Sunsoft FME-7: Difference between revisions

From NESdev Wiki
Jump to navigationJump to search
m (link to 5B audio page)
(Remove all details about qbradq's nesdev1. Also remove the entire emulator compatibility list. Reformat, add some trivia and link to pinout.)
Line 1: Line 1:
[[Category:ASIC mappers]]
[[Category:ASIC mappers]]
The Sunsoft FME-7 is a group of two mappers which work identically, except that one contains extra sound hardware. The FME-7 is the base memory mapper with no additional sound hardware. The Sunsoft 5B is an FME-7 with the addition of [[Sunsoft 5B audio|extra sound hardware]].
The [[Sunsoft FME-7]] represents two mapper ICs which work identically, except that one contains extra sound hardware. The FME-7 is the base memory mapper with no additional sound hardware. The Sunsoft 5B is an FME-7 with the addition of [[Sunsoft 5B audio|extra sound hardware]]. Both the Sunsoft 5B and FME-7 exist as a [[Sunsoft 5 pinout|44 pin TQFP]]. In Europe, boards using the FME-7 were labeled as JSROM and JLROM.


The FME-7 mapper was used in only one game released in the US, ''Batman: Return of the Joker''.
The FME-7 mapper was used in only one game released in the US, ''Batman: Return of the Joker''.
The FME-7 is being used as a model for the memory mapper in the [[NESDEV1 Development Cart]]. The NESDEV1 variant of the mapper makes provisions for up to 2048 KB of PRG-ROM and 512 KB of PRG-RAM. The original Sunsoft mappers did not support these extended memory sizes. As this mapper specification is still in development, emulator support for these extended memory spaces are entirely coincidental.
{| class="tabular" style="text-align: center; font-size: 85%; width: auto; table-layout: fixed;"
|+ iNES Mapper Numbers
! Mapper
! iNES Mapper Number
|-
| FME-7
| 69
|-
| Sunsoft 5B
| 69
|-
| NESDEV1 Variant
| Unassigned
|}


== Overview ==
== Overview ==
* Manufacturer: Sunsoft
* Manufacturer: Sunsoft
* PRG ROM Size: Up to 512 KB (2048 KB for the NESDEV1 variant)
* PRG ROM Size: Up to 512 KiB
* PRG ROM Bank Size: 8 KB at $6000, $8000, $A000, and $C000
* PRG ROM Bank Size: 8 KiB
* PRG RAM: Up to 8 KB (512 KB for the NESDEV1 variant)
* PRG RAM: Up to 8 KiB (512 KiB likely supported)
* CHR Bank Size: 1 KB
* CHR capacity: 256 KiB
* CHR RAM Support: Unknown
* CHR Bank Size: 1 KiB
* Nametable [[mirroring]]: Controlled by Mapper, H, V, 1scA, 1scB
* Nametable [[mirroring]]: Controlled by Mapper: H, V, 1scA, 1scB
* Subject to [[bus conflict]]s: No
* Subject to [[bus conflict]]s: No


Line 50: Line 33:


=== Command Register ($8000) ===
=== Command Register ($8000) ===
  Bit7...0
  7  bit  0
  ----CCCC
  ---- ----
    ++++- The command number to invoke when writing to the Parameter Register
.... CCCC
      ||||
      ++++- The command number to invoke when writing to the Parameter Register


=== Parameter Register ($A000) ===
=== Parameter Register ($A000) ===
  Bit7...0
  7  bit  0
  PPPPPPPP
  ---- ----
  ++++++++- The parameter to use for this command. Writing to this register invokes the command in the Command Register.
PPPP PPPP
|||| ||||
  ++++-++++- The parameter to use for this command. Writing to this register invokes the command in the Command Register.


== Commands ==
== Commands ==
In order to invoke a command first write the command's number to the Command Register, then the desired parameter to the Parameter Register.
In order to invoke a command first write the command's number to the Command Register, then the desired parameter to the Parameter Register.


=== CHR Bank 0 ($00) ===
=== CHR Bank 0 ($0) ===
  Parameter Byte
  7  bit  0
  Bit7...0
  ---- ----
  BBBBBBBB
BBBB BBBB
  ++++++++- The bank number to select at PPU $0000 - $03FF
  |||| ||||
  ++++-++++- The bank number to select at PPU $0000 - $03FF


=== CHR Bank 1 ($01) ===
=== CHR Bank 1 ($1) ===
  Parameter Byte
  7  bit  0
  Bit7...0
---- ----
  BBBBBBBB
  BBBB BBBB
  ++++++++- The bank number to select at PPU $0400 - $07FF
  |||| ||||
  ++++-++++- The bank number to select at PPU $0400 - $07FF


=== CHR Bank 2 ($02) ===
=== CHR Bank 2 ($2) ===
  Parameter Byte
  7  bit  0
  Bit7...0
---- ----
  BBBBBBBB
  BBBB BBBB
  ++++++++- The bank number to select at PPU $0800 - $0BFF
  |||| ||||
  ++++-++++- The bank number to select at PPU $0800 - $0BFF


=== CHR Bank 3 ($03) ===
=== CHR Bank 3 ($3) ===
  Parameter Byte
  7  bit  0
  Bit7...0
---- ----
  BBBBBBBB
  BBBB BBBB
  ++++++++- The bank number to select at PPU $0C00 - $0FFF
  |||| ||||
  ++++-++++- The bank number to select at PPU $0C00 - $0FFF


=== CHR Bank 4 ($04) ===
=== CHR Bank 4 ($4) ===
  Parameter Byte
  7  bit  0
  Bit7...0
---- ----
  BBBBBBBB
  BBBB BBBB
  ++++++++- The bank number to select at PPU $1000 - $13FF
  |||| ||||
  ++++-++++- The bank number to select at PPU $1000 - $13FF


=== CHR Bank 5 ($05) ===
=== CHR Bank 5 ($5) ===
  Parameter Byte
  7  bit  0
  Bit7...0
---- ----
  BBBBBBBB
  BBBB BBBB
  ++++++++- The bank number to select at PPU $1400 - $17FF
  |||| ||||
  ++++-++++- The bank number to select at PPU $1400 - $17FF


=== CHR Bank 6 ($06) ===
=== CHR Bank 6 ($6) ===
  Parameter Byte
  7  bit  0
  Bit7...0
---- ----
  BBBBBBBB
  BBBB BBBB
  ++++++++- The bank number to select at PPU $1800 - $1BFF
  |||| ||||
  ++++-++++- The bank number to select at PPU $1800 - $1BFF


=== CHR Bank 7 ($07) ===
=== CHR Bank 7 ($7) ===
  Parameter Byte
  7  bit  0
  Bit7...0
---- ----
  BBBBBBBB
  BBBB BBBB
  ++++++++- The bank number to select at PPU $1C00 - $1FFF
  |||| ||||
  ++++-++++- The bank number to select at PPU $1C00 - $1FFF


=== PRG Bank 0 ($08) ===
=== PRG Bank 0 ($8) ===
  Parameter Byte
  7  bit  0
  Bit7...0
  ---- ----
  ERBBBBBB
  ERBB BBBB
  ||++++++- For the NESDEV1 specification this is the bank number to select at
|||| ||||
||        CPU $6000 - $7FFF (limited to the first 512 KB of PRG ROM or RAM).
  ||++-++++- The bank number to select at CPU $6000 - $7FFF
||        The original mappers ignore this for RAM.
  |+------- RAM / ROM Select Bit
  |+------- RAM / ROM Select Bit
  |        0 = PRG ROM
  |        0 = PRG ROM
  |        1 = PRG RAM
  |        1 = PRG RAM
  +-------- RAM Enable Bit
  +-------- RAM Enable Bit ([[6264]] +CE line)
           0 = PRG RAM Disabled
           0 = PRG RAM Disabled
           1 = PRG RAM Enabled
           1 = PRG RAM Enabled


''If the RAM / ROM Select Bit is 1 (RAM selected), but the RAM Enable Bit is 0 (disabled) the data bus will be open. This is a limited form of WRAM write protection on power-up.''
It is very likely that a cartridge could be modified to support banking up to 512KiB of PRG-RAM here. However, no game was ever released with more than 8KiB and this is currently untested. A cartridge definitely could replace the 6264 with a 62256 or add an inverter and an extra 6264 which would then use RAM enable bit to select between two 8KiB banks out of 16KiB, in the manner of [http://bootgod.dyndns.org:7777/profile.php?id=919 SOROM].
 
If the RAM / ROM Select Bit is 1 (RAM selected), but the RAM Enable Bit is 0 (disabled) the data bus will be open. This is a limited form of WRAM write protection on power-up.


=== PRG Bank 1 ($09) ===
=== PRG Bank 1 ($9) ===
  Parameter Byte
  7  bit  0
  Bit7...0
---- ----
BBBBBBBB
  ..BB BBBB
++++++++- The bank number to select at CPU $8000 - $9FFF
  || ||||
  ++-++++- The bank number to select at CPU $8000 - $9FFF


=== PRG Bank 2 ($0A) ===
=== PRG Bank 2 ($A) ===
  Parameter Byte
  7  bit  0
  Bit7...0
---- ----
BBBBBBBB
  ..BB BBBB
++++++++- The bank number to select at CPU $A000 - $BFFF
  || ||||
  ++-++++- The bank number to select at CPU $A000 - $BFFF


=== PRG Bank 3 ($0B) ===
=== PRG Bank 3 ($B) ===
  Parameter Byte
  7  bit  0
  Bit7...0
---- ----
BBBBBBBB
  ..BB BBBB
++++++++- The bank number to select at CPU $C000 - $DFFF
  || ||||
  ++-++++- The bank number to select at CPU $C000 - $DFFF


=== Name Table Mirroring ($0C) ===
=== Name Table Mirroring ($C) ===
  Parameter Byte
  7  bit 0
  Bit7...0
  ---- ----
  ------MM
.... ..MM
      ++- Mirroring Mode
        ||
          0 = Vertical
        ++- Mirroring Mode
          1 = Horizontal
            0 = Vertical
          2 = One Screen Mirroring from $2000
            1 = Horizontal
          3 = One Screen Mirroring from $2400
            2 = One Screen Mirroring from $2000 ("1ScA")
            3 = One Screen Mirroring from $2400 ("1ScB")


=== IRQ Control ($0D) ===
=== IRQ Control ($D) ===
  Parameter Byte
  7  bit 0
  Bit7...0
  ---- ----
  C------T
C... ...T
  |     +- IRQ Enable
  |       |
  |         0 = Do not generate IRQs
|      +- IRQ Enable
  |         1 = Do generate IRQs
  |           0 = Do not generate IRQs
  |           1 = Do generate IRQs
  +-------- IRQ Counter Enable
  +-------- IRQ Counter Enable
          0 = Disable Counter Decrement
            0 = Disable Counter Decrement
          1 = Enable Counter Decrement
            1 = Enable Counter Decrement


=== IRQ Counter Low Byte ($0E) ===
=== IRQ Counter Low Byte ($E) ===
  Parameter Byte
  7  bit  0
  Bit7...0
---- ----
  LLLLLLLL
  LLLL LLLL
  ++++++++- The low eight bits of the IRQ counter. Note that setting this register directly sets the lower eight bits of the counter.
  |||| ||||
  ++++-++++- The low eight bits of the IRQ counter. Note that setting this register directly sets the lower eight bits of the counter.


=== IRQ Counter High Byte ($0F) ===
=== IRQ Counter High Byte ($F) ===
  Parameter Byte
  7  bit  0
  Bit7...0
---- ----
  HHHHHHHH
  HHHH HHHH
  ++++++++- The high eight bits of the IRQ counter. Note that setting this register directly sets the upper eight bits of the counter.
  |||| ||||
  ++++-++++- The high eight bits of the IRQ counter. Note that setting this register directly sets the upper eight bits of the counter.


== IRQ Operation ==
== IRQ Operation ==
Line 186: Line 189:
## This acknowledges the IRQ.
## This acknowledges the IRQ.
# Optional: Go back to Step 1 for the next IRQ.
# Optional: Go back to Step 1 for the next IRQ.
== Emulator Compatibility and Behavior ==
{| class="tabular sortable" style="text-align: center; font-size: 85%; width: auto; table-layout: fixed;"
|+ General Functionality
|-
! Emulator
! Version
! PRG-RAM Bank
! PRG-ROM Banks
! CHR-ROM Banks
! RAM Write Disable
! RAM Read Disable
! Vertical Mirroring
! Horizontal Mirroring
! 1SCA Mirroring
! 1SCB Mirroring
|-
| Nintendulator
| 0.975
| {{Pass}}
| {{Pass}}
| {{Pass}}
| {{Pass}}
| {{Pass}}
| {{Pass}}
| {{Pass}}
| {{Pass}}
| {{Pass}}
|-
| FCEUX
| 2.1.4a
| {{Pass}}
| {{Pass}}
| {{Pass}}
| {{Pass}}
| {{Pass}}
| {{Pass}}
| {{Pass}}
| {{Pass}}
| {{Pass}}
|-
| Nestopia
| 1.40
| {{Pass}}
| {{Pass}}
| {{Pass}}
| {{Fail}}
| {{Fail}}
| {{Pass}}
| {{Pass}}
| {{Pass}}
| {{Pass}}
|-
| VirtualNES
| 0.97
| {{Pass}}
| {{Pass}}
| {{Pass}}
| {{Fail}}
| {{Fail}}
| {{Pass}}
| {{Pass}}
| {{Pass}}
| {{Pass}}
|-
| NESten
| 0.63 beta1
| {{Pass}}
| {{Pass}}
| {{Pass}}
| {{Fail}}
| {{Fail}}
| {{Pass}}
| {{Pass}}
| {{Pass}}
| {{Pass}}
|-
| NESten
| 0.63+Mappers
| {{Pass}}
| {{Pass}}
| {{Pass}}
| {{Pass}}
| {{Fail}}
| {{Pass}}
| {{Pass}}
| {{Pass}}
| {{Pass}}
|-
| NesterJ
| 0.51b
| {{Pass}}
| {{Pass}}
| {{Pass}}
| {{Pass}}
| {{Pass}}
| {{Pass}}
| {{Pass}}
| {{Pass}}
| {{Pass}}
|}
{| class="tabular sortable" style="text-align: center; font-size: 85%; width: auto; table-layout: fixed;"
|+ Memory Capacity, Original Hardware
|-
! Emulator
! Version
! ROM Pages 0-31
! ROM Pages 32-63
! CHR Pages 0-127
! CHR Pages 128-255
|-
| Nintendulator
| 0.975
| {{Pass}}
| {{Pass}}
| {{Pass}}
| {{Pass}}
|-
| FCEU
| 2.1.4a
| {{Pass}}
| {{Pass}}
| {{Pass}}
| {{Pass}}
|-
| Nestopia
| 1.40
| {{Pass}}
| {{Fail}}
| {{Pass}}
| {{Pass}}
|-
| VirtualNES
| 0.97
| {{Pass}}
| {{Pass}}
| {{Pass}}
| {{Pass}}
|-
| NESten
| 0.63 beta1
| {{Pass}}
| {{Pass}}
| {{Pass}}
| {{Pass}}
|-
| NESten
| 0.63+Mappers
| {{Pass}}
| {{Pass}}
| {{Pass}}
| {{Pass}}
|-
| NesterJ
| 0.51b
| {{Pass}}
| {{Pass}}
| {{Pass}}
| {{Pass}}
|}
The NESDEV1 variant of the mapper makes provisions for up to 2048 KB of PRG-ROM and 512 KB of PRG-RAM. The original Sunsoft mappers did not support these extended memory sizes. As this mapper specification is still in development, emulator support for these extended memory spaces are entirely coincidental.
{| class="tabular sortable" style="text-align: center; font-size: 85%; width: auto; table-layout: fixed;"
|+ Extended Memory Capacity, NESDEV1 Variant
|-
! Emulator
! Version
! ROM Pages 64-127
! ROM Pages 128-255
! RAM Page 1
! RAM Pages 2-3
! RAM Pages 4-7
! RAM Pages 8-15
! RAM Pages 16-31
! RAM Pages 32-63
! CHR RAM
|-
| Nintendulator
| 0.975
| {{Fail}}
| {{Fail}}
| {{Fail}}
| {{Fail}}
| {{Fail}}
| {{Fail}}
| {{Fail}}
| {{Fail}}
| {{Fail}}
|-
| FCEUX
| 2.1.4a
| {{Pass}}
| {{Pass}}
| {{Fail}}
| {{Fail}}
| {{Fail}}
| {{Fail}}
| {{Fail}}
| {{Fail}}
| {{Pass}}
|-
| Nestopia
| 1.40
| {{Fail}}
| {{Fail}}
| {{Fail}}
| {{Fail}}
| {{Fail}}
| {{Fail}}
| {{Fail}}
| {{Fail}}
| {{Pass}}
|-
| VirtualNES
| 0.97
| {{Pass}}
| {{Pass}}
| {{Fail}}
| {{Fail}}
| {{Fail}}
| {{Fail}}
| {{Fail}}
| {{Fail}}
| {{Fail}}
|-
| NESten
| 0.63 beta1
| {{Pass}}
| {{Pass}}
| {{Fail}}
| {{Fail}}
| {{Fail}}
| {{Fail}}
| {{Fail}}
| {{Fail}}
| {{Fail}}
|-
| NESten
| 0.63+Mappers
| {{Fail}}
| {{Fail}}
| {{Fail}}
| {{Fail}}
| {{Fail}}
| {{Fail}}
| {{Fail}}
| {{Fail}}
| {{Fail}}
|-
| NesterJ
| 0.51b
| {{Pass}}
| {{Pass}}
| {{Fail}}
| {{Fail}}
| {{Fail}}
| {{Fail}}
| {{Fail}}
| {{Fail}}
| Untested
|}

Revision as of 19:47, 19 August 2012

The Sunsoft FME-7 represents two mapper ICs which work identically, except that one contains extra sound hardware. The FME-7 is the base memory mapper with no additional sound hardware. The Sunsoft 5B is an FME-7 with the addition of extra sound hardware. Both the Sunsoft 5B and FME-7 exist as a 44 pin TQFP. In Europe, boards using the FME-7 were labeled as JSROM and JLROM.

The FME-7 mapper was used in only one game released in the US, Batman: Return of the Joker.

Overview

  • Manufacturer: Sunsoft
  • PRG ROM Size: Up to 512 KiB
  • PRG ROM Bank Size: 8 KiB
  • PRG RAM: Up to 8 KiB (512 KiB likely supported)
  • CHR capacity: 256 KiB
  • CHR Bank Size: 1 KiB
  • Nametable mirroring: Controlled by Mapper: H, V, 1scA, 1scB
  • Subject to bus conflicts: No

Banks

  • CPU $6000-$7FFF: 8 KB Bankable PRG ROM or PRG RAM
  • CPU $8000-$9FFF: 8 KB Bankable PRG ROM
  • CPU $A000-$BFFF: 8 KB Bankable PRG ROM
  • CPU $C000-$DFFF: 8 KB Bankable PRG ROM
  • CPU $E000-$FFFF: 8 KB PRG ROM, fixed to the last bank of ROM
  • PPU $0000-$03FF: 1 KB Bankable CHR ROM
  • PPU $0400-$07FF: 1 KB Bankable CHR ROM
  • PPU $0800-$0BFF: 1 KB Bankable CHR ROM
  • PPU $0C00-$0FFF: 1 KB Bankable CHR ROM
  • PPU $1000-$13FF: 1 KB Bankable CHR ROM
  • PPU $1400-$17FF: 1 KB Bankable CHR ROM
  • PPU $1800-$1BFF: 1 KB Bankable CHR ROM
  • PPU $1C00-$1FFF: 1 KB Bankable CHR ROM

Registers

Configuration of the FME-7 is accomplished by first writing the command number to the Command Register, then writing the command's parameter byte to the Parameter Register.

Command Register ($8000)

7  bit  0
---- ----
.... CCCC
     ||||
     ++++- The command number to invoke when writing to the Parameter Register

Parameter Register ($A000)

7  bit  0
---- ----
PPPP PPPP
|||| ||||
++++-++++- The parameter to use for this command. Writing to this register invokes the command in the Command Register.

Commands

In order to invoke a command first write the command's number to the Command Register, then the desired parameter to the Parameter Register.

CHR Bank 0 ($0)

7  bit  0
---- ----
BBBB BBBB
|||| ||||
++++-++++- The bank number to select at PPU $0000 - $03FF

CHR Bank 1 ($1)

7  bit  0
---- ----
BBBB BBBB
|||| ||||
++++-++++- The bank number to select at PPU $0400 - $07FF

CHR Bank 2 ($2)

7  bit  0
---- ----
BBBB BBBB
|||| ||||
++++-++++- The bank number to select at PPU $0800 - $0BFF

CHR Bank 3 ($3)

7  bit  0
---- ----
BBBB BBBB
|||| ||||
++++-++++- The bank number to select at PPU $0C00 - $0FFF

CHR Bank 4 ($4)

7  bit  0
---- ----
BBBB BBBB
|||| ||||
++++-++++- The bank number to select at PPU $1000 - $13FF

CHR Bank 5 ($5)

7  bit  0
---- ----
BBBB BBBB
|||| ||||
++++-++++- The bank number to select at PPU $1400 - $17FF

CHR Bank 6 ($6)

7  bit  0
---- ----
BBBB BBBB
|||| ||||
++++-++++- The bank number to select at PPU $1800 - $1BFF

CHR Bank 7 ($7)

7  bit  0
---- ----
BBBB BBBB
|||| ||||
++++-++++- The bank number to select at PPU $1C00 - $1FFF

PRG Bank 0 ($8)

7  bit  0
---- ----
ERBB BBBB
|||| ||||
||++-++++- The bank number to select at CPU $6000 - $7FFF
|+------- RAM / ROM Select Bit
|         0 = PRG ROM
|         1 = PRG RAM
+-------- RAM Enable Bit (6264 +CE line)
          0 = PRG RAM Disabled
          1 = PRG RAM Enabled

It is very likely that a cartridge could be modified to support banking up to 512KiB of PRG-RAM here. However, no game was ever released with more than 8KiB and this is currently untested. A cartridge definitely could replace the 6264 with a 62256 or add an inverter and an extra 6264 which would then use RAM enable bit to select between two 8KiB banks out of 16KiB, in the manner of SOROM.

If the RAM / ROM Select Bit is 1 (RAM selected), but the RAM Enable Bit is 0 (disabled) the data bus will be open. This is a limited form of WRAM write protection on power-up.

PRG Bank 1 ($9)

7  bit  0
---- ----
..BB BBBB
  || ||||
  ++-++++- The bank number to select at CPU $8000 - $9FFF

PRG Bank 2 ($A)

7  bit  0
---- ----
..BB BBBB
  || ||||
  ++-++++- The bank number to select at CPU $A000 - $BFFF

PRG Bank 3 ($B)

7  bit  0
---- ----
..BB BBBB
  || ||||
  ++-++++- The bank number to select at CPU $C000 - $DFFF

Name Table Mirroring ($C)

7  bit  0
---- ----
.... ..MM
       ||
       ++- Mirroring Mode
            0 = Vertical
            1 = Horizontal
            2 = One Screen Mirroring from $2000 ("1ScA")
            3 = One Screen Mirroring from $2400 ("1ScB")

IRQ Control ($D)

7  bit  0
---- ----
C... ...T
|       |
|       +- IRQ Enable
|           0 = Do not generate IRQs
|           1 = Do generate IRQs
+-------- IRQ Counter Enable
            0 = Disable Counter Decrement
            1 = Enable Counter Decrement

IRQ Counter Low Byte ($E)

7  bit  0
---- ----
LLLL LLLL
|||| ||||
++++-++++- The low eight bits of the IRQ counter. Note that setting this register directly sets the lower eight bits of the counter.

IRQ Counter High Byte ($F)

7  bit  0
---- ----
HHHH HHHH
|||| ||||
++++-++++- The high eight bits of the IRQ counter. Note that setting this register directly sets the upper eight bits of the counter.

IRQ Operation

The IRQ feature of FME-7 is a CPU cycle counting IRQ generator. When enabled the 16-bit IRQ counter is decremented once per CPU cycle. When the IRQ counter is decremented from $0000 to $FFFF an IRQ is generated. The IRQ line is held low until it is acknowledged.

How to Use the IRQ Generator

  1. Set the counter to the desired number of cycles minus one.
  2. Enable the IRQ generator by turning on both the IRQ Enable and IRQ Counter Enable flags of the IRQ Control command.
  3. Within the IRQ handler, turn off the IRQ Enable flag of the IRQ Control command.
    1. This acknowledges the IRQ.
  4. Optional: Go back to Step 1 for the next IRQ.