{{DEFAULTSORT:256}}[[Category:VTxx mappers]]'''NES 2.0 Mapper 256''' is used for games using the bankswitching behavior of the [[VT03|OneBus]] Famiclones. The UNIF board names are '''UNL-OneBus''', '''BMC-OneBus''' and '''UNL-DANCE'''. ==Registers== To emulate ROM images using mapper 256, one must support bankswitching, nametable mirroring selection and IRQs using both the VTxx native registers (see the [[VT02+ PRG-ROM Bankswitching]] and [[VT02+ CHR-ROM Bankswitching]] articles for details) as well as the [[VT02+ MMC3 Compatibility Registers|MMC3 compatible registers]]. ==Single and split PRG/CHR address space== On physical hardware, bankswitching by the VTxx console itself can only be used if the cartridge uses OneBus addressing, signalled by connecting certain pins on the cartridge connector to Vcc/GND, because only in OneBus mode are the CHR address lines repurposed as higher-order address lines for the single address space. Therefore, regular OneBus ROM images will only contain PRG ROM and no CHR ROM, and PRG ROM ($41xx) and CHR ROM ($201x) bankswitch registers apply to the same address space. However, ROM images converted from Waixing's WXN format will have both PRG and CHR ROM, yet use the VTxx-native bankswitch registers and/or [[#Bank register address and CPU opcode scrambling|register address scrambling]]. These images cannot be run unchanged on physical hardware, and were intended to be run by Waixing's proprietary VTxx emulator found on several 32-bit plug-and-play consoles. For simplicity, mapper 256 is also used for such ROM images; to emulate them, simply apply the PRG ROM ($41xx) and CHR ROM ($201x) bankswitch registers to the respective separate address space. ==Bank register address and CPU opcode scrambling== Several plug-and-play consoles use a simple protection scheme intended to prevent interchanging the ROM data between different consoles. The protection scheme works by simply swapping the addresses of the bankswitch registers. Some patterns only change the VTxx-native register addresses, others apply to the MMC3 compatibility registers as well. Other plug-and-play consoles, in particular those by Jungletac, scramble CPU opcode bytes (and only those) by swapping bits. These consoles power-on with opcode scrambling enabled, but allow it to be disabled --- for example, to run a pirated licensed NES game without modifying it --- by writing to register '''411C''' (submappers 11, 12 and 14): D~7654 3210 --------- .E.. ..F. | +-- Select primary CPU opcode encryption (submapper 11 only) | 0: disabled | 1: enabled (default at power-on) +-------- Select CPU opcode encryption (submapper 12+14 only) 0: disabled 1: enabled (default at power-on) Select secondary CPU opcode encryption (submapper 11 only) 0: disabled (default at power-on) 1: enabled or '''$4169''' (submappers 13 and 15): D~7654 3210 --------- .... ...E +- Select CPU opcode encryption (submappers 13+15 only) 0: enabled (default at power-on) 1: disabled [[NES 2.0 submappers#NES 2.0 Mapper 256|Submappers]] have been allocated to denote the type of protection scheme: {{:NES 2.0 Mapper 256/Submapper table}} ==Embedded VT369 ROM== The VT369 variant of the OneBus famiclones has 4 KiB of ROM embedded into the NoaC glob itself. These 4 KiB are mapped to $1000-$1FFF of the main CPU's address space and to $4000-$4FFF of the sound CPU's address space, and contain initialization code and a sound CPU program. They are included as NES 2.0 Misc ROM.