/* Hot Blocks */ /* driver by David Haywood */ /* HotBlock board Tetris with naughty bits |||||||||||||||| +-------++++++++++++++++-------+ | | | YM2149 TESTSW | | | | 62256 62256 6116 6116 | | | | 24mhz TPC1020AFN 24c04a | | | | PAL | | P8088-1 IC4 IC5 62256 62256 | | | +------------------------------+ 330ohm resistor packs for colours -- there are a variety of test modes which can be obtained by resetting while holding down player 2 buttons eeprom / backup data not hooked up ( 24c04a on port4 ) most sources say this is a game by Nics but I believe Nics to be a company from Korea, this game is quite clearly a Spanish game, we know for a fact that NIX are from Spain so it could be by them instead */ #include "driver.h" #include "cpu/i86/i86.h" #include "sound/ay8910.h" static UINT8 *hotblock_ram; static UINT8 *hotblock_pal; static int hotblock_port0; static int hotblock_port4; static READ8_HANDLER( hotblock_video_read ) { /* right?, anything else?? */ if(hotblock_port0 &0x20) // port 0 = a8 e8 -- palette { return hotblock_pal[offset]; } else // port 0 = 88 c8 { return hotblock_ram[offset]; } } /* port 4 is some kind of eeprom / storage .. used to store the scores */ static READ8_HANDLER( hotblock_port4_r ) { // mame_printf_debug("port4_r\n"); return 0x00; } static WRITE8_HANDLER( hotblock_port4_w ) { // mame_printf_debug("port4_w: pc = %06x : data %04x\n",cpu_get_pc(space->cpu),data); // popmessage("port4_w: pc = %06x : data %04x",cpu_get_pc(space->cpu),data); hotblock_port4=data; } static WRITE8_HANDLER( hotblock_port0_w ) { // popmessage("port4_w: pc = %06x : data %04x",cpu_get_pc(space->cpu),data); hotblock_port0=data; } static WRITE8_HANDLER( hotblock_video_write ) { /* right?, anything else?? */ if(hotblock_port0 &0x20) // port 0 = a8 e8 -- palette { hotblock_pal[offset]=data; } else // port 0 = 88 c8 { hotblock_ram[offset]=data; } } static ADDRESS_MAP_START( hotblock_map, ADDRESS_SPACE_PROGRAM, 8 ) AM_RANGE(0x00000, 0x0ffff) AM_RAM AM_RANGE(0x10000, 0x1ffff) AM_READ(hotblock_video_read) AM_WRITE(hotblock_video_write) AM_BASE(&hotblock_ram) AM_RANGE(0x20000, 0xfffff) AM_ROM ADDRESS_MAP_END static ADDRESS_MAP_START( hotblock_io, ADDRESS_SPACE_IO, 8 ) AM_RANGE(0x0000, 0x0000) AM_WRITE(hotblock_port0_w) AM_RANGE(0x0004, 0x0004) AM_READ(hotblock_port4_r) AM_WRITE(hotblock_port4_w) AM_RANGE(0x8000, 0x8001) AM_DEVWRITE("ay", ay8910_address_data_w) AM_RANGE(0x8001, 0x8001) AM_DEVREAD("ay", ay8910_r) ADDRESS_MAP_END static VIDEO_START(hotblock) { hotblock_pal=auto_malloc(0x10000); } static VIDEO_UPDATE(hotblock) { int y,x,count; int i; static const int xxx=320,yyy=204; bitmap_fill(bitmap, 0, get_black_pen(screen->machine)); for (i=0;i<256;i++) { int dat=(hotblock_pal[i*2+1]<<8)|hotblock_pal[i*2]; palette_set_color_rgb(screen->machine,i,pal5bit(dat>>0),pal5bit(dat>>5),pal5bit(dat>>10)); } count=0; for (y=0;y