Re: [cc65] Atari __RESERVED_MEMORY__

From: Fatih Aygün <cyco1301yahoo.com>
Date: 2009-10-27 11:09:47
Hi Daniel,


> There is another solution: the graphics function wrapper could reserve
> the memory
> needed from the heap, adjusting RAMTOP (ZP $6A) to just bellow the stack
> and APPMHI to the current top of the heap.

But then, if the main program exceeds the heap and stack limitations assumed by
the tgi, it will simply crash. I think current solution is better, at least it doesn't
crash the program, and with the simple fix I described earlier, it will just report
the out of memory condition so the programmer will know exactly what's wrong.

> Of course, a better alternative still is using a malloced buffer and setting the
> graphics mode in the TGI code. This allows keeping the text mode screen
> unchanged when in graphics mode, all the conio functions would work to this
> "virtual" screen, but then all the graphics function should set and restore
> SAVMSC before calling ROM functions.

That would be neat. But there a are several issues that makes it hard, if not
impossible:

First, a loadable driver cannot access the heap functions, because it doesn't
know where they are. Furthermore, it's possible that they are not linked in to
the main program at all in the first place.

Second, the Atari video system has several alignment requirements for the display
list and the screen memory which would make this approach rather tricky.

Regards,
Fatih.


      
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Tue Oct 27 11:09:55 2009

This archive was generated by hypermail 2.1.8 : 2009-10-27 11:09:57 CET