Jump to content
IGNORED

Stella and DPC+


Random Terrain

Recommended Posts

When using Stella 5.1.3, batari Basic users were able to use a couple of asm tricks to make certain DPC+ screens look right.

 

To make an 88 row DPC+ screen look right, we'd use this:

 

__Main_Loop

   ;***************************************************************
   ;
   ;  88 rows that are 2 scanlines high.
   ;
   DF6FRACINC = 255 ; Background colors.
   DF4FRACINC = 255 ; Playfield colors.

   DF0FRACINC = 128 ; Column 0.
   DF1FRACINC = 128 ; Column 1.
   DF2FRACINC = 128 ; Column 2.
   DF3FRACINC = 128 ; Column 3.

   ;***************************************************************
   ;
   ;  Simple fix for the top two lines having the same color.
   ;
   asm
   lda DF6FRACDATA
   lda DF4FRACDATA
end

   ;***************************************************************
   ;
   ;  Displays the screen.
   ;
   drawscreen

   goto __Main_Loop

 

To make a 176 row DPC+ screen look right, we'd use this:

 

__Main_Loop

   ;***************************************************************
   ;
   ;  176 rows that are 1 scanline high. (88 rows of color).
   ;
   DF6FRACINC = 255 ; Background colors.
   DF4FRACINC = 255 ; Playfield colors.

   DF0FRACINC = 255 ; Column 0.
   DF1FRACINC = 255 ; Column 1.
   DF2FRACINC = 255 ; Column 2.
   DF3FRACINC = 255 ; Column 3.

   ;***************************************************************
   ;
   ;  Simple fix for the top and bottom rows.
   ;
   asm
   lda DF6FRACDATA
   lda DF4FRACDATA
   lda DF0FRACDATA
   lda DF1FRACDATA
   lda DF2FRACDATA
   lda DF3FRACDATA
end

   ;***************************************************************
   ;
   ;  Displays the screen.
   ;
   drawscreen

   goto __Main_Loop

 

Looks like those asm tricks stopped working with Stella 6.0. Does that mean something is wrong with Stella or does it mean those asm tricks were never supposed to work?

 

 

Thanks.

Link to comment
Share on other sites

There are different versions of the DPC+ driver that have different behavior with the fractional data fetchers. Looking at history in Stella the most recent updates were committed on March 15, 2020, which would have been released with Stella 6.1.

 

Main question is does the behavior you now see in Stella match the behavior on real hardware?

  • YES - then either:
    the tricks were never supposed to work
    - OR -
    the tricks worked with a different version of the DPC+ driver than what is being used now
     
  • NO - then there's more work to be done on DPC+ emulation.


Due to unexpected RL issues I am not available to work on Atari projects for the foreseeable future, so if there's more work to be done it'll either have to wait or see if somebody else can look into it.

 

 

Blog entry with the research for the March 15th commit:

 

Link to comment
Share on other sites

Thanks. I don't have a real Atari hooked up and don't know which box my Harmony cartridge is in, so I can't check. Maybe somebody who has a real Atari hooked up can check.

 

Here's a .bin file using the 88 row trick:

test_bb_dpc_88_rows.bin

 

Here's a screenshot of the 88 row editor with Stella 5.1.3 next to it:

z_aa_DPC_88_rows.thumb.png.adc6b0f81dd53da5ac9890196866dd5b.png

 

 

 Here's a .bin file using the 176 row trick:

test_bb_dpc_176_rows.bin

 

Here's a screenshot of the 176 row editor with Stella 5.1.3 next to it:

 

z_aa_DPC_176_rows.thumb.png.93bfe75846d5e0583db7e53644ec2be2.png

Link to comment
Share on other sites

Rogerpoco took a couple of photos:

 

https://atariage.com/forums/topic/323611-do-you-have-an-atari-2600-and-harmony-cart/?do=findComment&comment=4878708

 

Stella 6.0 and beyond look like a real Atari 2600. The trick as posted wasn't supposed to work. I hope that an updated trick might work, though.

  • Like 1
Link to comment
Share on other sites

3 hours ago, Random Terrain said:

Stella 6.0 and beyond look like a real Atari 2600

 

That still leaves the possibility that the trick is tied to a specific version of the DPC+ driver. If I find some freetime this weekend I'll look into making BINs of the test programs with each version of the DPC+ driver.

  • Like 2
Link to comment
Share on other sites

While I've only checked in Stella, it does look like the trick is tied to the DPC+ driver version. You'll need to get somebody to try them on real hardware to confirm as my 2600 is currently out of commission.

 

The big long hex value after 88_ is the MD5 value for the DPC+ driver. These two drivers have the same result:

 

137830973_ScreenShot2021-08-08at12_31_21PM.thumb.png.fe4e67e99c5e2d34dfd432ee1010195b.png

 

959364397_ScreenShot2021-08-08at12_31_41PM.thumb.png.5b60f35d2d05adcdefffb070bfa3a909.png

 

and these two drivers have the same result:

 

510346847_ScreenShot2021-08-08at12_31_28PM.thumb.png.e80cfa890f4bfcdaf9ec8a4bd839d860.png

 

822446821_ScreenShot2021-08-08at12_31_34PM.thumb.png.ffc81f4bd1346894c6497f4764834be6.png

 

I used the script in DPCplusVersions.zip to create these ROMs, there are 4 ROMs in each zip:

 

88.zip 

 

176.zip

 

These are the 4 driver versions:

 

DPCplus_Drivers.zip

  • Like 2
Link to comment
Share on other sites

10 hours ago, SpiceWare said:

While I've only checked in Stella, it does look like the trick is tied to the DPC+ driver version.

 

Thanks. Do you know who is in charge of the DPC+ driver? It would be nice to get the tricks working again.

Link to comment
Share on other sites

I believe batari maintains the driver, though I doubt there will be any additional revisions to DPC+ because we've moved on to CDFJ.

 

As such, just use whichever version of the driver behaves the way you want it to behave. Looking at a bB directory, replace the file bB###\includes\DPCplus.arm with the version of the driver you wish to use. The drivers are in the DPCplus_Drivers.zip file in my prior reply.

 

NOTE: I would not recommend using DPCplus_8dd73b44fd11c488326ce507cbeb19d1 because it is not compatible with the Harmony Encore.

Link to comment
Share on other sites

4 hours ago, SpiceWare said:

I believe batari maintains the driver, though I doubt there will be any additional revisions to DPC+ because we've moved on to CDFJ.

 

As such, just use whichever version of the driver behaves the way you want it to behave. Looking at a bB directory, replace the file bB###\includes\DPCplus.arm with the version of the driver you wish to use. The drivers are in the DPCplus_Drivers.zip file in my prior reply.

 

NOTE: I would not recommend using DPCplus_8dd73b44fd11c488326ce507cbeb19d1 because it is not compatible with the Harmony Encore.

 

OK, thanks. I renamed DPCplus_17884ec14f9b1d06fe8d617a1fbdcf47.arm to DPCplus.arm and put it in the bB includes folder. Now both tricks work using the latest version of Stella.

 

In a PM, Rogerpoco tested two programs that were compiled using the updated driver and photos show that the tricks work on a real Atari 2600 using a Harmony cart. So now we know that it works with the latest version of Stella and the Harmony cart.

 

Any bB users reading this can put the file below in their includes folder too:

 

DPCplus.arm

  • Like 1
  • Thanks 1
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...