Skip to content

Commit

Permalink
Merge pull request #1126 from ra1fh/fix-for-new-romwbw-memory-layout
Browse files Browse the repository at this point in the history
rc2014: adapt to new RomWBW memory layout
  • Loading branch information
EtchedPixels authored Dec 26, 2024
2 parents f425f6f + b721e03 commit c1745ac
Showing 1 changed file with 27 additions and 4 deletions.
31 changes: 27 additions & 4 deletions Kernel/platform/platform-rc2014/boot-romwbw.s
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,10 @@ bootit:
ld hl,#0x8000 ; Don't copy first 256 bytes over
ld de,#0x4000
ld bc,#0x4000 ; We've loaded 0000-4000
ld a,#32
ld a,#40

di
out (MPGSEL_1),a ; Low bank at 0x4000 please
out (MPGSEL_1),a ; Bank 4 first 16K at 0x4000
ldir

;
Expand All @@ -102,8 +102,9 @@ bootit:
ld hl,#0x8000 ; Move it into place
ld de,#0x4000
ld bc,#0x4000
ld a,#33
out (MPGSEL_1),a ; Second kernel bank at 0x4000 please
ld a,#41
di
out (MPGSEL_1),a ; Bank 4 second 16K at 0x4000
ldir
pop bc

Expand Down Expand Up @@ -207,6 +208,28 @@ bootit:
out (MPGSEL_1),a
ldir

;
; Copy from bank 4 to bank 0
;
ld hl,#0x4000
ld de,#0x0000
ld bc,#0x4000
ld a,#40
out (MPGSEL_1),a
ld a,#32
out (MPGSEL_0),a
ldir

; page 41 to page 33
ld hl,#0x4000
ld de,#0x0000
ld bc,#0x4000
ld a,#41
out (MPGSEL_1),a
ld a,#33
out (MPGSEL_0),a
ldir

;
; Map the kernel low 16K block and jump into it
;
Expand Down

0 comments on commit c1745ac

Please sign in to comment.