| |
Testa Account closed
Registered: Oct 2004 Posts: 197 |
Anti badline trick/strech charline 7
hi,
i have a question about the anti badline trick,
in this case streched graphics, open sideborders and 7 sprites each line..
i have used this trick a vieuw times and i never had any problems..
what i did was;
$d011 = $3b
lda #$3c
stx $d016 ;open sideborder atrasterline $8a,charline 7
sta $d011 ;anti badline trick,
sty $d016
no problem
this time i also have some other stuff going on.
i use dma delay at line $30/$31
i use a fld, open borders and sprite fpp rastercode
so the dma delay swings the anti badline graphics from left to right and the fld rastercode moves the graphics up and down..
the problem i have is this..
after the fld/sprite fpp rastercode i want to do the
anti badline trick.
lets say $d011 = $1b and we are at line $8a
lda #$3c
stx $d016 ; open sideborders at line $8a, charline 7
sta $d011 ; anti badline trick
sty $d016 ;
at this point $d012 is $8d instead of $8b and there was a badline.
why was there a badline instead of the anti badline trick
and why is $d012 increased with 2 lines?
thanks
Testa
|
|
... 17 posts hidden. Click here to view all posts.... |
| |
Graham Account closed
Registered: Dec 2002 Posts: 990 |
Also, he wants to stretch line 7. The DEN bit trick will not display anything else than $3FFF idle byte.
@Testa: Add a few NOPs infront of the STA $D011 and see what happens. |
| |
WVL
Registered: Mar 2002 Posts: 902 |
Can you do some checks with VICE to see at what cycle you are?
I always use an illegal opcode to check when the code is being executed :
lda #$3c
stx $d016 ;de border is open now at $8a
.byte $02 ;JAM
sta $d011
sty $d016
VICE will immediately jump to monitor when the JAM gets executed and shows the rasterline and cycle.
Also, what sprites are you using exactly? Maybe it will help to switch from sprites 0-6 to 1-7. |
| |
Radiant
Registered: Sep 2004 Posts: 639 |
Quote: But also without sprites?
No, if you open the vertical border and turn off DEN you can still display sprites as long as you keep opening the border every frame, keeping the vertical border flipflop from ever getting set. |
| |
Radiant
Registered: Sep 2004 Posts: 639 |
Quoting WVLI always use an illegal opcode to check when the code is being executed
A better way: You can simply set a breakpoint in the VICE monitor. It then allows you to single step through the code, which will tell you at exactly which point something goes wrong. |
| |
Skate
Registered: Jul 2003 Posts: 494 |
Oswald already mentioned it. I believe you should check the value you've given to $d011. Accumulator value may need to be different than usual because of fld. Since you don't have time for table lookups, you may need 8 different code blocks for 8 different startup Y positions. I'd use a macro with a parameter for this. I hope you have enough free memory. |
| |
WVL
Registered: Mar 2002 Posts: 902 |
Yes, but you cannot set breakpoints during compiling ;) (I wish I could! wouldnt it be awesome if you could set some breakpoints and conditions automagically?!) |
| |
Oswald
Registered: Apr 2002 Posts: 5094 |
Quote: Yes, but you cannot set breakpoints during compiling ;) (I wish I could! wouldnt it be awesome if you could set some breakpoints and conditions automagically?!)
and load your labels into the monitor.... |
| |
doynax Account closed
Registered: Oct 2004 Posts: 212 |
Quote: Yes, but you cannot set breakpoints during compiling ;) (I wish I could! wouldnt it be awesome if you could set some breakpoints and conditions automagically?!)
I'm not quite certain whether you're serious or not, but personally I've set up a little script which massages the label file to transform names with a particular prefix (e.g. br_*) into a breakpoint command. And in recent versions of VICE you can use the -moncommand switch to automatically read in the generated label script.
A better idea might be to patch up your assembler of choice to add new pseudo-ops for various useful monitor functions, or just a simpler mechanism to pass on strings as-is. But I haven't gotten around to it yet ;)
|
| |
JackAsser
Registered: Jun 2002 Posts: 2014 |
Quote: I'm not quite certain whether you're serious or not, but personally I've set up a little script which massages the label file to transform names with a particular prefix (e.g. br_*) into a breakpoint command. And in recent versions of VICE you can use the -moncommand switch to automatically read in the generated label script.
A better idea might be to patch up your assembler of choice to add new pseudo-ops for various useful monitor functions, or just a simpler mechanism to pass on strings as-is. But I haven't gotten around to it yet ;)
Nice hint! Cool! I'll do that aswell. => no more ".byte 2". Also if somebody would be so kind to patch VICE to support segmented labels or atleast support labels > $ffff and assume they're in ram1 on the C128. :D
|
| |
Ninja
Registered: Jan 2002 Posts: 411 |
Just to give you another option: CCS monitor displays a cycle counter always in the status line; very convenient for single stepping... |
Previous - 1 | 2 | 3 - Next |