Green Beret FDS port

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

Moderator: Moderators

Post Reply
User avatar
krzysiobal
Posts: 1037
Joined: Sun Jun 12, 2011 12:06 pm
Location: Poland
Contact:

Green Beret FDS port

Post by krzysiobal »

No physical access to the cartridge so can't confirm if it is Kaiser or Whirlwind Manu version, but both use the same mapper UNIF AC-08.

Code: Select all

$8001 ~[...PPPP.] (mask=$E001)
           ||||
           |+++- PRG bank at $6000
           +---- PRG chip select:
                   0 = PRG1 = IC2
                   1 = PRG2 = IC3

        $6000 $8000 $a000 $c000 $e000
        ----- ----- ----- ----- -----
 Bank   $8001  0000  0001  0010  0011
 Chip   PRG1/2 PRG3  PRG3  PRG3  PRG3
* FCEUX source claims that UNIF AC-08 mapper is also used for Castlevania (FDS port?) but with shifted bits and selectable mirroring, while this one does not have capability of mirroring select.

* Wiki claims that AC-08 is mapped do 42.0, which is not compatible.

Image Image Image Image Image

Code: Select all

PAL pinout:
                .--v--.
          M2 -> |01 20| -- +5V
 CPU_nROMSEL -> |02 19|
     CPU_A14 -> |03 18| -> PRG_A13
     CPU_A13 -> |04 17| -> PRG_A14
     CPU_RnW -> |05 16| -> PRG_A15
     CPU_D4  -> |06 15| -> PRG2_nOE
     CPU_D3  -> |07 14| -> PRG1_nOE 
     CPU_D2  -> |08 13| -> PRG3_nOE
     CPU_D1  -> |09 12| -> PRG12_nCE
         GND -- |10 11| <- CPU_A0
                '-----'
Expected PAL equations:
PRG_A13   <= CPU_D1 when M2='1' & CPU_nROMSEL='0' and CPU_A14='0' and CPU_A13='0' and CPU_A0='1' and CPU_RnW='0' --latch
PRG_A14   <= CPU_D2 when M2='1' and CPU_nROMSEL='0' and CPU_A14='0' and CPU_A13='0' and CPU_A0='1' and CPU_RnW='0' --latch
PRG_A15   <= CPU_D3 when M2='1' and CPU_nROMSEL='0' and CPU_A14='0' and CPU_A13='0' and CPU_A0='1' and CPU_RnW='0' --latch
PRG2_nOE  <= CPU_D4 when M2='1' and CPU_nROMSEL='0' and CPU_A14='0' and CPU_A13='0' and CPU_A0='1' and CPU_RnW='0' --latch
PRG1_nOE  <= not PRG2_nOE --or either latches not CPU_D4 like above, but functionally equivalent
PRG3_nOE  <= '0' when M2='1' and CPU_nROMSEL='1' and CPU_A14='1' and CPU_A13='1' and CPU_RnW='1' else 0
PRG12_nCE <= '0' when CPU_nROMSEL='0' and CPU_RnW='1' else 0
User avatar
aquasnake
Posts: 515
Joined: Fri Sep 13, 2019 11:22 pm

Re: Green Beret FDS port

Post by aquasnake »

Mario Baby

KS018/AC08/LH09 Green Beret

actually these 2 mappers do not have the same behavior.




http://forums.nesdev.com/viewtopic.php? ... 19#p243719
User avatar
aquasnake
Posts: 515
Joined: Fri Sep 13, 2019 11:22 pm

Re: Green Beret FDS port

Post by aquasnake »

The FDS BIOS only initializes to write #$2E to $4025 at the beginning, and always writes #$47 to $4025 at the rest of the time. Setting the first write to horizontal mirroring should be a general routine for FDS initialization. According to debug breakpoint tracking, this game is fixed to vertical mirroring.

So the accessing to $4025 should be ignored, and fix it as vertical mirroring. This simplifies the design of hardware.

The difference between this version and the common "Green Beret (FDS conversion, lh09) (Unl)" included in goodset is as follow:
It maps the fixed address segment of $8000 - $ffff to the last 32KB. While fceux's emulation for ac-08 which maps $8000 - $ffff to the first 32KB
Post Reply