Jump to content
IGNORED

DPC+ support !


Al_Nafuur

Recommended Posts

new fonts and animated wait logos are cool, but what about DPC+ support?

 

I am (trying) to develop a DPC+ support for the PlusCart and the UnoCart. The DPC+ Bankswitching is working so far, so Chaotic Grill is running on the PlusCart.

 

The ARM code is not fully supported right now. Currently the DPC+ ROMs must be patched or recompiled to fit the memory layout of PlusCart and UnoCart, which differs from the Harmony's ARM. And the IRQ driven audio is not implemented yet.

 

So far I managed to recompile some of SpiceWares DPC+ examples and run on PAL systems. It seems that there is a timing issue in my DPC+ implementation, so these binaries are not working on (slightly faster) NTSC systems.

 

For reading a write from the 6507 the PlusCart (and the UnoCart) waits for the address bus to change, and uses the last value read on the data bus.

e.g:

https://gitlab.com/firmaplus/atari-2600-pluscart/-/blob/master/source/STM32firmware/PlusCart/Src/cartridge_emulation_dpcp.c#L217

 

this approach wastes a lot of time, and not much time is left for the operations afterwards without missing the next 6507 request/cycle.

 

I tried to use the read timing of @ZackAttack's SnoopDataBus function from his vcsLib, but without success.

 

For further testing I would like to have a modified stella build with altered memory settings for the PlusCart/UnoCart:

ROM base: 0x20000000

RAM base: 0x10000000

 

Harmony settings are:

ROM base: 0x00000000

RAM base: 0x40000000

 

maybe someone can provide this. Maybe this changes could be done for CDFJ too ?

Link to comment
Share on other sites

I'm just as eager as anyone for DPC+ and CDFJ to be implemented, this last hurdle would completely make the PlusCart my go to cart rather than going between it and Harmony. It's a pretty large order to get both bankswitching formats but I'm sure we will get them implemented at some point.

Link to comment
Share on other sites

So it appears to me that you're essentially trying to "guarantee" that you have the correct data byte by waiting until the address bus changes, and then using the last data byte read BEFORE that change.

 

But, couldn't you do some sort of time check which looks at how long since the address bus changed *previously* and then just wait until the appropriate time for the data bus to be "stable".  That way you'd gain back the time between stability of the data bus, and the (eventual) change of the address bus by the 6507.  Another way of putting that; instead of taking the absolute last possible instant of the valid data "valid time range", you could try to shift that earlier using a timer/counter since the address bus was changed.

 

Edit:

 

Something like

 

    while (CurrentTime() - PreviousAddressChangeTime < TimeForDataToBecomeValid) {}
    data = DATA_IN. ; read the valid data now we know address is stable
                                                                             

 

 

 

 

Edited by Andrew Davie
Link to comment
Share on other sites

5 hours ago, Andrew Davie said:

Something like


    while (CurrentTime() - PreviousAddressChangeTime < TimeForDataToBecomeValid) {}
    data = DATA_IN. ; read the valid data now we know address is stable
                                                                             

 

Something like this would be cool. We could measure the time between the address bus changes at emulation startup while the VCS is still in the RAM waitroutine. An then calculate the time it should take until the data at a write cycle is valid on the Data bus:

GIF11.gif

iirc this kind of measurement is used by SpiceWare to test if it is a PAL, NTSC or SECAM console (because they all have different CPU clock rates). I just don't find the thread right now. Has he published any c code about this detection? 

 

 

Link to comment
Share on other sites

  • 4 weeks later...

How many NTSC systems has this been tested on? How long does it take to reproduce? What does the failure look like?

 

I played chaotic grill for 10-15 minutes on my ntsc 7800 without seeing any issue. If it weren't for the flicker I may have played all night. That game is awesome.

 

I suspect this may be an issue with detecting the wrong address. Specifically this line of code:

		while ((addr = ADDR_IN) != addr_prev) addr_prev = addr;

When working with the uno firmware I noticed that my JR would hold a transient address on the bus long enough for that code to pick it up. So the cart essentially services two memory accesses for each address change in the console. For simpler schemes like a 4K ROM it doesn't really matter because the f407 is so fast, but I could see it being a problem for more complicated ones like this.

 

I'll test with the JR tomorrow and hopefully see a failure.

 

  • Like 1
Link to comment
Share on other sites

9 hours ago, ZackAttack said:

I suspect this may be an issue with detecting the wrong address. Specifically this line of code:


		while ((addr = ADDR_IN) != addr_prev) addr_prev = addr;

When working with the uno firmware I noticed that my JR would hold a transient address on the bus long enough for that code to pick it up. So the cart essentially services two memory accesses for each address change in the console. For simpler schemes like a 4K ROM it doesn't really matter because the f407 is so fast, but I could see it being a problem for more complicated ones like this.

This code is used at almost every Bankswitching in the UnoCart and PlusCart. But in 3E, 3F and 0840 bankswitching there is a "new more robust test for stable address (seems to be needed for 7800)" used:

		while (((addr = ADDR_IN) != addr_prev) || (addr != addr_prev2))
		{	// new more robust test for stable address (seems to be needed for 7800)
			addr_prev2 = addr_prev;
			addr_prev = addr;
		}

maybe we should use this at the DPC+ bankswitching too..

 

Link to comment
Share on other sites

  • 2 years later...
On 7/13/2023 at 1:34 AM, pseudografx said:

Hi, been a while since last activity in this conversation, but has there been any progress in bringing DPC+ support to the Plus/UnoCart?

Unfortunately no progress

  • Sad 1
Link to comment
Share on other sites

  • 11 months later...

ZeroPage Homebrew will be unveiling DPC+ support for the Uno/PlusCart (plus CDFJ on the way!) with LIVE Video Interviews with the devs Wolfgang Stubig @Al_Nafuur & Marco Johannes @MarcoJ tomorrow's ZPH stream LIVE on Twitch! Hope you can join us!

 

Games:

  • Debut of DPC+ Support for Uno/PlusCart plus LIVE Video Interviews with devs Wolfgang Stubig @Al_Nafuur & Marco Johannes @MarcoJ

  • Mattress Monkeys (2024 Exclusive World Premiere | 2600) by Phantom Logic Studios / Mathew Halpern @8bitPoet / Zachary Scolaro @ZackAttack

 

  • Like 3
Link to comment
Share on other sites

The new PlusStore API version which patches the DPC+ bB games has been released.

A collection of the games can be found in the folder: "Public ROMs/Homebrew/DPC+ bB Games"

  • Like 2
Link to comment
Share on other sites

Posted (edited)
12 minutes ago, pseudografx said:

Is this accessible from a browser? I only have a UnoCart.

No.

@JetSetIlly will release a tool for the UnoCart users. We are currently clarifying under which licenses this will be published.

 

Edit:
@JetSetIlly MarcoJ and I would like to release the DPCp ACE driver under GPLv2.

 

Edited by Al_Nafuur
  • Like 1
Link to comment
Share on other sites

On 6/21/2024 at 10:25 PM, pseudografx said:

Is this accessible from a browser? I only have a UnoCart.

On 6/21/2024 at 10:36 PM, Al_Nafuur said:

@JetSetIlly will release a tool for the UnoCart users

 

v1.0 of relocateBB https://github.com/JetSetIlly/relocateBB/releases/tag/v1.0

 

Any questions or problems can be posted here. Alternatively you can open an issue on Github if that's convenient.

 

  • Thanks 1
Link to comment
Share on other sites

On 6/25/2024 at 10:47 PM, JetSetIlly said:

 

v1.0 of relocateBB https://github.com/JetSetIlly/relocateBB/releases/tag/v1.0

 

Any questions or problems can be posted here. Alternatively you can open an issue on Github if that's convenient.

 

Thanks for the tool. This can convert the Batari BASIC .bin, but how to convert in .ace for example Scramble from Champs Games, that is not in Batari BASIC? Thanks.

 

Link to comment
Share on other sites

54 minutes ago, tmop69 said:

Thanks for the tool. This can convert the Batari BASIC .bin, but how to convert in .ace for example Scramble from Champs Games, that is not in Batari BASIC? Thanks.

Games that are not written in Batari BASIC have to be converted by hand. We've done that for Scramble and the demo is on the PlusStore. However, Scramble is a commercial game so the full game is not publicly available

 

If you've bought a full version of Scramble in the past then there will need to be some arrangement with @johnnywcfor you to acquire the Uno/PlusCart version. It's technically possible but not something I can offer any help with.

  • Like 2
  • Thanks 1
Link to comment
Share on other sites

1 hour ago, JetSetIlly said:

Games that are not written in Batari BASIC have to be converted by hand. We've done that for Scramble and the demo is on the PlusStore. However, Scramble is a commercial game so the full game is not publicly available

 

If you've bought a full version of Scramble in the past then there will need to be some arrangement with @johnnywcfor you to acquire the Uno/PlusCart version. It's technically possible but not something I can offer any help with.

We haven't uploaded the manually converted DPC+ ROMs for the UnoCart to the forums yet. They are only available via the PlusStore. @johnnywc if it is okay for you, we can upload the ACE version to the forum too.

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

On 6/29/2024 at 6:41 AM, JetSetIlly said:

Games that are not written in Batari BASIC have to be converted by hand. We've done that for Scramble and the demo is on the PlusStore. However, Scramble is a commercial game so the full game is not publicly available

 

If you've bought a full version of Scramble in the past then there will need to be some arrangement with @johnnywcfor you to acquire the Uno/PlusCart version. It's technically possible but not something I can offer any help with.

Thanks Steve for mentioning this. :)   If you have previously ordered a full ROM of Scramble from Champ Games, we will be glad to provide to you an ACE version of the ROM to play on the PlusCart/UnoCart.  Eventually we will start including an ACE version of the game ROM for any new purchases.

22 hours ago, Al_Nafuur said:

We haven't uploaded the manually converted DPC+ ROMs for the UnoCart to the forums yet. They are only available via the PlusStore. @johnnywc if it is okay for you, we can upload the ACE version to the forum too.

Yes, that would be great.  Thanks! 👍

  • Like 1
  • Thanks 2
Link to comment
Share on other sites

Here are all none bB DPC+ ROMs we have converted manually so far for UnoCart users (UCA firmware required!) to test.

 

PlusCart users can find the binaries in the PlusStore folder "Public ROMs/Homebrew/DPC+ ACE"

 

Chaotic_Grill.ACE Frantic_20140404.ACE Scramble Demo NTSC_stm32.ACE Scramble_v2.ACE Spacerocks_20121106_stm32.ace ZaxxonHDDemo_ACE_150927_NTSC.bin ZaxxonHDDemo_ACE_150927_PAL60.bin

  • Like 4
  • Thanks 1
Link to comment
Share on other sites

  • Recently Browsing   0 members

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