Author Topic: PcEngine Duo - 2MB Internal RAM expansion  (Read 160 times)

Quickie

  • Newbie
  • *
  • Posts: 5
PcEngine Duo - 2MB Internal RAM expansion
« on: October 30, 2024, 06:17:32 AM »
Hi all,

I am a newbie in this forum, so please don't take in consideration my question if a design or solution already exists.

I got into my hands a junk Pc Engine Duo, and besides the usual recap and lens cleanup I wanted to boost a little bit this fantastic console.
I designed an internal custom RGB mod PCB that allowed me to do a neat installation on the HuC6260 IC. If there is some interest on it I can post the details on another thread.

I started digging on the PcEngine CD catalog and came across that some nice games require the Arcade Card for extra RAM.
My question is: isn't there any Open source design that could allow to perform this upgrade permanent without the need of having an expensive Arcade Card?

I have been reviewing @TailChao 's CD Stupid Card 4.0, which in fact includes 2MB of SRAM among a 512kb Flash, but I am not interested in having the HuCard slot permanently in use as I would prefer to launch any CD-ROM? title from Turbo Everdrive's TEOS and a patched bios, having the extra 2MB of RAM onboard.

If there isn't anything like that I thought that if @TailChao gives his blessing I could try to do a design one internal RAM expansion based on his work, but I understand there should be some work involved in the current CPLD code to strip the flash portion, and that is beyond my skills right now.


Keith Courage

  • Hero Member
  • *****
  • Posts: 2690
Re: PcEngine Duo - 2MB Internal RAM expansion
« Reply #1 on: October 31, 2024, 07:20:15 AM »
I don't think there are any Sram chips compatible with the internals of these systems that would let one install the larger size of the Arcade cards ram internally. The arcade CD system card is 16MB for DUOs as it already has 2mb built in. So trying to find 18MB or 20MB of internal ram that works for these systems is probably a long shot. Here are the specs of the two 1MB chips installed in a stock DUO https://wiki.console5.com/wiki/SRAM_1Mb:_128K_x_8-bit.

Not to mention, if there was a way to actually replace the existing DUO CD ram with a larger size chip, I wonder if the games would recognize the extra ram or if they are programmed to specifically look for the extra Ram in the HuCard slot. I'm not a programmer so somene else smarter than I would have to look into if that happens for the arcade CD games or not.

Cool idea for soldering up RGB to the HU6260 chip.
« Last Edit: October 31, 2024, 07:30:05 AM by Keith Courage »

Quickie

  • Newbie
  • *
  • Posts: 5
Re: PcEngine Duo - 2MB Internal RAM expansion
« Reply #2 on: October 31, 2024, 11:31:18 AM »
Thanks for your reply Keith Courage, let me however, explain better some things that perhaps were not clear:

- Pc Engine Arcade Card has 2MB (Megabytes) of SRAM, which is equivalent to 16 Mb (Megabits). So the target is to have those 2MB or 16Mb as stated :)

- There are SRAMs whose specifications may suit fine for this project. An example is 1MB SRAM Alliance AS6C8008's with TSOP-44 packaging. Their package and footprint are small enough to be integrated on an internal solution using two of them, and those are the ones used by TailChao's CD Stupid Card 4.0.

- Arcade Card Memory detection is (as far as I know, as per TailChao's documentation) based on honoring a pin query (CARDn to disable their internal memory) which unfortunately needs to be patched on the Duo's original 3.0 BIOS as seems it does not does detect it properly.

- The new memory address mapping and control is managed by a CPLD and the code behind it. I am not versed in Verilog, therefore I am not able to strip the current part for memory handling of CD Stupid Card 4.0, but the code should be there.


That is why I wondered if the TailChao could give his saying on this ;)

On the other hand I will open a new post with my RGB mod for the Duo :)
« Last Edit: November 01, 2024, 05:29:43 PM by Quickie »

Keith Courage

  • Hero Member
  • *****
  • Posts: 2690
Re: PcEngine Duo - 2MB Internal RAM expansion
« Reply #3 on: November 02, 2024, 03:01:53 AM »
So the stupid card ram chips(AS6C8008's) can be used to replace the internal D431000A Ram chips or are you saying that you would like to create a way to just install the AS6C8008's ram chips internally to the Hucard slot somehow?

Quickie

  • Newbie
  • *
  • Posts: 5
Re: PcEngine Duo - 2MB Internal RAM expansion
« Reply #4 on: November 03, 2024, 02:59:10 AM »
The statement is to design an internal add-on driven by a cpld connected to some HuCard slot pins, not just wiring SRAM memory chips, because as stated, they need some logic for the adressment.

elmer

  • Hero Member
  • *****
  • Posts: 2153
Re: PcEngine Duo - 2MB Internal RAM expansion
« Reply #5 on: November 03, 2024, 08:36:09 AM »
Are you aware that TailChao's CD Stupid Card v4 is not compatible with Arcade Card games? That was never its design goal.

It was meant to provide ROM and extra banked RAM for homebrew projects and translations ... of which there have been absolutely none made so far that use its capabilities, primarily because the Turbo Everdrive v2 was released just after the CD Stupid Card v4, and it provided more RAM, and in a more programmer-friendly fashion.


The 2MB of Arcade Card memory is accessed very differently to normal PC Engine memory, and while "yes", you do have access to the Arcade Card through banks $40..$43, the memory is those banks is not normal banked-RAM, and instead is just autoincrementing ports so that you can use TIA/TAI instructions to copy data from the Arcade Card to VRAM/RAM.

If you really wish to design some circuitry to provide an internal Arcade Card capability to your PC Engine, then you are going to have to add a huge amount of capabilities into your CPLD that are not included in TailChao's CD Stupid Card v4.

Quickie

  • Newbie
  • *
  • Posts: 5
Re: PcEngine Duo - 2MB Internal RAM expansion
« Reply #6 on: November 04, 2024, 10:30:27 AM »
Hi elmer,

I was somehow expecting that, but did not had 100% certainty. I read that the CD Stupid Card v.4.0 provided a custom memory mapping for development but I wasn't able to find any explicit reference of not being compatible with Arcade Card memory banking.
Now it's clear that they do have different mapping schemes and the Arcade card one is quite complex.

I can imagine that the availability of Turbo Everdrive v2 and it's 4MB moved the interest towards it, and I was aware that your TEOS development supported the usage of TED v.2 as a Super System Card :clap:, but couldn't see any reference or mention to the Arcade Card emulation.

Essentially, your TEOS support for extended memory mappers is the neatest solution I can imagine if you have a TED v.2, but having read some old posts refering to the SF2 Memory mapper and the challenges it presented it makes me wonder if it could be possible to considering an Arcade card mapping emulation on TEOS as you've done with SSC.

I guess that the fact of TEOS requiring v2.5 ED was because of the use of a more capable CPLD of the latter (Lattice) vs Altera MAXII epm240t100c5n from previous versions, but as I stated, I am not versed in Verilog to see if there might even be enough macrocells available to consider implementing something of this complexity with the current available space.

elmer

  • Hero Member
  • *****
  • Posts: 2153
Re: PcEngine Duo - 2MB Internal RAM expansion
« Reply #7 on: November 05, 2024, 12:08:58 PM »
Essentially, your TEOS support for extended memory mappers is the neatest solution I can imagine if you have a TED v.2, but having read some old posts refering to the SF2 Memory mapper and the challenges it presented it makes me wonder if it could be possible to considering an Arcade card mapping emulation on TEOS as you've done with SSC.

It just isn't possible. The Arcade Card memory is accessed in a totally different way to normal memory.

The TED v2 was just never designed to have those capabilities.

The TED v2 does emulate the SF2 mapper, and you can use all of that memory as RAM if you wish.

Accessing more than 2.5MB is also possible using the TED v2's built-in mapper, but that is very different to using the SF2 mapper.

PCEAS has included support for developing homebrew for the SF2 mapper (up to 8MBytes) since earlier this year, but nobody has used it yet AFAIK apart from my asm example project.

HuC will *never* natively support HuCARDs larger than 1MB because its program structure just isn't compatible.


I guess that the fact of TEOS requiring v2.5 ED was because of the use of a more capable CPLD of the latter (Lattice) vs Altera MAXII epm240t100c5n from previous versions, but as I stated, I am not versed in Verilog to see if there might even be enough macrocells available to consider implementing something of this complexity with the current available space.

TEOS's existence has nothing to do with the CPLD/FPGA size as such, it was possible because the TED v2 is built using 4MB of RAM, wheras the TED v1 was built using 1MB Flash-ROM.

Now, Krikzz probably couldn't have designed the TED v2 to use RAM without using the larger and more complex FPGA, but that's not quite the same thing. TEOS does not use or change the CPLD, it just uses the capabilities that Krikzz designed into the TED v2 and then documented.