Jump to content
IGNORED

DPC+, Stella question


bogax

Recommended Posts

I've rearranged SeaGtGruff's DPC+
code for pushing the playfield.
(this is for iesposta's game)

It counts through the playfield lines
pushing the four bytes of a line from
tables.

Just pushing the lines should take
around 40 cycles per line.
176 lines * 40 = 7040 cycles.

I think it's more like twice that.

But Stella reports nary a bobble in
the line count.

What accounts for that?

push

dptr = dptr + dbase
DF4PUSH = ddat0[dptr]
DF5PUSH = ddat1[dptr]
DF6PUSH = ddat2[dptr]
DF7PUSH = ddat3[dptr]
return thisbank

skip

DF4LOW = 184 : DF5LOW = 184 : DF6LOW = 184 : DF7LOW = 184
DF4HI = 6 : DF5HI = 7 : DF6HI = 8 : DF7HI = 9
dbase = $00

crow = 90
decompress_loop
crow = crow - 1
if !sdat[crow] then crow = crow - 1 : dbase = sdat[crow] : goto decompress_loop
dptr = sdat[crow] & $0F : gosub push
dptr = sdat[crow] / 16 : gosub push
if crow then decompress_loop
Link to comment
Share on other sites

I think it is because that is mostly ARM functions where the Atari is given NOP, no operations, so Stella isn't seeing anything happening?

 

In another game I need a routine to push 5 lines (rows).

It doesn't have to be compressed data.

Where I would just give a scanline number and it would push the 5 lines.

 

Or better yet, if not cycle intensive, give an X and a Y playfield position and PUSH a 5 by 5 PF chunk.

The problem there being crossing over PF1, PF2 in the data streams 4, 5, 6 or 7.

 

On the other hand, these kinds of things may already be there in pfvline, pfhline, and pfpixel. There might not be any cycle savings doing it with push.

 

The playfield as data with compression - that saves rom space and DPC+ "graphics bank" space to have more sprites and playfields!

Link to comment
Share on other sites

I can't say for sure what is happening here, but there is one big deficiency in the ARM emulation in Stella: the cycles between the two systems aren't synchronized. For example, no matter how long the ARM would take to run code, Stella would essentially see it as taking zero 6502 time. Hence, anything that ran too long and would screw up the timing on a real console would not be properly emulated by Stella at all.

 

I want to get this fixed, probably by swapping out the current ARM emulation code with something from a NintendoDS emulator (which has an ARM CPU). I haven't done much research on this, and in any event don't have the time to look into it before the end of this year. If anyone is willing to step up and help in this regard, it would be greatly appreciated.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...