Author Topic: System card dreams....  (Read 3940 times)

SamIAm

  • Hero Member
  • *****
  • Posts: 1835
Re: System card dreams....
« Reply #15 on: February 25, 2015, 01:37:15 PM »
Quote
I wouldn't be surprised if we could ship a custom card for less than $30.

Assuming just 10 cards are made: It's $220+ to make them. The chips and such are about $10.
That would make each card about $35.

But we know from experience, large quantities are the way to go. If you make 50 cards, it's only a bit more expensive - but the cost per card drops dramatically (to around $5, iirc). The majority of the card cost is setup expenses. So yeah, I could see $20 for a card.

You are right, though. We need bonknuts to get some time off school so he can work on this. I honestly think if he were to fix/re-write/extend the bios, this could be a big thing....

But for what its worth, I have the board designed already. Just need to get parts to make sure the pad footprints / traces are right, and have the boards made. All that has to go through Arkhan - I don't shop online. And he's waiting to see if we have enough $$ from atlantean to do it.

Thanks for the info.

Arkhan, I know you'll read this sooner or later. Hit me up. I'll pay for the parts.

I don't mind paying at a higher rate to make some prototypes before we go for a large-quantity order. Ideally, I'd like to test the proto-boards with literally a couple dozen games as well as some sort of test-program, if Bonknuts or someone else can whip one up.

TailChao

  • Full Member
  • ***
  • Posts: 156
Re: System card dreams....
« Reply #16 on: February 25, 2015, 01:38:25 PM »
Sure ... and if you want to make that dream come true, then IMHO ...
[uldecimal][li]Make the dozen-or-less line modification to Mednafen to emulate 512KB ROM/RAM.[/li][li]Gather together your crew that's going to work on the first translation that uses it.[/li][li]Start development with the modified Mednafen and make sure that you can use the RAM effectively.[/li][li]That's all.[/li][/ul]

This is basically why I asked what people are looking for in a System Card. If all that's desired is 512KB ROM + 512KB RAM, MCGenjin already gives you that and is fully supported in Mednafen. You just need to add an MCGenjin header to a modified system card, and configure it for 2 x 256KB.
I have some crappy prototypes with 1MB of RAM and RAM paging, but those aren't emulated (and are really overkill in my opinion).


Your card is exactly what inspired Bonknuts (aka Tom) to want to have this for translation projects.

If you would be willing to share more details about what you did to make that card, that would be wonderful. In another thread, I was talking about putting up money to build some prototypes, and that could be arranged with you if you are interested.

I hope Bonknuts can get in touch with whomever is most interested in making a card and work out the technical details. I'll start bugging him to weight in here.

Gotcha,
All the MCGenjin work I did is here.
To get 512KB of RAM you can use the supplied POFs as is and connect two 256K x 8 SRAMs to User CS0 and User CS1.
An easier way (since 512KB x 8 chips are common) is to alter the decoding to just trigger a single User CS when A20 is low and A19 is high. If you want me to post modified POFs and VHDL here which do essentially that, I'd be happy to.
« Last Edit: February 25, 2015, 01:45:56 PM by TailChao »

SamIAm

  • Hero Member
  • *****
  • Posts: 1835
Re: System card dreams....
« Reply #17 on: February 25, 2015, 01:45:34 PM »
This is basically why I asked what people are looking for in a System Card. If all that's desired is 512KB ROM + 512KB RAM, MCGenjin already gives you that and is fully supported in Mednafen. You just need to add an MCGenjin header to a modified system card.
I have some crappy prototypes with 1MB of RAM and RAM paging, but those aren't emulated (and are really overkill in my opinion).


Yeah, we really shouldn't need that for translations. As little as 8kb of extra RAM would make an enormous difference.

Your experience making a real card would be very valuable if you can share it. With the basic 512KB ROM/RAM card that you built, did you encounter any compatibility problems?

TailChao

  • Full Member
  • ***
  • Posts: 156
Re: System card dreams....
« Reply #18 on: February 25, 2015, 01:52:04 PM »
Yeah, we really shouldn't need that for translations. As little as 8kb of extra RAM would make an enormous difference.

Your experience making a real card would be very valuable if you can share it. With the basic 512KB ROM/RAM card that you built, did you encounter any compatibility problems?
I actually never tried flashing it with the System card image, so I'm not sure. It was built upon request for someone when I first finished the MCGenjin stuff way back when, and I just tested it for functionality (i.e. does the RAM and mapping work properly).

I just looked at the system card in a hex editor and the end of the first bank is padded with $FF, so an MCGenjin header can just be slammed in there no problem. Will test with Mednafen later.

elmer

  • Hero Member
  • *****
  • Posts: 2153
Re: System card dreams....
« Reply #19 on: February 25, 2015, 02:47:18 PM »
Depends on how he's planning to use the RAM. I think it would be a lot harder to code for than a simple extension to the page mechanism already in place, but I could be wrong.
You know that it's already going to be readable through the regular mapping mechanism ... he wants to replace the current flash memory with it.

But there is definitely the question of whether it will be CPU writable through the same mechanism, or even at all!

He's currently using 8MB of flash memory ... but I can only find 1 supplier of 2MBx8 5V SRAM, and 3 suppliers of 1MBx8 5V SRAM ... and it's not very cheap.

I guess that he could be using SDRAM ... but that would be one heck of a lot of work!

It'll be very interesting to see what he's using when it comes out.

Quote
BTW, I'm not sure you would actually have to modify mednafen much. You can already write to ROM, and have it change.
Huh??? If it's not actually masking off writes to the emulated ROM memory, then the capability is already in there and I don't need to do anything!

You should just be able to pad a system card up to 512KB or 1MB with zeros, fix up it's header for that size ... and Mednafen would then allocate you a whole bunch of spare memory for you to write into.

Is there some reason that wouldn't do everything that you need?

Quote
Do it, and post the changes (and how to re-build everything).
Sounds like you don't actually need any changes!

I'll certainly post build instructions if/when I've got the PC-FX changes done ... but unless someone tells me that expanding a system card didn't work, I'll keep on with the PC-FX stuff while I'm still on a roll.

Quote
If you do, would you please let me know where to look in the mednafen source for the cd handling routines? If I can see how it's emulated, maybe I can figure out what is going on with the scsi bus in bios.
What are you looking for? Do you already have the SCSI and SCSI3 documentation?

Quote
We need bonknuts to get some time off school so he can work on this. I honestly think if he were to fix/re-write/extend the bios, this could be a big thing....
I'm new here ... may I ask what's wrong with the existing SuperCDROM BIOS???
« Last Edit: February 25, 2015, 02:49:21 PM by elmer »

elmer

  • Hero Member
  • *****
  • Posts: 2153
Re: System card dreams....
« Reply #20 on: February 25, 2015, 03:05:39 PM »
This is basically why I asked what people are looking for in a System Card. If all that's desired is 512KB ROM + 512KB RAM, MCGenjin already gives you that and is fully supported in Mednafen.

So no need to change Mednafen at all ... and the translation crew can just get to work!  :wink:

Quote
All the MCGenjin work I did is here.

Cool stuff! I hadn't seen that before ... really nice!  :D

spenoza

  • Hero Member
  • *****
  • Posts: 2751
Re: System card dreams....
« Reply #21 on: February 25, 2015, 03:28:04 PM »
Now, I'm trying to remember a previous discussion some time back about how the system uses RAM. For main RAM, what is the max the system can use? Can it access main RAM through the cart slot? Can cart slot RAM only server as extended memory?

Maybe I'm mixing metaphors, here... I think what I'm remember was related to the SuperGrafx. The SGX doubles the system memory, does it not?
<a href="http://www.pcedaisakusen.net/2/34/103/show-collection.htm" class="bbc_link" target="_blank">My meager PC Engine Collection so far.</a><br><a href="https://www.pcenginefx.com/forums/" class="bbc_link" target="_blank">PC Engine Software Bible</a><br><a href="http://www.racketboy.com/forum/" c

elmer

  • Hero Member
  • *****
  • Posts: 2153
Re: System card dreams....
« Reply #22 on: February 25, 2015, 04:10:53 PM »
Now, I'm trying to remember a previous discussion some time back about how the system uses RAM. For main RAM, what is the max the system can use? Can it access main RAM through the cart slot? Can cart slot RAM only server as extended memory?

Maybe I'm mixing metaphors, here... I think what I'm remember was related to the SuperGrafx. The SGX doubles the system memory, does it not?
The PCE's HuC6280 CPU is a classic 8-bit CPU with a 64KB logical-address range ... but it can map any 8KB logical-segment into any 8KB memory segment in it's 2MB physical-address range.

That's actually one of the nicest memory schemes of any of the early consoles.

So ... the cartridge memory is mapped into the bottom 1MB of the physical address range (thus the 1MB limit on carts - without a second level of mapping, like Street Fighter used) ... and the top 1MB stays internal to the console.

Most of the internal space is wasted, after all, who would EVER need a cartridge more than 1MB!!!!!

The original PCE had 1 internal 8KB segment of RAM, the SGX had 4 internal 8KB segments of RAM.

The cartridge port does have the "write" signals taken out to it, so "yes" you can put RAM on a cartridge and map into into regular memory like any other segment.

TheOldMan

  • Hero Member
  • *****
  • Posts: 958
Re: System card dreams....
« Reply #23 on: February 25, 2015, 04:24:20 PM »
toymachine78:
Quote
Where do you learn to design boards? Are you guys computer engineers? Electrical engineers?

Actually, I'm a software engineer (retired). Back when I got my degree, you had to take 3 courses in computer design, though. Was pretty interesting; starting from some transistors, build a flip-flop. Or two. Or three. (Hmm.... monostabile multivibrator, then j-k, then D, iirc). Then build the basic gates (and, or, not, eor, etc).
Second class was build basic circuits using those gates. Latches, selectors, adders, etc. Third class was more high-level; using building-block circuits, build other 'blocks': address bus, data bus, basic cpu, instruction decoder, etc.
The guy who taught the class was really cool. At the end of each class, he actually brought in a huge breadboard, with all the various devices built onto it - and made totally from transistors (he did cheat a little - each 'chip' was on a smaller board, and the boards were wired together)
Hey, 1kHz may not be fast, but it did work. I think in the end we ended up with a 4 bit cpu.

elmer:
Quote
Huh??? If it's not actually masking off writes to the emulated ROM memory, then the capability is already in there and I don't need to do anything!
Have not tested with a cd system card. My test was with a regular card image. But since the actual card should be treated as ROM, I was pretty surprised to find out you could write to it :)

Quote
What are you looking for? Do you already have the SCSI and SCSI3 documentation?
What I'm looking for is a useful description of the registers used to access the scsi bus; I have docs on how it works, but knowing $0401 bit 6 is scsi select line (or ack, or whatever) would go a long way in decoding how to 'talk' to the cd reader itself. Right now, I just have a bunch of i/o addresses, with individual bits being toggled. Would be nice to know what those bits are actually doing.

Quote
what's wrong with the existing SuperCDROM BIOS???
There's a bug loading palettes when the cd boots.
I suspect (but am not positive of) there is a problem with the status register being saved correctly in some irq situation.
And I'd really like to have a faster cd loading routine.

Keep in mind, if we have more space in the bios rom, we can expand the funtionality; would be nice to have de-compression in bios, rather than RAM. Or the possibility of two different chip tune players :) Heck, we could even remove the cd check when bios boots a cd :)

Spenoza:
Quote
Now, I'm trying to remember a previous discussion some time back about how the system uses RAM. For main RAM, what is the max the system can use?
I'm fairly sure any page on a card could be RAM, with the exception of page 0 (which has to contain the boot code). I know a card can access 512K; I'm pretty sure that's only half the max size of a card.

TailChao:
I know nothing about fpga chips. But one request Tom would like I know is out of my league.
Would it be possible to mirror a bank of RAM into both the card space and the system space?
I -think- the idea there is to mirror the system RAM (page 7e, I believe) into an unused area of the boot/bios page.  Not positive, though. You'd have to ask Tom about what he wants mirrored, and how.

EvilEvoIX

  • Hero Member
  • *****
  • Posts: 1895
Re: System card dreams....
« Reply #24 on: February 26, 2015, 12:33:15 AM »


Quote from: ProfessorProfessorson
I already dropped him a message on there and he did not reply back, so f*ck him, and his cunt wife.

TailChao

  • Full Member
  • ***
  • Posts: 156
Re: System card dreams....
« Reply #25 on: February 26, 2015, 04:15:54 AM »
This is basically why I asked what people are looking for in a System Card. If all that's desired is 512KB ROM + 512KB RAM, MCGenjin already gives you that and is fully supported in Mednafen.

So no need to change Mednafen at all ... and the translation crew can just get to work!  :wink:

Quote
All the MCGenjin work I did is here.

Cool stuff! I hadn't seen that before ... really nice!  :D

The Super System Card still needs to be modified though. I did a quick first try this morning.
I used the padded space at the end of bank 0 to add multi-region capability, automatically set up the MCGenjin ROM page select to the second 256KB page (so $20-$3F will be whatever you guys want to add to the BIOS routines), and patched EX_MEMOPEN to always yield A = $86 X = $03 and CLC.

Will try it with some games tonight, and distribute it here if it works.


I know nothing about fpga chips. But one request Tom would like I know is out of my league.
Would it be possible to mirror a bank of RAM into both the card space and the system space?
I -think- the idea there is to mirror the system RAM (page 7e, I believe) into an unused area of the boot/bios page.  Not positive, though. You'd have to ask Tom about what he wants mirrored, and how.

It's possible.
I think a better way though is to have a 512KB ROM + 1MB RAM cartridge, where normally the ROM is fixed to banks $00-$3F and the RAM is set up with 256KB fixed and 256KB pageable in banks $40-$7F. Then add a new register to "switch out" the ROM and replace the whole cart address region in $00-$7F with the 1MB of RAM.

This way you could load whatever patches you want to the System Card, use it as a HuCard loader (which would be compatible with most everything), and just get more memory in general.

For now I'll just try and get MCGenjin + Super System Card + 512KB RAM working in mednafen in case people want to use it for translations. However, if there's a desire to actually do a developer run of cards, I suggest we do the latter setup with 1MB of RAM.
I'll leave this open to suggestion (not just from Tom, but anyone). Might be able to do a run in April or so.

elmer

  • Hero Member
  • *****
  • Posts: 2153
Re: System card dreams....
« Reply #26 on: February 26, 2015, 05:13:56 AM »
For now I'll just try and get MCGenjin + Super System Card + 512KB RAM working in mednafen in case people want to use it for translations. However, if there's a desire to actually do a developer run of cards, I suggest we do the latter setup with 1MB of RAM.
I'll leave this open to suggestion (not just from Tom, but anyone). Might be able to do a run in April or so.
Way cool! Thanks for this.

Further points to consider as this snowball picks up speed ...

Are you going to make this work on the original CDROM systems?

You'd need to be able to map 256KB of your RAM to the regular System Card 3.0 banks ... but not do it by default in case you're running on a Duo or higher that already has that memory.

How are people going to get the modified System Card image on to the card in the first place?

Are you going to ship pre-flashed cards and risk the copyright issues that that would involve ... or is there going to be some other way to get the modified System Card image on to the cartridge?

TailChao

  • Full Member
  • ***
  • Posts: 156
Re: System card dreams....
« Reply #27 on: February 26, 2015, 05:29:37 AM »
Are you going to make this work on the original CDROM systems?

You'd need to be able to map 256KB of your RAM to the regular System Card 3.0 banks ... but not do it by default in case you're running on a Duo or higher that already has that memory.
Getting everything to work on the original hardware is the basic intention, yes.
I don't own a Duo (only a PCE, TG16 + CD, and Express), but I'm assuming its internal memory is enabled by the HuCard detect line (otherwise there would be a conflict with normal games). In which case we don't have to do anything.
However, if it doesn't work this way, adding a workaround in some modified MCGenjin CPLD is not a big deal.

How are people going to get the modified System Card image on to the card in the first place?

Are you going to ship pre-flashed cards and risk the copyright issues that that would involve ... or is there going to be some other way to get the modified System Card image on to the cartridge?
This is basically my major concern, and I don't want any legal trouble.

The "right way" is to roll our own compatible BIOS, but I'm definitely not doing this.
Having users able to flash the cartridge with a system card image in their home (assuming they don't own a chip programmer) would drive up the cost, too. What will probably have to happen if I do a run of developer cards is that they'll just have an empty 29F040 / 39F040 DIP socket, and the owner will have to toss the image on a chip themselves, or get a preflashed one from someone else.
Or a preflashed chip could happen to have fallen in the same bag as the board, I have no idea how that would happen though.

For now, let's just get the emulator support working and see what people want in the hardware.

Edit:
I was impatient, seems the patched System Card works okay with a couple games in Mednafen.
Are IPS patches okay with people here, or is it alright just to post a binary?
« Last Edit: February 26, 2015, 05:34:28 AM by TailChao »

elmer

  • Hero Member
  • *****
  • Posts: 2153
Re: System card dreams....
« Reply #28 on: February 26, 2015, 05:54:38 AM »
Getting everything to work on the original hardware is the basic intention, yes.
I don't own a Duo (only a PCE, TG16 + CD, and Express), but I'm assuming its internal memory is enabled by the HuCard detect line (otherwise there would be a conflict with normal games). In which case we don't have to do anything.
However, if it doesn't work this way, adding a workaround in some modified MCGenjin CPLD is not a big deal.
AFAIK, you're going to need that work-around.

People with DUOs have reported being able to run SuperCD games when using a System Card image on a TurboEverdrive, which definitely doesn't have the RAM.

Quote
The "right way" is to roll our own compatible BIOS, but I'm definitely not doing this.
Having users able to flash the cartridge with a system card image in their home (assuming they don't own a chip programmer) would drive up the cost, too. What will probably have to happen if I do a run of developer cards is that they'll just have an empty 29F040 / 39F040 DIP socket, and the owner will have to toss the image on a chip themselves, or get a preflashed one from someone else.
You definitely can't rely on people having a programmer!

Is the flash chip in-system-progammable from the PCE side?

If so, then you could pre-flash it with an absolutely minimal custom program that just loaded a modified BIOS off CD and then flashed it. Then that CD image gets put somewhere out in the cloud.

TailChao

  • Full Member
  • ***
  • Posts: 156
Re: System card dreams....
« Reply #29 on: February 26, 2015, 06:08:48 AM »
AFAIK, you're going to need that work-around.

People with DUOs have reported being able to run SuperCD games when using a System Card image on a TurboEverdrive, which definitely doesn't have the RAM.
In that case it's quite possible that the read sequence in EX_MEMOPEN (which I disabled) triggers this.
I'll investigate this more if we end up actually manufacturing cards.

You definitely can't rely on people having a programmer!

Is the flash chip in-system-progammable from the PCE side?

If so, then you could pre-flash it with an absolutely minimal custom program that just loaded a modified BIOS off CD and then flashed it. Then that CD image gets put somewhere out in the cloud.
Right now on MCGenjin cards no write control is given to the ROM, only RAM.
The reason is that the MCGenjin mapper is basically acting as a ROM data bus passthrough, deciding whether to invert the data lines depending upon our region. Having this act bi-directionally is complicated and I'll have to do some thinking about it, since the mapper also works by trapping ROM writes. Which means more control registers to unlock, etc.