[Coco] ccasm question
Hugo Dufort
hugo at seshat.ca
Tue Mar 10 19:13:11 EDT 2015
Yes, I have already removed the 160x192x4 and 160x192x2 modes, which are
not supported. I guess I've forgotten to double-check the other modes;
and 320x192x2 doesn't sound very appealing. I have worked on some fast
pixel-setting routines earlier today, and will start implementing (and
benchmarking) my little pixel trick for fast sprite rendering later this
week. I hope the performance will be worth the effort.
I think I will save the global "static" information about the current
graphics mode at some fixed address in low memory.
Thanks for the comments.
Hugo
Le 2015-03-10 19:04, Robert Gault a écrit :
> Hugo Dufort wrote:
>> I'm using RegX as an additional accumulator, so it just carries a
>> value, and it
>> doesn't actually point to anything meaningful in memory. Instead of
>> using the
>> user stack to store additional fields I like to work with the
>> existing registers
>> as much as possible. In the actual case, RegX contains the sum
>> WIDTH+COLORS and
>> is used as a classical "selector" (compare, branch, code, branch).
>>
>> I don't know if it makes sense with the 6809, e.g. using 2-byte
>> pointers to hold
>> values or to count, even though the possible operations on these
>> registers is
>> limited.
>>
>> Hugo
>
> OK now I see it, so you load regX with any width, add regA=any number
> of colors and get a result that's compared to a value to give you the
> HRES*4+CRES.
> You don't need to use multiple look-up tables and regX can certainly
> be used as an accumulator. You do need four lines of code for each
> width-color combination and the overhead increases with each comparison.
> In this case you probably used less memory than having three look-up
> tables with fewer routines. Generally, look-up tables require less
> code and are faster. This seems to be the exception to prove the rule. :)
>
> But keep in mind that you may not want that 320 width with 2 colors.
> Make sure that screen setting actually works as it is not supported in
> the ROMs.
> You may have been thinking of 256 width with 2 colors.
>
> Robert
>
>
> ---
> This email has been checked for viruses by Avast antivirus software.
> http://www.avast.com
>
>
---
L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel antivirus Avast.
http://www.avast.com
More information about the Coco
mailing list