[Coco] tetris question
Darren A
mechacoco at gmail.com
Mon Jan 18 10:26:36 EST 2010
On 1/18/10, brian palmer wrote:
> I always assumed that the Tetris Pack automatically determined what coco it
> was plugged into. So that small snippet of code Robert G posted would be
> what determines what coco unit it is plugged into. I Find that snippet of
> code really effective in what it does on real hardware. But I would say
> emulators would not be able to use it. May need to update that code for
> emulator users.
---
That code snippet will work on an emulator so long as the emulator
returns a value with bits 6 and 7 cleared when you read a palette
register. MESS does exactly that, and VCC returns whatever value you
write to the palette registers. That code snippet should work fine on
either of those.
What's interesting is that the code works on real hardware only
because the byte at $FFFF has bits 6 and 7 cleared. If you were to
change the CoCo 3's ROM such that the LSB of the Reset vector has
either bits 6 or 7 set, then that game would not be able to detect
that it is running on a CoCo 3. Of course, that would also break any
program that simply checks the value of the Reset vector to deterimine
which machine it is running on.
Darren
More information about the Coco
mailing list