Browse Source
Merge pull request #647 from b3rendsh/master
Update loader for MSX
pull/652/head
v3.6.0-dev.51
Wayne Warthen
3 weeks ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
20 additions and
1 deletions
-
Source/MSX/msx-ldr.asm
|
|
|
@ -17,11 +17,21 @@ P2_SEG .equ $f2c9 ; current segment page 2 (MSX-DOS 2) |
|
|
|
CSRSW .equ $fca9 ; cursor on/off flag |
|
|
|
MNROM .equ $fcc1 ; main system rom slot |
|
|
|
H_TIMI .equ $fd9f ; timer interrupt hook (vdp vsync) |
|
|
|
HB_IDENT .equ $fffc ; pointer to HBIOS ident data block |
|
|
|
|
|
|
|
; ------------------------------------------------------------------------------ |
|
|
|
|
|
|
|
.ORG $100 |
|
|
|
|
|
|
|
jp main |
|
|
|
|
|
|
|
.db 13,10 |
|
|
|
.db "MSX ROMWBW LOADER V0.2",13,10 |
|
|
|
.db 26 |
|
|
|
|
|
|
|
main: call check_ident ; running from RomWBW? |
|
|
|
jp z,0 ; z=yes,silently end program |
|
|
|
|
|
|
|
; copy loader to page 3 and run it there |
|
|
|
ld hl,LSTART |
|
|
|
ld de,$c000 |
|
|
|
@ -29,6 +39,16 @@ H_TIMI .equ $fd9f ; timer interrupt hook (vdp vsync) |
|
|
|
ldir |
|
|
|
jp $c000 |
|
|
|
|
|
|
|
; Check for RomWBW HBIOS |
|
|
|
check_ident: ld hl,(HB_IDENT) |
|
|
|
ld a,'W' |
|
|
|
cp (hl) |
|
|
|
ret nz |
|
|
|
inc hl |
|
|
|
ld a,~'W' |
|
|
|
cp (hl) |
|
|
|
ret |
|
|
|
|
|
|
|
LSTART: |
|
|
|
|
|
|
|
; ------------------------------------------------------------------------------ |
|
|
|
@ -225,7 +245,6 @@ _restore2: ld a,$01 |
|
|
|
ld a,b |
|
|
|
ret |
|
|
|
|
|
|
|
|
|
|
|
; --------------------------------------------------------- |
|
|
|
; Handle errors reading rom file |
|
|
|
; --------------------------------------------------------- |
|
|
|
|