Commit Graph

7 Commits

Author SHA1 Message Date
paul eeepc 66635b15e7 Making progress on main program flow with detection in preparation for dumping/writing operations.
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.
2016-12-07 18:08:31 -06:00
paul eeepc 497e53378b Basic cartridge detection working. NES detected with CIRAM /CE and PPU /A13N jumper. Famicom detected with audio in/out connection. SNES detected by enabling control signals and reading reset vector looking for non 0xff data. Still need to add check that would pass with blank flash cart though reading flash ID's perhaps.
Removing bad logic where TRUE == 0x00 as that's 'false' in C so that was causing more confusions than solutions.
2016-12-04 03:16:40 -06:00
paul eeepc 8cdeecdd77 adding some error checks to usbFunctionWrite.
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'.
2016-11-30 12:53:06 -06:00
Paul Molloy c36313135e Initial firmware implementation of buffer objects and raw sram allocation
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)
2016-11-28 02:01:14 -06:00
paul eeepc cd6378b8c5 SNES dictionary creation, addition of NES cpu/ppu read/writes
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.
2016-11-27 15:32:36 -06:00
Paul Molloy 7d00145431 Big step in confirmation of pin manipulations working on kazzo.
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)
2016-11-27 00:18:46 -06:00
paul eeepc dae63f73b0 Tons of edits...
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.
2016-11-25 19:50:43 -06:00