Famicom World

Family Computer => Technical & Repair Assistance => Topic started by: Arkanix38 on April 14, 2017, 07:49:52 pm

Title: Troubles Saving on DeJap DQ5 Repro
Post by: Arkanix38 on April 14, 2017, 07:49:52 pm
Hi,

I have had a DQV cart sitting in my naughty bin for a while now and decided to get it working. I have the DeJap + Partial 2.01 ROM in it and i've got it wired up to the 74LS139. The game works perfectly except that it won't save. The game boots with a "Adventure Log 1 is gone". After going throught the beginning of the game to the first save point, I notice that there is a Level 27 save in slot 2 (that i can't access in the main menu) and when I try to save in slot 1 it fails to save and I get the "Adventure Log 1 is gone" message on next boot.

I have checked that the save battery is providing >3.1V.

thanks, Ark
Title: Re: Troubles Saving on DeJap DQ5 Repro
Post by: xIceMan on April 25, 2017, 03:39:52 am
Mind posting pics of the cart and/or the pin used?

I'm pretty sure someone mixed up address lines for decoding the SRAM.
Title: Re: Troubles Saving on DeJap DQ5 Repro
Post by: Arkanix38 on April 25, 2017, 06:55:03 pm
(http://i.imgur.com/OUMo8jC.jpg)

I desoldered the 74LS139, then lifted all pins except 1,8, 9 and 16.

then
- ROM /OE -> 74LS139 Pin 7
- ROM A20 ->74LS139 Pin 14
- ROM A20 ->U4 socket 2
- ROM A21 -> GND
- 74LS139 Pin 2->74LS139 Pin 3
- 74LS139 Pin 2->U4 Socket 14
- 75LS139 Pin 4->74LS139 Pin 15

I chose this as the cart appeared to use the same layout as the Final Fantasy IV cart but the SRAM must be decoded differently.
Title: Re: Troubles Saving on DeJap DQ5 Repro
Post by: xIceMan on April 26, 2017, 01:00:37 am
Why is there a wire from ROM A21 to GND?
74LS139 connections are completely wrong as well.

This is how it should be:
Pin1 -> Hole 1 (SNES /OE)
Pin 2 -> Cart Connector #40
Pin 3 -> Cart Connector #40
Pin 4 -> Bridge with Pin 15 of 74LS139
Pin 5 and 6 are NC
Pin 7 -> ROM /OE
Pin 8 -> Hole 8 (GND)
Pin 9 -> Hole 9 (RAM /CE)
Pin 10,11 and 12 are NC
Pin 13 -> ROM A21 AND 74LS139 Hole 3 where Pin 3 was in before
Pin 14 -> ROM A20  AND 74LS139 Hole 2 where Pin 2 was in before
Pin 15 -> Bridge with Pin 4 of 74LS139
Pin 16 -> Hole 16 (VCC)
Title: Re: Troubles Saving on DeJap DQ5 Repro
Post by: Arkanix38 on April 26, 2017, 05:35:52 am
Edited, Mixed up pin numbers for 74LS139 Pin 2,3 so wiring is as you list (except for A21)

A21 Wired to ground because the ROM is 16Mbit and doesn't utilise A21.

I have tried Wiring A21 as you instruct but it had no effect on cartridge saving.

Here (https://youtu.be/RVYCu8_ootI) is a (shortened) video of what happens after shorting the save battery (clearing the SRAM ie no corruption or files), starting the game and attempting to save. Note the apparent save in Slot 2.
Title: Re: Troubles Saving on DeJap DQ5 Repro
Post by: xIceMan on April 26, 2017, 06:43:35 am
16MBit ROM does not mean you don't have to use A21.
Your chip is a MBM29F033, which NEEDS A21 all the time.

Please connect A21 to 74LS139 Pin 13 and Hole 3.
Because A21 is tied to GND it's never pulled high, which means no saves.
Title: Re: Troubles Saving on DeJap DQ5 Repro
Post by: Arkanix38 on April 26, 2017, 05:15:33 pm
As I said in the last post, I did as you had suggested and it did not allow me to save. When addressing 16Mbit ROMS, only address lines A0-A20 are required and leaving A21 unconnected can cause floating voltage issues and incorrect addressing. As I didn't need to use A21 I wired it to ground to ensure I only used the lower 16Mbit bank of the 29F033C that I had programmed.

A21 is not used by the SRAM so it should not affect its ability to save at all. I'm guessing that either the voltage at the SRAM chip is unstable or the enable lines aren't being accessed in the same way as the FFIV cart I based my wiring off.
Title: Re: Troubles Saving on DeJap DQ5 Repro
Post by: xIceMan on April 27, 2017, 01:19:21 am
Both carts are LoROM so the wiring of the 74LS139 has to be the same.
Also, A21 is used for SRAM decoding all the time. Whether it's pulled high all the time or not.

Here's a nice table I found that shows you how SRAM is mapped at $70:000 within a LoROM game:
A22|A21|A20|A19|A18|A17|A16|A15|A14|A13|A12|A11|A10|A9|A8|A7|A6|A5|A4|A3|A2|A1|A0|
 1  |   1 |   1 |   0 |  0  |  0  |  0  |  0  |  0  |  0  |  0  |  0  |  0  | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |

Meaning if A20,A21 and A22 are high the SRAM is mapped into $70:000.

Perhaps the 74LS139 inside a SHVC-2A3B has different connections? Did you measure them with a multi meter?
Especially hole 2 and 3 which is A20/A21 in SHVC-1A3B as well as pin 9 which is RAM /CE.

Other than that, if you were to use a 29F016 you can connect A21 to GND. But since the 29F033 does have A21 you should connect it to A21 as well. I never had any issues doing that even if the game was only 16MBit. :P

P.S: 1A3B/2A3B are pretty annoying boards to base repros of. :P I made adapters especially for 1A3B because I got tired of it, heh.
Title: Re: Troubles Saving on DeJap DQ5 Repro
Post by: Arkanix38 on April 27, 2017, 04:03:31 am
Ok i've followed some traces...

SRAM Pin 20 (/CE) -> 74LS139 hole 10 [I double checked, this one is weird and goes to pin 10]
SRAM Pin 22 (/OE) -> Cart pin 23 (/RD)
SRAM Pin 26 (CE2) -> Battery (high/enabled)
SRAM Pin 27 (/WE) -> Cart pin 54 (/WR)

It seems that the only difference with the 2A3B board is that the SRAM /CE line is run to 74LS139 hole 10 rather than hole 9. I wired hole 10 to pin 9 and now the cart saves and starts without the corrupted save message!

Unfortunately I only get these issues because I refuse to use anything but an original board as a donor for my own games.

Thanks again xIceMan
Title: Re: Troubles Saving on DeJap DQ5 Repro
Post by: xIceMan on April 27, 2017, 05:52:17 am
Glad you got it working now! Didn't know SRAM /CE goes to pin 10 on that board. Always learn something new. :P

I used to use only original donors as well but the lack of good donors (1A3M,1J3M, etc.) and their always increasing price made me make my own boards with 27c160/27c322 EPROM as well as 29L1611/29L3211 EEPROM. :P