Prototype of Mahjong Console Game
- 詳細內容
- 分類:Engineering
- 發佈於:2014-04-28, 週一 02:51
- 作者 Chih Chiang Wang
- 點擊數:15668
This is the Mahjong console game developed on the SOC chip (Propeller).
The idea is to make the portable Mahjong game with the real buttons input. It should be low cost with the easy control for elders.
Would like to find the SOC which should include the following components. It will be easy to get more focus on the SW development:
- CPU
- ROM
- Memory
- GPIO
- TV output
- Low cost for the limited performance to meet the requirment of running a Mahjong game
I did try to find this kinds of solutions, but it's hard to get the matched one by web search. Most SOC solutions are ARM or MIPS based and they need external ROM, RAM or TV codec. More payment for hardware and software development environment.
One day, I found the solution from the web. This SOC is maily for education and it did meet the requests I need. I kick off the implementation, and I did get some probelms need to be fixed during the time.
Get more detail by the following web link for this SOC (Propeller) solution I found:
http://www.parallax.com/downloads/propeller-tool-software
I bought the evaluation board (EVB) of Propeller C3:
Bought breadboard to make the keyboard by jumper wires and buttons. Connected to GPIOs of the EVB. Here I got one issue for detected the input value of buttons. The input value is drifted since NOT to add the pull down resister.
Read the relevant data sheets and downloaded the developing SW tools. Start to write the code:
Programed C like languge. There is no free tool to do the sourece code level debug like the normal IDE environmnet. To debug the code is by added the dubug messages and then traced it by the terminal aplication. It's really sometimes not easy to fix the intermittent bug:
Need to write the part of code by the assembly languge to improve the performance especially for the recursive algorithm:
One big problem is the internal memory is not enough. Did try to optimize the code with the memory usage but looks like still no much available memory for adding the sound effect:
Play and test the game on TV:
Since the limited memory, there is no graphic operation like the frame buffer. Need to design the tiles and sprites with the limited color space to be showed on the screen (Looks like it's worse than FAMICOM by my bad artistry).
Bought the active and passive components to make the standalone prototype (simple but ugly placement):
Took a box to integrate the keyboard and the main board:
Assembled buttons into the cover and then connected them with the keyboard:
Downloaded the bin file from PC via USB to Serial adapter:
Ready to go:
Play the game on the TV by the standalone prototype:
Vedio for the testing on the EVB:
This prototype is actually made before my iOS game as Mahjong 136.