[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Hi Again. Another Machine Language Mission.
In article <01bfb2fb$f07b2180$35beb3c7@paulrsm>, "Paul R. Santa-Maria"
<paulrsm@ameritech.net> wrote:
> 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.
It's 0 to _34_ horizontal.
> > 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?
No, I'm not using byte boundaries. That would make it 7 by 8. I want _8_ by 8.
High-res screen one.
> > 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?
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.
Yep.
> 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
--
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
****** The New Short & Sweet Signature ******
Mail: processoroverclocked@33mhz.cjb.net
Web : http://chelsea.is.dreaming.org
Chat: http://tamchelchat.cjb.net
Don't forget: Tammy Day on February 15th!
Please change '.com' to '.cjb.net' to respond.