Kazzo USB rom dumper / dev cart programmer

Discuss hardware-related topics, such as development cartridges, CopyNES, PowerPak, EPROMs, or whatever.

Moderators: B00daW, Moderators

Werrock
Posts: 44
Joined: Mon Mar 28, 2016 9:40 am
Location: Sweden

Re: Kazzo USB rom dumper / dev cart programmer

Post by Werrock » Tue Mar 29, 2016 1:00 pm

I did the following test:

Code: Select all

board <- {
  mappernum = 11,
  cpu_rom = {
    size_base = 1 * mega, size_max = 1 * mega, banksize = 0x8000
  },
  ppu_rom = {
    size_base = 1 * mega, size_max = 1 * mega, banksize = 0x2000
  },
  cpu_romsize = 1 * mega, cpu_banksize = 0x8000,
  ppu_romsize = 1 * mega, ppu_banksize = 0x2000,
  ppu_ramfind = false, vram_mirrorfind = false
};
Although I dont really understand the size_base, it seems to not work if lower than the max. The size_max I got from the wiki to be 128kB for both PRG and CHR so I fixed that.

New result is:
ba1.nes, mapper 11
Program ROM: size 0x010000, crc32 0x9b8e02c0
Charcter ROM: size 0x010000, crc32 0xb0a8c32a

Game now works perfectly in emulator!

lidnariq
Posts: 8792
Joined: Sun Apr 13, 2008 11:12 am
Location: Seattle

Re: Kazzo USB rom dumper / dev cart programmer

Post by lidnariq » Tue Mar 29, 2016 1:17 pm

Werrock wrote:Here is the picture of Policeman PCB:
[...]
The chip on the left is a 74LS175 and the right one 74LS138 so 74HC377 (mentioned as a chip used for over sizing) is not used.
Oh dear. That's annoying full of things. The '175 assuredly latches to D0, D1, D4, D5 as CHR A13, A14, PRG A15, A16 respectively, but...

You could try using the GNROM script but replace both instances of

Code: Select all

    cpu_write(d, 0x8000, 
with

Code: Select all

    cpu_write(d, 0x8400, 
But it may or may not work.

Might you provide a picture of the back? And/or if you have a multimeter, measure what pins are connected to what? I'm not clear just how far we can get given that cryptically-named 05-00002-010 IC.

Werrock
Posts: 44
Joined: Mon Mar 28, 2016 9:40 am
Location: Sweden

Re: Kazzo USB rom dumper / dev cart programmer

Post by Werrock » Tue Mar 29, 2016 1:29 pm

Code: Select all

board <- {
  mappernum = 36,
  cpu_rom = {
    size_base = 0x10000, size_max = 4 * mega, banksize = 0x8000
  },
  ppu_rom = {
    size_base = 0x10000, size_max = 1 * mega, banksize = 0x2000
  },
  cpu_romsize = 4 * mega, cpu_banksize = 0x8000,
  ppu_romsize = 1 * mega, ppu_banksize = 0x2000,
  ppu_ramfind = false, vram_mirrorfind = false
};

function cpu_dump(d, pagesize, banksize) {
  for (local i = 0; i < pagesize; i += 1) {
    cpu_write(d, 0x8400, i << 4);
    cpu_read(d, 0x8000, 0x4000);
    cpu_read(d, 0xc000, 0x4000);
  }
}

function ppu_dump(d, pagesize, banksize) {
  for (local i = 0; i < pagesize; i += 1) {
    cpu_write(d, 0x8400, i);
    ppu_read(d, 0, 0x2000);
  }
}
The current code. No real luck, not workign atleast. Tried to play with size_base and maX_size but always get same result:
\anago\policeman.nes, mapper 36
Program ROM: size 0x008000, crc32 0x012ce0e2
Charcter ROM: size 0x002000, crc32 0xc2b55df5

I was expecting two 64kB blocks (http://glukvideo.info/listado-juegos-gluk#policeman)

I will get picture of the back. Tomorrow I could try to map the pins.

Edit: Even without the update you gave me it still give me the same result indicating that the page switching does not work at all.

Edit 2: Picture of PCB backside: http://sv.tinypic.com/r/155jtjo/9

lidnariq
Posts: 8792
Joined: Sun Apr 13, 2008 11:12 am
Location: Seattle

Re: Kazzo USB rom dumper / dev cart programmer

Post by lidnariq » Tue Mar 29, 2016 1:34 pm

Yeah. Sadly that's a common problem with under-documented hardware.

You could try random other addresses, but it'll be easiest just to figure out how the 74'138 is connected and choose a value accordingly.

Edit: funny thing ... the 74'175 seems to be only there for CHR banking, and the 05-00002-010 IC has to be handling PRG banking.

prototector
Posts: 39
Joined: Sun Aug 31, 2014 9:55 am

Re: Kazzo USB rom dumper / dev cart programmer

Post by prototector » Wed Mar 30, 2016 6:21 am

Werrock wrote:I did the following test:

Code: Select all

board <- {
  mappernum = 11,
  cpu_rom = {
    size_base = 1 * mega, size_max = 1 * mega, banksize = 0x8000
  },
  ppu_rom = {
    size_base = 1 * mega, size_max = 1 * mega, banksize = 0x2000
  },
  cpu_romsize = 1 * mega, cpu_banksize = 0x8000,
  ppu_romsize = 1 * mega, ppu_banksize = 0x2000,
  ppu_ramfind = false, vram_mirrorfind = false
};
Although I dont really understand the size_base, it seems to not work if lower than the max. The size_max I got from the wiki to be 128kB for both PRG and CHR so I fixed that.

New result is:
ba1.nes, mapper 11
Program ROM: size 0x010000, crc32 0x9b8e02c0
Charcter ROM: size 0x010000, crc32 0xb0a8c32a

Game now works perfectly in emulator!
I tried that script for dumping one of Color Dreams game, I got this error message:

Code: Select all

AN ERROR HAS OCCURED [the index 'cpu_dump' does not exist]

CALLSTACK
*FUNCTION [dump()] dumpcore.nut line [43]

LOCALS
[ppu_dumpsize] 131072
[cpu_dumpsize] 131072
[ppuarea_memory] 0
[vram] 0
[increase_ppu] 1
[increase_cpu] 1
[mappernum] 11
[script] "colordreams.ad"
[d] USERPOINTER
[this] TABLE 

Werrock
Posts: 44
Joined: Mon Mar 28, 2016 9:40 am
Location: Sweden

Re: Kazzo USB rom dumper / dev cart programmer

Post by Werrock » Thu Mar 31, 2016 9:40 am

lidnariq wrote: ...
Might you provide a picture of the back? And/or if you have a multimeter, measure what pins are connected to what? I'm not clear just how far we can get given that cryptically-named 05-00002-010 IC.
I used a mulimeter and tried to count and map to the pinout from:
http://wiki.nesdev.com/w/index.php/Cartridge_connector

Here is the result for the 138, let me know if of any use.

Code: Select all

 CPU A14 -[01 U 16]- 5V
 /ROMSEL -[02   15]- NC
  CPU A9 -[03 7 14]- NC
 CPU A13 -[04 4 13]- NC
 CPU R/W -[05 ' 12]- NC
      M2 -[06 1 11]- NC
   175P8 -[07 3 10]- NC
     GND -[08 8 09]- NC

Werrock
Posts: 44
Joined: Mon Mar 28, 2016 9:40 am
Location: Sweden

Re: Kazzo USB rom dumper / dev cart programmer

Post by Werrock » Thu Mar 31, 2016 9:48 am

prototector wrote: ...
I tried that script for dumping one of Color Dreams game, I got this error message:

Code: Select all

AN ERROR HAS OCCURED [the index 'cpu_dump' does not exist]
That was only the beginning of a script. I have submitted the whole script to the git repo, you can fetch the pending copy at:
https://github.com/Werrock83/anago-scri ... pper_11.ad

I have tested with a few color dreams games and it seems fine.

lidnariq
Posts: 8792
Joined: Sun Apr 13, 2008 11:12 am
Location: Seattle

Re: Kazzo USB rom dumper / dev cart programmer

Post by lidnariq » Thu Mar 31, 2016 10:05 am

Werrock wrote:

Code: Select all

 CPU A14 -[01 U 16]- 5V
 /ROMSEL -[02   15]- NC
  CPU A9 -[03 7 14]- NC
 CPU A13 -[04 4 13]- NC
 CPU R/W -[05 ' 12]- NC
      M2 -[06 1 11]- NC
   175P8 -[07 3 10]- NC
     GND -[08 8 09]- NC
Ok, that tells me that it's selecting for A14, /ROMSEL, A9 and M2 high; and A13 and R/W low. That means it's looking for writes to $4200 ? Weird. Well, ok, you should be able to dump the CHR—8 KiB at a time, like GNROM—with cpu_write(d, 0x4200, i);

As for the PRG, I have no idea; maybe the connectivity of the 05-00002-010 would help. This is clearly not the same board as what's described for Mapper 36.

Werrock
Posts: 44
Joined: Mon Mar 28, 2016 9:40 am
Location: Sweden

Re: Kazzo USB rom dumper / dev cart programmer

Post by Werrock » Thu Mar 31, 2016 10:37 am

https://github.com/libretro/libretro-fc ... s/01-222.c

Code: Select all

 * 01-22110-200 (05-00002-010) (036       ) - MGC-014 Strike Wolf
 * 01-22000-400 (05-00002-010) (036       ) - MGC-015 Policeman
Mapper and chip mentioned here for the game but I could not find any helpful information how it works.

Werrock
Posts: 44
Joined: Mon Mar 28, 2016 9:40 am
Location: Sweden

Re: Kazzo USB rom dumper / dev cart programmer

Post by Werrock » Thu Mar 31, 2016 10:46 am

foo.nes, mapper 36
Program ROM: size 0x008000, crc32 0x0d47f2b6
Charcter ROM: size 0x010000, crc32 0xf73ee39e

Using 4200 for CHR mapping. So it looks good better since it only read one page before and now 64kB which is the expected size! Too bad we cannot read the PRG.

lidnariq
Posts: 8792
Joined: Sun Apr 13, 2008 11:12 am
Location: Seattle

Re: Kazzo USB rom dumper / dev cart programmer

Post by lidnariq » Thu Mar 31, 2016 11:10 am

Well, you could see if PRG just happens to also be at 0x4200 — cpu_write(d, 0x4200, (i<<4));

Or you could PM the 32 KiB of PRG you have for now.

Or you could sit down with the multimeter and additionally measure how the 05-00002-010 is connected.

Werrock
Posts: 44
Joined: Mon Mar 28, 2016 9:40 am
Location: Sweden

Re: Kazzo USB rom dumper / dev cart programmer

Post by Werrock » Thu Mar 31, 2016 11:31 am

Did that :) didnt work. I will try map the chip tomorrow!

prototector
Posts: 39
Joined: Sun Aug 31, 2014 9:55 am

Re: Kazzo USB rom dumper / dev cart programmer

Post by prototector » Fri Apr 01, 2016 7:07 am

Werrock wrote:
prototector wrote: ...
I tried that script for dumping one of Color Dreams game, I got this error message:

Code: Select all

AN ERROR HAS OCCURED [the index 'cpu_dump' does not exist]
That was only the beginning of a script. I have submitted the whole script to the git repo, you can fetch the pending copy at:
https://github.com/Werrock83/anago-scri ... pper_11.ad

I have tested with a few color dreams games and it seems fine.
Ah, ok! Sorry about that; I'll give the whole script a try. Thanks a lot for this! Did you use the GUI or command line version of Anago with it?

Werrock
Posts: 44
Joined: Mon Mar 28, 2016 9:40 am
Location: Sweden

Re: Kazzo USB rom dumper / dev cart programmer

Post by Werrock » Fri Apr 01, 2016 8:07 am

The GUI only.

Werrock
Posts: 44
Joined: Mon Mar 28, 2016 9:40 am
Location: Sweden

Re: Kazzo USB rom dumper / dev cart programmer

Post by Werrock » Fri Apr 01, 2016 9:00 am

Updated PIN mapping:

Code: Select all

 CPU A14 -[01 U 16]- 5V
 /ROMSEL -[02   15]- NC
  CPU A9 -[03 7 14]- NC
 CPU A13 -[04 4 13]- NC
 CPU R/W -[05 ' 12]- NC
      M2 -[06 1 11]- NC
   175P9 -[07 3 10]- NC
     GND -[08 8 09]- NC

      5V -[01 U 16]- 5V
  010P26 -[02   15]- NC
      NC -[03 7 14]- NC
  CPU D0 -[04 4 13]- CPU D3
  CPU D1 -[05 ' 12]- U1P13
      NC -[06 1 11]- NC
   U2P27 -[07 7 10]- U2P1
     GND -[08 5 09]- 138P7
	 
      NC -[01 U 24]- NC
      NC -[02   23]- NC
    U1P1 -[03 0 22]- NC
     GND -[04 5 21]- CPU A13
      5V -[05 ' 20]- CPU A14
      NC -[06 0 19]- GND
      5V -[07 X 18]- CPU R/W
      NC -[08 2 17]- /ROMSEL 
      NC -[09 ' 16]- M2
      NC -[10 0 15]- CPU A8
  CPU D5 -[11 1 14]- CPU A1
  CPU D4 -[12 0 13]- CPU A0
U1 is the PRG and U2 is the CHR EEPROM.

Post Reply