I am writing a program in my Apple //gs

3 posts / 0 new
Last post
Offline
Last seen: 5 years 6 months ago
Joined: Oct 9 2018 - 20:12
Posts: 1
I am writing a program in my Apple //gs

    Hello,

 

I am writing a program in my Apple //gs and it is a paint program using the GR and plot function. I have one question to ask. I am storing the plotted x and y coordinate in set of arrays and I want when the user finalize it..it converts the entire image in screen either into an image binary file that can be opened or into a set of loops of read, data and poking and peeking to display the image back. Can someone help me in this?

 

I know someone says why bother with that..just use a paint program...well I could..but I do not know of a good basic programming book that I can reference into to show me how to open an image file or sprite file in basic and what format the image is.

 

Thanks in advance.

Dog Cow's picture
Offline
Last seen: 4 years 11 months ago
Joined: Dec 11 2008 - 16:26
Posts: 554
You can save the screen

You can save the screen memory to a disk file, then restore it later. The technique to do it is similar for DOS and ProDOS. Use the BSAVE function.

Offline
Last seen: 3 hours 23 min ago
Joined: Jul 5 2018 - 09:44
Posts: 2585
Dog Cow wrote:You can save

[quote=Dog Cow]

You can save the screen memory to a disk file, then restore it later. The technique to do it is similar for DOS and ProDOS. Use the BSAVE function.

[/quote]

 

This is correct, the technique is also basically the same as for a HIRES graphic screen, except the starting address and length are obviously different.

 

For LORES, the format is basically each text page character is two LORES blocks, one for the first nibble and the other for the second.  Each 4 bits codes to the 16 colors of LORES.  The text and LORES memory map is intertwined like HIRES, and also similarly contains "holes" which are not displayed.  You should consult a reference manual if you want any more detail than that, as this is a 30k ft. description.  You can also find the values for the addresses of the text pages and the length in reference documentation.

 

 

Log in or register to post comments