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

Subject: RE: [stella] Adventure, Another Issue (Thanks for yesterday)
From: "Brian Prescott" <bprescot@xxxxxxxxxxxxxxx>
Date: Tue, 4 Jun 2002 08:39:59 -0400

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
       ADC    $93                 ;Add the room data base address
       STA    $93                 ;to the offset therefore getting
       LDA    #>RoomDataTable                ;      the final room data
       ADC    $94
       STA    $94

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.


-----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

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.

Joel D. Park

Archives (includes files) at
Unsub & more at

Current Thread