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)
-creation of io file
modified: main.c
-moving io setup to io.c
new file: pinport.h
-creation of pinport file, intended to be avr specific code from macro.h
-shared .h files used in both firmware and host app
modified: firmware/Makefile
modified: host/Makefile
-added shared dependency to copy shared files to source prior to
building
modified: host/source/usb_operations.h
modified: firmware/source/main.c
-removing usb commands (now in shared)
modified: host/include/dbg.h
-adding SUCCESS defintion
modified: host/source/inlprog.c
-calling write file if write arg sent
new file: host/source/write_operations.c
new file: host/source/write_operations.h
-creation of write operations files
-opens file and reads header
-some skeleton comments
-lots of work left to do here
new file: roms/nrom_v_test.nes
-adding NROM test rom file
- removing compile errors
- fixing request/command for off (was always sending on copy paste error)
modified: source/usb_operations.c
- Adding checks beyond VID/PID pair
- Now check Manufacturer, Product, and build version
- Give Warnings/Error if device is not supported
- Don't blindly accept and try to write to non-supported devices.
- Cleared up confusion on ENDPOINT direction.
-moved usb device operations into usb_operations module
new file: source/usb_operations.c
new file: source/usb_operations.h
-creation of usb_operations module
-currently handles libusb open/close and retrieving INL retro-prog
usb handle.