diff options
| author | B. Watson <urchlay@slackware.uk> | 2026-03-10 03:02:20 -0400 |
|---|---|---|
| committer | B. Watson <urchlay@slackware.uk> | 2026-03-10 03:02:20 -0400 |
| commit | 3a334ebb3d7c8a24b28b5faa70e298851b3d88a1 (patch) | |
| tree | 04a7ef42f4cb765b79a3be3b90d81161eb82a1ae /memsetup.asm | |
| parent | e862223b12d2d23371073e6d6db1e7d73d7cfaa8 (diff) | |
| download | fujinet-chat-3a334ebb3d7c8a24b28b5faa70e298851b3d88a1.tar.gz | |
Fix weird bug when loading from MyDOS/Sparta.
Diffstat (limited to 'memsetup.asm')
| -rw-r--r-- | memsetup.asm | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/memsetup.asm b/memsetup.asm index fa81ae6..de9c7d9 100644 --- a/memsetup.asm +++ b/memsetup.asm @@ -1,3 +1,14 @@ +; Initial load segment for the fnchat.exe executable. Sets MEMTOP and +; RAMTOP to $6A00, disables BASIC (on XL/XE), disables ANTIC DMA, then +; returns so the rest of the .xex continues to load. + +; This is pretty weird: when loading fnchat.xex from MyDOS 4.50 or +; (apparently) Spartados X, a 0 byte gets written to our display +; list. It's up in the $BFxx area, which is to say, where the GR.0 +; screen used by DOS lives... and somehow these DOSes are writing a +; 0 byte to the screen (a space) in the middle of loading the file. +; Setting SAVMSC to something else ($0600, here) avoids this. + *= $2000 memsetup lda $d301 ; PORTB @@ -9,6 +20,9 @@ memsetup lda #0 sta $02e5 ; MEMTOP low sta $022f ; SDMCTL (turn off screen) + sta $58 ; SAVMSC + lda #$06 + sta $59 ; SAVMSC+1 lda $14 ; RTCLOK+2 loop cmp $14 ; wait until next frame |
