Skip to content

Commit

Permalink
fixup! address review concern (#184)
Browse files Browse the repository at this point in the history
  • Loading branch information
jroweboy authored Sep 7, 2023
1 parent 4a235b7 commit 1090959
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
5 changes: 1 addition & 4 deletions mos-platform/nes-action53/_prg-rom-banked.ld
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,8 @@ MEMORY {
prg_rom_0 : ORIGIN = __prg_rom_0_lma, LENGTH = __prg_rom_size >= 32 ? 0x4000 : 0
prg_rom_1 : ORIGIN = __prg_rom_1_lma, LENGTH = __prg_rom_size >= 64 ? 0x4000 : 0
prg_rom_2 : ORIGIN = __prg_rom_2_lma, LENGTH = __prg_rom_size >= 64 ? 0x4000 : 0
prg_rom_fixed : ORIGIN = __prg_rom_fixed_lma, LENGTH = 0x4000 - 0x32
prg_rom_fixed : ORIGIN = __prg_rom_fixed_lma, LENGTH = 0x4000 - 0x20

/* Reset stub for the fixed bank. */
reset_stub : ORIGIN = 0x10000 - 0x32, LENGTH = 0x12
/* Skip over the required loader space in $ffd0-$fff9 */
space_for_supervisor : ORIGIN = 0x10000 - 0x20, LENGTH = 0x1a
vectors : ORIGIN = 0x10000 - 0x6, LENGTH = 6
Expand All @@ -36,6 +34,5 @@ SECTIONS {
INCLUDE dpcm.ld

SECTIONS {
.reset_stub : { KEEP(*(.reset_stub)) } >reset_stub
.vectors : { KEEP(*(.vectors)) } >vectors
}
1 change: 0 additions & 1 deletion mos-platform/nes-action53/prg-rom.ld
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ OUTPUT_FORMAT {
FULL(prg_rom_1)
FULL(prg_rom_2)
FULL(prg_rom_fixed)
FULL(reset_stub)
FULL(space_for_supervisor)
FULL(vectors)
FULL(chr_rom)
Expand Down
9 changes: 6 additions & 3 deletions mos-platform/nes-action53/reset.s
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@

.section .reset_stub,"ax",@progbits
_reset_stub:
.section .prg_rom_fixed.reset_stub,"ax",@progbits
.weak reset_stub
.globl __reset_stub
reset_stub:
__reset_stub:
; Set the $81 register for the PRG outer bank so that we bank $8000
lda #$81
sta $5000
Expand All @@ -12,5 +15,5 @@ _reset_stub:

.section .vectors,"ax",@progbits
.short nmi
.short _reset_stub
.short reset_stub
.short irq

0 comments on commit 1090959

Please sign in to comment.