===================================================================== Epoch Game Pocket Computer Technical Document As of 2/20/2010, by Chris Covell (This Document is very tentative and likely contains errors!) ===================================================================== Memory Map (Viewed from a program on a 32kbyte EEPROM.) Since I tied A15 on my cart to /OE on the EEPROM, the chip is inactive from $8000-$FFFF. With a larger EPROM it may or may not be mapped to this region of memory. 0000 ---------------------- ~ 4K Internal ROM 1000 ---------------------- Cartridge ROM ~ (origin $1000) 4000 ---------------------- 16K Cartridge ROM ~ ($4001~$400F are reset and interrupt jump tables) 8000 ---------------------- Unmapped (might be ~ for larger ROMs) C000 ---------------------- ------ ~ (600 byte Screen RAM) C258 ------ 2K Work RAM ~ C800 ---------------------- ~ (Mirror of Work RAM) D000 ---------------------- Unmapped (might be ~ for larger ROMs) FF80 ---------------------- ~ 128 byte Internal RAM FFFF ---------------------- ===================================================================== ===================================================================== Cartridge ROM Connection Diagram (from the Mahjongg Cart) ____ ____ VPP(NC) -|1 U 28|- VCC A12 -|2 27|- A14 A7 -|3 26|- A13 A6 -|4 25|- A8 A5 -|5 24|- A9 A4 -|6 23|- A11 A3 -|7 22|- A15 A2 -|8 21|- A10 A1 -|9 20|- /RD (CE) A0 -|10 19|- D7 D0 -|11 18|- D6 D1 -|12 17|- D5 D2 -|13 16|- D4 GND -|14 15|- D3 --------- According to The Guru, a regular 8/16K EPROM can be used in place of the mask ROM by simply installing a socket after removing the ROM. To make a socketed cartridge that will accept mask ROMs, EPROMs, and 32K EEPROMs, lift legs for pins 1 (VPP) and 27 (A14) on the socket before you solder it in. Put nonconductive tape over the pinholes for the pins that you bent up. Solder in the socket and also solder wires to the bent-up pins as well as to pinholes 27 and 28 on the underside of the PCB. Now, if you want to use the mask ROM or an 8/16(?)K EPROM in the socket, connect the wires for socket pin 27 and PCB pinhole 27 together. If you want to use the EEPROM (pin configuration is slightly different), connect socket pin 1 to PCB pinhole 27; and socket pin 27 to PCB pinhole 28, via wires. The high 16K of the EEPROM should be available in the Pokekon address space at $4000-$7FFF. A suggestion for those who want to go that extra mile: consider installing switches into the board so that a 32K EEPROM can contain 4x8K game ROMs, 2x16K game ROMs, or 2x8K and 1x16K game ROMs. A 2-way switch could be connected to the (pulled-up socket pin) at A14 and feed either VCC or GND to control low/high 16K in the EEPROM, and a 3-way switch on (pulled-up) A13 could have VCC, GND, and PCB A13 to select each low/high 8K, or passthrough for 16K game ROMs. ===================================================================== ===================================================================== Controller Data Controller data is latched through Port C (PC), a 6-bit read-only port. The BIOS handles this automatically through the CALT $0088 subroutine. The same subroutine stores the current button presses at $FF92/$FF93 in RAM, and button strobe data at $FF94/$FF95. A 1 at each bit means a button has been pressed. **Stupidly, the Pokekon BIOS sets the strobe bit ($FF94/95) of a button to 1 anytime the button is pressed OR released, so button release behaviour still has to be masked out manually by game ROMs.** bit: 76543210 -------- $FF92/$FF94: xxxxRDLU $FF93/$FF95: xx42S31S t e a l -------------------------- | |Select||Start|| | Up | | /--\ | 1 | | 2 | | | Le| |Rt | | \--/ | 3 | | 4 | | | Dn | -------------------------- ===================================================================== ===================================================================== Misc. Tech Notes This is how the Pokekon BIOS writes its screen data in RAM to the 3 LCD drivers. 1,2,3 are the controllers written to in sequence, a,b,c... are the order that each line is written to the LCD driver. 0 49 74 <---1a---||--3a-> <---1b---||--3c-> <---1c---||--3e-> <---1d---||--3g-> |----2a-->|--3b-> |----2b-->|--3d-> |----2c-->|--3f-> |----2d-->|--3h-> The LCD data is sent through Port B (PB). Data for the whole screen can be sent automatically by the BIOS through the CALT $0082 subroutine. ===================================================================== ===================================================================== BIOS Font Mapping (for use with text printing/placement BIOS routines) 0 1 2 3 4 5 6 7 8 9 A B C D E F ------------------------------- 0| ! " # $ % & ' ( ) * + , - . / 1|0 1 2 3 4 5 6 7 8 9 : ; < = > ? 2|@ A B C D E F G H I J K L M N O 3|P Q R S T U V W X Y Z [ \ ] ^ _ 4|0 1 2 3 4 5 6 7 8 9 A B C D E F <- 5x5 characters 5|G H I J K L M N O P Q R S T U V <- 5x5 characters 6|W X Y Z <- 5x5 characters 7| 8| (Games can map their own fonts into the area for 9| characters $64-$FF. A word at $4005-6 in the cartridge A| ROM is the pointer to these character graphics.) B| ===================================================================== =====================================================================