-
Notifications
You must be signed in to change notification settings - Fork 0
/
BIOS.asm
47 lines (38 loc) · 1.58 KB
/
BIOS.asm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
;--------------------------------------------------------
; COPYRIGHT (C) HARRY CLARK 2024
;--------------------------------------------------------
; GENERIC SEGA MEGA CD LOADER
;--------------------------------------------------------
; THIS FILE PERTAINS TO THE BIOS
; FUNCTIONALITY - DECLARING AND ACCESSING
; THIS SUB-ROUTINES FOR THE CPU TO BOOT THE DISC
;--------------------------------------------------------
INCLUDE "BIOS_inc.asm"
INCLUDE "macros.asm"
ORG $6000
;--------------------------------------------------------
; DETERMINE THE VALUES NECESSARY FOR ACCESSING
; SPECIFICS IN THE HARDWARE
;--------------------------------------------------------
SP_SECTOR: DC.L 0
MODULE_NAME: DC.B 'MAIN-SUBCPU',0
MODULE_VERSION: DC.W 0, 0
MODULE_NEXT: DC.L 0
MODULE_SIZE: DC.L 0
MODULE_START_ADDR: DC.L $20
MODULE_WORK_ADDR: DC.L 0
SUB_JUMP_TABLE: DC.W SP_INIT-SUB_JUMP_TABLE
DC.W SP_MAIN-SUB_JUMP_TABLE
DC.W SP_IRQ-SUB_JUMP_TABLE
DC.W 0
;--------------------------------------------------------
; INITIALISE THE STACK POINTER
; THIS WORKS UNDER THE GUISE OF BEING CALLED
; ON A SINGLE COUROUTINE AFTER THE INITIAL BOOT
;--------------------------------------------------------
SP_INIT:
RTS
SP_MAIN:
BNE SP_MAIN
SP_IRQ:
RTS