top of page

1.0.5 / 12-04-2012





average rating is null out of 5
average rating is null out of 5
average rating is null out of 5

TwoMbit is a cycle/bus accurate emulator for Sega's 8-bit game consoles (Master System, Gamegear, SG-1000)


Most Recent Changes


  • [bugfix]: fixed interrupt recognition and timings of some z80 opcodes

  • [bugfix]: improved pal games autodetection

  • [bugfix]: improved japanese games autodetection

  • [bugfix]: improved mapper detection (Nemesis, Transbot, Spy, jang pung 2, Power Boggle, ...)

  • [bugfix]: improved cram update behaviour (Rise of the Robots, Back to the future 2)

  • [bugfix]: for gear to gear games in single gear mode. Frame error flag is reseted always. It seems it could be only seted by a broken connection between two gears (so no usefull for emulation) (Hyper Chou Pro Yakyuu '92)

  • [bugfix]: fixed a bug for gg backdrop color (Power Strike II)

  • [feature]: added DahJee ram emulation for SG-1000 (Kings Valley, Magical Kid Wiz)

  • [feature]: added custom byte flipping mapper (Janggun ui adeul)

  • [thanks]: angrylion for bug tracking

Show Previous Changes


  • [bugfix]: sample playback for tone counter 0 (chess games sms/gg)

  • [bugfix]: vdp access times for SG 1000 (Monaco GP)

  • [bugfix]: for gear to gear games in single gear mode. These games expect the send flag successfull seted, even the data is sended into nothing (Lemmings, GP Rider)

  • [bugfix]: for gear to gear mode. Some games read receive data too soon. My initial assumption was that each shifted bit is saved in an accessible register directly, but its stored in a buffer until all shifting is done. (GP Rider again)

  • [bugfix]: increased the distance between 2 running game gears. Some games are unable to determine about gear 1 and 2. (Popeye)

  • [feature]: allowed Super Tetris to run. The game don't expect port 3e. Maybe the korean sms, based on the japanese one, don't have it. I would consider this as a game specific hack.

  • [feature]: added command line support. Now you can assign games to the emulator.

  • [feature]: added the option to disable sms borders. means borders are always black and reduced. To maintain aspect ratio borders can not removed completly

  • [feature]: added 4% overscan for normal border display to resemble real TV viewport, means smaller borders


  • added mac support

  • added linux support

  • added correct aspect switch

  • bugfix: scanlines in higher resolutions were displayed too thin

  • bugfix: better autodetection of pal games (the ones, which makes problems in a ntsc region).


  • added cheat support

  • added savestate support

  • [bugfix]: vscroll cache time

  • [bugfix]: sprite subsystem is processing during inactive display


- switched to gcc for compiler
- switched to QT 4.8 for Gui ( c# / .net is no more )
- build libsms (cross-plattform)

- gamegear emulation
- sg-1000 emulation
- emulating additional cart work ram (Ernie Els Golf, the castle, Othello)
- emulating bus contention
- emulating game gear bios
- emulating custom sram sizes (Shining force)
- emulating eeprom of the baseball series games
- emulating lightphaser, paddle (japanese and export), sportspad (japanese and export), 3d glasses, Terebi Oekaki
- emulating gear-2-gear at cycle level
- parallel communication (Squinky Tennis in micro machines, Primal Rage, ...)
- serial communication
- different baud rate settings
- emulating backward compatibillity of gamegear(mastergear) and sms
- emulating yamaha2413
- fex(zip, 7z, rar, gzip), bzip2, untar for compressed roms

- removed cache for irq detection, now irqs will be detected one cpu cycle before opcode edge (simplified the overall process)
- fixed sample playback
- differentiate between sg and sms/gg vdp delay and access window behavior.

feature doings
- cheats
- savestates
- replace directx to make TwoMbit platform independant

accuracy doings
- sn76489: writing to regs will not processed without delay
- vdp: accurate access windows during sprite processing
- vdp: split sprite subprocessing in timed steps (like bg processing) and not one sprite at a time
- yamaha2413: sub sample accuracy

--1.0 beta--

I woud like to go public with my cycle accurate, open source SMS emulator TwoMbit.

TwoMbit is affected by bsnes and uses the libco threading module. One thread for each core.

The Gui is programmed in C# / WPF (compiled for .Net 4.0). The emulation core is a unmanaged c++ dll. I am using directx only, so the core depends on time

The cpu can sync each Master to the vdp or apu, of course if it's needed only. for example before register writes.
The vdp can sync to the cpu each 2 Master.
The emulator itsself is not very speed optimised at time but I think the code readability is good.

What is emulated?
- cpu bus hold times
- interrupt recognition one cpu cycle before opcode edge.
- sprite preprocessing during active display
- background display generation is parted and timed in name, color and pattern address select and ram load
- VDP delay
- cpu access window for active display
- emulating port 3e, can load bios or combine bios with game
- switchable between SMS 1 and 2

What is missing
- Lightgun support (input is already configurable in GUI)
- savestate support
- cheat support

  • SG-1000, SC-3000 emulation (vdp mode 0 and 2 are already supported)

  • game gear emulation

  • additional yamaha sound chip

bottom of page