Skip to content

Commit

Permalink
Added a bootable header on bank 1
Browse files Browse the repository at this point in the history
  • Loading branch information
Konamiman committed Nov 30, 2018
1 parent f5ca04d commit 8e80e51
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
24 changes: 24 additions & 0 deletions msx/bank1/header.asm
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
; Rookie Drive USB FDD BIOS
; By Konamiman, 2018
;
; This file defines a ROM header for bank 1, it simply jumps to the initialization
; routine for bank 0. This header is needed to ensure that the ROM will boot properly
; even if for some reason the computer resets while executing code in bank 1.

db "AB"
dw BANK1_INIT
ds 12

BANK1_INIT:
ld hl,BANK1_INIT_DO
ld de,0C000h
ld bc,BANK1_INIT_DO_END - BANK1_INIT_DO
ldir
jp 0C000h

BANK1_INIT_DO:
xor a
ld (ROM_BANK_SWITCH),a
ld hl,(4002h)
jp (hl)
BANK1_INIT_DO_END:
1 change: 1 addition & 0 deletions msx/rookiefdd.asm
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ DEFDPB:

org 4000h

include "bank1/header.asm"
include "bank1/ch376.asm" ;USB host hardware dependant code
include "bank1/inihrd_inienv.asm"
include "bank1/verbose_reset.asm"
Expand Down

0 comments on commit 8e80e51

Please sign in to comment.