Teki Paki 洗脳ゲーム, a 1991 arcade puzzle game by Toaplan, challenges players to manipulate falling groups of three colored blocks. Points are earned by aligning five or more blocks of the same color horizontally, vertically, or diagonally, causing them to vanish and potentially triggering chain reactions for even higher scores.
The game spices things up with special blocks: dynamite clears the entire screen for a massive bonus when five are matched, while smiley blocks act as versatile wildcards. As players progress through levels, the pace quickens and block patterns become trickier, demanding quick thinking and strategic block placement to prevent the screen from filling up.
Success in Teki Paki requires a combination of pattern recognition, efficient board management, and strategic utilization of special blocks to trigger large chain reactions.
Teki Paki, the first entry to Toaplan V2 hardware (my PCB is pictured above) is powered by a Motorola 68000 CPU clocked at 10 MHz and a Hitachi HD647180 microcontroller, also running at 10 MHz. The M68000 executed the game program, the HD647180 was used to store and execute the sound program. The HD647180 was based on the Zilog Z80 architecture, a widely used and well-understood processor in the gaming industry and would eventually become the Zilog z180.
Why did Toaplan chose this MCU? It could store an internal ROM. This wasn't their first try at using extra chips to stop piracy, but this time it actually worked! For years, the HD647180 Toaplan titles didn't have sound in emulation until CAPS0ff decapped each MCU and extracted the internal ROM. You can read about the process below.
https://caps0ff.blogspot.com/2016/12/hd647180-19-58-102-terrific-toaplan.html
https://caps0ff.blogspot.com/2017/08/hd647180-ghoxwhoopee-bonus-round.html
The sound program playback audio generates from the Yamaha 3812 (OPL2) which runs at 3.375 Mhz and does not use shared memory to communicate between the M68000 and HD647180, rather a simply latch where the M68000 writes a command and the HD647180 reads the command triggering audio playback. Overall the hardware design for Teki Paki is simplistic.
Just like with Vimana and Same! Same! Same!, I was able to use the t80 cpu module to playback audio instead of an HD647180 for the Teki Paki implementation. While there is a known y80e cpu implementation that is z180 compatible it's yet to be used in any implementation for FPGA gaming or any other project that I can determine.
When writing Teki Paki, I referenced the PCB, FBNeo, and mame sources. FBNeo uses standard z80 calls for audio playback according to the driver and when building mame, z80 playback was possible by modifying port 0x60 and the secondary CPU type as shown below:

I'll publish the source for this core and move it to downloader distributions in next weeks update after I finish the refactor and framework updates for Toaplan 2 titles on MiSTerFPGA and the Analogue Pocket. I've restructured the code and fixed the audio issue in Truxton II / Tatsujin Oh in preparation for additional Toaplan 2 titles coming this summer.
Currently the only known issue in Teki Paki is the explosions on the second players side after setting off five or more dynamite blocks. This is due to sprite lag which I've yet to implement and set. This will also be resolved in next weeks update...
Have a great weekend!
Matthew Belshan
2024-05-13 02:51:58 +0000 UTCTim Caution
2024-05-11 23:11:19 +0000 UTCEspiox
2024-05-11 22:59:04 +0000 UTCronalvel .
2024-05-11 22:28:09 +0000 UTC