for Mega65 disable the extended stack on cold/warm restart

This commit is contained in:
FeralChild64 committed 2020-05-30 15:44:06 +02:00
1 parent 3476aed277
commit 3eb7d4ffbd
3 files changed
+22 -5

No files matched your search

+5
View File
@@ -69,6 +69,11 @@
#if HAS_OPCODES_65CE02
// CPU flags support
.pseudocommand cle { .byte $02 }
.pseudocommand see { .byte $03 }
// .B register support
.pseudocommand tab { .byte $5B }
+9 -3
View File
@@ -11,10 +11,16 @@ hw_entry_reset:
// The GPL program at https://github.com/Klaus2m5/6502_65C02_functional_tests/blob/master/6502_functional_test.a65
// uses the similar initial reset sequence, affirmed by c64 PRG p269
sei // disable the interrupts, as fast as possible - they are disabled in case of HW reset,
// but this routine can be also called manually
sei // disable the interrupts, as fast as possible - they are disabled in case of HW reset,
// but this routine can be also called manually
cld // required for all CPUs - due to possibility of manual call
cld // required for all CPUs - due to possibility of manual call
#if HAS_OPCODES_65CE02
see // disable extended stack
#endif
ldx #$FF
txs
@@ -12,11 +12,17 @@ default_brk_handler:
#if CONFIG_PLATFORM_COMMODORE_64
ldx #$00
sta VIC_SCROLX // turn the display off - we want as little screen artifacts as possible
sta VIC_SCROLX // turn the display off - we want as little screen artifacts as possible
#endif
cld // make sure this dangerous flag is disabled
cld // make sure this dangerous flag is disabled
#if HAS_OPCODES_65CE02
see // disable extended stack
#endif
jsr JRESTOR
jsr JIOINIT