Skip to content

Commit

Permalink
Correct pce immediate relocations
Browse files Browse the repository at this point in the history
  • Loading branch information
mysterymath committed Nov 10, 2023
1 parent 4c6e9a5 commit d940ff8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion mos-platform/pce-cd/libpce/include/pce/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ extern "C" {

#define __PCE_RAM_BANK_USE(id, offset) \
static inline void pce_ram_bank##id##_map(void) { \
__attribute__((leaf)) asm volatile("lda #mos8(__ram_bank" #id "_bank)\n" \
__attribute__((leaf)) asm volatile("lda #__ram_bank" #id "_bank\n" \
"tam #(1 << " #offset ")\n" \
: \
: \
Expand Down
2 changes: 1 addition & 1 deletion mos-platform/pce-common/libpce/include/pce/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ extern "C" {

#define __PCE_ROM_BANK_USE(id, offset) \
static inline void pce_rom_bank##id##_map(void) { \
__attribute__((leaf)) asm volatile("lda #mos8(__rom_bank" #id "_bank)\n" \
__attribute__((leaf)) asm volatile("lda #__rom_bank" #id "_bank\n" \
"tam #(1 << " #offset ")\n" \
: \
: \
Expand Down
10 changes: 5 additions & 5 deletions mos-platform/pce/crt0/crt0.S
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ _early_start:
txs
lda #$f8 ; bank 1 = 0xF8 (RAM)
tam #$02
lda #mos8(__start_bank_2)
lda #__start_bank_2
tam #$04
lda #mos8(__start_bank_3)
lda #__start_bank_3
tam #$08
lda #mos8(__start_bank_4)
lda #__start_bank_4
tam #$10
lda #mos8(__start_bank_5)
lda #__start_bank_5
tam #$20
lda #mos8(__start_bank_6)
lda #__start_bank_6
tam #$40
; Jump to the real start routine, now that banks are set up.
jmp _start
Expand Down

0 comments on commit d940ff8

Please sign in to comment.