make rom faster
This commit is contained in:
BIN
assets/a.out
Normal file
BIN
assets/a.out
Normal file
Binary file not shown.
13
assets/makerom.py
Normal file
13
assets/makerom.py
Normal file
@@ -0,0 +1,13 @@
|
||||
code = bytearray([
|
||||
0xa9, 0x42,
|
||||
0x8d, 0x00, 0x40,
|
||||
0xdb
|
||||
])
|
||||
|
||||
rom = code + bytearray([0xEA] * (1024 * 32 - len(code)))
|
||||
|
||||
rom[0x7FFC] = 0x00
|
||||
rom[0x7FFD] = 0x80
|
||||
|
||||
with open("rom.bin", "wb") as bin_file:
|
||||
bin_file.write(rom)
|
||||
BIN
assets/rom.bin
Normal file
BIN
assets/rom.bin
Normal file
Binary file not shown.
18
assets/test.S
Normal file
18
assets/test.S
Normal file
@@ -0,0 +1,18 @@
|
||||
.org 0x8000
|
||||
|
||||
reset:
|
||||
lda #0xff
|
||||
sta 0x6002
|
||||
|
||||
loop:
|
||||
lda #0x55
|
||||
sta 0x6000
|
||||
|
||||
lda #0xaa
|
||||
sta 0x6000
|
||||
|
||||
jmp reset
|
||||
|
||||
.org 0xfffc
|
||||
.word reset
|
||||
.word 0x0000
|
||||
Reference in New Issue
Block a user