Re: [stella] supercharger good; busted code bad

Subject: Re: [stella] supercharger good; busted code bad
From: "Eckhard Stolberg" <Eckhard_Stolberg@xxxxxx>
Date: Sat, 13 Jul 2002 22:02:38 +0200
> I guess though there's no easy way to see where in ROM
> code is living, except maybe using some kind of hex editor?

If you are using DASM, then you can have it generate a
listing file for you which tells you which bytes went
where. IIRC a command line like

DASM sourcefile.asm -f3 -v3 -ogamefile.bin -Llistfile.txt

should do the trick. But for the purpose of Supercharger
compatibility there is an easier way. You have to put the
system vectora at $FFFC anyway, so if you change that ORG
to $FFF8 and add four meaningless bytes, then DASM would
generate an error message, if your are placing code or data
on the forbidden addresses.

Also note that the 6507 always reads two bytes for one byte
insructions like RTS or NOP. So don't put a RTS at $FFF7
either, as that also would crash your Supercharger. 
 
> Do you know what I mean by "normal"? It should be two happy faces,
> each controlled by a diff. stick to move left and right and to 
> "flap" with the fire button, with a floor and ceiling implied,
> and bouncing on the floor.  Both move relative joust like.
> With the supercharger on a real 2600, different movement behaviors
> go on....getting caught half way up the screen, wild shmmering 
> between high, medium, and low positions, other strange stuff.
> And similarly weird on PCAE

I only had a brief test, but I think I got "normal" behaviour.
But I think the problem might be in your constants section. I
don't think DASM allows you to specify addressing mode in
constant definitions. So "LDA FlapStenght" isn't going to load
a value of 4 into the accumulator. It's loading a value from TIA
register 4. So you should change accesses to your constants to
something like "LDA #FlapStrength".

Also you might like to read the section in the DASM manual
about the SEG pseudo opcode. It allows you to define your
variables in a more flexible way than direct equates. If
you have some code like this:

   SEG.U variables
   ORG $80
variable1   DS   1   ;reserve 1 byte for variable1
variable2   DS   5   ;reserve 5 bytes for variable2
...

   SEG code
   ORG $F000
   lda varible1
...

it is much easier to add, delete or move variables in the
RAM.


Ciao, Eckhard Stolberg


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


Current Thread