From f65131343d3e3147d5bed92437ac6300c6eee4b4 Mon Sep 17 00:00:00 2001 From: Aaron Giles Date: Mon, 15 Dec 2008 01:12:26 +0000 Subject: [PATCH] Added proper artwork for the led in Gridiron Fight [David Haywood] -----Messaggio originale----- Da: David Haywood [mailto:neohaze@nildram.co.uk] Inviato: domenica 14 dicembre 2008 23.56 A: Angelo Salese Oggetto: Gridiron update Changed it from using a hack using the gfx rom to display the 'play number' to using the LEDs in the artwork system. --- .gitattributes | 1 + src/mame/drivers/tehkanwc.c | 12 +++--------- src/mame/layout/gridiron.lay | 25 +++++++++++++++++++++++++ src/mame/mame.mak | 2 ++ src/mame/video/tehkanwc.c | 36 +++--------------------------------- 5 files changed, 34 insertions(+), 42 deletions(-) create mode 100644 src/mame/layout/gridiron.lay diff --git a/.gitattributes b/.gitattributes index 119097213e4..29ffba4ad96 100644 --- a/.gitattributes +++ b/.gitattributes @@ -2514,6 +2514,7 @@ src/mame/layout/geebee.lay svneol=native#text/plain src/mame/layout/gldncrwn.lay svneol=native#text/plain src/mame/layout/goldnpkr.lay svneol=native#text/plain src/mame/layout/gorf.lay svneol=native#text/plain +src/mame/layout/gridiron.lay svneol=native#text/plain src/mame/layout/gypsyjug.lay svneol=native#text/plain src/mame/layout/invad2ct.lay svneol=native#text/plain src/mame/layout/invaders.lay svneol=native#text/plain diff --git a/src/mame/drivers/tehkanwc.c b/src/mame/drivers/tehkanwc.c index 6e0ed1ca2dd..ab601cdb168 100644 --- a/src/mame/drivers/tehkanwc.c +++ b/src/mame/drivers/tehkanwc.c @@ -2,11 +2,7 @@ fixed gridiron079gre (shared access to spriteram was broken) - This driver is antiquated.. the LED drawing in the video file is one giant - hack, we should change it to use the artwork system, not hack it to draw - characters from the gfx roms onscreen.. - - The inputs also seem to be a hacky mess (although there was reportedly a + The inputs seem to be a hacky mess (although there was reportedly a hardware joystick hack for tehkanwc via plugin logic subboard, is this attempting to simulate it? @@ -28,8 +24,6 @@ robbiex@rocketmail.com TODO: - dip switches and input ports for Gridiron and Tee'd Off -NOTES: -- Samples MUST be on Memory Region 4 Additional notes (Steph 2002.01.14) @@ -98,7 +92,7 @@ TO DO : #include "cpu/z80/z80.h" #include "sound/ay8910.h" #include "sound/msm5205.h" - +#include "gridiron.lh" extern UINT8 *tehkanwc_videoram2; @@ -900,5 +894,5 @@ ROM_END GAME( 1985, tehkanwc, 0, tehkanwc, tehkanwc, 0, ROT0, "Tehkan", "Tehkan World Cup (set 1)", 0 ) GAME( 1985, tehkanwb, tehkanwc, tehkanwc, tehkanwc, 0, ROT0, "Tehkan", "Tehkan World Cup (set 2, bootleg?)", 0 ) -GAME( 1985, gridiron, 0, tehkanwc, gridiron, 0, ROT0, "Tehkan", "Gridiron Fight", 0 ) +GAMEL( 1985, gridiron, 0, tehkanwc, gridiron, 0, ROT0, "Tehkan", "Gridiron Fight", 0, layout_gridiron ) GAME( 1986, teedoff, 0, tehkanwc, teedoff, teedoff, ROT90, "Tecmo", "Tee'd Off (Japan)", 0 ) diff --git a/src/mame/layout/gridiron.lay b/src/mame/layout/gridiron.lay new file mode 100644 index 00000000000..594886e51bc --- /dev/null +++ b/src/mame/layout/gridiron.lay @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/mame/mame.mak b/src/mame/mame.mak index f859dfb075e..af68461ed4e 100644 --- a/src/mame/mame.mak +++ b/src/mame/mame.mak @@ -1805,6 +1805,8 @@ $(DRIVERS)/stactics.o: $(LAYOUT)/stactics.lh $(DRIVERS)/tceptor.o: $(LAYOUT)/tceptor2.lh +$(DRIVERS)/tehkanwc.o: $(LAYOUT)/gridiron.lh + $(DRIVERS)/tetrisp2.o: $(LAYOUT)/rocknms.lh $(DRIVERS)/thayers.o: $(LAYOUT)/dlair.lh diff --git a/src/mame/video/tehkanwc.c b/src/mame/video/tehkanwc.c index fb8515cd4a7..cb2bdeff056 100644 --- a/src/mame/video/tehkanwc.c +++ b/src/mame/video/tehkanwc.c @@ -103,8 +103,6 @@ VIDEO_START( tehkanwc ) /* Gridiron Fight has a LED display on the control panel, to let each player choose the formation without letting the other know. - We emulate it by showing a character on the corner of the screen; the - association between the bits of the port and the led segments is: ---0--- | | @@ -121,38 +119,10 @@ VIDEO_START( tehkanwc ) static void gridiron_draw_led(running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect, UINT8 led,int player) { - int i; - - - static const UINT8 ledvalues[] = - { 0x86, 0xdb, 0xcf, 0xe6, 0xed, 0xfd, 0x87, 0xff, 0xf3, 0xf1 }; - - - if ((led & 0x80) == 0) return; - - for (i = 0;i < 10;i++) - { - if (led == ledvalues[i] ) break; - } - - if (i < 10) - { - if (player == 0) - drawgfx(bitmap,machine->gfx[0], - 0xc0 + i, - 0x0a, - 0,0, - 0,232, - cliprect,TRANSPARENCY_NONE,0); + if (led&0x80) + output_set_digit_value(player, led&0x7f); else - drawgfx(bitmap,machine->gfx[0], - 0xc0 + i, - 0x03, - 1,1, - 0,16, - cliprect,TRANSPARENCY_NONE,0); - } -else logerror("unknown LED %02x for player %d\n",led,player); + output_set_digit_value(player, 0x00); } static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect)