Skip to content

Commit

Permalink
Renamed instructions_*.c -> i*.c. Should help with GitHub issue #364.
Browse files Browse the repository at this point in the history
  • Loading branch information
vhelin committed Oct 6, 2022
1 parent 12ec70a commit 580dc4f
Show file tree
Hide file tree
Showing 134 changed files with 542 additions and 1,468 deletions.
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ wla_[ab].tmp
*.exe

# Generated files
opcodes_*_tables.c
ins_tbl_gen/t*.c

# CMake files
/*[Bb]uild*/
Expand All @@ -43,8 +43,6 @@ ImportGenerators.cmake
*.tlog
*.VC.*
*.log


*.idb
*.pdb
*.ilk
Expand Down
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ foreach(ARCH IN LISTS ARCHS)
if((NOT CMAKE_CROSSCOMPILING) OR CMAKE_CROSSCOMPILING_EMULATOR)
add_executable(gen-${WLA_NAME}
"instruction_table_generator/main.c"
"instructions_${WLA_NAME}.c"
"i${WLA_NAME}.c"
)
set_property(TARGET gen-${WLA_NAME} APPEND
PROPERTY COMPILE_DEFINITIONS
Expand All @@ -163,7 +163,7 @@ foreach(ARCH IN LISTS ARCHS)
endif()
file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/ins_tbl_gen/")
set(TABLE_GEN_OUTPUT
"${CMAKE_CURRENT_BINARY_DIR}/ins_tbl_gen/instructions_${WLA_NAME}_tables.c")
"${CMAKE_CURRENT_BINARY_DIR}/ins_tbl_gen/t${WLA_NAME}.c")
add_custom_command(
OUTPUT "${TABLE_GEN_OUTPUT}"
COMMAND ${GEN_PREFIX}gen-${WLA_NAME}
Expand All @@ -173,7 +173,7 @@ foreach(ARCH IN LISTS ARCHS)
# Generate actual wla binary
add_executable(wla-${WLA_NAME}
${WLA_SRCS} "${TABLE_GEN_OUTPUT}"
"instructions_${WLA_NAME}.c"
"i${WLA_NAME}.c"
)
set_property(TARGET wla-${WLA_NAME} APPEND PROPERTY
COMPILE_DEFINITIONS "${COMPILE_DEF}")
Expand Down
112 changes: 56 additions & 56 deletions historical/amiga
Original file line number Diff line number Diff line change
Expand Up @@ -4,93 +4,93 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

copy makefiles/scoptions.000 to scoptions
sc define AMIGA=1 define GB=1 instructions_gb.c
sc define AMIGA=1 define Z80=1 instructions_z80.c
sc define AMIGA=1 define MCS6502=1 instructions_6502.c
sc define AMIGA=1 define WDC65C02=1 instructions_65c02.c
sc define AMIGA=1 define CSG65CE02=1 instructions_65ce02.c
sc define AMIGA=1 define MC6800=1 instructions_6800.c
sc define AMIGA=1 define MC6801=1 instructions_6801.c
sc define AMIGA=1 define MC6809=1 instructions_6809.c
sc define AMIGA=1 define I8008=1 instructions_8008.c
sc define AMIGA=1 define I8080=1 instructions_8080.c
sc define AMIGA=1 define W65816=1 instructions_65816.c
sc define AMIGA=1 define SPC700=1 instructions_spc700.c
sc define AMIGA=1 define HUC6280=1 instructions_huc6280.c
sc define AMIGA=1 define SUPERFX=1 instructions_superfx.c
sc define AMIGA=1 define GB=1 igb.c
sc define AMIGA=1 define Z80=1 iz80.c
sc define AMIGA=1 define MCS6502=1 i6502.c
sc define AMIGA=1 define WDC65C02=1 i65c02.c
sc define AMIGA=1 define CSG65CE02=1 i65ce02.c
sc define AMIGA=1 define MC6800=1 i6800.c
sc define AMIGA=1 define MC6801=1 i6801.c
sc define AMIGA=1 define MC6809=1 i6809.c
sc define AMIGA=1 define I8008=1 i8008.c
sc define AMIGA=1 define I8080=1 i8080.c
sc define AMIGA=1 define W65816=1 i65816.c
sc define AMIGA=1 define SPC700=1 ispc700.c
sc define AMIGA=1 define HUC6280=1 ihuc6280.c
sc define AMIGA=1 define SUPERFX=1 isuperfx.c

copy makefiles/scoptions.000 to instruction_table_generator/scoptions
cd instruction_table_generator

sc define AMIGA=1 define GB=1 main.c
slink FROM LIB:c.o main.o /instructions_gb.o TO instruction_table_generator LIB LIB:scm.lib LIB:sc.lib LIB:amiga.lib
instruction_table_generator /instructions_gb_tables.c
delete instruction_table_generator main.o /instructions_gb.o
slink FROM LIB:c.o main.o /igb.o TO instruction_table_generator LIB LIB:scm.lib LIB:sc.lib LIB:amiga.lib
instruction_table_generator /tgb.c
delete instruction_table_generator main.o /igb.o

sc define AMIGA=1 define Z80=1 main.c
slink FROM LIB:c.o main.o /instructions_z80.o TO instruction_table_generator LIB LIB:scm.lib LIB:sc.lib LIB:amiga.lib
instruction_table_generator /instructions_z80_tables.c
delete instruction_table_generator main.o /instructions_z80.o
slink FROM LIB:c.o main.o /iz80.o TO instruction_table_generator LIB LIB:scm.lib LIB:sc.lib LIB:amiga.lib
instruction_table_generator /tz80.c
delete instruction_table_generator main.o /iz80.o

sc define AMIGA=1 define MCS6502=1 main.c
slink FROM LIB:c.o main.o /instructions_6502.o TO instruction_table_generator LIB LIB:scm.lib LIB:sc.lib LIB:amiga.lib
instruction_table_generator /instructions_6502_tables.c
delete instruction_table_generator main.o /instructions_6502.o
slink FROM LIB:c.o main.o /i6502.o TO instruction_table_generator LIB LIB:scm.lib LIB:sc.lib LIB:amiga.lib
instruction_table_generator /t6502.c
delete instruction_table_generator main.o /i6502.o

sc define AMIGA=1 define WDC65C02=1 main.c
slink FROM LIB:c.o main.o /instructions_65c02.o TO instruction_table_generator LIB LIB:scm.lib LIB:sc.lib LIB:amiga.lib
instruction_table_generator /instructions_65c02_tables.c
delete instruction_table_generator main.o /instructions_65c02.o
slink FROM LIB:c.o main.o /i65c02.o TO instruction_table_generator LIB LIB:scm.lib LIB:sc.lib LIB:amiga.lib
instruction_table_generator /t65c02.c
delete instruction_table_generator main.o /i65c02.o

sc define AMIGA=1 define CSG65CE02=1 main.c
slink FROM LIB:c.o main.o /instructions_65ce02.o TO instruction_table_generator LIB LIB:scm.lib LIB:sc.lib LIB:amiga.lib
instruction_table_generator /instructions_65ce02_tables.c
delete instruction_table_generator main.o /instructions_65ce02.o
slink FROM LIB:c.o main.o /i65ce02.o TO instruction_table_generator LIB LIB:scm.lib LIB:sc.lib LIB:amiga.lib
instruction_table_generator /t65ce02.c
delete instruction_table_generator main.o /i65ce02.o

sc define AMIGA=1 define MC6800=1 main.c
slink FROM LIB:c.o main.o /instructions_6800.o TO instruction_table_generator LIB LIB:scm.lib LIB:sc.lib LIB:amiga.lib
instruction_table_generator /instructions_6800_tables.c
delete instruction_table_generator main.o /instructions_6800.o
slink FROM LIB:c.o main.o /i6800.o TO instruction_table_generator LIB LIB:scm.lib LIB:sc.lib LIB:amiga.lib
instruction_table_generator /t6800.c
delete instruction_table_generator main.o /i6800.o

sc define AMIGA=1 define MC6801=1 main.c
slink FROM LIB:c.o main.o /instructions_6801.o TO instruction_table_generator LIB LIB:scm.lib LIB:sc.lib LIB:amiga.lib
instruction_table_generator /instructions_6801_tables.c
delete instruction_table_generator main.o /instructions_6801.o
slink FROM LIB:c.o main.o /i6801.o TO instruction_table_generator LIB LIB:scm.lib LIB:sc.lib LIB:amiga.lib
instruction_table_generator /t6801.c
delete instruction_table_generator main.o /i6801.o

sc define AMIGA=1 define MC6809=1 main.c
slink FROM LIB:c.o main.o /instructions_6809.o TO instruction_table_generator LIB LIB:scm.lib LIB:sc.lib LIB:amiga.lib
instruction_table_generator /instructions_6809_tables.c
delete instruction_table_generator main.o /instructions_6809.o
slink FROM LIB:c.o main.o /i6809.o TO instruction_table_generator LIB LIB:scm.lib LIB:sc.lib LIB:amiga.lib
instruction_table_generator /t6809.c
delete instruction_table_generator main.o /i6809.o

sc define AMIGA=1 define I8008=1 main.c
slink FROM LIB:c.o main.o /instructions_8008.o TO instruction_table_generator LIB LIB:scm.lib LIB:sc.lib LIB:amiga.lib
instruction_table_generator /instructions_8008_tables.c
delete instruction_table_generator main.o /instructions_8008.o
slink FROM LIB:c.o main.o /i8008.o TO instruction_table_generator LIB LIB:scm.lib LIB:sc.lib LIB:amiga.lib
instruction_table_generator /t8008.c
delete instruction_table_generator main.o /i8008.o

sc define AMIGA=1 define I8080=1 main.c
slink FROM LIB:c.o main.o /instructions_8080.o TO instruction_table_generator LIB LIB:scm.lib LIB:sc.lib LIB:amiga.lib
instruction_table_generator /instructions_8080_tables.c
delete instruction_table_generator main.o /instructions_8080.o
slink FROM LIB:c.o main.o /i8080.o TO instruction_table_generator LIB LIB:scm.lib LIB:sc.lib LIB:amiga.lib
instruction_table_generator /t8080.c
delete instruction_table_generator main.o /i8080.o

sc define AMIGA=1 define W65816=1 main.c
slink FROM LIB:c.o main.o /instructions_65816.o TO instruction_table_generator LIB LIB:scm.lib LIB:sc.lib LIB:amiga.lib
instruction_table_generator /instructions_65816_tables.c
delete instruction_table_generator main.o /instructions_65816.o
slink FROM LIB:c.o main.o /i65816.o TO instruction_table_generator LIB LIB:scm.lib LIB:sc.lib LIB:amiga.lib
instruction_table_generator /t65816.c
delete instruction_table_generator main.o /i65816.o

sc define AMIGA=1 define SPC700=1 main.c
slink FROM LIB:c.o main.o /instructions_spc700.o TO instruction_table_generator LIB LIB:scm.lib LIB:sc.lib LIB:amiga.lib
instruction_table_generator /instructions_spc700_tables.c
delete instruction_table_generator main.o /instructions_spc700.o
slink FROM LIB:c.o main.o /ispc700.o TO instruction_table_generator LIB LIB:scm.lib LIB:sc.lib LIB:amiga.lib
instruction_table_generator /tspc700.c
delete instruction_table_generator main.o /ispc700.o

sc define AMIGA=1 define HUC6280=1 main.c
slink FROM LIB:c.o main.o /instructions_huc6280.o TO instruction_table_generator LIB LIB:scm.lib LIB:sc.lib LIB:amiga.lib
instruction_table_generator /instructions_huc6280_tables.c
delete instruction_table_generator main.o /instructions_huc6280.o
slink FROM LIB:c.o main.o /ihuc6280.o TO instruction_table_generator LIB LIB:scm.lib LIB:sc.lib LIB:amiga.lib
instruction_table_generator /thuc6280.c
delete instruction_table_generator main.o /ihuc6280.o

sc define AMIGA=1 define SUPERFX=1 main.c
slink FROM LIB:c.o main.o /instructions_superfx.o TO instruction_table_generator LIB LIB:scm.lib LIB:sc.lib LIB:amiga.lib
instruction_table_generator /instructions_superfx_tables.c
delete instruction_table_generator main.o /instructions_superfx.o
slink FROM LIB:c.o main.o /isuperfx.o TO instruction_table_generator LIB LIB:scm.lib LIB:sc.lib LIB:amiga.lib
instruction_table_generator /tsuperfx.c
delete instruction_table_generator main.o /isuperfx.o

cd /

Expand Down
4 changes: 2 additions & 2 deletions historical/makefile_generator/gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,8 @@ def generate(cpu, new_line, template):
'include.h',
'printf.h',
],
'instructions_' + cpu['name'] + '_tables.c': [],
'instructions_' + cpu['name'] + '.c': [],
't' + cpu['name'] + '.c': [],
'i' + cpu['name'] + '.c': [],
}

# It's possible that an header such as defines.h includes other headers.
Expand Down
14 changes: 7 additions & 7 deletions historical/makefiles/makefile.amiga.6502
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ LD=gcc
CFLAGS= -c -O3 -ansi -pedantic -Wall -DUNIX -DMCS6502
LDFLAGS = -lm

OFILES = main.o crc32.o decode.o hashmap.o include.o listfile.o mersenne.o parse.o pass_1.o pass_2.o pass_3.o pass_4.o printf.o stack.o instructions_6502_tables.o instructions_6502.o
OFILES = main.o crc32.o decode.o hashmap.o include.o listfile.o mersenne.o parse.o pass_1.o pass_2.o pass_3.o pass_4.o printf.o stack.o t6502.o i6502.o


all: $(OFILES) makefile
Expand All @@ -25,15 +25,12 @@ decode.o: decode.c decode.h parse.h pass_1.h printf.h stack.h
hashmap.o: hashmap.c hashmap.h crc32.h
$(CC) $(CFLAGS) hashmap.c

i6502.o: i6502.c
$(CC) $(CFLAGS) i6502.c

include.o: include.c include.h crc32.h defines.h hashmap.h shared.h parse.h pass_1.h printf.h
$(CC) $(CFLAGS) include.c

instructions_6502.o: instructions_6502.c
$(CC) $(CFLAGS) instructions_6502.c

instructions_6502_tables.o: instructions_6502_tables.c
$(CC) $(CFLAGS) instructions_6502_tables.c

listfile.o: listfile.c listfile.h defines.h hashmap.h shared.h include.h
$(CC) $(CFLAGS) listfile.c

Expand Down Expand Up @@ -64,6 +61,9 @@ printf.o: printf.c printf.h
stack.o: stack.c stack.h defines.h hashmap.h shared.h hashmap.h parse.h pass_1.h include.h printf.h
$(CC) $(CFLAGS) stack.c

t6502.o: t6502.c
$(CC) $(CFLAGS) t6502.c


clean:
delete $(OFILES) >nil:
Expand Down
14 changes: 7 additions & 7 deletions historical/makefiles/makefile.amiga.65816
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ LD=gcc
CFLAGS= -c -O3 -ansi -pedantic -Wall -DUNIX -DW65816
LDFLAGS = -lm

OFILES = main.o crc32.o decode.o hashmap.o include.o listfile.o mersenne.o parse.o pass_1.o pass_2.o pass_3.o pass_4.o printf.o stack.o instructions_65816_tables.o instructions_65816.o
OFILES = main.o crc32.o decode.o hashmap.o include.o listfile.o mersenne.o parse.o pass_1.o pass_2.o pass_3.o pass_4.o printf.o stack.o t65816.o i65816.o


all: $(OFILES) makefile
Expand All @@ -25,15 +25,12 @@ decode.o: decode.c decode.h parse.h pass_1.h printf.h stack.h
hashmap.o: hashmap.c hashmap.h crc32.h
$(CC) $(CFLAGS) hashmap.c

i65816.o: i65816.c
$(CC) $(CFLAGS) i65816.c

include.o: include.c include.h crc32.h defines.h hashmap.h shared.h parse.h pass_1.h printf.h
$(CC) $(CFLAGS) include.c

instructions_65816.o: instructions_65816.c
$(CC) $(CFLAGS) instructions_65816.c

instructions_65816_tables.o: instructions_65816_tables.c
$(CC) $(CFLAGS) instructions_65816_tables.c

listfile.o: listfile.c listfile.h defines.h hashmap.h shared.h include.h
$(CC) $(CFLAGS) listfile.c

Expand Down Expand Up @@ -64,6 +61,9 @@ printf.o: printf.c printf.h
stack.o: stack.c stack.h defines.h hashmap.h shared.h hashmap.h parse.h pass_1.h include.h printf.h
$(CC) $(CFLAGS) stack.c

t65816.o: t65816.c
$(CC) $(CFLAGS) t65816.c


clean:
delete $(OFILES) >nil:
Expand Down
14 changes: 7 additions & 7 deletions historical/makefiles/makefile.amiga.65c02
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ LD=gcc
CFLAGS= -c -O3 -ansi -pedantic -Wall -DUNIX -DWDC65C02
LDFLAGS = -lm

OFILES = main.o crc32.o decode.o hashmap.o include.o listfile.o mersenne.o parse.o pass_1.o pass_2.o pass_3.o pass_4.o printf.o stack.o instructions_65c02_tables.o instructions_65c02.o
OFILES = main.o crc32.o decode.o hashmap.o include.o listfile.o mersenne.o parse.o pass_1.o pass_2.o pass_3.o pass_4.o printf.o stack.o t65c02.o i65c02.o


all: $(OFILES) makefile
Expand All @@ -25,15 +25,12 @@ decode.o: decode.c decode.h parse.h pass_1.h printf.h stack.h
hashmap.o: hashmap.c hashmap.h crc32.h
$(CC) $(CFLAGS) hashmap.c

i65c02.o: i65c02.c
$(CC) $(CFLAGS) i65c02.c

include.o: include.c include.h crc32.h defines.h hashmap.h shared.h parse.h pass_1.h printf.h
$(CC) $(CFLAGS) include.c

instructions_65c02.o: instructions_65c02.c
$(CC) $(CFLAGS) instructions_65c02.c

instructions_65c02_tables.o: instructions_65c02_tables.c
$(CC) $(CFLAGS) instructions_65c02_tables.c

listfile.o: listfile.c listfile.h defines.h hashmap.h shared.h include.h
$(CC) $(CFLAGS) listfile.c

Expand Down Expand Up @@ -64,6 +61,9 @@ printf.o: printf.c printf.h
stack.o: stack.c stack.h defines.h hashmap.h shared.h hashmap.h parse.h pass_1.h include.h printf.h
$(CC) $(CFLAGS) stack.c

t65c02.o: t65c02.c
$(CC) $(CFLAGS) t65c02.c


clean:
delete $(OFILES) >nil:
Expand Down
14 changes: 7 additions & 7 deletions historical/makefiles/makefile.amiga.65ce02
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ LD=gcc
CFLAGS= -c -O3 -ansi -pedantic -Wall -DUNIX -DCSG65CE02
LDFLAGS = -lm

OFILES = main.o crc32.o decode.o hashmap.o include.o listfile.o mersenne.o parse.o pass_1.o pass_2.o pass_3.o pass_4.o printf.o stack.o instructions_65ce02_tables.o instructions_65ce02.o
OFILES = main.o crc32.o decode.o hashmap.o include.o listfile.o mersenne.o parse.o pass_1.o pass_2.o pass_3.o pass_4.o printf.o stack.o t65ce02.o i65ce02.o


all: $(OFILES) makefile
Expand All @@ -25,15 +25,12 @@ decode.o: decode.c decode.h parse.h pass_1.h printf.h stack.h
hashmap.o: hashmap.c hashmap.h crc32.h
$(CC) $(CFLAGS) hashmap.c

i65ce02.o: i65ce02.c
$(CC) $(CFLAGS) i65ce02.c

include.o: include.c include.h crc32.h defines.h hashmap.h shared.h parse.h pass_1.h printf.h
$(CC) $(CFLAGS) include.c

instructions_65ce02.o: instructions_65ce02.c
$(CC) $(CFLAGS) instructions_65ce02.c

instructions_65ce02_tables.o: instructions_65ce02_tables.c
$(CC) $(CFLAGS) instructions_65ce02_tables.c

listfile.o: listfile.c listfile.h defines.h hashmap.h shared.h include.h
$(CC) $(CFLAGS) listfile.c

Expand Down Expand Up @@ -64,6 +61,9 @@ printf.o: printf.c printf.h
stack.o: stack.c stack.h defines.h hashmap.h shared.h hashmap.h parse.h pass_1.h include.h printf.h
$(CC) $(CFLAGS) stack.c

t65ce02.o: t65ce02.c
$(CC) $(CFLAGS) t65ce02.c


clean:
delete $(OFILES) >nil:
Expand Down
14 changes: 7 additions & 7 deletions historical/makefiles/makefile.amiga.6800
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ LD=gcc
CFLAGS= -c -O3 -ansi -pedantic -Wall -DUNIX -DMC6800
LDFLAGS = -lm

OFILES = main.o crc32.o decode.o hashmap.o include.o listfile.o mersenne.o parse.o pass_1.o pass_2.o pass_3.o pass_4.o printf.o stack.o instructions_6800_tables.o instructions_6800.o
OFILES = main.o crc32.o decode.o hashmap.o include.o listfile.o mersenne.o parse.o pass_1.o pass_2.o pass_3.o pass_4.o printf.o stack.o t6800.o i6800.o


all: $(OFILES) makefile
Expand All @@ -25,15 +25,12 @@ decode.o: decode.c decode.h parse.h pass_1.h printf.h stack.h
hashmap.o: hashmap.c hashmap.h crc32.h
$(CC) $(CFLAGS) hashmap.c

i6800.o: i6800.c
$(CC) $(CFLAGS) i6800.c

include.o: include.c include.h crc32.h defines.h hashmap.h shared.h parse.h pass_1.h printf.h
$(CC) $(CFLAGS) include.c

instructions_6800.o: instructions_6800.c
$(CC) $(CFLAGS) instructions_6800.c

instructions_6800_tables.o: instructions_6800_tables.c
$(CC) $(CFLAGS) instructions_6800_tables.c

listfile.o: listfile.c listfile.h defines.h hashmap.h shared.h include.h
$(CC) $(CFLAGS) listfile.c

Expand Down Expand Up @@ -64,6 +61,9 @@ printf.o: printf.c printf.h
stack.o: stack.c stack.h defines.h hashmap.h shared.h hashmap.h parse.h pass_1.h include.h printf.h
$(CC) $(CFLAGS) stack.c

t6800.o: t6800.c
$(CC) $(CFLAGS) t6800.c


clean:
delete $(OFILES) >nil:
Expand Down

0 comments on commit 580dc4f

Please sign in to comment.