RE: [stella] Adventure, Another Issue (Thanks for yesterday)

Subject: RE: [stella] Adventure, Another Issue (Thanks for yesterday)
From: "Brian Prescott" <bprescot@xxxxxxxxxxxxxxx>
Date: Thu, 6 Jun 2002 18:16:54 -0400
Joel:

As you are already aware (or will be very soon!), programming on the 2600
requires an acute awareness of cycle counting (for positioning player
graphics, drawing interesting backgrounds, etc.).  Since a step across a
page boundary uses an extra cycle in code as well as when stepping through
data, it is possible that you can, in the process of adding or removing
code, cause an unexpected or out of place cycle to creep into timing
sensitive code.

This happened to me many times on my two finished projects, and also when I
was modifying some old Activision code.  I haven't looked extensively into
the structure of the Adventure code (I was lucky to find the fix quickly,
BTW did it work for you?), but it may be set up in a way that there is no
timing sensitive code near any page boundaries.

BP

-----Original Message-----
From: owner-stella@xxxxxxxxxxx [mailto:owner-stella@xxxxxxxxxxx]On
Behalf Of Joel Park
Sent: Tuesday, June 04, 2002 9:00 AM
To: stella@xxxxxxxxxxx
Subject: Re: [stella] Adventure, Another Issue (Thanks for yesterday)


Brian,

Thanks for the fast reply.
And for the huge help, I'll try this stuff out tonight.

What you were mentioning about PageBreaks...  As long as I keep all the room
data within one "High" range I should be ok right??  Like as long as it's
between FE00 and FEFF I shoud be fine, right.  (Sorry for such a newbie
question.)

Thanks to all you guys,  I really appreciate how helpful everyone is.



----- Original Message -----
From: "Brian Prescott" <bprescot@xxxxxxxxxxxxxxx>
To: <stella@xxxxxxxxxxx>
Sent: Tuesday, June 04, 2002 8:39 AM
Subject: RE: [stella] Adventure, Another Issue (Thanks for yesterday)


> Joel:
>
> The problem is in the RoomNumToAddress subroutine.  This routine
calculates
> an address into the room data table.  By adding a byte to the arrow
graphic,
> these addresses are all off by one.
>
> In the subroutine, you can change the final bit of code to this:
>
>        LDA    #<RoomDataTable
>        CLC
>        ADC    $93                 ;Add the room data base address
>        STA    $93                 ;to the offset therefore getting
>        LDA    #>RoomDataTable                ;      the final room data
> address.
>        ADC    $94
>        STA    $94
>        RTS
>
> And of course, add the RoomDataTable label at FE1B.
>
> When you do this kind of thing in the actual code instead of the table
data
> at the end, you also need to be aware that page breaks can and do cause
the
> code to go haywire.  I found this out in some of my own disassemblies and
> code modifications.
>
> BP
>
> -----Original Message-----
> From: owner-stella@xxxxxxxxxxx [mailto:owner-stella@xxxxxxxxxxx]On
> Behalf Of Joel Park
> Sent: Tuesday, June 04, 2002 8:04 AM
> To: stella@xxxxxxxxxxx
> Subject: [stella] Adventure, Another Issue (Thanks for yesterday)
>
>
> Once I got a newer version of DASM, I was all ready to go and everything
> worked great and I thought I had all the labels added, But...
>
> It still looks to be accessing memory directly somewhere instead of using
my
> labels but for the life of me I can't find it.. I've been through the code
> multiple times,  line per line and can't find any place that would be
giving
> me problems.
>
> Here is what I do to test.
>
> I went to the graphic for the Sword and added an extra line of graphics in
> the middle, to make it higher.   Then I go clear to the end and there are
> like 9 bytes that are labeled as "Unused", I remove one of them to keep my
> program 4K.
>
> When I compile and run,  the whole game is freaking out..  The issue seems
> to be related to the dynamic backgrounds and not my sprites because they
all
> look fine and any changes I make to them are visible.. But the background
> are pretty much all gone and it's just a garbled mess nearly impossible to
> navigate.
>
> The version of the code I attached has all the lables and everything and
> still compiles.  Could someone check it out and see if I missed something
> when adding lables or something..  There may be an assembler command that
is
> setting the high byte of my memory addresses and I'm just not picking it
out
> or something.
>
> Thanks,
> Joel D. Park
>
>
>
>
> --------------------------------------------------------------------------
--------------------
> Archives (includes files) at http://www.biglist.com/lists/stella/archives/
> Unsub & more at http://www.biglist.com/lists/stella/
>
>


----------------------------------------------------------------------------
------------------
Archives (includes files) at http://www.biglist.com/lists/stella/archives/
Unsub & more at http://www.biglist.com/lists/stella/

----------------------------------------------------------------------------------------------
Archives (includes files) at http://www.biglist.com/lists/stella/archives/
Unsub & more at http://www.biglist.com/lists/stella/


Current Thread