[SOLVED] Can't fix CHR pinswap problem

A place that you can discuss reproduction of classic titles or "licensed-for-reproduction" homebrew for personal use.

Moderators: B00daW, Moderators

Forum rules
1. NO BLATANT PIRACY. This includes reproducing homebrew less than 10 years old, with the exception of free software.
2. No advertising your reproductions, with the exception of free software.
3. Be nice. See RFC 1855 if you aren't sure what this means.
Post Reply
User avatar
Fisher
Posts: 1249
Joined: Sat Jul 04, 2015 9:58 am
Location: -29.794229 -55.795374

[SOLVED] Can't fix CHR pinswap problem

Post by Fisher »

Hi.
A friend of mine asked me to do a repro of a NROM game he bought.
Since it's a commercial game that's being sold, I think it's better to not post the ROMs or pictures.
He bringed me this UNROM PCB:
20210422_091334.jpg
20210422_091353.jpg
So far so good, the ROM pins are swapped.
I took a look and it seems to be like this:

Code: Select all

     PRG ROM
    +---V---+                 6264
NC  |1    32| Vcc            CHR RAM       
A16 |2    31| Vcc           +---V---+
A15 |3    30| Vcc       Vcc |1    28| Vcc
A12 |4    29| A14       A7  |2    27| R/W
A7  |5    28| A13       A8  |3    26| Vcc
A6  |6    27| A11       A6  |4    25| A9
A5  |7    26| A10       A5  |5    24| A11
A4  |8    25| A9        A4  |6    23| A10
A3  |9    24| /ROMSEL   A3  |7    22| PPU /RD
A2  |10   23| A8        A2  |8    21| A12
A1  |11   22| GND       A1  |9    20| PPU A13
A0  |12   21| D7        A0  |10   19| D7
D2  |13   20| D6        D0  |11   18| D6
D0  |14   19| D5        D1  |12   17| D5
D1  |15   18| D4        D2  |13   16| D4
GND |16   17| D3        GND |14   15| D3
    +-------+               +-------+
After splitting the PRG and CHR, I used Joe's tool to swap the pins with these parameters:

Code: Select all

PRG:
pinswap -a16,15,14,13,12,9,8,10,11,7,6,5,4,3,2,1,0 -d7,6,5,4,3,1,0,2 -o sw-prg.bin prg.bin

CHR:
pinswap -a7,10,12,11,9,8,6,5,4,3,2,1,0 -o sw-chr.bin chr.bin
After putting the smaller EPROMs on the board, it booted fine, but unfourtunatelly the tiles seem almost all wrong.
I used a 27c128 for the CHR, doubling the data after pinswaping and putting the A13 pin to VCC.
I just can't figure out what's wrong, I reviewed the pinout, the parameters and the soldering a dozen of times without success.

Can someone please suggest something I could do to solve this problem?
Thanks in advance.
Last edited by Fisher on Sun Apr 25, 2021 3:26 pm, edited 1 time in total.
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: Can't fix CHR pinswap problem

Post by lidnariq »

Fisher wrote: Sat Apr 24, 2021 3:59 pm After putting the smaller EPROMs on the board, it booted fine, but unfourtunatelly the tiles seem almost all wrong.
Are the tiles identifiably correct tiles, but just the wrong tile? Or are they not even that?
User avatar
Fisher
Posts: 1249
Joined: Sat Jul 04, 2015 9:58 am
Location: -29.794229 -55.795374

Re: Can't fix CHR pinswap problem

Post by Fisher »

They're the wrong tiles.
I'll post pictures of the screen, hopefully I won't be making the developers angry:
20210424_174245.jpg
20210424_174029.jpg
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: Can't fix CHR pinswap problem

Post by lidnariq »

Let's see ... A0-A6 should be fine, because they didn't need swapping. That means the three LSBits of the tile should be good regardless.

In the logo, the pink-and-orange diagonal in the top left of the lettering has been replaced with ... something that I might describe as a whale. Tile A6 where we should see tile C6. So A10 and A9 are probably backwards.

The stars are sprites, and we tile F8 (the number 2) where we should see tile 1F0. So it looks like A12 and A7 are backwards also. Tile 09 and 101 are also backwards.

Tile 03 is correct.

I wonder if you've got the direction of how you specify pins to the pinswap program exactly backwards from how it's supposed to work?
User avatar
Fisher
Posts: 1249
Joined: Sat Jul 04, 2015 9:58 am
Location: -29.794229 -55.795374

Re: Can't fix CHR pinswap problem

Post by Fisher »

Did the said swaps.
Things are better, but not perfect.
Did I mess with all the 6 swaps?
It seems so. :oops:
20210424_233416.jpg
20210424_233443.jpg
These are the swaps I was supposed to do:

Code: Select all

CHR
O   A
A12=A7
A11=A10
A10=A12
A9 =A11
A8 =A9
A7 =A8
Looks like it didn't swap anything! :shock:
Tomorrow, I'll carefully remove the EPROM, erase it and try again.
User avatar
Fisher
Posts: 1249
Joined: Sat Jul 04, 2015 9:58 am
Location: -29.794229 -55.795374

Re: Can't fix CHR pinswap problem

Post by Fisher »

After doing the file preparation, erasing, and programming the EPROM again everything went fine.
Not sure what I did wrong, but now it's all fine now.
Thank you. :-)
User avatar
happysoul
Posts: 3
Joined: Tue May 24, 2022 1:47 am

Re: Can't fix CHR pinswap problem

Post by happysoul »

Fisher wrote: Sun Apr 25, 2021 3:25 pm After doing the file preparation, erasing, and programming the EPROM again everything went fine.
Not sure what I did wrong, but now it's all fine now.
Thank you. :-)
why not use mx29f040 a29040 or other 29 chips? it is very cheap. and can be program with 5V read/write
at28c64 and at28c256
User avatar
Fisher
Posts: 1249
Joined: Sat Jul 04, 2015 9:58 am
Location: -29.794229 -55.795374

Re: [SOLVED] Can't fix CHR pinswap problem

Post by Fisher »

Yes, indeed they would be way better for sure.
But these are the chips I have at hand, plus the shipping costs to the small town I live are not that good and the delivery time tends to be of 4+ weeks, so I'm pretty much stuck doing what I can with what I have.
Post Reply