by admin

Segaslot 2

Segaslot 2 Average ratng: 4,1/5 7348 votes
Segaslot
  • The Sega mapper
  • The Codemasters mapper

On website, I have a complete list of emulator videos from arcade emulators to console emulators.this video, I. Puyo Puyo™ Tetris® 2 The Ultimate Crossover of Puzzle Legends-Out Now Microsoft Store, Nintendo Switch™, PlayStation Store, PS4, PS5, Xbox One®, Xbox Series X. Official Website Valkyria Chronicles 4 The Flames of War Reignite in this Action-Strategy RPG — Out Now.

Introduction

Because the Z80 CPU only has a 64KB address space, and only 48KB of this is mapped to the cartridge on the Master System and Game Gear, 'mappers' are used to allow the use of larger ROMs, as well as on-cartridge RAM. Smaller games (typically 32KB for released software) do not need a mapper.

The terminology can be confusing. In this document the word 'paging', which usually means the same as 'mapping', is not used. 'Mapping', of course, refers to the act of presenting some range of a chip's address space at some, usually mismatching, range of the Z80's address space. 'Mapper' refers to the hardware that performs mapping. 'Slot' refers to an area of the Z80 address space into which various areas of ROM or RAM can be mapped. 'Bank' refers to the area of ROM or RAM thus mapped.

The Sega mapper

There are several revisions of the Sega mapper, which was sometimes produced as a discrete chip but integrated into the ROM chip in most cases. It defines four 16KB slots in the memory map. Any 16KB bank of ROM may be mapped into any of the first three slots; additionally, up to two 16KB RAM banks can be mapped into the last two slots. The mapper hardware is controlled by writes to memory addresses $fffc-$ffff.

This is the mapper used in 99% of software, and is assumed to be there (for games larger than 48KB) by the BIOS.

The only difference between revisions is that unused functionality is removed from some of them, for example some versions only support ROM banking in slot 2 and some only support 128KB ROMs. Emulating a 'full' mapper in all cases does not cause any problems.

Information about certain mapper chips can be found on the SMS Paging Chips page.

Registers

Address $fffc: RAM mapping and miscellaneous functions

BitFunction
7'ROM write' enable
6-5Unused
4RAM enable ($c000-$ffff)
3RAM enable ($8000-$bfff)
2RAM bank select
1-0Bank shift
Segaslot 2

Addresses $fffd-$ffff: ROM mapping

Control registerROM bank select for slot
$fffd0 ($0000-$3fff)
$fffe1 ($4000-$7fff)
$ffff2 ($8000-$bfff)

The registers are thought to be undefined after a reset for games using the 831001 and 832011 ROMs and 315-5208 mapper. The 315-5235 mapper is reset to FFFC=00, FFFD=00, FFFE=01, FFFF=02 after a power-up reset.

ROM mapping

The ROM may be considered as an array of 16KB banks. The 8-bit value written to a ROM mapping control register from $fffd to $ffff selects which of these is mapped to the relevant slot.

Depending on the mapper revision, the number of significant bits in the bank selection register may vary - for example, some revisions have 3 significant bits (supporting 8 banks, 128KB total size), others have 5 (512KB), with the largest known supporting 6 bits (1MB). Some software may also set higher-order bits than those that are relevant to its ROM size. Provided the ROM is a power-of-two size, these issues do not cause problems, because ROM mirroring will nullify the effect.

Sega Slot 2 Games

When mapping in slot 0, the first 1KB is unaffected, in order to preserve the interrupt vectors. The remaining 15KB is mapped with the last 15KB of the relevant bank.

Most games only use slot 2; very few use slot 0.

Because the control registers overlap in the memory map with a RAM mirror, this mirrored RAM allows the last value written to each register to be read back (from the RAM copy). The registers are, however, strictly write-only. Overwriting the RAM mirror at another address will not affect mapping.

Note also the bank shifting feature described below.

Segalot Philippe

RAM mapping

The control register at $fffc enables mapping of on-cartridge RAM to the address space used by the in-console RAM ($c000-$ffff) or to slot 2 (region $8000-$bfff).

When bit 3 is 1, RAM will be mapped into slot 2, overriding any ROM banking via the control register at $ffff. When 0, ROM banking is effective.

When bit 4 is 1, RAM will be mapped into the address range used by the (mirrored) on-board RAM. To avoid bus contention, this should therefore be disabled using port $3E. No known software uses this feature.

The bank select bit chooses between the first 16KB bank of SRAM (0) and the second (1), but only for slot 2. Thus, if the register were set to %---111--, 32KB of cartridge RAM would be exposed to the Z80 address bus between $8000 and $ffff (with the second 16KB mapped as the first and vice versa).

It is worth noting that most games with on-cartridge RAM have less than 32KB; most seem to have just 8KB, which is mirrored to fill both 16KB slots.

ROM bank shifting

Bits 1-0 of the control register at $fffc define a shift value that is added to any bank number written to $fffd-f:

Bit 1Bit 0ShiftBanks $00-$1F map to
00$00$00-$07, $08-$0F, $10-$17, $18-$1F
01$18$18-$1F, $00-$07, $08-$0F, $10-$17
10$10$10-$17, $18-$1F, $00-$07, $08-$0F
11$08$08-$0F, $10-$17, $18-$1F, $00-$07
Sega slot machine for sale

If only these bits are changed, there is no effect until one of the registers at $fffd-f is written to, at which point all three will have the shift applied. The $0000-$03ff region remains unmapped as before. No known software uses this feature. Because it is only featured on one type of 512KB mapper chip, its behaviour with other ROM sizes is undefined.

'ROM Write' enable

Bit 7 of the control register at $fffc controls write protection for the 'ROM' (which may be emulated using RAM in development hardware). Setting this bit to 0 write protects it. This feature is not known to be used by any software.

The Codemasters mapper

ROM mapping

This mapper presents three 16KB slots to the address bus as before. However, the control registers are mapped to the first byte of each bank and the first 1KB is no longer protected.

Sega Slot Machine 1950s

Control registerSlot
$00000 ($0000-$3fff)
$40001 ($4000-$7fff)
$80002 ($8000-$bfff)

The mapper is initialised with banks 0, 1 and 0 in slots 0, 1 and 2 respectively.

When using slot 0, care must be taken to replace interrupt vectors appropriately. Also note that there is no RAM mirroring of mapper writes so there is no way to retrieve the last value written.

Most games seem to only use slot 2.

Due to the similarities with the Sega mapper, it is generally possible to patch Codemasters software to work with a Sega mapper.

RAM mapping

One Codemasters game, Ernie Els Golf, features 8KB of on-cart RAM. If the byte written to $4000 has the high bit set ($80) then the upper 8KB of slot 2 (from $a000 to $c000) is mapped to this on-cart RAM, while the lower 8KB will remain mapped to ROM as if the high bit were unset.

'Korean' mapper

Some Korean original software (eg. Run! Dodgeball King) uses an alternative mapper system which is a further simplification of the above. Slots 0 and 1 are fixed to banks 0 and 1 of ROM respectively, while the bank mapped to slot 2 is selected by a byte written to address $a000.

MSX and Nemesis mappers

Sega Slots Free

Addresses $0000-$0003: 8K ROM bank mapping

Control registerROM bank select for slot
Fixed($0000-$3fff)
$00002 ($8000-$9fff)
$00013 ($a000-$bfff)
$00020 ($4000-$5fff)
$00031 ($6000-$7fff)

With the MSX mapper, the first 16K of ROM is fixed at $0000-$3fff. With the Nemesis mapper, the last 8K bank is fixed at $0000-$1fff, and the second 8K bank is fixed at $2000-$3fff.

Many Korean ports of MSX games were done using this mapper. Nemesis is the only known game that uses the Nemesis variant.

Janggun Mapper

Sega Model 2 Games

Control registerROM bank select for slotSize
Fixed($0000-$3fff)16K
$4000($4000-$5fff)8K
$6000($6000-$7fff)8K
$8000($8000-$9fff)8K
$a000($a000-$bfff)8K
$fffe($4000-$7fff)16K
$ffff($8000-$bfff)16K

Writes pass a value with the 0th to 5th bits representing the 8K bank to be selected, and a 1 bit value representing whether the bank data should be reversed on read. Slots 0 and 1, or slots 2 and 3 can be selected as 16K banks by writes to 0xfffe and 0xffff respectively. When writes to these addresses occur, flags are set based on the value of the 6th bit of the data being written. If the 6th bit is set to 1, the data read from these banks will be reversed (11000000 becomes 00000011). Additionally, writes to these addresses will be written to system RAM.

This mapper is used for Janggun-ui Adeul (Korea).