diff options
| -rw-r--r-- | Makefile | 8 | ||||
| -rw-r--r-- | config/config.c | 4 | ||||
| -rw-r--r-- | loading.asm | 51 | ||||
| -rw-r--r-- | memsetup.asm | 2 |
4 files changed, 63 insertions, 2 deletions
@@ -1,4 +1,4 @@ -PARTS=config/config.xex memsetup.xex font_dl.xex client.xex +PARTS=loading1.xex config/config.xex loading2.xex memsetup.xex font_dl.xex client.xex TESTXEX=fnchat-$(shell date +%Y%m%d-%H%M).xex @@ -28,6 +28,12 @@ clean: memsetup.xex: memsetup.asm +loading1.xex: loading.asm + $(ATASM) -o$@ $< + +loading2.xex: loading.asm + $(ATASM) -o$@ -DCLIENT=1 $< + font_dl.xex: font_dl.asm font.dat test: memsetup.xex font_dl.xex diff --git a/config/config.c b/config/config.c index d8cb260..f84f196 100644 --- a/config/config.c +++ b/config/config.c @@ -7,6 +7,7 @@ #include <conio.h> #include <ctype.h> #include <dirent.h> +#include <peekpoke.h> #include "../src/config.h" @@ -427,6 +428,9 @@ void set_default_config(void) { void main(void) { char bad; + /* loading1.xex left the original DL address at $fe */ + POKEW(0x0230, PEEKW(0xfe)); + set_default_config(); OS.color2 = conf->colors[0]; diff --git a/loading.asm b/loading.asm new file mode 100644 index 0000000..fd56a84 --- /dev/null +++ b/loading.asm @@ -0,0 +1,51 @@ + *= $8400 ; aka screen_bot_addrs[0], gets cleared by main() in the client. + + save_dlist_loc = $fe + +;msg .sbyte " Loading FujiNet Config " +msg + .sbyte " Loading FujiNet " + .if .def CLIENT + .sbyte "Client" + .else + .sbyte "Config" + .endif + .sbyte " " + +dl + .byte $70, $70, $70 ; 3x8 blanks + .byte $70, $70, $70, $70, $70, $70, $70, $70, $70, $70 + .byte $42 ; LMS GR.0 + .word msg + .byte $41 ; JVB + .word dl + +wait1frame + lda $14 ; RTCLOK+2 +wloop + cmp $14 + beq wloop + rts + +init + lda $0230 + sta save_dlist_loc + lda $0231 + sta save_dlist_loc+1 + jsr wait1frame + lda #<dl + sta $0230 ; SDLSTL + lda #>dl + sta $0231 ; SDLSTH + jmp wait1frame + + *= $02e2 ; INITAD + .word init + + .if 0 ; change to 1 for standalone testing +run + jmp run + + *= $02e0 ; RUNAD + .word run + .endif diff --git a/memsetup.asm b/memsetup.asm index 8e6b4df..f1e3694 100644 --- a/memsetup.asm +++ b/memsetup.asm @@ -21,7 +21,7 @@ memsetup sta $02e6 ; MEMTOP high lda #0 sta $02e5 ; MEMTOP low - sta $022f ; SDMCTL (turn off screen) + ;sta $022f ; SDMCTL (turn off screen) ; give the SDMCTL change time to get applied by the OS lda $14 ; RTCLOK+2 |
