Jump to content

Photo

Need help compiling and updating DPC+ information


119 replies to this topic

#76 RevEng OFFLINE  

RevEng

    River Patroller

  • 4,724 posts
  • Bitnik
  • Location:Canada

Posted Wed Aug 28, 2013 7:16 AM

#1 - All of these apply to DPC+ kernel, except size, which only applies to the old multisprite kernel.

#2 - not sure. It was a workaround for a bug that caused the screen to bump whenever you did a goto to the start of a bank. It only showed up under Harmony, so I think it might have been a Harmony firmware bug in the DPC+ implementation.

#3 - the DPC+ stack isn't the actual ARM stack. Its 100% dedicated to your push and pull commands.

#77 Random Terrain ONLINE  

Random Terrain

    Visual batari Basic User

  • Topic Starter
  • 28,327 posts
  • Controlled Randomness
    Replay Value
    Nonlinear
  • Location:North Carolina (USA)

Posted Fri Aug 30, 2013 3:37 AM

Speaking of that special stack, do you know why the 256 stack locations can't be variables themselves?

 

It would be cool if we could do something like this:

_

   dim _Monkey_Nipple = stack 200


#78 RevEng OFFLINE  

RevEng

    River Patroller

  • 4,724 posts
  • Bitnik
  • Location:Canada

Posted Fri Aug 30, 2013 5:56 AM

It's technically possible, so I can only offer some observations as to why I think batari chose to implement it as a stack...

-accessing DPC+ memory is much more expensive for rom space and cycles than memory access. Making the two look the same hides this, which will lead to rom and cycle issues.
-the "let" C code is already very complex. Adding dynamic DPC+ memory access would be a difficult and error prone process.
- DPC+ fetchers act like stacks. Implementing stack-like access in bB means the generated asm code can be minimal.

#79 Gemintronic OFFLINE  

Gemintronic

    Jason S. - Lead Developer & CEO

  • 8,854 posts

Posted Fri Aug 30, 2013 6:54 AM

The whole stack thing sounds useful but hurts my head.  I almost wish the extra memory could be accessed like separate pages of variables.

 

Something like:

 

 varpage 2

 

Would swap out a range of variables with whatever is designated as the second set of values in the extended memory.



#80 RevEng OFFLINE  

RevEng

    River Patroller

  • 4,724 posts
  • Bitnik
  • Location:Canada

Posted Fri Aug 30, 2013 7:08 AM

Yeah, I hear both of you. Stack isn't exactly a basic concept.

When batari announced he was going to make some DPC+ memory available, I honestly expected to see peek and poke access to it. It could have operated more like a special array than a stack, with just a bit more asm code.

That said, I'll take a look at providing more stack examples.

#81 Random Terrain ONLINE  

Random Terrain

    Visual batari Basic User

  • Topic Starter
  • 28,327 posts
  • Controlled Randomness
    Replay Value
    Nonlinear
  • Location:North Carolina (USA)

Posted Fri Aug 30, 2013 1:10 PM

When batari announced he was going to make some DPC+ memory available, I honestly expected to see peek and poke access to it. It could have operated more like a special array than a stack, with just a bit more asm code.


Yeah, at least what you poke will stay where you put it. I don't like the idea of not knowing where my variable values might be in the stack. Would it be hard to hack the stack so nothing moves? If I stick it at 100, it should stay at 100.



 

That said, I'll take a look at providing more stack examples.


If nothing can be easily hacked, at least more examples might make it easier to understand and use.

Thanks



#82 RevEng OFFLINE  

RevEng

    River Patroller

  • 4,724 posts
  • Bitnik
  • Location:Canada

Posted Fri Aug 30, 2013 3:48 PM

I don't think it's a good plan to change it, as it uses stack terminology and operates pretty much like every other stack.

The values actually stay wherever you put them... it's just that you use different stack pointer positions depending on if you're pushing or pulling.

I think for now its probably best just to go with some useful examples.

#83 Random Terrain ONLINE  

Random Terrain

    Visual batari Basic User

  • Topic Starter
  • 28,327 posts
  • Controlled Randomness
    Replay Value
    Nonlinear
  • Location:North Carolina (USA)

Posted Sat Aug 31, 2013 9:23 AM

I thought I'd add 2 more things to the 13 Objects with Coordinates example program. The sprites flip without a problem, but that masking stuff doesn't seem to work correctly. I didn't try masking with player0 since I wasn't sure if it only worked with player1 through player9:

 

Attached File  ex_dpc_13_objects_2013y_08m_31d_1100t.bin   32KB   126 downloads

 

Attached File  ex_dpc_13_objects_2013y_08m_31d_1100t.bas   34.79KB   132 downloads

 

Move any sprite besides player0 off the screen to the left and it seems to work correctly. But move one of the sprites off the screen to the right and you'll see that masking isn't working properly. Now make any of those sprites larger and move off the screen in either direction and you'll see that masking doesn't seem to handle larger sprites correctly.

 



#84 RevEng OFFLINE  

RevEng

    River Patroller

  • 4,724 posts
  • Bitnik
  • Location:Canada

Posted Sat Aug 31, 2013 11:44 AM

The sprite reflection is throwing off batari's masking scheme. I'll take a look a fixing it.

Lack of masking for larger sprites is a known limitation, but if I get masking working cheaply for reflected sprites, I'll look at it.

#85 Random Terrain ONLINE  

Random Terrain

    Visual batari Basic User

  • Topic Starter
  • 28,327 posts
  • Controlled Randomness
    Replay Value
    Nonlinear
  • Location:North Carolina (USA)

Posted Tue Sep 3, 2013 2:00 PM

If anyone wants to double check the missile section while I'm working on another example program, here it is:

 

randomterrain.com/atari-2600-memories-batari-basic-commands.html#dpc_missiles

 

If you notice any wrong or if you see that I forgot something, please let me know. (You might have to refresh/reload the page.)



#86 iesposta OFFLINE  

iesposta

    River Patroller

  • 3,429 posts
  • Retro-gaming w/my VCS
  • Location:Pennsylvania

Posted Tue Sep 3, 2013 2:32 PM

If anyone wants to double check the missile section while I'm working on another example program, here it is:
 
randomterrain.com/atari-2600-memories-batari-basic-commands.html#dpc_missiles
 
If you notice any wrong or if you see that I forgot something, please let me know. (You might have to refresh/reload the page.)

Looks good at a glance.
"contaminates" is a colourful negative word, unless you turn it into a feature!
Chuck there needed an arm, and to get a 9th pixel I use its missile. You can see the bottom of the arm is the shirt color and the top of the missile is the hand color.
gallery_29575_717_3639.jpg

#87 Random Terrain ONLINE  

Random Terrain

    Visual batari Basic User

  • Topic Starter
  • 28,327 posts
  • Controlled Randomness
    Replay Value
    Nonlinear
  • Location:North Carolina (USA)

Posted Tue Sep 3, 2013 3:32 PM

"contaminates" is a colourful negative word, unless you turn it into a feature!

Chuck there needed an arm, and to get a 9th pixel I use its missile. You can see the bottom of the arm is the shirt color and the top of the missile is the hand color.

 

I just added this sentence under the contamination image:

 

"This contamination can be used to your advantage in some cases. For example, a missile of the right size could be placed next to a sprite to make part of that sprite seem wider than it actually is. Add a hand and arm, a nose, the brim of a hat, a piece of a spaceship, or whatever you can dream up."



#88 RevEng OFFLINE  

RevEng

    River Patroller

  • 4,724 posts
  • Bitnik
  • Location:Canada

Posted Fri Sep 6, 2013 10:09 AM

The original chart from batari (and in this thread) says 176.
I, personally, leave the last line unset or black, because of that half scan line appears in the upper right.
attachicon.gifIMG_3348.PNG

EDIT: Not that there is anything wrong with this behavior, just depends on how OCD you are!!! :)

 

Its worth noting that the last line of color here actually serves as the score background color.

 

In my yet-to-be-released bB source I tracked down the source of this and fixed it by setting the background color to black as the kernel starts. Until I have something more to share, folks can do the same just by adding a "COLUBK=0" to their source, just prior to the drawscreen.



#89 Random Terrain ONLINE  

Random Terrain

    Visual batari Basic User

  • Topic Starter
  • 28,327 posts
  • Controlled Randomness
    Replay Value
    Nonlinear
  • Location:North Carolina (USA)

Posted Mon Sep 9, 2013 10:15 AM

Please check out the program below and see if you'd like anything changed before I clean up the code and put it on the bB page:

 

Attached File  ex_dpc_frac_2013y_09m_09d_1155t.bin   32KB   130 downloads

 

Press the joystick left or right to select DF6FRACINC, DF0FRACINC, DF1FRACINC, DF2FRACINC, DF3FRACINC or DF4FRACINC. Press the joystick up or down to increase or decrease the selected register. Press the fire button to slow things down when you get near a number that you'd like to stop on. Hit reset to go back to the default settings.

 

 

Thanks.



#90 Random Terrain ONLINE  

Random Terrain

    Visual batari Basic User

  • Topic Starter
  • 28,327 posts
  • Controlled Randomness
    Replay Value
    Nonlinear
  • Location:North Carolina (USA)

Posted Mon Sep 9, 2013 6:03 PM

If there are no complaints or suggestions, I'm going to put this on the page tonight.



#91 RevEng OFFLINE  

RevEng

    River Patroller

  • 4,724 posts
  • Bitnik
  • Location:Canada

Posted Mon Sep 9, 2013 6:58 PM

I liked it as-is. It's a good way of confirming for the programmer exactly how the DF#FRACINC settings work! :thumbsup:

#92 Random Terrain ONLINE  

Random Terrain

    Visual batari Basic User

  • Topic Starter
  • 28,327 posts
  • Controlled Randomness
    Replay Value
    Nonlinear
  • Location:North Carolina (USA)

Posted Mon Sep 9, 2013 7:05 PM

I liked it as-is. It's a good way of confirming for the programmer exactly how the DF#FRACINC settings work! :thumbsup:

 

OK, thanks. I'll leave it the way it is. I'll just clean up the code.



#93 Random Terrain ONLINE  

Random Terrain

    Visual batari Basic User

  • Topic Starter
  • 28,327 posts
  • Controlled Randomness
    Replay Value
    Nonlinear
  • Location:North Carolina (USA)

Posted Wed Sep 11, 2013 12:56 AM

OK, I lied. I added one more feature. There are a few presets that you can choose with the select switch:

 

randomterrain.com/atari-2600-memories-batari-basic-commands.html#ex_dpc_frac



#94 iesposta OFFLINE  

iesposta

    River Patroller

  • 3,429 posts
  • Retro-gaming w/my VCS
  • Location:Pennsylvania

Posted Wed Sep 11, 2013 1:29 AM

OK, I lied. I added one more feature. There are a few presets that you can choose with the select switch:

 

randomterrain.com/atari-2600-memories-batari-basic-commands.html#ex_dpc_frac

That's a great demo!

If only I could think of a game that uses 4 expanding and contracting columns.

It'a a 4 band equalizer display!



#95 Random Terrain ONLINE  

Random Terrain

    Visual batari Basic User

  • Topic Starter
  • 28,327 posts
  • Controlled Randomness
    Replay Value
    Nonlinear
  • Location:North Carolina (USA)

Posted Wed Sep 11, 2013 2:29 AM

I added the DPC+ section to the table of contents on the left side of the page. I can always add more subsections or move things around when people point out things that should be added or changed.

 

When you guys get a chance, you can look over the whole DPC+ section and see if anything needs to be changed or moved or if I forgot to add something:

 

randomterrain.com/atari-2600-memories-batari-basic-commands.html#dpcplus

 

 

Thanks.



#96 Random Terrain ONLINE  

Random Terrain

    Visual batari Basic User

  • Topic Starter
  • 28,327 posts
  • Controlled Randomness
    Replay Value
    Nonlinear
  • Location:North Carolina (USA)

Posted Mon Sep 16, 2013 3:26 PM

Here's something I don't remember reading. Does the DPC+ kernel use paddles?



#97 RevEng OFFLINE  

RevEng

    River Patroller

  • 4,724 posts
  • Bitnik
  • Location:Canada

Posted Mon Sep 16, 2013 5:11 PM

Looking at the source, it doesn't appear to have paddle support.

#98 Random Terrain ONLINE  

Random Terrain

    Visual batari Basic User

  • Topic Starter
  • 28,327 posts
  • Controlled Randomness
    Replay Value
    Nonlinear
  • Location:North Carolina (USA)

Posted Mon Sep 16, 2013 5:36 PM

Looking at the source, it doesn't appear to have paddle support.

 

OK, thanks.



#99 Random Terrain ONLINE  

Random Terrain

    Visual batari Basic User

  • Topic Starter
  • 28,327 posts
  • Controlled Randomness
    Replay Value
    Nonlinear
  • Location:North Carolina (USA)

Posted Tue Sep 17, 2013 12:30 AM

Is "dim rand16 = <var>" still needed with the DPC+ kernel?
 



#100 RevEng OFFLINE  

RevEng

    River Patroller

  • 4,724 posts
  • Bitnik
  • Location:Canada

Posted Tue Sep 17, 2013 5:13 AM

No. DPC+ has an arm based 32-bit LFSR for random numbers.




0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users