Commit Graph

7 Commits

Author SHA1 Message Date
Paul Desktop ASUS-C7H cc4aa6c67c -------------------------------------------
Firmware application version #3 release
-------------------------------------------

N64 updates:
Some extra timing delays were necessary for consistent dumping.
Includes fixes for N64 dumping that proved working for me on 10+ carts I
dumped successfully.  There is now a .csv in docs folder with cart size
in bytes, divide that number by 131,072 to get size in mbits for -z
flag.  Includes CRC32 checksum that can be verified using HxD hex
editor.  N64 file output is big-endian so it reads as it should in hex
editor which is .z64 file format.  lua script updated to print out the
game name from the in rom header.

NES updates:
flashing support for quite a few different mappers including GTROM,
MMC2, MMC4, action53, easyNSF, and other tweaks to rd/wr timings.

FIRMWARE UPDATES:
inlretro2.lua script now tries to poll the firmware "application
version" and suggest updating your firmware if you're not running the
version in this release.  You can always update your firmware using the
bootloader method in the readme.  But there is an easier method if you
have an stm32 based device (translated: you purchased your device in
2018 or later). AND you're already running firmware version v2.3.x

simply run the new scripts which were added in this commit:

	PCB version 2.0 or 2.1 (large square PCB with option for 6 connectors)
	>inlretro.exe -s scripts\inlretro_inl6fwupdate.lua

	PCB version 2.0N (smaller PCB with NES connector only:
	>inlretro.exe -s scripts\inlretro_inlNESfwupdate.lua

Now that it's easier for the host software to detect the firmware
application version can work towards having the scripts automatically
update the device firmware for you..  But still need to implement this..
2019-08-16 10:27:19 -05:00
Paul XPS 577277cd2b Basic NES file header creation. PRG/CHR-ROM sizes are filled in based
on provided prg/chr rom input args for dumping.  Mirroring is sensed &
entered for fixed mirror mappers.  So this is basic iNES file format.

Still don't have automatic banktable locating, nor mapper detection.

But this provides a basic header that should work with most currently
supported NES mappers.  If the headers need tweaked, I recommend opening
in Mesen and using it's header modifcation tool.
2019-03-21 20:28:53 -05:00
Paul XPS e4debe5a13 Big update for firmware version v2.3.1
this is the verion getting flashed on all v2.0N NESmaker kits
v2.3.0 worked for basic functions, but was never shipped

Majority of effort revolved around testing mapper30 boards with the
smaller v2.0N INLretro with the NES connector alone for NESmaker kits.

added linear feedback shift register for test stream data generated
locally on the device.  I'm not 100% sure if this is any faster than
pushing the actual data via USB though.. :/  It's plenty fast on the
stm32 nearly instantaneous for 32KByte.  But the AVR takes a couple
sec..

Created "stuff" dictionary for things like that were I just want to add
small things and don't want to bother with a whole new dictionary.

Added file verification to the host with files.lua

Have some nes flash algos return post-written data so calling function
can decide if want to retry, fail, etc.

Changed host dictionary calls to assert instead of error because it
really shouldn't continue.  I didn't see an error when sending opcode to
wrong dict and caused head banging..

fwupdate permits bytes to be skipped, or force the update.  Found that
the fwupdater got assigned different addresses of ram depending on what
all other ram gets allocated to the main application

Some clean up of inlretro.lua

TODO:
host learn and keep track of the connected device.
Needed for ciccom right now, or knowing whether ciccom connection
is even present..
In the end maybe ciccom is better placed in firmware, but for small
transfers of only a few bytes it kinda makes sense to keep on the host.
Pinport gets quite messy with these made up pin names when really all I
want to do is toggle a specific pin on the NES connector.  So maybe some
double mappings would actually be okay, need to rethink that..

create different flash modes that either keep going, retry, or error
depending on the goal of the flash operation.  Fanout the return value
from flash algos to all of them.

have fwupdate assigned a specific area of ram so the ram pointer doesn't
change between builds.  Okay to ignore for now.

Realized can have STM32F070C6 devices execute bootloader by erasing all
the flash or perhaps even just the first word of flash according at
AN2606.  This wouldn't work for RB devices though.  This could be done
through the bootloader dict
2018-12-06 01:07:13 -06:00
beyondcoast e3a09931b7 Fix ROM Size check logic, wrong variable names in battery-backed ram mappers. 2018-12-02 13:23:57 -06:00
beyondcoast 26f403d9f6 Change interface to process() for all NES mappers to make higher level scripts more flexible in using them, eliminate hardcoded prg,chr,ram sizes. Add CLI options to drive all this functionality directly. Note: Option letters are chosen somewhat arbitarily, next change will be to use argp so more descriptive flag names can be used ex: --nes_prg_rom_size_kb=16 in addition to single character shortnames. This will be important as console support expands. 2018-12-02 13:06:22 -06:00
Paul XPS 7584bbeb70 Big update from past weeks' work. Most of the work involves converting
NES scripts to use new dump/flash methodology that MMC3 started.
Includes BNROM, UNROM, MMC1, and new scripts for FME7 & MMC4 (SOP flash).
Adding more general support to SNES with v2proto_hirom that script is
actually becoming more of a master script supporting both LoROM and
HiROM including flash, dump, and save backups.
SNES Rd/Wr now designate the state of /ROMSEL so have to manually
determine if access should be in /ROMSEL space of the SNES memory map or
not.  (ie all SNES cart memories are /ROMSEL space except HiROM SRAM).
2018-11-19 18:00:03 -06:00
Paul XPS 86e8d3d215 Big old first major commit since publicly releasing..
I made a commit earlier this week but messed things up by not pulling
from the master and things weren't updated...  Here's the notes from
that commit:

 Author: Paul XPS <paul@infiniteneslives.com>
 Date:   Tue Nov 6 22:45:52 2018 -0600

 Large commit biggest feature add is NES MMC3 support including Save RAM
 (aka WRAM/PRGRAM) support including dumping and writing save files.

 The MMC3 script & method of dumping/flashing is the most forward
 thinking script/firmware so far.  Finally starting to form a clear
 vision of how I want to handle flashing/dumping variations with mappers.
 Biggest thing is having the host handle the mapper init & banking
 control.  In the view of the firmware, it's only responsible for knowing
 how to flash a bank.  And dumping is even more generic with the host
 just telling what address range to read.  Things will get more complex
 with support of mappers with bus conflicts.  But ready to start
 converting these old hacked methods to be more like the MMC3 means.

 Have some early support for dumping gameboy using the snes script as the
 pinouts are nearly identical.  Along with testing of toggling between 3v
 GBA and 5v DMG.

 Have some early support for INLretro NES only version which uses a
 smaller mcu because it doesn't need to support large 16bit carts.  Still
 have to get this completed.

 Added support for CNROM, but I'm not sure if it's actually working.  Going
 to restart with NROM and start updating the currently supported
 mappers to be more like MMC3.

But this also includes some new updates from the second half of the week:

Started updating existing NES scripts to use new MMC3 methodology.  Got
NROM, CNROM, BNROM, & Color Dreams working.  On the host side only
needed to add nes.c functions for specific flash algos.  Able to delete
significant amounts of mapper specific code from flash.c

Got some basic SNES script support with new methodology for Catskull
elect 5v PLCC SNES LoROM board.  And INL SNES HI/LO-ROM 3v board as
well.  These don't yet use buffer writes, just single byte writes.

Also having issues with Mirroring test/sensing again.  Driving me crazy,
but don't really care about it at the moment and not sure what's wrong..
So just committing that broken for now.  Looking to remove this
functionality from the firmware side as the host should be controlling
most of this.

Looking to add SNES RAM & buffered writes.  Also need to test some of
the HIROM code as I just added it in there while I did the LOROM stuff..
2018-11-09 21:52:33 -06:00