User Tools

Site Tools


hardware:flashcarts

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
hardware:flashcarts [2025/11/15 18:29] dewbritehardware:flashcarts [2025/11/16 03:25] (current) dewbrite
Line 1: Line 1:
 ====== Flash Cartridges ====== ====== Flash Cartridges ======
  
-In-console, cartridges live on top of the 36 pin cartridge port.+Cartridges connect to the GameTank'36 pin cartridge port.
  
-The pinout is as follows:+===== Pinout ===== 
 + 
 +{{ :hardware:cartridge_port_screenshot.png?600 |}}
  
 |1. +5V | 19. A13| |1. +5V | 19. A13|
Line 23: Line 25:
 |17. D2 | 35. _RESET | |17. D2 | 35. _RESET |
 |18. CLK | 36. GND | |18. CLK | 36. GND |
 +
 +==== Pinout Overview ====
 +
 +
 +Cartridge memory is expected to be accessible through the address and data pins (A//x//, D//x//). These correspond _mostly_ to the CPU's address and data lines, notably for addresses 0x8000..=0xFFFF.
 +
 +The most significant bit is used for pin 27 (Cartridge Select), and as such, the cartridge perceives the aforementioned address space in the range of 0x0000..=0x7FFF through pins A0..=A14
 +
 +Pin 27 (Cartridge Select, active low) corresponds to the CPU's most significant address bit, NOT.
 +
 +Pins 25 and 20 (Read and Write, active low) corresponds to the CPU's r/w signals.
 +
 +Pin 21 (IRQ, active low) corresponds to the CPU's IRQ line.
 +
 +Pin 34 (Ready) is connected to the CPU's Ready line.
 +
 +Pin 18 (Clock) is connected to the CPU clock (~3.5MHz)
 +
 +Pins 2 to 5 correspond to VIA pins PA0, PA1, PA2, and PA7, and are expected to be customized per-cartridge.
 +
 +The truth of the matter is, you can kind of do //whatever you want// with most of these pins, so, go wild, but, there are a number of well-supported cartridges that you may find useful.
  
  
Line 37: Line 60:
  
 Alongside the flash memory, the chip has a shift register connected to pins 2, 4, and 5 on the cartridge. This shift register may control the 7 most significant address bits on the flash. Specifically, it only controls those address bits when the CPU requests an address on the cartridge (A15 HIGH) but in the lower half of cartridge memory (A14 LOW). When an address on the upper half of cartridge memory (A14 HIGH) is requested, the 7 banked address bits are pulled HIGH. Alongside the flash memory, the chip has a shift register connected to pins 2, 4, and 5 on the cartridge. This shift register may control the 7 most significant address bits on the flash. Specifically, it only controls those address bits when the CPU requests an address on the cartridge (A15 HIGH) but in the lower half of cartridge memory (A14 LOW). When an address on the upper half of cartridge memory (A14 HIGH) is requested, the 7 banked address bits are pulled HIGH.
 +
 +===== Writing to the flash chip =====
 +
 +
  
 ===== Interfacing with the shift register from software ===== ===== Interfacing with the shift register from software =====
hardware/flashcarts.1763231379.txt.gz · Last modified: 2025/11/15 18:29 by dewbrite