Restructure project, build 4K, 8K, 16K and 32K memtest variants
This commit is contained in:
parent
af0462d2fe
commit
4badfa381f
5 changed files with 22 additions and 22 deletions
5
.gitignore
vendored
5
.gitignore
vendored
|
@ -1,4 +1,3 @@
|
|||
emu6502
|
||||
*.o65
|
||||
*.bin
|
||||
*.map
|
||||
out
|
||||
tmp
|
37
Makefile
37
Makefile
|
@ -1,25 +1,26 @@
|
|||
|
||||
.PHONY: all memtest-f000.901465.bin memtest-f000.901465.o65 ascii memtest-f000.901465+ascii.o65 emu5602
|
||||
.PHONY: all memtest6502 emu5602
|
||||
|
||||
all: memtest-f000.901465.bin ascii emu5602
|
||||
all: memtest6502 emu5602
|
||||
|
||||
clean:
|
||||
rm -f memtest-f000.901465.bin memtest-f000.901465.o65 memtest-f000.901465.map
|
||||
rm -f memtest-f000.901465+ascii.bin memtest-f000.901465+ascii.o65 memtest-f000.901465+ascii.map
|
||||
rm -f emu6502
|
||||
rm -rf tmp out
|
||||
|
||||
memtest-f000.901465.bin: memtest-f000.901465.o65
|
||||
dd if=memtest-f000.901465.o65 bs=1 skip=2 of=memtest-f000.901465.bin
|
||||
memtest6502:
|
||||
mkdir -p tmp out
|
||||
xa '-D_MEMEND=$$8000' -M -A F000 -O PETSCREEN -c -C -v -o tmp/memtest32k-f000.o65 src/memtest6502.asm
|
||||
dd if=tmp/memtest32k-f000.o65 bs=1 skip=2 of=out/memtest32k-f000.901465.bin
|
||||
xa '-D_MEMEND=$$4000' -M -A F000 -O PETSCREEN -c -C -v -o tmp/memtest16k-f000.o65 src/memtest6502.asm
|
||||
dd if=tmp/memtest16k-f000.o65 bs=1 skip=2 of=out/memtest16k-f000.901465.bin
|
||||
xa '-D_MEMEND=$$2000' -M -A F000 -O PETSCREEN -c -C -v -o tmp/memtest8k-f000.o65 src/memtest6502.asm
|
||||
dd if=tmp/memtest8k-f000.o65 bs=1 skip=2 of=out/memtest8k-f000.901465.bin
|
||||
xa '-D_MEMEND=$$1000' -M -A F000 -O PETSCREEN -c -C -v -o tmp/memtest4k-f000.o65 src/memtest6502.asm
|
||||
dd if=tmp/memtest4k-f000.o65 bs=1 skip=2 of=out/memtest4k-f000.901465.bin
|
||||
# Test image for the emulator built with ASCII charset instead of PETSCII
|
||||
xa '-D_MEMEND=$$1000' -M -A F000 -O ASCII -c -C -v -l tmp/memtest4k-f000-ascii.map -o tmp/memtest4k-f000-ascii.o65 src/memtest6502.asm
|
||||
dd if=tmp/memtest4k-f000-ascii.o65 bs=1 skip=2 of=out/memtest4k-f000-ascii.emu6502.bin
|
||||
|
||||
memtest-f000.901465.o65:
|
||||
xa -M -A F000 -O PETSCREEN -c -C -v -l memtest-f000.901465.map -o memtest-f000.901465.o65 memtest-f000.901465.asm
|
||||
emu5602: memtest6502
|
||||
# _END is set to the address of the last instruction s.t. the emulator knows when to terminate
|
||||
gcc -D_END=$$(cat tmp/memtest4k-f000-ascii.map | grep ^done, | cut -d, -f2 | tr -d ' ,') -o out/emu6502 src/emu6502.c src/fake6502.c
|
||||
|
||||
ascii: memtest-f000.901465+ascii.o65
|
||||
dd if=memtest-f000.901465+ascii.o65 bs=1 skip=2 of=memtest-f000.901465+ascii.bin
|
||||
|
||||
memtest-f000.901465+ascii.o65:
|
||||
xa -M '-D_MEMEND=$$1000' -A F000 -O ASCII -c -C -v -l memtest-f000.901465+ascii.map -o memtest-f000.901465+ascii.o65 memtest-f000.901465.asm
|
||||
|
||||
|
||||
emu5602:
|
||||
gcc -D_END=$$(cat memtest-f000.901465+ascii.map | grep ^done, | cut -d, -f2 | tr -d ' ,') -o emu6502 emu6502.c fake6502.c
|
||||
|
|
|
@ -67,7 +67,7 @@ int main() {
|
|||
ram = (uint8_t*) malloc(RAMSIZE);
|
||||
screen = (uint8_t*) malloc(0x400);
|
||||
memset(screen, 'X', 0x400);
|
||||
int ffd = open("memtest-f000.901465+ascii.bin", O_RDONLY);
|
||||
int ffd = open("out/memtest4k-f000-ascii.emu6502.bin", O_RDONLY);
|
||||
f000 = mmap(0, 0x1000, PROT_READ, MAP_PRIVATE, ffd, 0);
|
||||
|
||||
reset6502();
|
Loading…
Reference in a new issue