1

I added a linkcable emulator to a gameboy emulator: https://github.com/maxbit89/GBEmulator

The link cable is implemented in https://github.com/maxbit89/GBEmulator/blob/master/serial2sock.c

The main thing is i don't shift SB(0xff01) i just swap it and when the transfer is done i clear the SC flags (0xff02) and trigger the Serial interrupt 0x58. (Technically i think it should be equal to shift and trigger interrupt.)

I used the comm.c example from gbdev. (https://github.com/maxbit89/GBEmulator/blob/master/test/roms/free/linkcable.gb) The Example works fine. But when i start Tetris with my implementation the game menue works fine (Selections are shown in both instances) But when the game is started the game freezes and is hang up in a loop.

The emulator can be started to test like this:

GBemulator instance 1:

./GBemulator Tetris.gb -l 8008

GBemulator instance 2:

./GBemulator Tetris.gb -c 127.0.0.1 8008

Note: The Current source isn't compiling in Windows(MinGW) because i didn't implement winsock. (Code is Testet with Debian Buster)

Can some one tell me why Tetris is behaving like this?

maxbit89
  • 748
  • 1
  • 11
  • 31

0 Answers0