Login
Forum Help



Post Your Message
="hidden" name="cat" value="Programming">
Username: (Login)

Topic:
Message:
 


Previous Messages
Posted By

neils
on 2022-01-27
02:41:53
 Re: Change screen address

Thank you both!

Posted By

siz
on 2022-01-27
02:17:57
 Re: Change screen address

Or you can find the original BASIC/KERNAL sources here.

Posted By

Csabo
on 2022-01-26
10:08:56
 Re: Change screen address

Your best source would be the Ultimate Map by SVS. You can also find the ROM disassembly online here.

Posted By

neils
on 2022-01-26
09:29:07
 Re: Change screen address

Thanks for your answer Csabo.

I was hoping that I could do something similar to this C64 example:

lda $d018
and #%11110000
ora #%00100000
sta $d018 ; Change screen address from $0400 to $0800
lda #$08
sta $0288 ; Update KERNAL screen pointer
ora #$80
tay
lda #0
tax
.loop
sty $D9,x ;Update pointers to screen lines
clc
adc #$28
bcc .skip
iny
.skip
inx
cpx #$1a
bne .loop
lda #$ff
sta $D9,x

From this point on, the screen editor will use the new location. So my understanding is that the Plus/4 can't do this, as these pointers are hardwired in KERNAL. Too bad sad

Where can I find a commented disassembly of the Plus/4 KERNAL? Maybe there's a workaround?

PS. It isn't for a game. I'm trying to implement XC=BASIC's commands on the Plus/4 and I'm failing to implement this command: https://xc-basic.net/doku.php?id=v3:screen

Posted By

Csabo
on 2022-01-26
08:43:49
 Re: Change screen address

You are correct that $FF14 controls the location of the text screen. Unfortunately AFAIK you cannot change where the KERNAL writes characters. Just to be absolutely clear, are you thinking something like this?

LDA #$18
STA $FF14 ; change text screen location from the default $0800 to $1800
LDA #$01
JSR $FFD2 ; output letter "A" to the screen


And then you'd want the letter to appear somewhere from $1C00-$1FE7? Unfortunately the KERNAL uses a fixed lookup table that points to the screen (from $D802/$D81B), which will always point to the $0C00 area.

I could be wrong?... If so I hope someone enlightens me, but I've never seen this work on Plus/4.

Therefore I'd say you have 3 options:
1) sidestep the entire issue by rearranging your code so that the text screen is at the default location (no need for any KERNAL changes)
2) copy the ROM to RAM and change what needs to be changed (you do lose half the free memory, but might be the least amount of trouble)
3) write your own character input/output routines.

Posted By

neils
on 2022-01-26
07:45:09
 Change screen address

Hello all
I'm pretty new to the Plus/4, I'm coming from the C64 world.
I'm trying to change the screen address to something other than $0C00. So far I've figured out that writing to $FF14 changes the address, but how to update KERNAL to use the new address? I've tried to update $053E but it looks like it's not as easy as that.
Is there a ROM routine that reconfigures KERNAL to use the new location?
Any help is much apreciated. Thanks.


Copyright © Plus/4 World Team, 2001-2024. Support Plus/4 World on Patreon