From: Alan Cox Date: Mon, 10 Nov 2014 21:53:08 +0000 (+0000) Subject: bootrom: Some corrections from Manuel Pazos X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=711675f473723fd8c21e908dfcb33416e82082e4;p=FUZIX.git bootrom: Some corrections from Manuel Pazos Plus some tidying of them to match the sdcc assembler Still doesn't work but its hopefully closer now --- diff --git a/Kernel/platform-msx1/bootrom.s b/Kernel/platform-msx1/bootrom.s index f7db4fc1..951b0c68 100644 --- a/Kernel/platform-msx1/bootrom.s +++ b/Kernel/platform-msx1/bootrom.s @@ -15,20 +15,55 @@ wtfami: di ld a, #':' out (0x2f), a +; Select RAM subslot in all pages + ld a,(0xffff) ; Subslot register + cpl + and #0xc0 ; RAM subslot (RAM in page 3) + ld e, a + rrca ; Propogate into other pages + rrca + or e + rrca + rrca + or e + rrca + rrca + or e + ld (0xffff),a ; All pages with the same subslot in a, (0xA8) ld d, a and #0x0C ; bits for 0x4000 ld b, a - rla - rla ; to 0x8000 + rlca + rlca ; to 0x8000 or b ; and 0x4000 - rla - rla ; to 0xC000/8000 + rlca + rlca ; to 0xC000/8000 or b ; and 0x4000 ld b, a ; B is now the bits for ; putting 48K of cartridge ; in place +; Select RAM in page 0 + ld a,d ; Page 3 must be RAM + and #0xc0 + rlca + rlca + or b ; Pages 3-1 = Cartridge, Page 0 = RAM out (0xA8), a ; Map cartridge + +; Select the subslot of the cartridge in pages 3, 2, 1 + ld a, (0xffff) + cpl + and #0x0C ; Cartridge in page 1 + ld c, a + rlca + rlca ; to 0x8000 + or c ; and 0x4000 + rlca + rlca ; to 0xC000/8000 + or c ; and 0x4000 + ld (0xffff), a ; Select the subslot of the cartridge + ld a, #3 out (0xFC), a ; Begin mapping RAM ld a, #'1' @@ -90,5 +125,6 @@ ramgo: ld a, #'!' out (0xA8), a ; Now go all ram jp 0x100 - ; Hack Hack FIXME - .ds 0x72 + ; Put start at 0x100 so we can boot the MSXDOS .com too + ; Hack + .ds 0x49