HP Forums
Sharp PC-E500 memory maps? - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: Not HP Calculators (/forum-7.html)
+--- Forum: Not remotely HP Calculators (/forum-9.html)
+--- Thread: Sharp PC-E500 memory maps? (/thread-17853.html)



Sharp PC-E500 memory maps? - Dave Britten - 12-25-2021 01:00 AM

I got ahold of a PC-E500, and I'm attempting to convert some PC-1500 games to run on it. One issue I've run into is positioning the graphics cursor. On the PC-1500, if you PRINT; then GPRINT something, the cursor position for the GPRINT will flow naturally from wherever PRINT; left off. Not so on the PC-E500: there's a separate graphics cursor position controlled with the GCURSOR command, which defaults to 0, 0 at the top left of the screen.

I figure I could make a small subroutine that reads the current text cursor position (i.e. set via LOCATE), and calculates appropriate arguments for GCURSOR. The problem is I don't know how to read the current text cursor position! Anybody have any sort of memory map that might indicate where to PEEK the cursor position?


RE: Sharp PC-E500 memory maps? - robve - 12-25-2021 02:42 AM

(12-25-2021 01:00 AM)Dave Britten Wrote:  I figure I could make a small subroutine that reads the current text cursor position (i.e. set via LOCATE), and calculates appropriate arguments for GCURSOR. The problem is I don't know how to read the current text cursor position! Anybody have any sort of memory map that might indicate where to PEEK the cursor position?

The x cursor location is stored as one byte at &bfc9b. The y location is stored as one byte at &bfc9c. PEEK these addresses to get the values, but don't POKE.

An interesting feature of the E500 is that the screen width and height can be shrunk, showing and scrolling the text only without that specified region. This allows the bottom row of function keys to be shown continuously for example, when this is activated.

The max screen window width is PEEK(&bfc9d). The max screen window height is PEEK(&bfc9e). These can be POKEd to change the window.

Hope this helps.

- Rob

EDIT: fixed typo.


RE: Sharp PC-E500 memory maps? - robve - 12-25-2021 03:00 AM

See also the Forth500 project and the E500 resources I've included: Forth500 GitHub repo

I have a lot more. PM sent!

- Rob


RE: Sharp PC-E500 memory maps? - Dave Britten - 12-25-2021 04:04 AM

(12-25-2021 02:42 AM)robve Wrote:  
(12-25-2021 01:00 AM)Dave Britten Wrote:  I figure I could make a small subroutine that reads the current text cursor position (i.e. set via LOCATE), and calculates appropriate arguments for GCURSOR. The problem is I don't know how to read the current text cursor position! Anybody have any sort of memory map that might indicate where to PEEK the cursor position?

The x cursor location is stored as one byte at &bfc9b. The y location is stored as one byte at &bfc9c. PEEK these addresses to get the values, but don't POKE.

An interesting feature of the E500 is that the screen width and height can be shrunk, showing and scrolling the text only without that specified region. This allows the borrow row of function keys to be shown continuously for example, when this is activated.

The max screen window width is PEEK(&bfc9d). The max screen window height is PEEK(&bfc9e). These can be POKEd to change the window.

Hope this helps.

- Rob

Thanks Rob! I'll play with that tomorrow. I just want to make a simple subroutine that will read the cursor location (in other words, where would the next PRINT go?) and translate that to GCURSOR arguments that will make the next GPRINT behave sort of like it would on the PC-1500. Sounds like it shouldn't be too hard then.