[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Hi Again. Another Machine Language Mission.



Jon Bettencourt <processoroverclocked@33mhz.com> wrote:

> 1. Take in some coordinates at $EB (horizontal) and $EC (vertical).
> 2. Multiply the coordinates by 8.

What are the range of the coordinates?  It appears to be 0 to 39 horizontal
and 0 to 23 vertical.

> 3. Get an 8 by 8 square on the hi-res screen, with the top-left corner at
> those coordinates, and put it into eight byte bitmap data, like this:

You are using byte boundaries only?  Hi-res screen one or two?

> 4. Starting at $5000, ending at $5FFF, and going in increments of 8, see
> if that bitmap data matches anything.

That is a total of 512 bitmaps to check, right?

> 5. If it does, take the memory address where we found the match, subtract
> $5000 from it, divide it by 8, and store the result in $ED (low) and $EE
> (high).
>
> 6. If it doesn't match anything, store value $FF in both $ED and $EE
(thus
> resulting in 65535 or -1)

You want the index of the bitmap (0..511) returned if found, otherwise
return -1.

It sounds like you are trying to read the hi-res screen like you can the
text screen.  If you are using a strict 40x24 screen (byte boundaries
only), then this is not difficult.  When you confirm my guesses, I can kick
it out.

-- 

Paul R. Santa-Maria
Ann Arbor, Michigan  USA
paulrsm@ameritech.net