mirror of
https://github.com/thornAvery/kep-hack.git
synced 2026-02-06 15:45:24 +13:00
big update after strip
hg-commit-id: dcfb20faef4d
This commit is contained in:
parent
443ff15688
commit
6fd6c7af46
17 changed files with 428 additions and 91 deletions
|
|
@ -1,4 +1,4 @@
|
|||
#include "console.h"
|
||||
#include "Console.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ public:
|
|||
// Custom Functions
|
||||
std::string LookupDutyString();
|
||||
|
||||
const enum dutyList : unsigned char
|
||||
enum dutyList : unsigned char
|
||||
{
|
||||
duty12_5 = 0x0,
|
||||
duty25 = 0x1,
|
||||
|
|
|
|||
65
music/pokeredmusicdisasm/Makefile
Normal file
65
music/pokeredmusicdisasm/Makefile
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
|
||||
OBJECTS = main.o Jump.o Modulation.o Note.o Octave.o Parser.o Stop.o \
|
||||
Tempo.o UnkCode.o UnkEB.o Velocity.o Volume.o Console.o AbstractData.o Call.o \
|
||||
Duty.o
|
||||
|
||||
CC = g++
|
||||
CFLAGS = -std=c++0x
|
||||
|
||||
pokeredmusicdisasm: $(OBJECTS)
|
||||
$(CC) $(CFLAGS) $(OBJECTS) -o "../../extras/pokeredmusicdisasm.exe"
|
||||
|
||||
Parser.o: Jump.h Modulation.h Note.h Octave.h Parser.h Stop.h \
|
||||
Tempo.h UnkCode.h UnkEB.h Velocity.h Volume.h
|
||||
$(CC) $(CFLAGS) -c main.cpp Jump.cpp Modulation.cpp \
|
||||
Note.cpp Octave.cpp Parser.cpp Stop.cpp Tempo.cpp UnkCode.cpp UnkEB.cpp \
|
||||
Velocity.cpp Volume.cpp
|
||||
|
||||
Duty.o: Duty.h AbstractData.h
|
||||
$(CC) $(CFLAGS) -c Duty.cpp AbstractData.cpp
|
||||
|
||||
Console.o: Console.h
|
||||
$(CC) $(CFLAGS) -c Console.cpp
|
||||
|
||||
AbstractData.o: AbstractData.h
|
||||
$(CC) $(CFLAGS) -c AbstractData.cpp
|
||||
|
||||
Call.o: Call.h Call.cpp AbstractData.h
|
||||
$(CC) $(CFLAGS) -c Call.cpp AbstractData.cpp
|
||||
|
||||
main.o: main.cpp Console.h Parser.h
|
||||
$(CC) $(CFLAGS) -c main.cpp Console.cpp Parser.cpp
|
||||
|
||||
Jump.o: Jump.h AbstractData.h
|
||||
$(CC) $(CFLAGS) -c Jump.cpp AbstractData.cpp
|
||||
|
||||
Modulation.o: Modulation.h AbstractData.h
|
||||
$(CC) $(CFLAGS) -c Modulation.cpp AbstractData.cpp
|
||||
|
||||
Note.o: Note.h AbstractData.h
|
||||
$(CC) $(CFLAGS) -c Note.cpp AbstractData.cpp
|
||||
|
||||
Octave.o: Octave.h AbstractData.h
|
||||
$(CC) $(CFLAGS) -c Octave.cpp AbstractData.cpp
|
||||
|
||||
Stop.o: Stop.h AbstractData.h
|
||||
$(CC) $(CFLAGS) -c Stop.cpp AbstractData.cpp
|
||||
|
||||
Tempo.o: Tempo.h AbstractData.h
|
||||
$(CC) $(CFLAGS) -c Tempo.cpp AbstractData.cpp
|
||||
|
||||
UnkCode.o: UnkCode.h AbstractData.h
|
||||
$(CC) $(CFLAGS) -c UnkCode.cpp AbstractData.cpp
|
||||
|
||||
UnkEB.o: UnkEB.h AbstractData.h
|
||||
$(CC) $(CFLAGS) -c UnkEB.cpp AbstractData.cpp
|
||||
|
||||
Velocity.o: Velocity.h AbstractData.h
|
||||
$(CC) $(CFLAGS) -c Velocity.cpp AbstractData.cpp
|
||||
|
||||
Volume.o: Volume.h AbstractData.h
|
||||
$(CC) $(CFLAGS) -c Volume.cpp AbstractData.cpp
|
||||
|
||||
clean:
|
||||
rm *.o
|
||||
rm ../../extras/pokeredmusicdisasm.exe
|
||||
|
|
@ -29,42 +29,42 @@ public:
|
|||
std::string LookupPitchStr();
|
||||
std::string LookupDelayStr();
|
||||
|
||||
const enum pitch_code : unsigned char
|
||||
{
|
||||
noteC = 0x0,
|
||||
noteCS = 0x1,
|
||||
noteD = 0x2,
|
||||
noteDS = 0x3,
|
||||
noteE = 0x4,
|
||||
noteF = 0x5,
|
||||
noteFS = 0x6,
|
||||
noteG = 0x7,
|
||||
noteGS = 0x8,
|
||||
noteA = 0x9,
|
||||
noteAS = 0xA,
|
||||
noteB = 0xB,
|
||||
noteRst = 0xC
|
||||
};
|
||||
enum pitch_code : unsigned char
|
||||
{
|
||||
noteC = 0x0,
|
||||
noteCS = 0x1,
|
||||
noteD = 0x2,
|
||||
noteDS = 0x3,
|
||||
noteE = 0x4,
|
||||
noteF = 0x5,
|
||||
noteFS = 0x6,
|
||||
noteG = 0x7,
|
||||
noteGS = 0x8,
|
||||
noteA = 0x9,
|
||||
noteAS = 0xA,
|
||||
noteB = 0xB,
|
||||
noteRst = 0xC
|
||||
};
|
||||
|
||||
const enum delay_code : unsigned char
|
||||
{
|
||||
note16 = 0x0,
|
||||
note8 = 0x1,
|
||||
note8_16 = 0x2,
|
||||
note4 = 0x3,
|
||||
note4_16 = 0x4,
|
||||
note4_8 = 0x5,
|
||||
note4_8_16 = 0x6,
|
||||
note2 = 0x7,
|
||||
note2_16 = 0x8,
|
||||
note2_8 = 0x9,
|
||||
note2_8_16 = 0xA,
|
||||
note2_4 = 0xB,
|
||||
note2_4_16 = 0xC,
|
||||
note2_4_8 = 0xD,
|
||||
note2_4_8_16 = 0xE,
|
||||
note1 = 0xF
|
||||
};
|
||||
enum delay_code : unsigned char
|
||||
{
|
||||
note16 = 0x0,
|
||||
note8 = 0x1,
|
||||
note8_16 = 0x2,
|
||||
note4 = 0x3,
|
||||
note4_16 = 0x4,
|
||||
note4_8 = 0x5,
|
||||
note4_8_16 = 0x6,
|
||||
note2 = 0x7,
|
||||
note2_16 = 0x8,
|
||||
note2_8 = 0x9,
|
||||
note2_8_16 = 0xA,
|
||||
note2_4 = 0xB,
|
||||
note2_4_16 = 0xC,
|
||||
note2_4_8 = 0xD,
|
||||
note2_4_8_16 = 0xE,
|
||||
note1 = 0xF
|
||||
};
|
||||
private:
|
||||
unsigned char pitch;
|
||||
unsigned char delay;
|
||||
|
|
|
|||
|
|
@ -24,17 +24,17 @@ public:
|
|||
|
||||
std::string LookupOctString();
|
||||
|
||||
const enum OctaveCode : unsigned char
|
||||
{
|
||||
oct0 = 0xE7,
|
||||
oct1 = 0xE6,
|
||||
oct2 = 0xE5,
|
||||
oct3 = 0xE4,
|
||||
oct4 = 0xE3,
|
||||
oct5 = 0xE2,
|
||||
oct6 = 0xE1,
|
||||
oct7 = 0xE0,
|
||||
};
|
||||
enum OctaveCode : unsigned char
|
||||
{
|
||||
oct0 = 0xE7,
|
||||
oct1 = 0xE6,
|
||||
oct2 = 0xE5,
|
||||
oct3 = 0xE4,
|
||||
oct4 = 0xE3,
|
||||
oct5 = 0xE2,
|
||||
oct6 = 0xE1,
|
||||
oct7 = 0xE0
|
||||
};
|
||||
|
||||
private:
|
||||
unsigned char octave;
|
||||
|
|
|
|||
|
|
@ -54,22 +54,22 @@ public:
|
|||
template<class T>
|
||||
bool ParseData(unsigned int& pos, bool reado = false);
|
||||
|
||||
const enum dataType : unsigned char
|
||||
{
|
||||
DATA_NA,
|
||||
DATA_CALL,
|
||||
DATA_DUTY,
|
||||
DATA_JUMP,
|
||||
DATA_MODULATION,
|
||||
DATA_NOTE,
|
||||
DATA_OCTAVE,
|
||||
DATA_STOP,
|
||||
DATA_TEMPO,
|
||||
DATA_UNKCODE,
|
||||
DATA_UNKEB,
|
||||
DATA_VELOCITY,
|
||||
DATA_VOLUME
|
||||
};
|
||||
enum dataType : unsigned char
|
||||
{
|
||||
DATA_NA,
|
||||
DATA_CALL,
|
||||
DATA_DUTY,
|
||||
DATA_JUMP,
|
||||
DATA_MODULATION,
|
||||
DATA_NOTE,
|
||||
DATA_OCTAVE,
|
||||
DATA_STOP,
|
||||
DATA_TEMPO,
|
||||
DATA_UNKCODE,
|
||||
DATA_UNKEB,
|
||||
DATA_VELOCITY,
|
||||
DATA_VOLUME
|
||||
};
|
||||
|
||||
private:
|
||||
std::string filename;
|
||||
|
|
|
|||
22
music/pokeredmusicdisasm/README.txt
Normal file
22
music/pokeredmusicdisasm/README.txt
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
to compile you must have g++ installed
|
||||
type: make
|
||||
and it will install to the extras folder
|
||||
|
||||
if you want to unmake
|
||||
type: make clean
|
||||
and it will remove make objects and the executable
|
||||
|
||||
the program usage is: pokeredmusicdisasm [<offset> [<file> | --] [--stop]
|
||||
offset is the rom offset in hexidecimal (FFFF or 0xFFFF)
|
||||
file is the rom file, you can use -- for "../baserom.gbc"
|
||||
--stop is the hexidecimal stop number
|
||||
|
||||
to make things quick and easy you can just enter the hexidecimal offset
|
||||
pokeredmusicdisasm <offset>
|
||||
|
||||
to use the stop parameter you must use it as the 3rd argument as below
|
||||
pokeredmusicdisasm <offset> -- --stop=FFFF
|
||||
pokeredmusicdisasm <offset> <file> --stop=FFFF
|
||||
|
||||
you may enter limited interactive mode by not supplying any arguments
|
||||
pokeredmusicdisasm
|
||||
|
|
@ -27,7 +27,7 @@ bool Stop::IsValid(unsigned char* byte)
|
|||
string Stop::GenAsm()
|
||||
{
|
||||
string tmpRet = AbstractData::GenAsm();
|
||||
if(tmpRet != "") return false;
|
||||
if(tmpRet != "") return tmpRet;
|
||||
|
||||
stringstream tmpAsmOut;
|
||||
tmpAsmOut << "mus_end";
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ bool Tempo::IsValid(unsigned char* byte)
|
|||
string Tempo::GenAsm()
|
||||
{
|
||||
string tmpRet = AbstractData::GenAsm();
|
||||
if(tmpRet != "") return false;
|
||||
if(tmpRet != "") return tmpRet;
|
||||
|
||||
stringstream tmpAsmOut;
|
||||
tmpAsmOut << "mus_tempo" << " " << (short)divider << ", " << (short)modifier;
|
||||
|
|
|
|||
|
|
@ -1,16 +1,4 @@
|
|||
#include <sstream>
|
||||
|
||||
#include "Call.h"
|
||||
#include "Duty.h"
|
||||
#include "Jump.h"
|
||||
#include "Modulation.h"
|
||||
#include "Note.h"
|
||||
#include "Octave.h"
|
||||
#include "Stop.h"
|
||||
#include "Tempo.h"
|
||||
#include "Velocity.h"
|
||||
#include "Volume.h"
|
||||
|
||||
#include "UnkCode.h"
|
||||
|
||||
using namespace std;
|
||||
|
|
|
|||
|
|
@ -1,16 +1,4 @@
|
|||
#include <sstream>
|
||||
|
||||
#include "Call.h"
|
||||
#include "Duty.h"
|
||||
#include "Jump.h"
|
||||
#include "Modulation.h"
|
||||
#include "Note.h"
|
||||
#include "Octave.h"
|
||||
#include "Stop.h"
|
||||
#include "Tempo.h"
|
||||
#include "Velocity.h"
|
||||
#include "Volume.h"
|
||||
|
||||
#include "UnkEB.h"
|
||||
|
||||
using namespace std;
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ bool Volume::IsValid(unsigned char* byte)
|
|||
string Volume::GenAsm()
|
||||
{
|
||||
string tmpRet = AbstractData::GenAsm();
|
||||
if(tmpRet != "") return false;
|
||||
if(tmpRet != "") return tmpRet;
|
||||
|
||||
stringstream tmpAsmOut;
|
||||
tmpAsmOut << "mus_volume" << " " << (short)volume;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue