diff options
| author | 2008-01-08 12:32:54 +0000 | |
|---|---|---|
| committer | 2008-01-08 12:32:54 +0000 | |
| commit | c559bb4b4ad0ff5f649ea0e7a0afbb4482e81982 (patch) | |
| tree | f039cdbc2cffa13218cafcc2a319b26088640ad4 /src | |
| parent | 1b378f7136394b6e01a53bd1ec7c343ade4e67d3 (diff) | |
Removed a bunch of dead code
Diffstat (limited to 'src')
| -rw-r--r-- | src/mame/drivers/othunder.c | 25 | ||||
| -rw-r--r-- | src/mame/video/othunder.c | 98 |
2 files changed, 9 insertions, 114 deletions
diff --git a/src/mame/drivers/othunder.c b/src/mame/drivers/othunder.c index c84969a8d40..05dfb3e3069 100644 --- a/src/mame/drivers/othunder.c +++ b/src/mame/drivers/othunder.c @@ -158,6 +158,12 @@ Notes: - The keyboard leds I'm turning on are actually the gun solenoid outputs, which would rattle the gun while firing. +- BM, 060108 - The original flyer for this game has screenshots which clearly + show the background is 4 pixels to the left on several game stages (you can + see the edge of sprites overlapping past the right edge). Therefore I + do not believe the TC0100SCN problem mentioned above actually exists. The + current emulation appears to be accurate. + Stephh's notes (based on the game M68000 code and some tests) : @@ -222,21 +228,6 @@ TODO: - Schematics show a OBPRI output to control sprite priority. This doesn't seem to be used however, and isn't hooked up. See othunder_TC0220IOC_w(). -- TC0100SCN problem: text vs. bg0/1 offsets are wrong: first level - wants bg0 4 further right. Cut screens (all?) want bg0 4 pixels - further left. But the bg0 x scroll value is zero in both cases! - (and the code setting it is a CLR, so there's no doubt it's meant - to be). - There are no set bits in the TC0100SCN ctrl regs which might be - causing this. So I'm mystified. (Maybe it's related to game being - ORIENTATION_FLIP_X ??) - -BM, 060108 - The original flyer for this game has screenshots which clearly -show the background is 4 pixels to the left on several game stages (you can -see the edge of sprites overlapping past the right edge). Therefore I -do not believe the TC0100SCN problem mentioned above actually exists. The -current emulation appears to be accurate. - ***************************************************************************/ #include "driver.h" @@ -251,8 +242,6 @@ current emulation appears to be accurate. VIDEO_START( othunder ); VIDEO_UPDATE( othunder ); -extern UINT16 *othunder_ram; - /*********************************************************** INTERRUPTS @@ -515,7 +504,7 @@ static WRITE8_HANDLER( othunder_TC0310FAM_w ) static ADDRESS_MAP_START( othunder_map, ADDRESS_SPACE_PROGRAM, 16 ) AM_RANGE(0x000000, 0x07ffff) AM_ROM - AM_RANGE(0x080000, 0x08ffff) AM_RAM AM_BASE(&othunder_ram) + AM_RANGE(0x080000, 0x08ffff) AM_RAM AM_RANGE(0x090000, 0x09000f) AM_READWRITE(othunder_TC0220IOC_r, othunder_TC0220IOC_w) // AM_RANGE(0x090006, 0x090007) AM_WRITE(eeprom_w) // AM_RANGE(0x09000c, 0x09000d) AM_WRITE(MWA16_NOP) /* ?? (keeps writing 0x77) */ diff --git a/src/mame/video/othunder.c b/src/mame/video/othunder.c index 2d79707eb75..683cf2bd630 100644 --- a/src/mame/video/othunder.c +++ b/src/mame/video/othunder.c @@ -3,8 +3,6 @@ #define TC0100SCN_GFX_NUM 1 -UINT16 *othunder_ram; - struct tempsprite { int gfx; @@ -16,13 +14,11 @@ struct tempsprite }; static struct tempsprite *spritelist; -static int taito_hide_pixels; - /**********************************************************/ -static VIDEO_START( othunder_core ) +VIDEO_START( othunder ) { /* Up to $800/8 big sprites, requires 0x100 * sizeof(*spritelist) Multiply this by 32 to give room for the number of small sprites, @@ -30,18 +26,12 @@ static VIDEO_START( othunder_core ) spritelist = auto_malloc(0x2000 * sizeof(*spritelist)); - TC0100SCN_vh_start(machine,1,TC0100SCN_GFX_NUM,taito_hide_pixels,0,0,0,0,0,0); + TC0100SCN_vh_start(machine,1,TC0100SCN_GFX_NUM,4,0,0,0,0,0,0); if (has_TC0110PCR()) TC0110PCR_vh_start(); } -VIDEO_START( othunder ) -{ - taito_hide_pixels = 4; - video_start_othunder_core(machine); -} - /************************************************************ SPRITE DRAW ROUTINE @@ -254,90 +244,6 @@ VIDEO_UPDATE( othunder ) draw_sprites(machine, bitmap,cliprect,primasks,3); } - /* Draw artificial gun targets */ - { - int rawx, rawy, centrex, centrey, screenx, screeny; - - /* calculate p1 screen co-ords by matching routine at $A932 */ - rawx = othunder_ram[0x2848/2]; - centrex = othunder_ram[0xa046/2]; - if (rawx <= centrex) - { - rawx = centrex - rawx; - screenx = rawx * othunder_ram[0xa04e/2] + (((rawx * othunder_ram[0xa050/2]) & 0xffff0000) >> 16); - screenx = 0xa0 - screenx; - if (screenx < 0) screenx = 0; - } - else - { - if (rawx > othunder_ram[0xa028/2]) rawx = othunder_ram[0xa028/2]; - rawx -= centrex; - screenx = rawx * othunder_ram[0xa056/2] + (((rawx * othunder_ram[0xa058/2]) & 0xffff0000) >> 16); - screenx += 0xa0; - if (screenx > 0x140) screenx = 0x140; - } - rawy = othunder_ram[0x284a/2]; - centrey = othunder_ram[0xa048/2]; - if (rawy <= centrey) - { - rawy = centrey - rawy; - screeny = rawy * othunder_ram[0xa052/2] + (((rawy * othunder_ram[0xa054/2]) & 0xffff0000) >> 16); - screeny = 0x78 - screeny; - if (screeny < 0) screeny = 0; - } - else - { - if (rawy > othunder_ram[0xa030/2]) rawy = othunder_ram[0xa030/2]; - rawy -= centrey; - screeny = rawy * othunder_ram[0xa05a/2] + (((rawy * othunder_ram[0xa05c/2]) & 0xffff0000) >> 16); - screeny += 0x78; - if (screeny > 0xf0) screeny = 0xf0; - } - - // fudge y to show in centre of scope/hit sprite, note that screenx, screeny - // were confirmed to match those stored by the game at $82732, $82734 - screeny += 2; - - /* calculate p2 screen co-ords by matching routine at $AA48 */ - rawx = othunder_ram[0x284c/2]; - centrex = othunder_ram[0xa04a/2]; - if (rawx <= centrex) - { - rawx = centrex - rawx; - screenx = rawx * othunder_ram[0xa05e/2] + (((rawx * othunder_ram[0xa060/2]) & 0xffff0000) >> 16); - screenx = 0xa0 - screenx; - if (screenx < 0) screenx = 0; - } - else - { - if (rawx > othunder_ram[0xa038/2]) rawx = othunder_ram[0xa038/2]; - rawx -= centrex; - screenx = rawx * othunder_ram[0xa066/2] + (((rawx * othunder_ram[0xa068/2]) & 0xffff0000) >> 16); - screenx += 0xa0; - if (screenx > 0x140) screenx = 0x140; - } - rawy = othunder_ram[0x284e/2]; - centrey = othunder_ram[0xa04c/2]; - if (rawy <= centrey) - { - rawy = centrey - rawy; - screeny = rawy * othunder_ram[0xa062/2] + (((rawy * othunder_ram[0xa064/2]) & 0xffff0000) >> 16); - screeny = 0x78 - screeny; - if (screeny < 0) screeny = 0; - } - else - { - if (rawy > othunder_ram[0xa040/2]) rawy = othunder_ram[0xa040/2]; - rawy -= centrey; - screeny = rawy * othunder_ram[0xa06a/2] + (((rawy * othunder_ram[0xa06c/2]) & 0xffff0000) >> 16); - screeny += 0x78; - if (screeny > 0xf0) screeny = 0xf0; - } - - // fudge y to show in centre of scope/hit sprite, note that screenx, screeny - // were confirmed to match those stored by the game at $82736, $82738 - screeny += 2; - } return 0; } |
