It is currently Tue Aug 21, 2018 6:58 am

All times are UTC - 7 hours





Post new topic Reply to topic  [ 85 posts ]  Go to page 1, 2, 3, 4, 5, 6  Next
Author Message
PostPosted: Fri Mar 18, 2016 9:13 am 
Offline

Joined: Fri Jul 04, 2014 2:34 pm
Posts: 335
Location: Germany
So, I got this game for a trade with something else but it only boots on Famiclone consoles, not in the original Famicom.

Like many Waixing games I tried to lift CHR ROM /OE Pin and connect it to Famicom cartridge connector pin 17.

But it was already properly connected. (Game is from C&E Soft, not from Waixing).

I see:
E28F004 (PRG-ROM) (below the SRAM)
E28F004 (CHR-ROM)
D4364C (SRAM)
GAL16V8D
74LS670 x4
Diodes + Resistors

Battery was removed to see the board properly.

Is there a way to fix this cart to work on a original Famicom, too?

EDIT: Added picture without SRAM, so PRG ROM is visible.
EDIT2: Measured contacts from PRG and all are properly connected.

I'm assuming it is the logic? If so, why?

Problem solved: Replaced the 74'670 + SRAM and it works now!


Attachments:
IMG_6794.JPG
IMG_6794.JPG [ 213.84 KiB | Viewed 3225 times ]
IMG_6792.JPG
IMG_6792.JPG [ 186.63 KiB | Viewed 3244 times ]
IMG_6791.JPG
IMG_6791.JPG [ 186.28 KiB | Viewed 3244 times ]


Last edited by Ice Man on Tue Mar 29, 2016 3:21 am, edited 1 time in total.
Top
 Profile  
 
PostPosted: Fri Mar 18, 2016 6:33 pm 
Offline

Joined: Sun Apr 13, 2008 11:12 am
Posts: 7402
Location: Seattle
The circuitry is pretty simple here; it just seems to use 2 74'670s for PRG banking and 2 for CHR banking. (So the hardware makes it look like it should support up to 2 MiB of PRG and 512 KiB of CHR.)

There's additionally the 8 KiB PRG-RAM, as you graciously desoldered.

Any chance you could provide better photographs (i.e. brighter light, no shadows, higher resolution), or else just sit down with a continuity meter and determine what pins connect to what? Some things are easy (e.g. we know that the register file outputs have to connect to PRG A13…A20 and CHR A11…A18; and their inputs at least mostly connect to CPU D0…D7), but knowing the rest of the connectivity would make diagnosing/debugging easier.

The biggest question for continuity are the pins on the GAL.


Top
 Profile  
 
PostPosted: Sat Mar 19, 2016 3:23 am 
Offline

Joined: Fri Jul 04, 2014 2:34 pm
Posts: 335
Location: Germany
I hope this helps, as I have no better camera, sadly.

http://share.pho.to/A4gU2

What I noticed is:

PRG /OE is connected to GAL16V8D Pin 1 and Cartridge connector #44.

PRG /CE is grounded.

The diodes and resistors are used for the SRAM+Battery (save circuit).


Top
 Profile  
 
PostPosted: Sat Mar 19, 2016 7:17 am 
Offline

Joined: Sun Apr 13, 2008 11:12 am
Posts: 7402
Location: Seattle
It seems very likely that there's some assumption made in the GAL's programming that allows the game to boot correctly on a famiclone that isn't true on the famicom.

For example, Disch's notes for mapper 246 say that the PRG bank at $E000 is set to $FF on boot, which might be implemented using some logic in the GAL in combination with the 74'670's /OE pins, rather than actually writing a value to the '670 during boot.

The bright side is that, if we can figure out the full connectivity of the GAL, we should be able to generate a new fusemap for it that would let it work on a famicom as well. This is what I can tell from the photos, as far as the GAL is concerned:
Code:
                           +--v--+
                        -> |01 20| -- Vcc
                        -> |02 19|
                        -> |03 18|
CPU A12 and PRG RAM A12 -> |04 17|
                        -> |05 16|
                CPU A10 -> |06 15| <- CPU M2
         CPU A9 and ??? -> |07 14| <- PRG RAM A4 and PRG ROM A5 and CPU A4
                        -> |08 13| <- PRG RAM A5 and PRG ROM A8 and CPU A5
                        -> |09 12| -> 74'670 /RE = /OE
                    Gnd -- |10 11| <-
                           +-----+


Top
 Profile  
 
PostPosted: Sat Mar 19, 2016 9:11 am 
Offline

Joined: Fri Jul 04, 2014 2:34 pm
Posts: 335
Location: Germany
This is what find out so far:

Code:
                           +--v--+
                PRG /OE -> |01 20| -- Vcc
 Upper '670 Pin 4 (PRG) -> |02 19| -- PRG RAM /CE
 Lower '670 Pin 5 (PRG) -> |03 18| -- '670 Pin 12 (PRG)
CPU A12 and PRG RAM A12 -> |04 17| -- '670 Pin 12 (CHR)
CPU A11 and PRG RAM A11 -> |05 16| <- CPU M2
CPU A10 and PRG RAM A10 -> |06 15| -- SRAM /RW
             PRG RAM A9 -> |07 14| <- PRG RAM A4 and PRG ROM A5 and CPU A4
             PRG RAM A8 -> |08 13| <- PRG RAM A5 and PRG ROM A8 and CPU A5
             PRG RAM A7 -> |09 12| -> 74'670 /RE = /OE
                    Gnd -- |10 11| <- PRG RAM A6
                           +-----+


Top
 Profile  
 
PostPosted: Sat Mar 19, 2016 7:04 pm 
Offline

Joined: Sun Apr 13, 2008 11:12 am
Posts: 7402
Location: Seattle
Ok, so to finish:
Code:
            +--v--+
 /ROMSEL -> |01 20| -- Vcc
 CPU A14 -> |02 19| -> PRG RAM /CE
 CPU A13 -> |03 18| -> 74'670 /WE (PRG)
 CPU A12 -> |04 17| -> 74'670 /WE (CHR)
 CPU A11 -> |05 16| <- CPU M2
 CPU A10 -> |06 15| <- R/W
  CPU A9 -> |07 14| <- CPU A4 (PRG ROM A5)
  CPU A8 -> |08 13| <- CPU A5 (PRG ROM A8)
  CPU A7 -> |09 12| -> 74'670 /RE (PRG)
     Gnd -- |10 11| <- CPU A6
            +-----+


There's a bunch of interesting questions here, although I'm not entirely certain whether any of them will help make it work.

First the random irrelevant musing:
Disch's notes suggest that only the 6 KiB of RAM from $6800-$7FFF are used, but if the registers are only decoded over $6000-$600F (as is possible if it's connected to CPU A4…A14, /ROMSEL, and M2), the RAM could be present over the entire 8KiB range, and only waste 4 bytes of it.

The /RE output has to be what's used here for initial power up. Somehow, the hardware has to assume that when /RE is high, the outputs of the '670s are HiZ (and then float high).

Mind, I'm not certain why they would float high; the 74LS series part should float to somewhere around 2V or so, which shouldn't be high enough for CMOS .... wait a moment. Do the famiclones run at 3V instead of 5V? If that's what's wrong, you could try adding large pullups to the PRG 74'670's outputs (around 10kΩ)


Last edited by lidnariq on Tue Mar 22, 2016 2:36 pm, edited 1 time in total.

Top
 Profile  
 
PostPosted: Sun Mar 20, 2016 3:41 am 
Offline

Joined: Fri Jul 04, 2014 2:34 pm
Posts: 335
Location: Germany
The famiclone I had earlier was a Video Game GT-3300 and if I'm not totally wrong it runs with 5V.

So I guess pull ups wouldn't work here?


Top
 Profile  
 
PostPosted: Sun Mar 20, 2016 6:54 am 
Offline

Joined: Sun Apr 13, 2008 11:12 am
Posts: 7402
Location: Seattle
It's less likely that it would help, but nothing else immediately occurs to me.

What tools (logic tester, logic analyzer, oscilloscope, &c) do you have access to?


Top
 Profile  
 
PostPosted: Sun Mar 20, 2016 7:24 am 
Offline

Joined: Fri Jul 04, 2014 2:34 pm
Posts: 335
Location: Germany
Only a digital multimeter, that's all. :(


Top
 Profile  
 
PostPosted: Sun Mar 20, 2016 7:38 am 
Offline

Joined: Sun Apr 13, 2008 11:12 am
Posts: 7402
Location: Seattle
Hm. Can you use a pair of headphones or an LED or something to see if GAL→74LS670 /RE behaves the same on both the famicom and famiclone?

It should only be high for a few moments, and may or may not be high after a reset.


Top
 Profile  
 
PostPosted: Sun Mar 20, 2016 8:47 am 
Offline

Joined: Fri Jul 04, 2014 2:34 pm
Posts: 335
Location: Germany
For that I'd need to get a famiclone again. I sold mine some weeks ago since I got all other games working on the famicom now. :(

I can check with a LED later.


Top
 Profile  
 
PostPosted: Sun Mar 20, 2016 12:44 pm 
Offline

Joined: Fri Jul 04, 2014 2:34 pm
Posts: 335
Location: Germany
So, I connected a LED and this is what happened:
-Put in game into the Famicom
-Turned on the console
-LED was bright, then off for a milisecond and then always on but slightly dimmed.

Resetting the console did nothing to the LED.


Also, what did you mean with headphones? How can I test that method?


Top
 Profile  
 
PostPosted: Sun Mar 20, 2016 3:39 pm 
Offline

Joined: Sun Apr 13, 2008 11:12 am
Posts: 7402
Location: Seattle
Er, what orientation was the LED? It tentatively sounds like you connected the anode to /RE, and the cathode to ground? So lit = +5V, off = 0V, and somewhere inbetween = oscillating?

That's a little confusing.

Really, oscillating at all is confusing. With the GAL, I don't see how it could have enough leftover state to detect when the CPU has reset. It does sound like it's executing bad code, as you expected.


Anyway, the headphone thing: connect probe-10k resistor-headphones-ground. The 10k resistor will limit current to quiet enough that it won't be painful to hear, but enough current will still flow that you'll hear a click when the voltage changes.


Top
 Profile  
 
PostPosted: Sun Mar 20, 2016 4:03 pm 
Offline

Joined: Fri Jul 04, 2014 2:34 pm
Posts: 335
Location: Germany
Exactly, that's what I did.

Anode to '670 /RE
Cathode to GND

Yep, 5V = on, 0V = off and anything inbetween oscillating, since after some restarts (not reset) the LED wouldn't lit bright enough anymore but was darker.

Is there away to read the GALs code or fix this? If not I will just sell this game eventhough I'd love to keep it and play it on a real Famicom. :(


Top
 Profile  
 
PostPosted: Sun Mar 20, 2016 4:22 pm 
Offline

Joined: Sun Apr 13, 2008 11:12 am
Posts: 7402
Location: Seattle
Absolutely. Some of the outputs will be simply combinatorial.
You should be able to use some of the tools mentioned here http://www.retro.co.za/ccc/mac/ReverseE ... /PALs.html


If you were using an ordinary LED without a current limiting resistor, you may have damaged it by running too much current though it.


Alternatively, Nocash is in Germany and maybe (maybe) might be interested in taking a look.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 85 posts ]  Go to page 1, 2, 3, 4, 5, 6  Next

All times are UTC - 7 hours


Who is online

Users browsing this forum: Google [Bot] and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group