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

TailChao

  • Full Member
  • ***
  • Posts: 156
Re: System card dreams....
« Reply #30 on: February 26, 2015, 07:52:28 AM »
Alright, sorry for the double post but:
Here's a UPS patch for the Japanese System Card 3.0 (Original MD5 should be 38179df8f4ac870017db21ebcbf53114).

Steps for Mednafen:
-Patch the Super System Card image.
-Replace your currently configured PCE-CD BIOS with this patched image.
-Disable arcade card emulation (in your .cfg file).

What this gets you:
-512KB of RAM from $40-$7F plus the base 64K of RAM for a total of 576KB.
-512KB of ROM from $00-$3F. Banks $00-$1F are the (modified) Super System Card. The rest are whatever your imagination can put there.
-Seems to work with most SuperCD games, if something is messed up, let me know.
-Would work in both a PCE and TurboGrafx with no modification.

Next Steps:
I am willing to make a "developer's" run of cards which could support these features and possibly a few more. I'll also release all materials associated with how the cards are designed, how the mapper works etc. Then you guys can do whatever you want with it.

I don't have the resources to do a mass production run or deal with the legal issues, my priority is creating games but I think this card would be a neat thing.

elmer

  • Hero Member
  • *****
  • Posts: 2148
Re: System card dreams....
« Reply #31 on: February 26, 2015, 09:21:46 AM »
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.
Well, a basic TL866CS programmer goes for about $47 on AliBaba ... so the translation crews might be happy enough to just have one guy buy one and send out updated ROMs to the others when they're needed.

It sounds like a total pain to me, but I'm sure that someone will have a better perspective on that than I do.

From my very, very personal POV, I'd much rather have the mapper simplified to get rid of the multi-region capability and allow the PCE's CPU to flash updates.

For a "developers" run and not a "mass-production" run, I would think that any developers are likely to be using Japanese systems, or to have a kisado/mirai available.

Anyone that really only had a US system could just swap in a bit-flipped ROM chip ... and the PCE's flashing software could take the region into account whenever it did the updates.

For a mass-production run ... it would just be a case of having some ROMs pre-flashed with a Japanese boot loader, and some with a US boot-loader.

But realistically ... it's not my call on this!  :wink:

TailChao

  • Full Member
  • ***
  • Posts: 156
Re: System card dreams....
« Reply #32 on: February 26, 2015, 10:00:22 AM »
For a "developers" run and not a "mass-production" run, I would think that any developers are likely to be using Japanese systems, or to have a kisado/mirai available.

Anyone that really only had a US system could just swap in a bit-flipped ROM chip ... and the PCE's flashing software could take the region into account whenever it did the updates.

For a mass-production run ... it would just be a case of having some ROMs pre-flashed with a Japanese boot loader, and some with a US boot-loader.

But realistically ... it's not my call on this!  :wink:
For any sort of production run, I'd rather just make the 1MB version I described earlier, since then you can just include whatever version of the system card you like with the CD game itself, and just load it at start.
Then you get to keep the multi region capability and get more memory anyway.

elmer

  • Hero Member
  • *****
  • Posts: 2148
Re: System card dreams....
« Reply #33 on: February 26, 2015, 10:13:47 AM »
For any sort of production run, I'd rather just make the 1MB version I described earlier, since then you can just include whatever version of the system card you like with the CD game itself, and just load it at start.
Then you get to keep the multi region capability and get more memory anyway.
I sat back and gave it some more thought, and realized that I was entirely wrong ... but you'd already beaten me to replying and it was too late to retract!  :oops:

Yes, a stable base version that doesn't change is more important.

Then you can either go the 1MB route and load a new BIOS, or just ship it as 512KB with a modded BIOS that vectors everything through new jump vectors in the extra RAM and so allows each game to patch/add just what it needs.

The 2nd solution would be a little cheaper to make, and potentially require less extra space on the game's CD.




SamIAm

  • Hero Member
  • *****
  • Posts: 1835
Re: System card dreams....
« Reply #34 on: February 26, 2015, 12:32:44 PM »
Some of these technical aspects are a little over my head, but I am really grateful for the discussion happening now, and especially to TailChao for sharing so much.

Now we just need Bonknuts. I'll try and get at him again.

elmer

  • Hero Member
  • *****
  • Posts: 2148
Re: System card dreams....
« Reply #35 on: February 26, 2015, 01:42:03 PM »
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.
I wish that I could help you with that ... they're excellent questions.

I assume that we're both working from the same resources ... Charles MacDonald's brilliant work, the Hu7CD documentation, and the SCSI CD standards.

I do wonder if Hudson reused the same basic interface design for the PC-FX (which is a little better documented) ... but haven't really given it a serious look.

Quote
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 :)
I'd heard of the palette problem ... just assumed that everyone worked around it with a multi-stage boot.

As for the other things ... a custom CD BIOS scares me because it limits the audience to those with your specific hardware add-on.

PCE owners are already fragmented enough with all the different variations!

TheOldMan

  • Hero Member
  • *****
  • Posts: 958
Re: System card dreams....
« Reply #36 on: February 26, 2015, 03:22:19 PM »
elmer: this is what I was testing ROM writes with. You can see if your copy of mednafen blocks ROM writes.
.............................................................
/*.....................................................................................*/
/* emutest.c - program to test ROM writeability.                                       */
/*.....................................................................................*/

#include "huc.h"

main()
{
 
  init_satb();
 
  if( emuCheck() )
  {
     put_string( "Is Emu", 0, 0 );
  }
  else
  {
     put_string( "Not Emu", 0, 0 );
  }
 
  while( 1 )
  {
      vsync(0);
     satb_update();
  }
}

emuCheck()
{
   #asm
   ; map empty page in
   
   tma      #7            ; next to last page : $C000-DFFF
   pha
   lda      #0            ; boot bank in ROM
   tam      #7            ; set page
   
   lda      #$aa
   sta      $dffe         ; would be $fffe, the reset vector
   ldx      $dffe         ; if mapped one segment higher, like normal
   
   pla
   tam      #7            ; put page back
   
   cpx      #$aa
   bne      .fail
   
   lda      #0            ; return 1 if match
   ldx      #1
   rts
   
.fail
   lda      #0            ; return 0 if no match
   ldx      #0
   rts
   
   #endasm
}

..................................................
Huc -scd emutest.c
mount iso and run it.

HailingTheThings

  • Hero Member
  • *****
  • Posts: 3229
Re: System card dreams....
« Reply #37 on: February 26, 2015, 04:22:18 PM »
Slap on a pair of Air Zonk shades and that would be an amazing shirt.




Jah feel?

http://printallover.me/products/0000000p-i-have-a-duo?social=true


Well damn. I totes bookmarked dat page, may purchase, may, may.

elmer

  • Hero Member
  • *****
  • Posts: 2148
Re: System card dreams....
« Reply #38 on: February 26, 2015, 04:28:38 PM »
   tma      #7            ; next to last page : $C000-DFFF
Am I missing something here?

I'm not familiar with HuC ... but the general instruction form that I'm familiar with is tma 0-7 ... so you'd actually be switching the bank that's mapped into $E000-$FFFF ... and then you're doing the test by writing the byte at $DFFE, in a totally different bank.

Does HuC use tma 1-8 instead?
« Last Edit: February 26, 2015, 04:30:24 PM by elmer »

NightWolve

  • Hero Member
  • *****
  • Posts: 5277
Re: System card dreams....
« Reply #39 on: February 26, 2015, 04:35:49 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).

That's cool. I would've liked some transistor experience when I worked on my CS degree now that I think about it and the interests I gained due to Le Steve. Funny enough I minored in physics and in one lab course is where we did quite a few projects teaching us the basics of resistors, circuit design and so forth revovling around Ohm's Law.

poponon

  • Sr. Member
  • ****
  • Posts: 320


poponon

  • Sr. Member
  • ****
  • Posts: 320
Re: System card dreams....
« Reply #42 on: February 27, 2015, 12:22:49 AM »


*unzips*

I'm waiting.....

*unsheathes katana*

Hmph, you're almost not worth it...

*teleports behind you, cutting you in half*

heh...nothing personnel...kid...

*tips fedora*

elmer

  • Hero Member
  • *****
  • Posts: 2148
Re: System card dreams....
« Reply #43 on: February 27, 2015, 03:30:36 AM »
Huc -scd emutest.c
mount iso and run it.
So ... HuC has built me a 900KB iso ... but the current version of Mednafen doesn't support physical CDs any more, so there's no point in mounting it ... and Mednafen refuses to run it from the command line, it wants cue&bin, not iso.

Any suggestions?

TailChao

  • Full Member
  • ***
  • Posts: 156
Re: System card dreams....
« Reply #44 on: February 27, 2015, 04:02:18 AM »
As for the other things ... a custom CD BIOS scares me because it limits the audience to those with your specific hardware add-on.

PCE owners are already fragmented enough with all the different variations!
It limits your audience, but not so much if the card is cheap.

This is actually the major reason I want to do the 512KB ROM + 1MB RAM version of the card. You can just include a very slightly modified 3.0 BIOS (i.e. startup area only, like the 512KB RAM patch I posted), and it will just work as a normal super system card.
But if the game requires (or optionally can use) the extended RAM or wants to use a patched BIOS, it just loads that into RAM, maps out the system card ROM, and continues on.

When I first got a TurboGrafx and wanted to play Super CD games, I literally couldn't do so until I added a region modification to the system. The US system cards were too expensive.
This way you get an affordable card which works with either system and would offer expanded capability for translations.