Oh, it was probably my fault for being unclear, since the original
question was "how do I find out where the screen is" and the answer
was "read port 252", then I guess that raises the presumption that
other vague questions are about the function of ports, not whether
they're write-only.
There are machines with write-only paging registers though. The Acorn
Electron is definitely one. But it has a generally painful paging
mechanism overall — per the documentation, to get to an arbitrary
page, you have to request a page of one of the few ROMs that the
keyboard and BASIC ROM can recognise to be not themselves so that
they'll release the bus, then do your actual page; it took me ages to
find a scheme for my Electron emulator that matched that documented
behaviour and the expectations of all the software that just does
whatever it feels like.
The OS ROM on that machine just keeps a record of the last thing it
paged, and juggles as it feels correct when interrupts go. But it also
steals about 3.5 kb of a 32 kb machine for various other things, so
its help isn't always appreciated.
Anyway, blah blah blah, 250/251 being read/write makes some things I
was mulling over much easier. I'm hoping to release my 3d wireframe
code as a sort of engine for others to use. You just supply an
'update' function and the code builds around it and calls it to do
logic and drawing. There's a function call for drawing objects and
that's about it. Obviously I'm going to need to be much more careful
and open about paging.
I'm also giving serious consideration to knocking up a quick BASIC
dialect to try to increase the code's reach to non-ASM people and make
it more likely that some actual titles will be released. But if I
manage that then it'll be through a PC/Mac-side compiler rather than
any sort of Sam-based interactive environment.
Most importantly, I'm really, really keen to get what I have bundled
up so that you don't have to understand it to be able to use it.
On 28 Aug 2008, at 21:23, Leszek Chmielewski wrote:
Sorry for the missunderstanding. Anyway, I'm sure that all memory
paging ports are read and write ports, bacause there is no other way
to determine which bank is currenly paged in.
LCD
Thomas Harte schrieb:
I meant are they read/write, or write only? However in the interim,
I've found a copy of the Technical Manual online and discovered
that they are read/write, which I wasn't expecting.
On 28 Aug 2008, at 21:06, Leszek Chmielewski wrote:
251 = High Memory Page Register
250= Low Memory Page Register
Greetings,
LCD
Thomas Harte schrieb:
Port 252 is read/write? Anybody got any idea about ports 250 & 251?
On 28 Aug 2008, at 20:22, Leszek Chmielewski wrote:
James R Curry schrieb:
Okay, utterly random question...
How does one determine the start address of the screen in Sam
BASIC?
I forget.
It has been years.
-- James R Curry
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
SAM adv. technical manual says:
10 LET A=IN 252 BAND 31
20 LET BASE=(A+1)*16384
BASE=Start of Screen
greetings
LCD
P.S. But the structure of Information in Screen$ for Palette
interrupt changes is unknown to me yet. |-D.