2019-07-02 10:49:30 -04:00
|
|
|
; 8K of onboard RAM
|
|
|
|
.equ RAMSTART 0xc000
|
|
|
|
; Memory register at the end of RAM. Must not overwrite
|
|
|
|
.equ RAMEND 0xfdd0
|
|
|
|
|
|
|
|
jp init
|
2019-07-01 11:05:25 -04:00
|
|
|
|
|
|
|
.fill 0x66-$
|
|
|
|
retn
|
|
|
|
|
2019-10-06 14:32:23 -04:00
|
|
|
.inc "err.h"
|
|
|
|
.inc "core.asm"
|
|
|
|
.inc "parse.asm"
|
2019-07-02 11:14:30 -04:00
|
|
|
|
2019-07-02 10:49:30 -04:00
|
|
|
.equ PAD_RAMSTART RAMSTART
|
2019-10-06 14:32:23 -04:00
|
|
|
.inc "sms/pad.asm"
|
2019-07-02 09:02:19 -04:00
|
|
|
|
2019-07-02 10:49:30 -04:00
|
|
|
.equ VDP_RAMSTART PAD_RAMEND
|
2019-10-06 14:32:23 -04:00
|
|
|
.inc "sms/vdp.asm"
|
2019-07-02 10:49:30 -04:00
|
|
|
|
2019-07-02 11:14:30 -04:00
|
|
|
.equ STDIO_RAMSTART VDP_RAMEND
|
2019-10-06 14:32:23 -04:00
|
|
|
.inc "stdio.asm"
|
2019-07-02 11:14:30 -04:00
|
|
|
|
|
|
|
.equ SHELL_RAMSTART STDIO_RAMEND
|
|
|
|
.equ SHELL_EXTRA_CMD_COUNT 0
|
2019-10-06 14:32:23 -04:00
|
|
|
.inc "shell.asm"
|
2019-07-02 11:14:30 -04:00
|
|
|
|
2019-07-02 10:49:30 -04:00
|
|
|
init:
|
2019-07-02 09:02:19 -04:00
|
|
|
di
|
|
|
|
im 1
|
|
|
|
|
2019-07-02 10:49:30 -04:00
|
|
|
ld sp, RAMEND
|
2019-07-01 11:05:25 -04:00
|
|
|
|
2019-07-02 11:14:30 -04:00
|
|
|
call padInit
|
2019-07-02 10:49:30 -04:00
|
|
|
call vdpInit
|
2019-07-02 13:15:24 -04:00
|
|
|
ld hl, padUpdateSel
|
|
|
|
ld (VDP_CHRSELHOOK), hl
|
2019-07-01 15:46:10 -04:00
|
|
|
|
2019-07-02 13:15:24 -04:00
|
|
|
ld hl, padGetC
|
2019-07-02 11:14:30 -04:00
|
|
|
ld de, vdpPutC
|
|
|
|
call stdioInit
|
|
|
|
call shellInit
|
2019-07-02 13:15:24 -04:00
|
|
|
ld hl, vdpShellLoopHook
|
|
|
|
ld (SHELL_LOOPHOOK), hl
|
2019-07-02 11:14:30 -04:00
|
|
|
jp shellLoop
|
2019-07-01 11:05:25 -04:00
|
|
|
|
|
|
|
.fill 0x7ff0-$
|
|
|
|
.db "TMR SEGA", 0x00, 0x00, 0xfb, 0x68, 0x00, 0x00, 0x00, 0x4c
|