-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
EEPROM Initialization #4
Comments
This is true. What I did the first time is comment out some code so the data is read from FLASH. Then I forgot about it. https://github.com/pepijndevos/arduino-boy/blob/master/gameboy.ino#L167 |
How about this //This sketch is a way of initializing the EEPEROM for Bill's Arduino (https://github.com/pepijndevos/arduino-boy)
//By Alex McPhail
//I don't care how you use this
#include <EEPROM.h>
#include "output.h"
void setup()
{
for(int i=0;i<=PLAYER_LENGTH;i++)
EEPROM.write(i,DATA_BLOCK[i]);
}
void loop() {}//nothing to do |
That would work. How would you suggest to include it in the project? Maybe the init could check if the EEPROM contains valid data and fill it in otherwise. PR welcome. |
Actualy, it's a bit more subtle. Since I only store one Pokemon, the layout in EEPROM is different from the one in FLASH. |
So what's the difference in the layouts? And you could include it as a separate .ino |
If you'll look at |
So I've made a fork, and it mirrors your data, thus doesn't need initialization, because it's your save, "copied". All I did was remove all instances of Serial, and changed three 44's to 48's (lines 78, 86, 93). No idea why it's done what it's done :P |
No way given, aside from normal use, to initialize EEPROM.
The text was updated successfully, but these errors were encountered: