2019-07-03 00:49:30 +10: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-02 01:05:25 +10:00
|
|
|
|
|
|
|
.fill 0x66-$
|
|
|
|
retn
|
|
|
|
|
2019-10-07 05:32:23 +11:00
|
|
|
.inc "err.h"
|
|
|
|
.inc "core.asm"
|
|
|
|
.inc "parse.asm"
|
2019-07-03 01:14:30 +10:00
|
|
|
|
2019-07-03 00:49:30 +10:00
|
|
|
.equ PAD_RAMSTART RAMSTART
|
2019-10-07 05:32:23 +11:00
|
|
|
.inc "sms/pad.asm"
|
2019-07-02 23:02:19 +10:00
|
|
|
|
2019-07-03 00:49:30 +10:00
|
|
|
.equ VDP_RAMSTART PAD_RAMEND
|
2019-10-07 05:32:23 +11:00
|
|
|
.inc "sms/vdp.asm"
|
2019-07-03 00:49:30 +10:00
|
|
|
|
2019-07-03 01:14:30 +10:00
|
|
|
.equ STDIO_RAMSTART VDP_RAMEND
|
2019-10-07 05:32:23 +11:00
|
|
|
.inc "stdio.asm"
|
2019-07-03 01:14:30 +10:00
|
|
|
|
|
|
|
.equ SHELL_RAMSTART STDIO_RAMEND
|
|
|
|
.equ SHELL_EXTRA_CMD_COUNT 0
|
2019-10-07 05:32:23 +11:00
|
|
|
.inc "shell.asm"
|
2019-07-03 01:14:30 +10:00
|
|
|
|
2019-07-03 00:49:30 +10:00
|
|
|
init:
|
2019-07-02 23:02:19 +10:00
|
|
|
di
|
|
|
|
im 1
|
|
|
|
|
2019-07-03 00:49:30 +10:00
|
|
|
ld sp, RAMEND
|
2019-07-02 01:05:25 +10:00
|
|
|
|
2019-07-03 01:14:30 +10:00
|
|
|
call padInit
|
2019-07-03 00:49:30 +10:00
|
|
|
call vdpInit
|
2019-07-03 03:15:24 +10:00
|
|
|
ld hl, padUpdateSel
|
|
|
|
ld (VDP_CHRSELHOOK), hl
|
2019-07-02 05:46:10 +10:00
|
|
|
|
2019-07-03 03:15:24 +10:00
|
|
|
ld hl, padGetC
|
2019-07-03 01:14:30 +10:00
|
|
|
ld de, vdpPutC
|
|
|
|
call stdioInit
|
|
|
|
call shellInit
|
2019-07-03 03:15:24 +10:00
|
|
|
ld hl, vdpShellLoopHook
|
|
|
|
ld (SHELL_LOOPHOOK), hl
|
2019-07-03 01:14:30 +10:00
|
|
|
jp shellLoop
|
2019-07-02 01:05:25 +10:00
|
|
|
|
|
|
|
.fill 0x7ff0-$
|
|
|
|
.db "TMR SEGA", 0x00, 0x00, 0xfb, 0x68, 0x00, 0x00, 0x00, 0x4c
|