memory locations for char set and what chars are where on the screen

Anything Sinclair ZX Basic related; history, development, tips - differences between BASIC on the ZX80 and ZX81
Post Reply
Gregg Evans
Posts: 10
Joined: Sat Oct 07, 2017 1:04 am

memory locations for char set and what chars are where on the screen

Post by Gregg Evans » Wed Nov 01, 2017 1:31 am

I have two clear plastic hemispheres and I want to make a spherical led matrix powered by my 1000 and perhaps use it instead of a monitor. (wont have quite the res) where in memory is the char. set saved and more importantly there must be a place in memory keeping track of what char. is to be displayed where. Does anyone know where to find that?

Gregg Evans
Posts: 10
Joined: Sat Oct 07, 2017 1:04 am

Re: memory locations for char set and what chars are where on the screen

Post by Gregg Evans » Wed Nov 01, 2017 2:10 am

It will most likely be powered by an Arduino but will use the 1000 for its content. It might also be cool to just show the ram blinking away in a sphere like its thinking.

User avatar
mrtinb
Posts: 503
Joined: Fri Nov 06, 2015 4:44 pm
Location: Denmark
Contact:

Re: memory locations for char set and what chars are where on the screen

Post by mrtinb » Wed Nov 01, 2017 6:40 am

The character set is stored at $1E00 - $1FFF.

The screen memory is a whole different story. It is the most complex of the ZX81/TS1000. Screen memory is floating around in memory dynamically after the program area. So if you add or delete a line in your program screen memory is moved up and down. On top of that each line is separated with $76 (newline). When memory gets tight the screen memory is collapsed removes spaces before $76 (newline). When this happens a black screen will be 25 $76 (newlines). The screen starts and ends with a $76 (newline).

More can be read here: http://problemkaputt.de/zxdocs.htm
Martin
ZX81, Lambda 8300, Commodore 64, Mac G4 Cube

User avatar
Paul
Posts: 860
Joined: Thu May 27, 2010 7:15 am
Location: Germanys west end

Re: memory locations for char set and what chars are where on the screen

Post by Paul » Wed Nov 01, 2017 6:45 am

The characterset is at the very end of the ROM ending at 8191.
It contains 64 characters 8 byte each.
That gives you the beginning of the character set in ROM.
What is on screen is the content of the D-File (Display file)
It begins with a 118 and has 24 more 118, one for each line.
With at least 4K of RAM you have an expanded D-File which means after CLS you have 32 zeros between each 118.
With less than 4K RAM you will have a compressed D-File containing only 25 118s after a CLS.

Kind regards Paul
In theory, there is no difference between theory and practice. But, in practice, there is.

Gregg Evans
Posts: 10
Joined: Sat Oct 07, 2017 1:04 am

Re: memory locations for char set and what chars are where on the screen

Post by Gregg Evans » Wed Nov 01, 2017 9:55 am

Wow Paul that is exactly what I needed. I hope I can put it to good use. What a great group. Thanks.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests