/* Twins Electronic Devices, 1994 PCB Layout ---------- This is a very tiny PCB, only about 6 inches square. |-----------------------| | 6116 16MHz 62256| |TEST 6116 24C02 | | PAL 62256| |J 62256 |--------| | |A |TPC1020 | 2 | |M 62256 |AFN-084C| | |M | | 1 | |A |--------| | | AY3-8910 | | D70116| |-----------------------| Notes: V30 clock : 8.000MHz (16/2) AY3-8910 clock : 2.000MHz (16/8) VSync : 50Hz seems a similar board to hotblocks same TPC1020 AFN-084C chip same 24c02 eeprom V30 instead of I8088 AY3-8910 instead of YM2149 (compatible) video is not banked in this case instead palette data is sent to the ports strange palette format. todo: hook up eeprom takes a long time to boot (eeprom?) Electronic Devices was printed on rom labels 1994 date string is in ROM */ #include "driver.h" #include "sound/ay8910.h" static UINT16 *twins_videoram; static UINT16 *twins_pal; static UINT16 paloff = 0; /* port 4 is eeprom */ static READ16_HANDLER( twins_port4_r ) { return 0xffff; } static WRITE16_HANDLER( twins_port4_w ) { } static WRITE16_HANDLER( port6_pal0_w ) { COMBINE_DATA(&twins_pal[paloff]); paloff = (paloff + 1) & 0xff; } /* ??? weird ..*/ static WRITE16_HANDLER( porte_paloff0_w ) { paloff = 0; } static ADDRESS_MAP_START( twins_map, ADDRESS_SPACE_PROGRAM, 16 ) AM_RANGE(0x00000, 0x0ffff) AM_RAM AM_RANGE(0x10000, 0x1ffff) AM_RAM AM_BASE(&twins_videoram) AM_RANGE(0x20000, 0xfffff) AM_ROM ADDRESS_MAP_END static ADDRESS_MAP_START( twins_io, ADDRESS_SPACE_IO, 16 ) AM_RANGE(0x0000, 0x0001) AM_WRITE(AY8910_control_port_0_lsb_w) AM_RANGE(0x0002, 0x0003) AM_READ(AY8910_read_port_0_lsb_r) AM_WRITE(AY8910_write_port_0_lsb_w) AM_RANGE(0x0004, 0x0005) AM_READWRITE(twins_port4_r, twins_port4_w) AM_RANGE(0x0006, 0x0007) AM_WRITE(port6_pal0_w) AM_RANGE(0x000e, 0x000f) AM_WRITE(porte_paloff0_w) ADDRESS_MAP_END VIDEO_START(twins) { twins_pal = auto_malloc(0x100*2); } VIDEO_UPDATE(twins) { int y,x,count; int i; static int xxx=320,yyy=204; fillbitmap(bitmap, get_black_pen(machine), 0); for (i=0;i<0x100;i++) { int dat,r,g,b; dat = twins_pal[i]; r = dat & 0x1f; r = BITSWAP8(r,7,6,5,0,1,2,3,4); g = (dat>>5) & 0x1f; g = BITSWAP8(g,7,6,5,0,1,2,3,4); b = (dat>>10) & 0x1f; b = BITSWAP8(b,7,6,5,0,1,2,3,4); palette_set_color_rgb(machine,i, pal5bit(r),pal5bit(g),pal5bit(b)); } count=0; for (y=0;y