Author Topic: CD Stupid Card 4.0  (Read 5724 times)

elmer

  • Hero Member
  • *****
  • Posts: 2153
Re: CD Stupid Card 4.0
« Reply #15 on: March 03, 2015, 10:13:54 AM »
A cheat menu that works off of the top IRQ vectors would be what I'd want... perhaps this could have a flash ROM region for customization.  If the IRQ vectors aren't enough for games, then some hardware monitoring of the pins on the HuCard might work.

That's my blue-sky "enhancement".
You may have missed the other thread, but I think that you're already getting what you want.

My understanding from that thread is ...

There will be flash, but it won't be in-system-programmable.
The bottom 512KB will be switchable from flash to RAM ... so just load up whatever modified BIOS with whatever vectors you like into that RAM.

There's your cheat menu.

Would you guys consider also posting about this on other forums ? I'm sure there are a lot more people out there that'd be interested in this thing.
Did you miss the bit about TailChao kindly offering to maybe make 25 or so of these for developers?

He's not proposing a mass-manufacturing run ... it's a bit too early to want more interest.
« Last Edit: March 03, 2015, 11:11:11 AM by elmer »

TailChao

  • Full Member
  • ***
  • Posts: 156
Re: CD Stupid Card 4.0
« Reply #16 on: March 03, 2015, 10:17:41 AM »
If it's too much of a hassle then by all means leave it out.  There aren't that many games that use it and I figure at this point most people who want one have one.

I just think it'd be cool to have a single system card that would play all (not counting the pr0n-o cd games, I guess) CD games, translations, etc.  Between this new system card and an everdrive It would be easier to start Obeying with reckless abandon as you'd have (almost) the entire library available without even having to worry about region compatibility.
I can totally understand the desire to have everything on one card, but the arcade card features exponentially increase the complexity of this project. I think you'll agree that it's easier just to try and keep the cost of the CD Stupid Card under $40.

A cheat menu that works off of the top IRQ vectors would be what I'd want... perhaps this could have a flash ROM region for customization.  If the IRQ vectors aren't enough for games, then some hardware monitoring of the pins on the HuCard might work.

That's my blue-sky "enhancement".
It depends upon how you want the cheat feature to work.
To be clear, the 512KB of flash on the card only has the lower 256KB used for the patched Super System Card BIOS. The upper 256KB is completely empty and you are free to make your own "Cheat BIOS" or whatever BIOS you want. However, this requires a chip programmer (I am happy to supply the 39F040 as a socketed DIP, but I cannot make it easily programmable through the cartridge slot without dropping dual region support).

You can also load your own patched cheat BIOS via CD into the lower 512KB of RAM, then switch into 1MB Linear RAM mode, which does not require a chip programmer. This is pretty much the cool mode, since you could literally load a HuCard from the CD, then layer cheats / patches on top of it.

Edit: Elmer basically got it.
« Last Edit: March 03, 2015, 10:22:46 AM by TailChao »

poponon

  • Sr. Member
  • ****
  • Posts: 320
Re: CD Stupid Card 4.0
« Reply #17 on: March 03, 2015, 10:36:47 AM »

Did you miss the bit about TailChao kindly offing to maybe make 25 or so of these for developers?

He's not proposing a mass-manufacturing run ... it's a bit too early to want more interest.

Ah yeah I'm jumping the gun. Too excited to see how the project turns out.

elmer

  • Hero Member
  • *****
  • Posts: 2153
Re: CD Stupid Card 4.0
« Reply #18 on: March 03, 2015, 11:10:37 AM »
However, I can change the amount of RAM on the CD Stupid Card to 2MB (just adding a second SRAM chip and extra banking bit), if it's actually useful to people. But this will obviously raise the card cost.

From what I can see, you've got 2 different groups of developers that this card will apply to ...

1) The translation guys.
2) The new development guys.

From what I've seen in the translation discussions, they're not going to need more than 1MB. They're targeting SCD, and 512KB-more-than-an-SCD is plenty for them to solve their space problems.

2MB that isn't compatible with an Arcade Card is unlikely to help them with any ACD games or ACD-enhanced games.

From my POV when looking at new development ... I have 4 specific games in mind, of which I'll try to pick 2, or maybe 3 to actually do (1 starter project, and 1 how-good-can-I-make-it project).

The 2 smaller games should run with either 1MB HuCard or your 1MB enhanced SCD card.

The 2 larger games are only going to be possible (at the moment) with the extra memory of an Arcade Card.

If you can put 2MB RAM on board, then 2MB+64KB (your card) is so close to 2MB+256KB (Arcade Card), that I'd definitely make the game(s) run with your card as an alternative to the Arcade Card.

For new development, I'd think that putting 2MB on your card should make it a viable target for anyone wanting to make Arcade Card games.

In my very personal opinion, I think that the cost of the extra 1MB would be worth it as an investment into encouraging future development ... but I can easily see others disagreeing and just wanting the cheapest card possible for encouraging future translations.

Now, when it comes to the technical details of actually accessing the memory, my 'druthers as a programmer would be ...
[ul][li]The bottom 256KB or 512KB region is write-protected so that existing games won't screw up the BIOS-in-RAM with writes.[/li][li]Have a bit to flip somewhere to switch the bottom 512KB between either flash or the bottom 512KB bank of RAM[/li][li]Have another 1 bit (if 1MB) or 2 bits (if 2MB) to select which of the 2-or-4 512KB banks of RAM is seen in the top 512KB region of the cart ... that would specifically include the 512KB bank that is used to replace the flash.[/li][li]Optional, but not-at-all-necessary, would actually be 1-or-2 bits to select which bank of RAM appears in the low 512KB region to replace the flash.[/li][/ul]There you go ... that's my unasked-for wish-list specification!  :wink:
« Last Edit: March 03, 2015, 11:17:23 AM by elmer »

TailChao

  • Full Member
  • ***
  • Posts: 156
Re: CD Stupid Card 4.0
« Reply #19 on: March 03, 2015, 11:56:14 AM »
For new development, I'd think that putting 2MB on your card should make it a viable target for anyone wanting to make Arcade Card games.

In my very personal opinion, I think that the cost of the extra 1MB would be worth it as an investment into encouraging future development ... but I can easily see others disagreeing and just wanting the cheapest card possible for encouraging future translations.
I'm totally cool with putting 2MB instead of 1MB, it's only an extra $7 and there should be room on the PCB. However to address your list:

[ul][li]The bottom 256KB or 512KB region is write-protected so that existing games won't screw up the BIOS-in-RAM with writes.[/li][/ul]
I think this is kind of moot, since we should be able to get decent compatibility with whatever patched System Card 3.0 is included on Flash, and that is write protected anyway. Either the simple one I released or whatever you guys come up with later.

[ul][li]Have another 1 bit (if 1MB) or 2 bits (if 2MB) to select which of the 2-or-4 512KB banks of RAM is seen in the top 512KB region of the cart ... that would specifically include the 512KB bank that is used to replace the flash.[/li][/ul]
The current card should already do what you want. The upper 512KB (RAM) is split into a selectable bank (lower 256KB) and fixed bank (upper 256KB). It's just in 256KB chunks instead of 512KB (which would be cumbersome).

[ul][li]Have a bit to flip somewhere to switch the bottom 512KB between either flash or the bottom 512KB bank of RAM[/li][li]Optional, but not-at-all-necessary, would actually be 1-or-2 bits to select which bank of RAM appears in the low 512KB region to replace the flash.[/li][/ul]
This would require mapping some controls into the upper region of the address space, which I would rather leave alone. Having all mapper operations work by trapping ROM writes is very safe, and uses less pins. Unfortunately this limits linear 1MB mode to just 1MB.
What I can do is change the modes to operate as follows:
[ul][li]Startup Mode (512KB ROM + Banked RAM) keeps the ROM as-is in the lower 512KB of the cartspace. The 256KB selectable RAM bank can be set to anywhere in the 2MB range, and the 256KB fixed RAM bank is set to the highest 256KB page.[/li][li]1MB linear RAM mode uses the lower 1MB.[/li][/ul]
Does that work for you? Or do you need more than one 256KB selectable page of RAM at once?
I can see if we have enough register space left to map out the upper 256KB of Flash and replace it with a second selectable RAM bank if it's absolutely needed.
« Last Edit: March 03, 2015, 12:03:06 PM by TailChao »

elmer

  • Hero Member
  • *****
  • Posts: 2153
Re: CD Stupid Card 4.0
« Reply #20 on: March 03, 2015, 12:49:03 PM »
Does that work for you? Or do you need more than one 256KB selectable page of RAM at once?
I can see if we have enough register space left to map out the upper 256KB of Flash and replace it with a second selectable RAM bank if it's absolutely needed.
Cool, I have a bit better understanding of where you're coming from.   :)

So the 1MB linear mode is targeted at running HuCard images, and is also potentially useful for the translation guys who want to load a totally custom CD BIOS.

The Startup mode can be used by the translation guys if they don't want to change the BIOS, and can also be used for new development.

The top 512K being split into fixed and bankable 256KB regions is absolutely perfect to me the way that you've described it.

Part of me is saying that I'd really like to have that 256KB-above-the-BIOS area be mapped into RAM if it's not going to cause too much trouble. Having it switchable would certainly be nice, but fixed would also be fine.

I can't say why I'm pushing for that ... I really can't see how it could possibly be an insurmountable problem if it wasn't ... but something somewhere in my head is not letting me just delete the request.  :-k

Will it be possible to switch back-and-forth between "startup" and "linear" modes, or is to going to require a reset once "linear" mode is engaged?
« Last Edit: March 03, 2015, 03:04:28 PM by elmer »

SamIAm

  • Hero Member
  • *****
  • Posts: 1835
Re: CD Stupid Card 4.0
« Reply #21 on: March 03, 2015, 12:51:34 PM »
I love you guys. Especially TailChao. Thank you so much!

elmer

  • Hero Member
  • *****
  • Posts: 2153
Re: CD Stupid Card 4.0
« Reply #22 on: March 03, 2015, 01:25:26 PM »
I'm totally cool with putting 2MB instead of 1MB, it's only an extra $7 and there should be room on the PCB.

I don't know what on earth is going on with SRAM pricing, but I was going to point out that there is at least one 2MBx8 SRAM manufacturer out there ... and then I checked Newark's prices and ... ouch!

So 1MBx8 is available for $7 each from the cheap manufacturer, but 2MBx8 is only available from one expensive manufacturer for $21 each.

I'm so glad that there's room on TailChao's board for 2 chips.  :wink:

TailChao

  • Full Member
  • ***
  • Posts: 156
Re: CD Stupid Card 4.0
« Reply #23 on: March 03, 2015, 03:28:47 PM »
Part of me is saying that I'd really like to have that 256KB-above-the-BIOS area be mapped into RAM if it's not going to cause too much trouble. Having it switchable would certainly be nice, but fixed would also be fine.

I can't say why I'm pushing for that ... I really can't see how it could possibly be an insurmountable problem if it wasn't ... but something somewhere in my head is not letting me just delete the request.  :-k

Will it be possible to switch back-and-forth between "startup" and "linear" modes, or is to going to require a reset once "linear" mode is engaged?
It is understandable, more banks are nice.
I'll try to implement it, but we are tight on gates because of a few new features...

As for linear mode, once you switch in you're stuck in it until the system is powered down. I do not think this is a big loss though.

I don't know what on earth is going on with SRAM pricing, but I was going to point out that there is at least one 2MBx8 SRAM manufacturer out there ... and then I checked Newark's prices and ... ouch!

So 1MBx8 is available for $7 each from the cheap manufacturer, but 2MBx8 is only available from one expensive manufacturer for $21 each.

I'm so glad that there's room on TailChao's board for 2 chips.  :wink:
Component pricing is funny, but yes it's lucky we have room and enough pins.
The chip count is the same as the MCGenjin 4MB Plus board I did a long time ago, so everything should fit fine.

Anyway, *UPDATE!*
[ul][li]2MB RAM is a go.[/li][li]I've removed the requirement to reverse register writes for "swapped" regions. The only thing that requires this is the region register, and my System Card patches do this for you.[/li][li]The 1MB linear mode unlock string is now "HU".[/li][/ul]
The first post and MCGenjin-CD documentation have been updated appropriately.

HailingTheThings

  • Hero Member
  • *****
  • Posts: 3229
Re: CD Stupid Card 4.0
« Reply #24 on: March 03, 2015, 03:30:23 PM »
Arcade Card support would be awesome because then I could just use this little guy instead of my Arcade Duo that secretes goopy glue whenever I feel its time to Sapphire?

Bonknuts

  • Hero Member
  • *****
  • Posts: 3292
Re: CD Stupid Card 4.0
« Reply #25 on: March 03, 2015, 03:38:38 PM »
Well.. since you're asking.. lol

 How much room do you have to implement features on the CPLD?

 The arcade card is a big much, yeah? What about two indirect registers? Full 2mb ram mode (only) with an 16bit signed auto incrementor against a 24bit vector address. Two regs (so you can read and write between to ports). Maybe put the ports in in open bus area of the AC region? (the hardware bank) Both having 8bit float parts would be nice too.


 But what I'd really love, but probably isn't doable with your existing setup.. a freaking finer timer interrupt. Something like up to 32khz and could be reset (the counter, so it can be resynced). There an irq on the cart port, so it should be doable. The reason for this? The stupid overhead of using the VDC interrupt to drive a 16khz sample playback. Why the hell didn't the implement a continuous mode where it's generated on every line without having to reload it? Having an external timer interrupt at 32khz should work, AFAIK because the phase drift isn't that great inside the frame and simply resetting/resyncing it ever vblank solves anything beyond that.

 But really, 2mbyte of ram is lot. I'd love access to that for new dev and whatever (I do both). The only concern is the availability. I don't care about price too much per se, but if I made something for this (this amount of memory), I'd love to be able to have people purchase this card.. somehow.

 Anyway, put me down for an order.

SamIAm

  • Hero Member
  • *****
  • Posts: 1835
Re: CD Stupid Card 4.0
« Reply #26 on: March 03, 2015, 04:17:52 PM »
Put me down for an order as well.

TailChao

  • Full Member
  • ***
  • Posts: 156
Re: CD Stupid Card 4.0
« Reply #27 on: March 04, 2015, 03:48:48 AM »
How much room do you have to implement features on the CPLD?
The EPM7032 we're using is 36 macrocells, not that big at all. But our real limit is pinning.
I'd like to keep the PLCC44 footprint for the mapper since anything larger would likely require a 4-layer board. We could move to an EPM7064 for more gates, but this basically rules out any features requiring fetch address manipulation.

Your timer might actually be doable if I can fit an oscillator on the board and sacrifice the indicator LEDs. Will let you know.

That said, I added Elmer's request for a second RAM bank at $40000 - $7FFFF this morning. You can optionally disable the flash in this region and then get this new feature. I'll hold off on updating the first post pending any other features that might be added in soon.

But really, 2mbyte of ram is lot. I'd love access to that for new dev and whatever (I do both). The only concern is the availability. I don't care about price too much per se, but if I made something for this (this amount of memory), I'd love to be able to have people purchase this card.. somehow.
Yes, now you can finally just have hugeass MUL, DIV, SQRT, and ARCTAN tables for CD games and not care about it!

As for manufacturing, I wish I could go through with a huge run of these on real plastic HuCards. But again, you guys will get all the mapper verilog and board gerbers for making more cards if they're ever needed.

Of course, once the feature set is finalized we should also add proper support to Mednafen as well.

elmer

  • Hero Member
  • *****
  • Posts: 2153
Re: CD Stupid Card 4.0
« Reply #28 on: March 04, 2015, 06:11:21 AM »
That said, I added Elmer's request for a second RAM bank at $40000 - $7FFFF this morning. You can optionally disable the flash in this region and then get this new feature.

Wow ... and optional, too ... that's absolutely perfect! Thanks! :D

But what I'd really love, but probably isn't doable with your existing setup.. a freaking finer timer interrupt. Something like up to 32khz and could be reset (the counter, so it can be resynced). There an irq on the cart port, so it should be doable. The reason for this? The stupid overhead of using the VDC interrupt to drive a 16khz sample playback. Why the hell didn't the implement a continuous mode where it's generated on every line without having to reload it? Having an external timer interrupt at 32khz should work, AFAIK because the phase drift isn't that great inside the frame and simply resetting/resyncing it ever vblank solves anything beyond that.

I'm still ignorant enough to not quite understand the circumstances that you're targeting.

Do you want this to make sample playback on HuCards less CPU-intensive, or more for adding extra sample channels to CD games?

Either way is cool ... just curious  :-k

ParanoiaDragon

  • Hero Member
  • *****
  • Posts: 4619
Re: CD Stupid Card 4.0
« Reply #29 on: March 04, 2015, 07:53:39 AM »
Roughly how much would this card cost, if the Arcade card features were included?  One reason I ask this, is because we did have plans for at least 1 Arcade CD game(Golden Axe), however, I wonder if it'd be more doable with this cards current features compared to the Arcade CD, or if we'd still need the ACD & combine it with the Stupid Cards features.  Ultimately, I know nothing, Old Rover/Nod would have to chime in about this, but you can read about the project here:
http://www.pcenginefx.com/forums/index.php?topic=15488.15