Detecting mirroring code working and tested
Started working on buffer operations from host
Current code compiles but not yet at point where can start testing
Adding cpu page read to nes.c to have faster dumping operations.
moving enums to shared as gets used quite a bit communicating between device and host.
Processing input args to create rom file when dumping
Adding create_rom function in file.c working but need to add check if file already exists
Listing out number of mappers which planning to support
Using CHR-RAM sensing, and flash manf/prod ID based on PRG-ROM banking
fixing bug in firmware for ppu writes was ANDing in /A13 instead of ORing..
adding datasheets to hardware folder for 5v PLCC and 3v TSOP flash used on all flash boards
Prepended DICT_ to dictionary names to prevent using those defines for something else accidentally
"NES/SNES" etc could be used in a lot of places, don't want to use wrong enum/define in wrong place.
created enums.h to list out all enums/defines for cartridge and memory elements in one location.
separate file.c/h file for getting data in/out of a files, and opening/closing them.
adding test roms to roms folder so they can be used for various testing.
now able to accept LIBUSB_LOG_LEVEL from commandline to turn on/off error
messges at runtime. Also setting level > 0 will print messages during
device discovery and connection. Still need to permit kazzo firmware
version to be provided on commandline to support K flag.
fixing dictionary call typo with semicolon and setting buffer length
to always be provided with function call instead of dictionary call
deciding what it should be based on the opcode.
Adding some speed notes and other speed related discussions to buffer
dictionary.
buffer opcode updates to transfer payloads
including stuffing two bytes of write transfers in setup packet.
Calling specific buffers with miscdata or opcode.
new dump and flash modules for firmware.
new buffer function update_buffers called during main to monitor and
manage buffer objects when not being loaded/unloaded from USB.
Trying to prevent transfer from exceeding buffer size.
Also verifying buffer's status is properly set to enforce upholding of the status.
Giving usbFunctionWrite a means to communicate it's error/success back to host with USB 'dictionary'.
Had a good lesson on what static means... :/
everything working now as previously designed
speed testing on windows10 PC yeilded ~21KBps when transferring 128-512KB
payloads and 128Byte transfer size. Going to bump to 256 and see how that
does after 128KB speed tests on linux machine.
created host test.c/.h file for general testing of new features.
that way I can start working on erase/write.h files and just use test.c as
scratch code space for tinkering and still call with -t flag on command
line.
modified dictionary calls to include pointers to data and lengths.
moved all buffer operations out of usb.c with new bridge function between
the two files. Lots of pointing going on and lessons learned..
Thankfully everything seems to be working if you actually call the
functions as I designed them.. Gotta love trouble shooting bugs that
don't exist.. Helped updating allocate output to get returned as error
back to the host.
Moved typedef structs to firmware type.h file as seemed to cause
compilation issues being contained in the files .h file when other .c
files needed those types.
Fixed casting warnings with usbMsgPtr ended up looking at usbdrv.c figured
out how close I got, just shouldn't have been putting the * in there..
complete. should be able to allocate buffers from host, but haven't got
to testing it yet. Compiling on firmware though..
Currently have 256 bytes of raw_buffer, and 8 buffer objects/structs
each with ~16 bytes per object. So could trim things down, but still have
decent amount of SRAM left. Could have another 256 byte buffer at this
rate.. but might not leave enough SRAM for temporary routines.
Possible that raw buffer space could be dynamically allocated
as either buffer space or temporary routine space...
AVR Memory Usage
----------------
Device: atmega164a
Program: 4094 bytes (25.0% Full)
(.text + .data + .bootloader)
Data: 573 bytes (56.0% Full)
(.data + .bss + .noinit)
logic 1 if relying on it. Seems to work fine on NES discrete and
INLXO-ROM boards where planning to utilize it. SNES can't pull up due to
pulldown and original famicom cart can't either perhaps because of
EXP6 EXP FF output being too much of a load..?
cleaned up firmware pinport.h used PURPLE/GREEN KAZZO for all #ifdef's
AVR Memory Usage
----------------
Device: atmega164a
Program: 3404 bytes (20.8% Full)
(.text + .data + .bootloader)
Data: 53 bytes (5.2% Full)
(.data + .bss + .noinit)
final kazzo design hex commited as comparable build to the past two commits of green/purple.
So this .hex commit is apples to apples with recently commited purple/green .hex commits.
----------------
Device: atmega164a
Program: 3416 bytes (20.8% Full)
(.text + .data + .bootloader)
Data: 53 bytes (5.2% Full)
(.data + .bss + .noinit)
First commit of purple kazzo specific firmware.
Currently just 12bytes larger than final design v1.2b-v1.4
This will probably expand as more updates twiddle with EXP FF
----------------
Device: atmega164a
Program: 3404 bytes (20.8% Full)
(.text + .data + .bootloader)
Data: 53 bytes (5.2% Full)
(.data + .bss + .noinit)
moving main.hex to include pcb version number.
hex includes snes read/write dictionary additions, but still untested.
code updates for this .hex are in commit to follow shortly.
Noticed avr-gcc version 4.8.2 on linux pc is compiling significantly smaller than
avr-gcc version 4.3.3 on windows PC. Need to update so hopefully getting
identical builds on both of my machines.
Able to read PRG-ROM flash chip's manf and device ID from commandline.
New dictionaries io and nes along with firmware files to support.
now have io_reset, nes_init, and snes_init io.c functions
nes.c functions including discrete_exp0_prgrom_wr and emulate_nes_cpu_rd.
New dictionary.c/.h for host to make dictionary calls easier including
setting proper return data lengths based on opcode.
adding nop command to pinport.h
AVR Memory Usage
----------------
Device: atmega164a
Program: 2960 bytes (18.1% Full)
(.text + .data + .bootloader)
Data: 53 bytes (5.2% Full)
(.data + .bss + .noinit)
new file: host/source/erase.c
new file: host/source/erase.h
creating erase files called from main with e_flag
modified: firmware/source/usb.c
introducing switch statement with range of values of opcode type detection.
modified: host/source/usb_operations.h
turning off debug
modified: shared/shared_errors.h
renumbering some error codes
thinking I'll have codes which can come from avr set to 128+
Expecting it to be simpler and potentially faster to send dump commands and simply provide pointer to ram buffer within usbFunctionSetup. Saves about 70Bytes of code, so not huge, but whatevs..
AVR Memory Usage
----------------
Device: atmega164a
Program: 2594 bytes (15.8% Full)
(.text + .data + .bootloader)
Data: 53 bytes (5.2% Full)
(.data + .bss + .noinit)
rearranged some of the .h files, created dictionary file to list all dictionaries of opcodes.
moved error codes to shared file so host can interpret firmware error codes.
created firmware usb.c/h to handle usb operations (didn't move as git seems to think..)
cleaned up fw main function and file.
host usb_operations, created USBrequest struct type to more easily handle all transfer info.
Currently able to send pinport commands and read back return values from retro prog.
Just need to start writting functions to send opcodes and start actually preforming some cartridge operations.
modified: pinport.c
modified: pinport.h
-completing implementation of remaining shared_pinport opcodes
modified: ../../shared/shared_pinport.h
-few opcodes deleted because I decided they were stupid when got
around to implementing them. Set user up for errors and not
useful generally.
modified: source/logic.h
-adding IP and OP definitions to use on DDR registers
-ERROR codes denote what function errored out
modified: ../shared/shared_pinport.h
-changing some opcode names for clarity and lowercasing non-recommended ones
modified: source/pinport.c
-fix bug that recreated cur_AHL_addr and cur_AXL_addr
-create opcode with 8bit operand function
modified: firmware/source/pinport.c
modified: firmware/source/pinport.h
-creating shared_pinport.h which is effectively a dictionary for
pinport opcodes
-file gets copied to host and firmware source dirs when compilied.
-hardware macros had to be renamed to include underscore to
differentiate opcode name from hardware macro.
-pinport.c now is a nice clean switch between opcode name and
macro with all literal numbers removed.
-now don't have to manually track/update opcode numbers between
multiple locations.
modified: firmware/source/io.c
modified: firmware/source/main.c
-updates to add underscore pre-fix to hardware macros.
-created from firmware/source/pinport.c
-macros to create opcodes which will get sent as commands over USB
-they will then get interpreted by pinport.c in firmware.
modified: source/pinport.h
-adding some compatibility between boards.
-purple and green should work under final version commands.
-making some commands lower case which aren't recommended.
-defining SUCCESS & ERROR_CODES
new file: pinport.c
-Creation of file with giant switch to decode byte value into
macro call.
-software AXL and AHL clocking of for green boards.
modified: pinport.h
-removed #ifdef for signals, should only be based on board when
possible.
-created macro for AXL/AHL_CLK to call software function
deleted: macro.h
-don't want this old guy around any more...
-modified to caluclate ROM/RAM usage of atmega164a
new file: source/io.h
new file: source/logic.h
-created files
modified: source/io.c
modified: source/main.c
-created io_pullup going to make separate io inits based on cartridge inserted
-modifing for io.h
modified: source/pinport.h
-File mostly complete with all possible pin manipulations
Base line rom/ram usage.
usb read/write functions are enabled, but long transfers are not.
host support only for LED on/off.
2KB of 16KB (12.5%) of program memory are not available due to bootloader.
AVR Memory Usage
----------------
Device: atmega164a
Program: 1620 bytes (9.9% Full) 87.5% is MAX due to bootloader
(.text + .data + .bootloader)
Data: 45 bytes (4.4% Full)
(.data + .bss + .noinit)