more work on Z80 support

This commit is contained in:
FeralChild64 committed 2020-12-30 18:08:31 +01:00
1 parent 3054a44e7c
commit 76f25a36e2
16 files changed
+763 -201

No files matched your search

+54 -1
View File
@@ -1,2 +1,55 @@
; XXX: move ALL table generation here, for some tables (DAA) use floor/ceiling RAM
;
; Z80 emulator - precalculated data generator
;
z80_table_gen:
jsr PRIMM
!pet $0D, "Generating CPU tables... "
!byte 0
;
; Generating: z80_atable_mi_bank0, z80_atable_hi_bank0
; Dependencies: NONE
;
ldx #$00
@loop_atable_bank0:
cpx #$E0
bcs @common_addr
; Memory area $0000-$DFFF - maps to $02000-$0FFFF - 56KB
lda #$04
sta z80_atable_hi_bank0, x
txa
clc
adc #$20
sta z80_atable_mi_bank0, x
@common_addr:
; Memory area $E000-$FFFF - maps to $4E000-$4FFFF - 8KB
lda #$04
sta z80_atable_hi_bank0, x
txa
sta z80_atable_mi_bank0, x
inx
bne @loop_atable_bank0
; XXX add more tables here
;
; The END
;
jsr PRIMM
!pet "done", $0D, $0D
!byte 0
rts