Commit Graph

89 Commits

Author SHA1 Message Date
sanni
324de5463b Allow for flash ID error to be ignored 2024-07-31 12:07:44 +02:00
sanni
70ef81bd7e Fix 16bit flashrom writer 2024-07-24 21:40:20 +02:00
sanni
7bdf3e6a0f Update FLASH.ino 2024-07-19 23:12:45 +02:00
sanni
dac242cd2f Flash: Add progress bar to read/verify/blankcheck flashrom 2024-07-19 22:18:22 +02:00
sanni
fd2c332ea9 Add progressbar to flashrom programmer
Only tested with 29F032 and 29LV640 but should still work for all since it was just copy&paste.
2024-06-30 11:36:33 +02:00
sanni
f798336aaa Always disable SRAM when flashing any hirom repros 2024-06-30 11:04:40 +02:00
sanni
27b84d2f7e Disable SRAM when flashing 2x2MB repro 2024-06-29 20:29:38 +02:00
sanni
ce4e26c686 Fix verifyFlash() 2024-06-27 10:55:54 +02:00
sanni
fefd959e84 Add CFI option to flashrom programmer 2024-06-26 13:29:18 +02:00
sanni
fd82faca2d SNES: Add 2x2MB flash to CFI (thx to MouseBiteLabs) 2024-06-26 09:24:12 +02:00
smesgr9000
4040d2b2a6 define common string "Select file" 2024-06-16 10:55:50 +02:00
sanni
27a213a3c1
Add CFI option to SNES repro menu
Only tested with 29LV640 on Chinese LoROM repro.
2024-06-13 16:43:20 +02:00
Ancyker
8535552b9a
Fix compilation errors when the FLASH core is enabled without FLASH16
Commit References:
* a32c6b3bff - Added ATTENTION_3_3V flash string but placed the definition inside a FLASH16 ifdef.
* 4d000418a8 - Added use of writeWord_Flash to FLASH8 without removing the FLASH16 ifdef around it.
2024-06-10 11:46:26 -04:00
smesgr9000
0d9596eb70 replace custom FLASH saving code with common function 2024-05-28 20:20:29 +02:00
smesgr9000
1aaa90af97 remove custom code to print 0 prefixes in sprintf 2024-05-20 13:17:44 +02:00
smesgr9000
4d000418a8 remove duplicate code to write Flash Command 2024-05-20 12:54:33 +02:00
smesgr9000
aaaa6ea3cd reuse menu item strings 2024-05-20 12:27:53 +02:00
smesgr9000
a32c6b3bff define PROGMEM string for Attention 3.3V 2024-05-20 12:07:28 +02:00
smesgr9000
f82be2d5db remove duplicate code to open file for verfication 2024-05-20 11:57:32 +02:00
smesgr9000
d7e795fbed remove duplicate code to open file to write on flash 2024-05-20 11:39:35 +02:00
smesgr9000
ea0b47de57 use constant for "Saving to" instead declare the string several times 2024-05-12 15:54:49 +02:00
Ancyker
e61ac414d8 Code optimization, cleanup, and stylization
* Reduced PROGMEM / DRAM usage slightly (Using defaults w/HW5: Before -> 214,668 bytes / 5,757 bytes; After -> 213,414 bytes / 5,751 bytes)
  * Optimized some menu options and calls
  * Added more string constants and implemented them where found.
* Fixed some stylization
  * Constants should always be uppercase.
  * Features should use the `ENABLE_<feature name>` format.
  * Options for features should use the `OPTION_<feature name>_<option name>` format.
  * Added ENUMs for more clarity and better type checking.
  * Moved some defines over to `constexpr` and `const` types. These are preferred over preprocessor constants when not intended for use with `#if` and other preprocessor language.
2024-03-02 11:26:35 -05:00
Ancyker
2cf7f5dbe7 Cleanup voltage requests
The `setVoltage()` function should be called even when `ENABLE_VSELECT` is disabled because `ENABLE_3V3FIX` also uses it. There is no resource cost to do this as when both options are disabled the compiler will optimize this function out. This just "future proofs" the code so if that function ever does more it doesn't need updated everywhere. This applies to `setup_FlashVoltage()` as well.

The changes to OSCR.cpp are just for code formatting and additional comments to clarify this.
2023-06-26 15:25:54 -04:00
sanni
dee54dd30e Move automatic voltage selection from menu to setup functions 2023-06-26 12:04:00 +02:00
Chomemel
fe91177864
Add files via upload
adding support for AM29LV160, AM29LV320 and AM29LV640
2023-05-14 08:23:54 +02:00
sanni
13d1b33fc1 Update FLASH.ino 2023-04-21 18:04:02 +02:00
sanni
0a21d49f8a Fix error in flashrom programmer menu 2023-04-20 11:38:46 +02:00
sanni
5cefd8362c
Update FLASH.ino 2023-02-04 15:51:12 +01:00
Vincent Pelletier
f07f6f9025 All: Replace print_Error(*, boolean) calls with print_{,Fatal}Error(*)
Also, make print_FatalError(*) independent from print_Error(*).
Also, factorise common parts of print_Error(*).

Frees 2336 bytes of program space and 5 bytes of global ram space.
2022-10-31 08:52:33 +00:00
Vincent Pelletier
a555f2117f All: Resolve all compiler and linker warnings
No functional change intended.
2022-10-28 05:29:20 +00:00
Vincent Pelletier
e7ef7fd4bd All: Make flashid an integer
flashid (almost) always contains the hexadecimal representation of two
bytes, which then means it gets compares with strcmp, which in turn need
another string argument. Instead, make it an integer, removing the need to
call strcmp.
Add a separate string representation for printing purposes (maybe this can be
avoided by having the print function format it when needed ?).
The only apparent case where flashid is not an hexadecimal representation
of a pair of bytes is when N64 clears it to "CONF". Set flashid to zero
this case.
This saves about 500 bytes of program space and 200 bytes of ram.
2022-10-28 05:29:20 +00:00
Vincent Pelletier
3fcd1a808d https://github.com/sanni/cartreader/issues/574#issuecomment-1286956251 2022-10-28 05:29:20 +00:00
sanni
4badfff458 Move to Arduino IDE 2.0.0 (different auto formatting, no code changes) 2022-10-13 09:49:03 +02:00
sanni
e87de58328 V9.0 2022-07-17 14:50:59 +02:00
sanni
0a4a4d0039 Add no-intro database to NES
This is just a beta release, stuff might be broken.
2022-07-07 00:15:13 +02:00
sanni
8b96d250bd Add MD database 2022-06-16 17:17:16 +02:00
sanni
5cb6574868
Update FLASH.ino 2022-01-19 13:32:15 +01:00
sanni
0081ad7b2f flash ID bugfix 2022-01-19 13:15:59 +01:00
sanni
6a830e651d Print first 40 bytes if flashrom is unknown 2022-01-13 17:07:58 +01:00
sanni
8a40898544 Add S29GL064M to flash.ino
Thanks to BASSIX
2021-11-27 19:46:02 +01:00
sanni
5a3b311feb Fix Led and missing word wrap 2021-10-26 17:13:42 +02:00
sanni
527f3562ed V6.4: Add ExLoRom and ExHiRom flash options
- LoRom (P0) will write up to 8MB starting from file 0x0 to flashrom 0x0.

- HiRom (P0) will write up to 4MB starting from file 0x0 to flashrom 0x0.

- ExLoRom (P1) will write the first 4MB starting from file 0x0 to flashrom 0x400000. And then a second block up to 4MB from file 0x400000 to flashrom 0x0.

- ExHiRom (P1) will write the first 4MB starting from file 0x0 to flashrom 0x400000. And then a second block up to 4MB from file 0x400000 to flashrom 0x0.
2021-06-09 11:28:39 +02:00
sanni
c343094966 Add option to force A23 to high while flashing HiROM repros
A23-> low enables P0 and A23->high enables P1 flashrom.
2021-05-12 17:42:49 +02:00
jiyunomegami
d7a133188d actually recheck DQ 7 in busyCheck29F032 2020-10-17 22:48:35 +09:00
jiyunomegami
2096ec7597 writeFlash29F032: Retry writing, for when /RESET is not connected (floating) 2020-08-14 19:03:42 +09:00
jiyunomegami
712c4cc83d busyCheck29F032 changes to match the datasheet 2020-08-14 19:02:37 +09:00
jiyunomegami
4c6fb7bd8c Detect Flash ID 04D5 MBM29F080C 2020-08-14 18:58:20 +09:00
jiyunomegami
29093b1bf3 add #ifdef enable_XXX check to each module 2020-07-05 00:07:14 +09:00
sanni
cfb9e39cbf V4.9: Improve WS Initialization
Thanks to skaman.
The code does a deeper sanity check of the header data when initializing the cart.  It avoids having to constantly press buttons to reinit the cart.  Carts can still not initialize the MBC properly but that's normal for the WonderSwan.  Clean the pins on the cart and check that the cart and adapter are seated properly.  If the cart doesn't unlock immediately, then let the sketch run for a bit.  For stubborn carts, a power cycle might be necessary.
The sketch fixes a few typos, removes some trailing spaces, and adds another ROM size (used by Benesse Pocket Challenge V2 carts).
2020-04-20 10:35:48 +02:00
sanni
7b263115a5 V4.8: Add Reset Option to sub menues 2020-04-12 11:11:10 +02:00