mahlemiut WIP

General discussion on MAME, MARP, or whatever else that doesn't belong in any of the other forums

Moderators: mahlemiut, seymour, QRS

User avatar
mahlemiut
Editor
Posts: 4189
Joined: Mon Feb 04, 2002 10:05 pm
Location: New Zealand
Contact:

mahlemiut WIP

Post by mahlemiut »

If Haze and R. Belmont can do this... :)

Thought I would look at the Sega Megatech driver seeing as Haze is on vacation, and I thought it would be a good learning experience to look at its BIOS (and the Z80 is the CPU I know fairly well).

Anyway, here's the current status of the driver. http://mahlemiut.marpirc.net/megatechupdate5.zip

And some pics too :)
ImageImage
ImageImage
- Barry Rodewald
MARP Assistant Web Maintainer
Image
User avatar
QRS
Editor
Posts: 954
Joined: Wed Feb 06, 2002 3:33 pm
Location: Sweden

RE

Post by QRS »

You are the man Barry!
QRS
User avatar
Luja
MARP Serf
MARP Serf
Posts: 182
Joined: Sun Jan 26, 2003 5:42 pm
Location: Bilbao, Basque Country

Post by Luja »

Wowwww!!!! Sonic and Golden Axe.... Great, great, great

Regards
User avatar
DRN
MARP Knight
MARP Knight
Posts: 308
Joined: Wed Mar 06, 2002 10:37 am
Location: Somerset, UK
Contact:

Post by DRN »

Excellent work Barry!! :D
Darren
User avatar
kfx
MARPaltunnel Wrists
MARPaltunnel Wrists
Posts: 462
Joined: Wed Mar 06, 2002 6:52 am
Location: Denmark
Contact:

Post by kfx »

Nice work :D
storm

OS : winXP
cpu : P4 3gzh
User avatar
mahlemiut
Editor
Posts: 4189
Joined: Mon Feb 04, 2002 10:05 pm
Location: New Zealand
Contact:

Post by mahlemiut »

http://mahlemiut.marpirc.net/megatechupdate6.zip

Disabled the reading on the Genesis ports when a certain bit port is set low. Not sure of the correctness, as it is activated when the BIOS goes into test mode. But maybe that's normal. I don't really know for sure.

Also, changed the DIP switch defaults to 1 coin/1 credit for slots 1, 3, and 4, and 1 coin/2 credits for slot 2, at 3 minutes per credit.
- Barry Rodewald
MARP Assistant Web Maintainer
Image
User avatar
mahlemiut
Editor
Posts: 4189
Joined: Mon Feb 04, 2002 10:05 pm
Location: New Zealand
Contact:

Post by mahlemiut »

http://mahlemiut.marpirc.net/megatechupdate7.zip

The Genesis input ports are now mapped to the BIOS inputs, so now there is no more doubling up of controls.
- Barry Rodewald
MARP Assistant Web Maintainer
Image
User avatar
mahlemiut
Editor
Posts: 4189
Joined: Mon Feb 04, 2002 10:05 pm
Location: New Zealand
Contact:

Post by mahlemiut »

Image

Well, it's a start. Still a long, long way to go on this one.
- Barry Rodewald
MARP Assistant Web Maintainer
Image
mfm005
Button Slapper
Button Slapper
Posts: 5
Joined: Mon Aug 05, 2002 2:11 am

Post by mfm005 »

very good :)
User avatar
mahlemiut
Editor
Posts: 4189
Joined: Mon Feb 04, 2002 10:05 pm
Location: New Zealand
Contact:

Post by mahlemiut »

ImageImage

Now I guess I should get all input ports working - just the coin, start, service and test inputs found so far.
- Barry Rodewald
MARP Assistant Web Maintainer
Image
User avatar
mahlemiut
Editor
Posts: 4189
Joined: Mon Feb 04, 2002 10:05 pm
Location: New Zealand
Contact:

Post by mahlemiut »

Image Image
- Barry Rodewald
MARP Assistant Web Maintainer
Image
User avatar
QRS
Editor
Posts: 954
Joined: Wed Feb 06, 2002 3:33 pm
Location: Sweden

Post by QRS »

Ahh some neat progress here Barry! Now hurry up so I can play Sonic in fullscreen soon j/k :)
QRS
Haze
MARP Knight
MARP Knight
Posts: 350
Joined: Sat Mar 23, 2002 5:04 pm

Post by Haze »

nice work again barry, check your pm
User avatar
mahlemiut
Editor
Posts: 4189
Joined: Mon Feb 04, 2002 10:05 pm
Location: New Zealand
Contact:

Post by mahlemiut »

Image

All ROM tests pass now.
IC-2 = BIOS ROM
Slot 1 Main = Genesis 68k code
SUB = Game information ROM.

Now I need to figure out IC-28 and IC-29 are.

And maybe no one will mind if I post this.... :)

Image
- Barry Rodewald
MARP Assistant Web Maintainer
Image
User avatar
Kale
MARP Seer
MARP Seer
Posts: 655
Joined: Fri Mar 08, 2002 5:53 pm

Post by Kale »

Bug fix for MT: Golden Axe 2 :)

Code: Select all

In genesis_io_r add these two lines at 1217 & 1239:
				if(iport1 & 0x10 || iport2 & 0x20)
					return_value+=1;
full code:
 READ16_HANDLER ( genesis_io_r )
{
	/* 8-bit only, data is mirrored in both halves */

	UINT8 return_value = 0;

	switch (offset)
	{
		case 0:
		/* Charles MacDonald ( http://cgfm2.emuviews.com/ )
		    D7 : Console is 1= Export (USA, Europe, etc.) 0= Domestic (Japan)
		    D6 : Video type is 1= PAL, 0= NTSC
		    D5 : Sega CD unit is 1= not present, 0= connected.
		    D4 : Unused (always returns zero)
		    D3 : Bit 3 of version number
		    D2 : Bit 2 of version number
		    D1 : Bit 1 of version number
		    D0 : Bit 0 of version number
		*/
			return_value = 0x80; /* ? megatech is usa? */
			break;

		case 1: /* port A data (joypad 1) */

			if (genesis_io_ram[offset] & 0x40)
			{
				int iport = readinputport(9);
				return_value = iport & 0x3f;
			}
			else
			{
				int iport1 = readinputport(12);
				int iport2 = readinputport(7) >> 1;
				return_value = (iport1 & 0x10) + (iport2 & 0x20);
				if(iport1 & 0x10 || iport2 & 0x20)
					return_value+=1;
			}

			return_value = (genesis_io_ram[offset] & 0x80) | return_value;
			logerror ("reading joypad 1 , type %02x %02x\n",genesis_io_ram[offset] & 0x80, return_value &0x7f);
			if(bios_ctrl_inputs & 0x04) return_value = 0xff;
			break;

		case 2: /* port B data (joypad 1) */

			if (genesis_io_ram[offset] & 0x40)
			{
				int iport1 = (readinputport(9) & 0xc0) >> 6;
				int iport2 = (readinputport(8) & 0x0f) << 2;
				return_value = (iport1 + iport2) & 0x3f;
			}
			else
			{
				int iport1 = readinputport(12) << 2;
				int iport2 = readinputport(7) >> 2;
				return_value = (iport1 & 0x10) + (iport2 & 0x20);
				if(iport1 & 0x10 || iport2 & 0x20)
					return_value+=1;
			}
			return_value = (genesis_io_ram[offset] & 0x80) | return_value;
			logerror ("reading joypad 2 , type %02x %02x\n",genesis_io_ram[offset] & 0x80, return_value &0x7f);
			if(bios_ctrl_inputs & 0x04) return_value = 0xff;
			break;

		default:
			return_value = 0xe0;

	}
	return return_value | return_value << 8;



}
This will fix the Golden Axe 2 start recognition bug.This is a guess,but I believe that bit is used for "joypad recognition",because without it the xP Play msg doesn't appear in the Main menu screen...
This will fix *at least* Gain Ground as well if a MegaTech version exists at all(I remember it can recognize "joypad recognition"),but I'm unsure if it breaks something at all(Needs through testing).
Post Reply