I have a fully functional Arduino Mega sketch that needs to be modified to meet my needs.
Sorry to say this, but I do have some negative experience here, so serious bidders who can complete 100% of the job in the promised time frame only. No excuses will be accepted. Honest work = honest instant pay + possible bonus + great feedback + further work assignments. Lame work = no pay + bad feedback. You have been warned.
The sketch reads game cartridges (memory cards) from various gaming systems. It has too many unnecessary functionality that I want to be removed. The objective is to keep only the stuff I need.
Current operation mode description.
When you power on the Arduino, it shows a menu on the screen that allows you to choose what type of memory card to read or what operation to perform:
- Nintendo 64
- Super Nintendo
- Nintendo Power
- Game Boy
- Mega Drive
- Flashrom programmer
(See pic. 01 for details)
There is a push-button on pin PD7. If you short-press it once, it moves the cursor onto the next menu item. if you short-press it twice, it moves the cursor into the previous menu item. If you long-press that button, it confirms selection.
If you choose, for example Game Boy, it will open a submenu that consists of two items: Game Boy (color) and Game Boy Advance. (pic. 02).
If you choose Game Boy or Game Boy Advance, it will attempt to read the memory card information and display it on the screen (pic. 03).
If you click the button shortly, it will display the following menu:
- Read ROM;
- Read save;
- Write save;
- Force save type;
- Flash retro;
(see pic. 04 for details).
If you hold the button down on any of the items, it will execute the corresponding function. Files are saved under specific file names, according to the ROM information.
If at any moment the SD card is removed, a notification is displayed.
If the selected operation was not completed successfully, a warning message is displayed.
There is an RGB LED that does some indication but it's different from what I want.
Here is how it needs to act eventually.
- Remove ALL functionality NOT related to Game Boy (Color) or Game Boy Advance.
- Remove the screen and use LED indication instead.
1. When you power on the Arduino, it checks for the game card to be present (you need to assign a GPIO pin. when it's pulled high, the card is present). If there is no game card, signal a "No Card" error LED (assign one), abort operation until the user presses the Reset button, then start over again.
3. If the game card is present, check for the Mode pin (add one) that toggles between Game Boy (color) if the pin is Low, and Game Boy Advance when the pin is High.
3. Arduino checks for any existing .gb, .gba or .gbc files on the SD card and if any are present, it erases them.
4. Assign a Read/Write pin. If it's Low, the following READ actions (5-7) are performed. If it's High, WRITE operations 8-10 are performed.
5. Read the ROM and save its contents to the SD card root directory under a generic name ([url removed, login to view] for Game Boy Advance games; [url removed, login to view] for Game Boy games; [url removed, login to view] for Game Boy Color games).
6. In case of success, signal the solid "Success" LED (assign a LED). In case of error, signal the "Error" LED (same LED but blinking slowly).
7. Read the Save file and save its contents to the SD card root directory. If no save file present, ignore and finish.
8. Introduce a 3-seconds delay and a "Write" LED. During this delay, quick-blink this LED.
9. Write the Save file to the game cart.
10. In case of success, signal the solid "Success" LED. Failure = signal the "Error" LED (same LED, but blinking slowly).
If at any moment the game card is removed, the ROM and Save file are erased from the SD card.
Any questions are welcome. I'm more than happy to test your sketch right away.
The source file with all the necessary libraries is attached.
Thanks and happy bidding.