Advertisement

Simon18F

Not rated 10,649

#PIC18F2550 #game emulation #MB Electronics Simon #processor replacement #enhanced games #small-size processor #custom hardware #embedded systems
Simon18F
Simon18F

Description: Simon18F is a project designed to replace the custom MB4850 processor of the MB Electronics Simon game with a PIC18F2550. The initial goal is to emulate the original Simon games, followed by the enhancement of existing games and the addition of new ones. The Simon18F processor board utilizes the PIC18F2550 processor, selected for its compact size and speed of 48 MHz. The negligible price difference between PIC16F and PIC18F series processors justifies the choice, as the increased speed, memory, and capabilities significantly enhance the board's functionality. The board is designed with a basic PIC18F setup, featuring a 5V regulator that allows it to be powered by the existing 9V battery in the MB Simon game. An external 20 MHz crystal is included to enable the PIC to operate at its maximum speed of 48 MHz, which is beneficial for PWM control of the LEDs and sound generation for the game. The input and output ports of the MB4850 processor are connected to the corresponding ports on the PIC. The processor board is constructed on a small piece of strip-board, allowing it to fit under the mainboard within the game’s casing, making it compact and expandable for future needs, such as adding an LCD screen or a serial/USB port for computer connectivity. A header connector links the processor board to a 16-way ribbon cable, which is soldered to another piece of stripboard equipped with single-row header pin strips that fit into the processor's socket. The software is derived from previous work reverse engineering an MB Electronics Simon game, aiming to closely replicate the flow and timing of the original game. The original Pocket Simon was also used for comparison to ensure the gameplay experience remains authentic. The software was developed using an SDL flowchart to verify the logic and efficiency before programming. The logic for the three games available on the Simon is illustrated in an accompanying flowchart. To facilitate easy modifications to the Simon18F code, a high-priority interrupt is utilized for sound generation, while a low-priority interrupt manages LED PWM dimming routines and button scanning and debouncing. All communication between the hardware affecting interrupts and game logic is executed through a C structure defined in hardware.c. This file contains hardware definitions and the necessary structures for interaction between the game logic and hardware interrupt handling routines.

The Simon18F project represents an innovative approach to modernizing a classic electronic game by integrating a more advanced microcontroller. The PIC18F2550, chosen for its superior processing capabilities, allows for enhanced game features such as improved sound quality and LED effects. The design incorporates a 5V voltage regulator, ensuring compatibility with the existing power supply of the original game, while the 20 MHz crystal oscillator supports high-speed operations essential for real-time game responses.

The strip-board construction method not only facilitates a compact design but also provides flexibility for future expansions. This adaptability is crucial for accommodating potential upgrades, such as the integration of an LCD display for enhanced user interaction or a USB interface for data transfer and programming. The use of a ribbon cable for connection to the processor board ensures a secure and reliable link, minimizing the risk of connection issues during gameplay.

The software architecture is carefully crafted to maintain the original game's timing and flow, ensuring that the user experience remains consistent with the classic Simon game. The implementation of high-priority and low-priority interrupts optimizes performance by efficiently managing sound generation and LED control, which are critical for gameplay dynamics. The inclusion of structured programming practices enhances code maintainability and facilitates future enhancements, allowing developers to build upon the existing framework.

Overall, the Simon18F project exemplifies the successful integration of modern electronics into legacy systems, preserving the essence of the original game while offering opportunities for innovation and expansion.Simon18F is a project to replace the custom MB4850 processor of the MB Electronics Simon game with a PIC18F2550; initially to emulate the original Simon games and, later, to enhance the existing games and add new ones. The Simon18F processor board is based on the PIC18F2550 processor. I chose this PIC since it is a good combination of small-size a nd speed (48 Mhz). Since there is virtually no difference (in price) between the PIC16Fs and PIC18Fs the extra speed, memory and capabilities of the processor will enhance the abilities of this board greatly. The board is a very basic PIC18F set up with a 5V regulator so the PIC can be powered by the existing 9V battery in the MB Simon game.

An external 20Mhz crystal is also included which allows the PIC to run at the full 48Mhz. The extra speed is useful for PWM control of the LEDs and generating the sound for the game. The input and output ports of the MB4850 processor are wired to the equivalent ports on the PIC. I decided to make the processor board on a small piece of strip-board which can fit under the mainboard inside the game`s case. This makes it easy to make and also allows the board to be expanded if required (you could use the extra ports for an LCD screen, or as a serial/USB port to connect the game to a computer (I`ve deliberately left the required pins unused).

The header connector is connected to the processor board via a 16 way ribbon cable. The other end of the cable is soldered to a small piece of stripboard that has two single-row header pin strips soldered on which fit into the processor`s socket. The software is based on the information from my previous project Reverse engineering an MB Electronic Simon game and attempts to follow the flow and timing of the original Simon as closely as possible.

I also used my original Pocket Simon as a comparison to make sure the feel was right. The software was designed using an SDL flowchart to ensure that the logic was correct (and efficiently written) before programming. The logic of the 3 games available on the Simon is shown in the flowchart to the right of the page. To make it as easy as possible to alter and adapt the Simon18F code I decided to use a high-priority interrupt to generate the sound and a low-priority interrupt to control the LED PWM dimming routines and the button scanning and debouncing.

All communication between the hardware affecting interrupts and the game logic are perform through a C structure found in hardware. c. hardware. c - Contains the hardware definitions and the structures required for communication between the game logic and the hardware handling interrupt routines Please follow this link to get a copy of the GPLed source code for this project as a zip file (this is an MPLAB project exported as a zip file so you should be able to reload it into your MPLAB IDE).

If you have any suggestions, or have produced some enhancements to the Simon18F software I would love to hear from you. You can find my email details on my profile page. If you like this site and want to help support future projects, or you just want to show appreciation for a project you built, used or enjoyed, please consider leaving a PayPal donation.

It`s quick, secure and helps us to run the site and fund future projects! The owner of this site is a member of the EFF and you should be a member too! The EFF protects the rights of open-source, open-hardware authors all over the world.

Related Circuits