1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2024-12-28 01:29:44 +00:00

Added 6522 VIA#1 and VIA#1 to CX16. #581

This commit is contained in:
Jesper Gravgaard 2020-12-14 13:33:10 +01:00
parent 0af602beb5
commit 205ce4eb6c
2 changed files with 23 additions and 0 deletions

View File

@ -3,6 +3,27 @@
// https://github.com/commanderx16/x16-docs/blob/master/Commander%20X16%20Programmer's%20Reference%20Guide.md
#include <cx16-vera.h>
#include <mos6522.h>
// The VIA#1: ROM/RAM Bank Control
// Port A Bits 0-7 RAM bank
// Port B Bits 0-2 ROM bank
// Port B Bits 3-7 [TBD]
struct MOS6522_VIA * const VIA1 = 0x9160;
// The VIA#2: Keyboard/Joy/Mouse
// Port A Bit 0 KBD PS/2 DAT
// Port A Bit 1 KBD PS/2 CLK
// Port A Bit 2 [TBD]
// Port A Bit 3 JOY1/2 LATCH
// Port A Bit 4 JOY1 DATA
// Port A Bit 5 JOY1/2 CLK
// Port A Bit 6 JOY2 DATA
// Port A Bit 7 [TBD]
// Port B Bit 0 MOUSE PS/2 DAT
// Port B Bit 1 MOUSE PS/2 CLK
// Port B Bits 2-7 [TBD]
// NOTE: The pin assignment of the NES/SNES controller is likely to change.
struct MOS6522_VIA * const VIA2 = 0x9070;
// Interrupt Vectors
// https://github.com/commanderx16/x16-emulator/wiki/(ASM-Programming)-Interrupts-and-interrupt-handling

View File

@ -394,11 +394,13 @@ Potential registers zp[1]:6 [ cnt ] : zp[1]:6 ,
REGISTER UPLIFT SCOPES
Uplift Scope [irq_zero] 353.5: zp[1]:3 [ irq_zero::i#2 irq_zero::i#1 ] 29.33: zp[1]:2 [ irq_zero::l#2 irq_zero::l#1 ]
Uplift Scope [] 0.71: zp[1]:6 [ cnt ] 0.59: zp[1]:4 [ hstart ] 0.44: zp[1]:5 [ hstop ]
Uplift Scope [MOS6522_VIA]
Uplift Scope [main]
Uplift Scope [__start]
Uplifting [irq_zero] best 2323 combination reg byte a [ irq_zero::i#2 irq_zero::i#1 ] reg byte x [ irq_zero::l#2 irq_zero::l#1 ]
Uplifting [] best 2323 combination zp[1]:6 [ cnt ] zp[1]:4 [ hstart ] zp[1]:5 [ hstop ]
Uplifting [MOS6522_VIA] best 2323 combination
Uplifting [main] best 2323 combination
Uplifting [__start] best 2323 combination
Attempting to uplift remaining variables inzp[1]:6 [ cnt ]