diff options
| author | B. Watson <urchlay@slackware.uk> | 2026-03-10 03:30:13 -0400 |
|---|---|---|
| committer | B. Watson <urchlay@slackware.uk> | 2026-03-10 03:30:13 -0400 |
| commit | b4d44860c237c05447f5641f83f19cece2ac9975 (patch) | |
| tree | fd79e2404405507f35ec2a92804b3d75bd863dab | |
| parent | be4cb6d2a1d1c857fc67eb155788717db167f625 (diff) | |
| download | fujinet-chat-b4d44860c237c05447f5641f83f19cece2ac9975.tar.gz | |
really fix the brokenness with MyDOS (close E: device at startup).
| -rw-r--r-- | memsetup.asm | 23 | ||||
| -rw-r--r-- | src/irc.c | 13 | ||||
| -rw-r--r-- | src/irc.h | 1 | ||||
| -rw-r--r-- | src/main.c | 1 |
4 files changed, 25 insertions, 13 deletions
diff --git a/memsetup.asm b/memsetup.asm index de9c7d9..8e6b4df 100644 --- a/memsetup.asm +++ b/memsetup.asm @@ -2,27 +2,28 @@ ; 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 + ; close the E: device + lda #$0c ; CIO CLOSE command + sta $0342 ; ICCOM + ldx #0 ; channel 0 + jsr $E456 ; CIOV + + ; disable BASIC (XL/XE only) lda $d301 ; PORTB - ora #$02 ; disable BASIC (XL/XE only) + ora #$02 sta $d301 lda #$80 + + ; set up everything else sta $6a ; RAMTOP sta $02e6 ; MEMTOP high lda #0 sta $02e5 ; MEMTOP low sta $022f ; SDMCTL (turn off screen) - sta $58 ; SAVMSC - lda #$06 - sta $59 ; SAVMSC+1 + + ; give the SDMCTL change time to get applied by the OS lda $14 ; RTCLOK+2 loop cmp $14 ; wait until next frame @@ -33,6 +33,8 @@ static char scr_prev = SCR_PRIV; char numbuf[10]; +char last_pm_nick[33]; + /* static void join_channel(void) { txbuf_set_str2("JOIN ", channel); @@ -444,10 +446,12 @@ void select_screen(void) { } else { s = scr_getbyname(msg_src); if(!s) { - if(streq_i(msg_cmd, "PRIVMSG")) /* or maybe NOTICE? */ + if(streq_i(msg_cmd, "PRIVMSG")) { /* or maybe NOTICE? */ + strncpy(last_pm_nick, msg_src, 32); s = SCR_PRIV; - else + } else { s = SCR_SERVER; + } } } scr_activate(s); @@ -734,6 +738,11 @@ static void start_keystroke(void) { scr_display(scr_prev); scr_prev = i; return; + case 'q': + case 'Q': + if(*last_pm_nick) + scr_create(last_pm_nick, 1); + return; case 'a': case 'A': switch_to_active(); @@ -48,6 +48,7 @@ extern char *msg_args[MAX_MSG_ARGS]; extern int msg_argcount; extern char irc_away; extern char bell_type; +extern char last_pm_nick[33]; /* call this once, right after TCP connection is established. */ void irc_register(void); @@ -142,6 +142,7 @@ int main(void) { hz = (GTIA_READ.pal & 0x0e) ? 60 : 50; + edbox_clear(); scr_init(); while(1) { |
