Welcome!

Final Burn Neo => FBN Development => Topic started by: vbt on October 16, 2011, 03:54:54 PM

Title: Porting MAME drivers (vbt's work in progress)
Post by: vbt on October 16, 2011, 03:54:54 PM
any good method to do that ? should i start with latest sources our olders ones (0.33) ?
Title: Re: Porting MAME drivers
Post by: Barry Harris on October 16, 2011, 04:31:46 PM
iq did a very good, very well commented driver at one stage that documented a lot of the things that need to be done. I'm not sure which it is off the top of my head, but when iq pops in he may remember which it was.

That would be the best starting point. Either that or pick something that's already been done and is simple. The News driver is pretty simple and only took me about half an hour years ago. If you port that first, then if you get stuck you could always refer to the FB Alpha driver.
Title: Re: Porting MAME drivers
Post by: iq_132 on October 17, 2011, 09:36:10 AM
here ya go!
http://neo-source.com/index.php?topic=1332.msg10974#msg10974

If you have any questions, send me a pm on here, post a message here, or message me on msn messenger.
I will get back to you sooner or later.
Title: Re: Porting MAME drivers
Post by: vbt on October 24, 2011, 02:57:04 PM
Little try, a new game on system 1 driver (not finished). At least it boots.

(http://img64.imageshack.us/img64/209/chopu.jpg)
Title: Re: Porting MAME drivers
Post by: Barry Harris on October 24, 2011, 03:09:29 PM
Cool, saves me having to go back and do them - I can never get motivated enough for them!

Good luck!
Title: Re: Porting MAME drivers
Post by: vbt on November 01, 2011, 07:54:45 PM
well, it's more less working on saturn, pc & XB360 (Lantus work & help :))
i got some troubles with inputlist & diplist, can you help on how to map mame data with fba data :

Quote
static struct BurnDIPInfo ChplftbDIPList[]=
{
   // Default Values
   {0x0f, 0xff, 0xff, 0xbe, NULL                     },
   {0xf0, 0xff, 0xff, 0xff, NULL                     },

   // Dip 1
   {0   , 0xfe, 0   , 2   , "Cabinet"                },
   {0x0f, 0x01, 0x01, 0x00, "Upright"                },
   {0x0f, 0x01, 0x01, 0x01, "Cocktail"               },
   
   {0   , 0xfe, 0   , 4   , "Lives"                  },
   {0x0f, 0x01, 0x0c, 0x04, "3"                      },
   {0x0f, 0x01, 0x0c, 0x0c, "4"                      },
   {0x0f, 0x01, 0x06, 0x08, "5"                      },

   {0   , 0xfe, 0   , 2   , "Demo Sounds"            },
   {0x0f, 0x01, 0x40, 0x40, "Off"                    },
   {0x0f, 0x01, 0x40, 0x00, "On"                     },
   
   // Dip 2
   {0   , 0xfe, 0   , 8   , "Coinage"                },
   {0x10, 0x01, 0x07, 0x04, "4 Coins 1 Credit"       },
   {0x10, 0x01, 0x07, 0x05, "3 Coins 1 Credit"       },
   {0x10, 0x01, 0x07, 0x00, "4 Coins 2 Credits"      },
   {0x10, 0x01, 0x07, 0x06, "2 Coins 1 Credit"       },
   {0x10, 0x01, 0x07, 0x01, "3 Coins 2 Credits"      },
   {0x10, 0x01, 0x07, 0x02, "2 Coins 1 Credits"      },
   {0x10, 0x01, 0x07, 0x07, "1 Coin  1 Credit"       },
   {0x10, 0x01, 0x07, 0x03, "1 Coin  2 Credits"      },

   {0   , 0xfe, 0   , 2   , "Allow Continue"         },
   {0x10, 0x01, 0x10, 0x00, "Off"                    },
   {0x10, 0x01, 0x10, 0x10, "On"                     },
   
   {0   , 0xfe, 0   , 4   , "Mode"                   },
   {0x10, 0x01, 0xc0, 0xc0, "Normal Game"            },
   {0x10, 0x01, 0xc0, 0x80, "Free Play"              },
   {0x10, 0x01, 0xc0, 0x40, "Test Mode"              },
   {0x10, 0x01, 0xc0, 0x00, "Endless Game"           },
};
Quote
static struct BurnInputInfo ChplftbInputList[] = {
   {"Coin 1"            , BIT_DIGITAL  , System1InputPort2 + 0, "p1 coin"   },
   {"Start 1"           , BIT_DIGITAL  , System1InputPort2 + 4, "p1 start"  },
   {"Coin 2"            , BIT_DIGITAL  , System1InputPort2 + 1, "p2 coin"   },
   {"Start 2"           , BIT_DIGITAL  , System1InputPort2 + 5, "p2 start"  },

   {"P1 Up"             , BIT_DIGITAL  , System1InputPort0 + 5, "p1 up"     },
   {"P1 Down"           , BIT_DIGITAL  , System1InputPort0 + 4, "p1 down"   },
   {"P1 Left"           , BIT_DIGITAL  , System1InputPort0 + 7, "p1 left"   },
   {"P1 Right"          , BIT_DIGITAL  , System1InputPort0 + 6, "p1 right"  },
   {"P1 Fire 1"         , BIT_DIGITAL  , System1InputPort0 + 1, "p1 fire 1" },
   {"P1 Fire 2"         , BIT_DIGITAL  , System1InputPort0 + 2, "p1 fire 2" },

   {"P2 Up"             , BIT_DIGITAL  , System1InputPort1 + 5, "p2 up"     },
   {"P2 Down"           , BIT_DIGITAL  , System1InputPort1 + 4, "p2 down"   },
   {"P2 Left"           , BIT_DIGITAL  , System1InputPort1 + 7, "p2 left"   },
   {"P2 Right"          , BIT_DIGITAL  , System1InputPort1 + 6, "p2 right"  },
   {"P2 Fire 1"         , BIT_DIGITAL  , System1InputPort1 + 1, "p2 fire 1" },
   {"P2 Fire 2"         , BIT_DIGITAL  , System1InputPort1 + 2, "p2 fire 2" },

   {"Reset"             , BIT_DIGITAL  , &System1Reset        , "reset"     },
   {"Service"           , BIT_DIGITAL  , System1InputPort2 + 3, "service"   },
   {"Test"              , BIT_DIGITAL  , System1InputPort2 + 2, "diag"      },
   {"Dip 1"             , BIT_DIPSWITCH, System1Dip + 0       , "dip"       },
   {"Dip 2"             , BIT_DIPSWITCH, System1Dip + 1       , "dip"       },

};

Quote
  811      PORT_START("P1")
  812      PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
  813      PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 )
  814      PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 )
  815      PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
  816      PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY
  817      PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY
  818      PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY
  819      PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY
  820 
  821      PORT_START("P2")
  822      PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
  823      PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL
  824      PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL
  825      PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
  826      PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL
  827      PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL
  828      PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL
  829      PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL
  830 
  831      PORT_START("SYSTEM")
  832      PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
  833      PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
  834      PORT_SERVICE_NO_TOGGLE( 0x04, IP_ACTIVE_LOW )
  835      PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE1 )
  836      PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 )
  837      PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 )
  838      PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
  839      PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )




1623  static INPUT_PORTS_START( choplift )
 1624      PORT_INCLUDE( system1_generic )
 1625 
 1626      PORT_MODIFY("SWB")
 1627      PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) )       PORT_DIPLOCATION("SWA:1,2,3,4")
 1628      PORT_DIPSETTING(    0x07, DEF_STR( 4C_1C ) )
 1629      PORT_DIPSETTING(    0x08, DEF_STR( 3C_1C ) )
 1630      PORT_DIPSETTING(    0x09, DEF_STR( 2C_1C ) )
 1631      PORT_DIPSETTING(    0x05, "2 Coins/1 Credit 5/3 6/4" )
 1632      PORT_DIPSETTING(    0x04, "2 Coins/1 Credit 4/3" )
 1633      PORT_DIPSETTING(    0x0f, DEF_STR( 1C_1C ) )
 1634      PORT_DIPSETTING(    0x01, "1 Coin/1 Credit 2/3" )
 1635      PORT_DIPSETTING(    0x02, "1 Coin/1 Credit 4/5" )
 1636      PORT_DIPSETTING(    0x03, "1 Coin/1 Credit 5/6" )
 1637      PORT_DIPSETTING(    0x06, DEF_STR( 2C_3C ) )
 1638      PORT_DIPSETTING(    0x0e, DEF_STR( 1C_2C ) )
 1639      PORT_DIPSETTING(    0x0d, DEF_STR( 1C_3C ) )
 1640      PORT_DIPSETTING(    0x0c, DEF_STR( 1C_4C ) )
 1641      PORT_DIPSETTING(    0x0b, DEF_STR( 1C_5C ) )
 1642      PORT_DIPSETTING(    0x0a, DEF_STR( 1C_6C ) )
 1643      PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_B ) )       PORT_DIPLOCATION("SWA:5,6,7,8")
 1644      PORT_DIPSETTING(    0x70, DEF_STR( 4C_1C ) )
 1645      PORT_DIPSETTING(    0x80, DEF_STR( 3C_1C ) )
 1646      PORT_DIPSETTING(    0x90, DEF_STR( 2C_1C ) )
 1647      PORT_DIPSETTING(    0x50, "2 Coins/1 Credit 5/3 6/4" )
 1648      PORT_DIPSETTING(    0x40, "2 Coins/1 Credit 4/3" )
 1649      PORT_DIPSETTING(    0xf0, DEF_STR( 1C_1C ) )
 1650      PORT_DIPSETTING(    0x10, "1 Coin/1 Credit 2/3" )
 1651      PORT_DIPSETTING(    0x20, "1 Coin/1 Credit 4/5" )
 1652      PORT_DIPSETTING(    0x30, "1 Coin/1 Credit 5/6" )
 1653      PORT_DIPSETTING(    0x60, DEF_STR( 2C_3C ) )
 1654      PORT_DIPSETTING(    0xe0, DEF_STR( 1C_2C ) )
 1655      PORT_DIPSETTING(    0xd0, DEF_STR( 1C_3C ) )
 1656      PORT_DIPSETTING(    0xc0, DEF_STR( 1C_4C ) )
 1657      PORT_DIPSETTING(    0xb0, DEF_STR( 1C_5C ) )
 1658      PORT_DIPSETTING(    0xa0, DEF_STR( 1C_6C ) )
 1659 
 1660      PORT_MODIFY("SWA")
 1661      PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) )      PORT_DIPLOCATION("SWB:1")
 1662      PORT_DIPSETTING(    0x00, DEF_STR( Upright ) )
 1663      PORT_DIPSETTING(    0x01, DEF_STR( Cocktail ) )
 1664      PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) )  PORT_DIPLOCATION("SWB:2")
 1665      PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
 1666      PORT_DIPSETTING(    0x00, DEF_STR( On ) )
 1667      PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Lives ) )        PORT_DIPLOCATION("SWB:3,4")
 1668      PORT_DIPSETTING(    0x08, "2" )
 1669      PORT_DIPSETTING(    0x0c, "3" )
 1670      PORT_DIPSETTING(    0x04, "4" )
 1671      PORT_DIPSETTING(    0x00, DEF_STR( Free_Play ) )
 1672      PORT_DIPNAME( 0x10, 0x10, DEF_STR( Bonus_Life ) )   PORT_DIPLOCATION("SWB:5")
 1673      PORT_DIPSETTING(    0x10, "20k 70k 120k 170k" )
 1674      PORT_DIPSETTING(    0x00, "50k 100k 150k 200k" )
 1675      PORT_DIPNAME( 0x20, 0x00, DEF_STR( Difficulty ) )   PORT_DIPLOCATION("SWB:6")
 1676      PORT_DIPSETTING(    0x00, DEF_STR( Hard ) )
 1677      PORT_DIPSETTING(    0x20, DEF_STR( Easy ) )
 1678      PORT_DIPUNUSED_DIPLOC( 0x40, 0x40, "SWB:7" )
 1679      PORT_DIPUNUSED_DIPLOC( 0x80, 0x80, "SWB:8" )
 1680  INPUT_PORTS_END

in fact I got a crash in BurnDrvGetDIPInfo@InpDIPSWResetDIPs, so i've disabled this part to boot the game on pc.
Title: Re: Porting MAME drivers
Post by: iq_132 on November 01, 2011, 09:49:50 PM
Try this
Code: [Select]
static struct BurnDIPInfo ChplftbDIPList[]=
{
   // Default Values
   {0x13, 0xff, 0xff, 0xbe, NULL                     },
   {0x14, 0xff, 0xff, 0xff, NULL                     },

   // Dip 1
   {0   , 0xfe, 0   , 2   , "Cabinet"                },
   {0x13, 0x01, 0x01, 0x00, "Upright"                },
   {0x13, 0x01, 0x01, 0x01, "Cocktail"               },
   
   {0   , 0xfe, 0   , 4   , "Lives"                  },
   {0x13, 0x01, 0x0c, 0x04, "3"                      },
   {0x13, 0x01, 0x0c, 0x0c, "4"                      },
   {0x13, 0x01, 0x06, 0x08, "5"                      },

   {0   , 0xfe, 0   , 2   , "Demo Sounds"            },
   {0x13, 0x01, 0x40, 0x40, "Off"                    },
   {0x13, 0x01, 0x40, 0x00, "On"                     },
   
   // Dip 2
   {0   , 0xfe, 0   , 8   , "Coinage"                },
   {0x14, 0x01, 0x07, 0x04, "4 Coins 1 Credit"       },
   {0x14, 0x01, 0x07, 0x05, "3 Coins 1 Credit"       },
   {0x14, 0x01, 0x07, 0x00, "4 Coins 2 Credits"      },
   {0x14, 0x01, 0x07, 0x06, "2 Coins 1 Credit"       },
   {0x14, 0x01, 0x07, 0x01, "3 Coins 2 Credits"      },
   {0x14, 0x01, 0x07, 0x02, "2 Coins 1 Credits"      },
   {0x14, 0x01, 0x07, 0x07, "1 Coin  1 Credit"       },
   {0x14, 0x01, 0x07, 0x03, "1 Coin  2 Credits"      },

   {0   , 0xfe, 0   , 2   , "Allow Continue"         },
   {0x14, 0x01, 0x10, 0x00, "Off"                    },
   {0x14, 0x01, 0x10, 0x10, "On"                     },
   
   {0   , 0xfe, 0   , 4   , "Mode"                   },
   {0x14, 0x01, 0xc0, 0xc0, "Normal Game"            },
   {0x14, 0x01, 0xc0, 0x80, "Free Play"              },
   {0x14, 0x01, 0xc0, 0x40, "Test Mode"              },
   {0x14, 0x01, 0xc0, 0x00, "Endless Game"           },
};
Title: Re: Porting MAME drivers
Post by: vbt on November 04, 2011, 08:30:53 AM
thanks iq  :cool: it's better, i have to fix the scrolling and it's done(surely, i'll leave some bugs).
I worked on wonder boy in monster land not encrypted and it looks like nothing work.
I'm wondering if memindex,system1init and bankswitch need to be rewritten for this game, i did :

WbmljbInputList
WbmljbDIPList (again wrong)
WbmljbInit
WbmlZ801PortRead
WbmlZ801PortWrite
WbmlZ801ProgRead
WbmlZ801ProgWrite
Title: Re: Porting MAME drivers
Post by: iq_132 on November 04, 2011, 08:44:15 AM
Here's how the dip switch offsets are figured out
Code: [Select]
static struct BurnInputInfo ChplftbInputList[] = {
   {"Coin 1"            , BIT_DIGITAL  , System1InputPort2 + 0, "p1 coin"   }, // 0
   {"Start 1"           , BIT_DIGITAL  , System1InputPort2 + 4, "p1 start"  }, // 1
   {"Coin 2"            , BIT_DIGITAL  , System1InputPort2 + 1, "p2 coin"   }, // 2
   {"Start 2"           , BIT_DIGITAL  , System1InputPort2 + 5, "p2 start"  }, // 3

   {"P1 Up"             , BIT_DIGITAL  , System1InputPort0 + 5, "p1 up"     }, // 4
   {"P1 Down"           , BIT_DIGITAL  , System1InputPort0 + 4, "p1 down"   }, // 5
   {"P1 Left"           , BIT_DIGITAL  , System1InputPort0 + 7, "p1 left"   }, // 6
   {"P1 Right"          , BIT_DIGITAL  , System1InputPort0 + 6, "p1 right"  }, // 7
   {"P1 Fire 1"         , BIT_DIGITAL  , System1InputPort0 + 1, "p1 fire 1" }, // 8
   {"P1 Fire 2"         , BIT_DIGITAL  , System1InputPort0 + 2, "p1 fire 2" }, // 9

   {"P2 Up"             , BIT_DIGITAL  , System1InputPort1 + 5, "p2 up"     }, // 10
   {"P2 Down"           , BIT_DIGITAL  , System1InputPort1 + 4, "p2 down"   }, // 11
   {"P2 Left"           , BIT_DIGITAL  , System1InputPort1 + 7, "p2 left"   }, // 12
   {"P2 Right"          , BIT_DIGITAL  , System1InputPort1 + 6, "p2 right"  }, // 13
   {"P2 Fire 1"         , BIT_DIGITAL  , System1InputPort1 + 1, "p2 fire 1" }, // 14
   {"P2 Fire 2"         , BIT_DIGITAL  , System1InputPort1 + 2, "p2 fire 2" }, // 15

   {"Reset"             , BIT_DIGITAL  , &System1Reset        , "reset"     }, // 16
   {"Service"           , BIT_DIGITAL  , System1InputPort2 + 3, "service"   }, // 17
   {"Test"              , BIT_DIGITAL  , System1InputPort2 + 2, "diag"      }, // 18
   {"Dip 1"             , BIT_DIPSWITCH, System1Dip + 0       , "dip"       }, // 19 (0x13)
   {"Dip 2"             , BIT_DIPSWITCH, System1Dip + 1       , "dip"       }, // 20 (0x14)
};
Title: Re: Porting MAME drivers
Post by: vbt on May 01, 2012, 06:20:59 PM
well, scrolling is now working on choplifter, it looks to be finished. I try to merge my old version(v0.2.97.11) with the the latest one. then i add wonderboy 2.  :smilie:
Title: Re: Porting MAME drivers
Post by: vbt on May 06, 2012, 05:25:31 AM
for feedback, source only fbad was too  big
Title: Re: Porting MAME drivers
Post by: vbt on May 09, 2012, 03:42:32 PM
good ? bad ?
Title: Re: Porting MAME drivers
Post by: Barry Harris on May 12, 2012, 12:08:14 PM
good ? bad ?

Sorry, I haven't had chance to look at this yet, will try and take a look this weekend.
Title: Re: Porting MAME drivers
Post by: vbt on May 28, 2012, 12:58:54 PM
well system 2 is too much for me, any good way to debug ?
Title: Re: Porting MAME drivers
Post by: vbt on June 27, 2012, 05:43:58 PM
ok, it's not fba main target
Title: Re: Porting MAME drivers
Post by: vbt on August 18, 2012, 06:27:44 AM
i start with a complete driver : pengo2u
maybe i'll need some help :)
Title: Re: Porting MAME drivers
Post by: iq_132 on August 21, 2012, 05:51:26 AM
i start with a complete driver : pengo2u
maybe i'll need some help :)
By all means, post about it here. :) I'm glad to help.
Title: Re: Porting MAME drivers
Post by: vbt on August 22, 2012, 12:51:06 PM
Thanks, iq! I send it soon, I did something but nothing run yet, only tile decoding is correct. then I'll port SEGA SHOOTING ZONE & System E :)
Title: Re: Porting MAME drivers
Post by: vbt on August 23, 2012, 05:29:11 PM
here is my WIP,there is nothing for sound and sprites but (I don't know if it's a good way) I wanted just to do enough to display background then fix colors, add sound, add sprites.
well Iq if you can spot wrong thing, i want to learn, thanks :)

NB : it's saturn port, i have nothing on this pc to work on pc version. so it's almost the same thing :)
Title: Re: Porting MAME drivers
Post by: vbt on January 29, 2014, 03:32:03 PM
well, finally i've fixed bug on saturn version. pc version is still working well
I return to wonderboy 2 driver port =)))

(http://thumbnails112.imagebam.com/30480/ed9206304792535.jpg) (http://www.imagebam.com/image/ed9206304792535)
Title: Re: Porting MAME drivers
Post by: iq_132 on January 29, 2014, 08:11:56 PM
Very impressive. Are you rendering these on the Saturn's 3d hardware or the 2d hardware??
Title: Re: Porting MAME drivers
Post by: vbt on January 31, 2014, 02:06:15 PM
Very impressive. Are you rendering these on the Saturn's 3d hardware or the 2d hardware??
there is not really 3D hardware, let's say i render system1 sprites as Saturn sprites and tiles/maps as saturn tiles/maps
choplifter adds also linescroll (converted to saturn hardware too)
Title: Re: Porting MAME drivers
Post by: vbt on July 08, 2014, 05:54:06 PM
for feedback, source only fbad was too  big
dink, it's a job for you, testing choplipfter on fba except if you don't like the game
Title: Re: Porting MAME drivers
Post by: dink on July 09, 2014, 03:41:21 PM
dink, it's a job for you, testing choplipfter on fba except if you don't like the game

I would be delighted to, please link me the driver :)

best regards,
- dink
Title: Re: Porting MAME drivers
Post by: vbt on July 09, 2014, 03:50:20 PM
here :
http://neo-source.com/index.php?action=dlattach;topic=1757.0;attach=6156
thanks Dink =)
Title: Re: Porting MAME drivers
Post by: dink on July 09, 2014, 04:45:55 PM
Thanks, I'll have to port your driver to the newest codebase, because it has problems linking here before I can try it.
Title: Re: Porting MAME drivers
Post by: dink on July 09, 2014, 05:26:35 PM
Alright! Excellent work, my friend :)  I played for a few minutes after porting it over to the latest FBA codebase, and everything seems A-OK :)
I will play some more later tonight when I have more time, and let you know how it goes.

best regards,
- dink
Title: Re: Porting MAME drivers
Post by: vbt on July 09, 2014, 07:05:10 PM
Alright! Excellent work, my friend :)  I played for a few minutes after porting it over to the latest FBA codebase, and everything seems A-OK :)
I will play some more later tonight when I have more time, and let you know how it goes.

best regards,
- dink
ahah ! great news ! big thanks Dink ! i still have to port your congo bongo driver on saturn(+add zaxxon) and also i'm waiting for some new drivers like the upl written by iq !
Title: Re: Porting MAME drivers
Post by: dink on July 10, 2014, 01:41:00 AM
I'm thinking about how we should add this to FBA (officially), can you get the parent rom (chplft.zip aka choplift.zip) to work as well?  Maybe iq_132 can help with the mcu emulation part (if needed).  Or, if we can't get the parent rom working, maybe there's a way to get only chplftb (aka chopliftu.zip new romset name) listed in the games list, but also require choplift.zip (parent rom) - to keep things looking nice. 

Heres the latest d_sys1.cpp with your driver added - it should work fine with .29 as well as the upcoming .30.  I changed something in memindex, so that access to System1ScrollXRam doesn't go into the next variable's memory space. System1VideoRam + 0x7C0 goes past System1VideoRam as its only 0x700 in size.  Other than that, everything looks good :)
old:
Code: [Select]
System1VideoRam        = Next; Next += 0x000700;
System1ScrollXRam = System1VideoRam + 0x7C0;
new:
Code: [Select]
System1VideoRam        = Next; Next += 0x000800;
        System1ScrollXRam      = System1VideoRam + 0x7C0;

best regards,
- dink
Title: Re: Porting MAME drivers
Post by: Barry Harris on July 10, 2014, 04:57:21 AM
Just add the parent as non-working and let the working clone(s) branch off it.

We used to have quite a few like that (not so many now), and it gives people the motivation to fix the non-working parent. :)
Title: Re: Porting MAME drivers
Post by: dink on July 10, 2014, 10:15:38 AM
Thanks for the help, Treble Winner

Here's the latest d_sys1.cpp, added Choplifter (parent / broken until protection MCU emulated), Choplifter (unprotected / working) and Choplifter (bootleg / working).  Also added to the svn.  Thanks vbt, the next FBA will have your choplifter driver :)
I used to play this game a lot back in the C64 days, so it is a great addition to this great emulator.

best regards,
- dink
Title: Re: Porting MAME drivers
Post by: vbt on July 14, 2015, 04:02:20 PM
Quote
   ROM_LOAD_NIB_HIGH( "bprom.4b",0x0000,0x0100,CRC(dd233851) SHA1(25eab1ec2227910c6fcd2803986f1cf206624da7) )
   ROM_LOAD_NIB_LOW(  "bprom.4c",0x0000,0x0100,CRC(60aaa686) SHA1(bb2ad555da51f6b30ab8b55833fe8d461a1e67f4) )
how to port that in fba ?  :S
Title: Re: Porting MAME drivers
Post by: iq_132 on July 14, 2015, 05:17:19 PM
allocate 0x200 bytes of memory.

BurnLoadRom(colprom + 0, .., 2); // 2 is spaces
BurnLoadRom(colprom + 1, .., 2);

for (int I = 0; I < 0x200; I+=2) {
     colprom[I/2] = (colprom[I+0] & 0x0f) | (colprom[I+1] << 4);
}

(you may need to swap [I+0] & [I+1] in the above.
Title: Re: Porting MAME drivers
Post by: vbt on July 14, 2015, 06:08:27 PM
allocate 0x200 bytes of memory.

BurnLoadRom(colprom + 0, .., 2); // 2 is spaces
BurnLoadRom(colprom + 1, .., 2);

for (int I = 0; I < 0x200; I+=2) {
     colprom[I/2] = (colprom[I + 0] & 0x0f) | (colprom[I+1] << 4);
}

(you may need to swap [I + 0] & [I+1] in the above.

thanks Iq_132, i test that  :cool: :smilie:
Title: Re: Porting MAME drivers
Post by: vbt on July 16, 2015, 03:10:58 PM
it needed swap :)

another thing to make happy dink ;)
Title: Re: Porting MAME drivers
Post by: dink on July 16, 2015, 04:39:55 PM
nice :)
Title: Re: Porting MAME drivers
Post by: vbt on July 18, 2015, 09:57:53 AM
sprites added, still missing sound and controls
Title: Re: Porting MAME drivers
Post by: iq_132 on July 19, 2015, 08:53:23 AM
Lovely work guys! Nice to see others writing drivers again!
Title: Re: Porting MAME drivers
Post by: vbt on August 06, 2015, 02:32:59 PM

it booted ! :biggrin: well still lot of work :)
Title: Re: Porting MAME drivers
Post by: Arcadez on August 06, 2015, 02:58:14 PM
@vbt good start but yeah it still needs some work  ;p
Title: Re: Porting MAME drivers
Post by: iq_132 on August 06, 2015, 03:25:16 PM
@vbt good start but yeah it still needs some work  ;p
You mean GREAT work. Getting it that far is impressive. :)
Title: Re: Porting MAME drivers
Post by: Arcadez on August 06, 2015, 03:33:49 PM
You mean GREAT work. Getting it that far is impressive. :)

Of course i mean that!!! me and vbt wind each other up on the chat my post was a continuation of that :D
Title: Re: Porting MAME drivers
Post by: vbt on August 07, 2015, 09:34:45 AM
thanks :) i did some fixes, now it needs dink's magical hands :)
Title: Re: Porting MAME drivers
Post by: Arcadez on August 07, 2015, 11:26:18 AM
@vbt it's comming along nicely some good work your doin here!!! just thought i'd mention i remember IQ telling me
wbml uses a completely different drawing routine with 4 layers rather than 1. i assume you know that anyway but thought
i'd mention this incase thats whats causing the grapical niggles above
Title: Re: Porting MAME drivers
Post by: vbt on August 09, 2015, 12:38:26 PM
many fixes done, correct title,colors,fg,music but no way to get correct bg even with the 4 pages emulated.
Title: Re: Porting MAME drivers
Post by: vbt on August 14, 2015, 09:59:46 AM
thanks iq & dink for your great help & fixes :)
Title: Re: Porting MAME drivers
Post by: iq_132 on August 14, 2015, 03:36:05 PM
thanks iq & dink for your great help & fixes :)
I didn't do much. Thanks for the shout out though. Anyway, CURRENT SCREENSHOTS PLEASE!! :D Also, mouser?
Title: Re: Porting MAME drivers (vbt's work in progress)
Post by: vbt on August 14, 2015, 04:22:40 PM

result of team work :) (dink,iq & me)
Title: Re: Porting MAME drivers (vbt's work in progress)
Post by: Arcadez on August 14, 2015, 04:23:48 PM
Great work fellas!!!
Title: Re: Porting MAME drivers (vbt's work in progress)
Post by: iq_132 on August 14, 2015, 06:27:34 PM
Lovely! Going to add the other games too? It shouldn't be too bad. If you need help adding row scrolling let me know (it really isn't that bad).
Title: Re: Porting MAME drivers (vbt's work in progress)
Post by: vbt on August 20, 2015, 03:29:01 PM
.
Title: Re: Porting MAME drivers (vbt's work in progress)
Post by: Arcadez on August 20, 2015, 03:40:33 PM
@vbt More Sega System 2 goodness
Title: Re: Porting MAME drivers (vbt's work in progress)
Post by: Bonky0013 on August 23, 2015, 09:30:09 AM
Yeah!!  :biggrin:

Great work man !
Monster land on fba is great  :wink:
Goooood job  :smilie:
Thanks ^^

Hope to see puyo puyo and thunderforce AC on system C2 ^^
Title: Re: Porting MAME drivers (vbt's work in progress)
Post by: dink on August 23, 2015, 01:07:32 PM
Thunderforce AC would be an excellent addition to fba :D

Yeah!!  :biggrin:

Great work man !
Monster land on fba is great  :wink:
Goooood job  :smilie:
Thanks ^^

Hope to see puyo puyo and thunderforce AC on system C2 ^^
Title: Re: Porting MAME drivers (vbt's work in progress)
Post by: vbt on August 27, 2015, 02:25:18 PM
wbml working on saturn too now but still no way to run virtual console version  :S
Title: Re: Porting MAME drivers (vbt's work in progress)
Post by: Haze on August 27, 2015, 03:40:19 PM
Thunderforce AC would be an excellent addition to fba :D

you have a genesis core so the C2 stuff should be easy.

key points
different vblank irq (the vdp vblank irq enable is ignored, the irq level is different and it always happens)
different palette hardware - the internal VDP cram isn't used, instead external palette hardware is (with different sprite / bg palettes and banking)
the protection - does palette banking and some other checks (ribbit is probably the most annoying case)
additional sound hardware

there are a number of other games with genesis based hardware too (puckman pokimon etc.) which would also be easy ports.



Title: Re: Porting MAME drivers (vbt's work in progress)
Post by: vbt on December 25, 2015, 04:25:25 PM
merry late christmas :)

maybe too early, you may guess the game :

(http://s23.postimg.org/lp2vbvx6z/guess1.jpg)
Title: Re: Porting MAME drivers (vbt's work in progress)
Post by: Gab75 on December 25, 2015, 05:33:46 PM
merry late christmas :)

maybe too early, you may guess the game :

The form of the wrestling ring can be seen... more or less! :P

Merry late Christmas to you too! :)
Title: Re: Porting MAME drivers (vbt's work in progress)
Post by: Arcadez on December 25, 2015, 06:43:01 PM
merry late christmas :)

maybe too early, you may guess the game :

(http://s23.postimg.org/lp2vbvx6z/guess1.jpg)

Nice work fella but the answer is already shown :D
Title: Re: Porting MAME drivers (vbt's work in progress)
Post by: vbt on December 25, 2015, 08:00:36 PM
oops  :redface: :redface: :redface: it's in the title bar, next time i'll blur it
(http://s14.postimg.org/qz8mpmgm9/Image1.jpg)
Title: Re: Porting MAME drivers (vbt's work in progress)
Post by: dink on December 25, 2015, 08:38:22 PM
great job!! :)
Title: Re: Porting MAME drivers (vbt's work in progress)
Post by: iq_132 on December 25, 2015, 09:14:36 PM
Excellent work!
Title: Re: Porting MAME drivers (vbt's work in progress)
Post by: Gab75 on December 26, 2015, 01:01:52 AM
oops  :redface: :redface: :redface: it's in the title bar, next time i'll blur it

Indeed we had an "easy task" ! :P

In any case, now the game appears way better! Great work! ;)
Title: Re: Porting MAME drivers (vbt's work in progress)
Post by: vbt on December 28, 2015, 08:05:26 PM
mr jong
again bad palette, thanks to super dink palette is fixed on appoooh driver ! :cool:

(http://s14.postimg.org/j86a1xvdt/mrjong.jpg)

Title: Re: Porting MAME drivers (vbt's work in progress)
Post by: Gab75 on December 29, 2015, 01:24:28 AM
mr jong
again bad palette, thanks to super dink palette is fixed on appoooh driver ! :cool:

Thanks! :) I never saw this game... it looks a bit like an unofficial variant of SEGA Pengo! ;)
Title: Re: Porting MAME drivers (vbt's work in progress)
Post by: vbt on December 29, 2015, 08:32:28 AM
Thanks! :) I never saw this game... it looks a bit like an unofficial variant of SEGA Pengo! ;)
yes it's more or less pengo, Crazy Blocks looks better. also Sanritsu/Kiwako published games for sega.
Title: Re: Porting MAME drivers (vbt's work in progress)
Post by: vbt on December 30, 2015, 04:57:19 AM
still some bugs :

(http://s24.postimg.org/98f3f3p5h/cb1.jpg)
(http://s17.postimg.org/4bb2zfnsv/cb2.jpg)

(http://s29.postimg.org/ofujaw2kn/app1.jpg)
Title: Re: Porting MAME drivers (vbt's work in progress)
Post by: fluffymadness on January 13, 2016, 01:07:35 PM
Hi guys, awesome work. What I really hope to see on fba someday is
Dataeast's Firetrap
https://youtu.be/P-WsL0KcCYY?t=47s
This game is just pure awesomeness :)
Title: Re: Porting MAME drivers (vbt's work in progress)
Post by: dink on January 13, 2016, 07:53:47 PM
I like that idea :)
Title: Re: Porting MAME drivers (vbt's work in progress)
Post by: dink on January 16, 2016, 09:25:26 PM
It's official - vbt's Appoooh driver will be in the next version of FBAlpha :)
Title: Re: Porting MAME drivers (vbt's work in progress)
Post by: vbt on January 17, 2016, 01:02:17 PM
good news thanks dink
Title: Re: Porting MAME drivers (vbt's work in progress)
Post by: vbt on February 06, 2016, 04:45:40 PM
and someone wants Robo Wres 2001?
Title: Re: Porting MAME drivers (vbt's work in progress)
Post by: Gab75 on February 07, 2016, 12:42:28 AM
and someone wants Robo Wres 2001?

Of course, thanks! :) I've never played Robo Wres 2001, but it seems a good "alternative" wrestling game... and in any case (as I wrote earlier) a porting is always a "useful and valuable work" ! ;)
Title: Re: Porting MAME drivers (vbt's work in progress)
Post by: vbt on March 13, 2016, 05:19:38 PM
(http://s29.postimg.org/5ghs39zk7/Image1.jpg)
Title: Re: Porting MAME drivers (vbt's work in progress)
Post by: vbt on August 23, 2016, 10:23:41 AM
thanks to dink and iq_132
(https://s3.postimg.io/f06xa0ayr/gigasb.png)
Title: Re: Porting MAME drivers (vbt's work in progress)
Post by: vbt on August 23, 2016, 12:50:36 PM
(https://s14.postimg.io/4lijk5mm9/gigasm2b.png)
 :cool:
Title: Re: Porting MAME drivers (vbt's work in progress)
Post by: Gab75 on August 23, 2016, 02:42:49 PM
Thanks for the additions! :)

... I hope that you'll also consider the porting of the other "freekick.c driver" games (Counter Run, Free Kick and Perfect Billiard) ! ;)
Title: Re: Porting MAME drivers (vbt's work in progress)
Post by: dink on August 23, 2016, 05:12:31 PM
vbt, nice job! :)
Title: Re: Porting MAME drivers (vbt's work in progress)
Post by: Arcadez on August 23, 2016, 05:16:37 PM
vbt, nice job! :)

+1
Title: Re: Porting MAME drivers (vbt's work in progress)
Post by: vbt on August 24, 2016, 07:01:25 PM
Thanks for the additions! :)

... I hope that you'll also consider the porting of the other "freekick.c driver" games (Counter Run, Free Kick and Perfect Billiard) ! ;)
sure other games are in progress, anyway it will need iq & dink magic hands. i have some troubles with controls

(https://s4.postimg.io/3quqsl15p/counterrun.png)
Title: Re: Porting MAME drivers (vbt's work in progress)
Post by: Arcadez on August 24, 2016, 07:08:06 PM
Looking good very well done!!!
Title: Re: Porting MAME drivers (vbt's work in progress)
Post by: Gab75 on August 25, 2016, 12:29:49 AM
sure other games are in progress, anyway it will need iq & dink magic hands. i have some troubles with controls

Very good news! :)
Thanks for your work and for the iq_132 & dink support! ;)
Title: Re: Porting MAME drivers (vbt's work in progress)
Post by: vbt on August 25, 2016, 10:18:45 AM
(https://s11.postimg.io/44x5spfnn/freekick3b.png)
freekick without code update
Title: Re: Porting MAME drivers (vbt's work in progress)
Post by: dink on August 26, 2016, 10:54:54 PM
it's done!
Title: Re: Porting MAME drivers (vbt's work in progress)
Post by: Arcadez on August 27, 2016, 08:27:04 AM
Nice work!!!
Title: Re: Porting MAME drivers (vbt's work in progress)
Post by: iq_132 on August 27, 2016, 10:10:17 AM
Lovely work! :)
Title: Re: Porting MAME drivers (vbt's work in progress)
Post by: vbt on August 27, 2016, 04:28:05 PM
congrats dink !!!
Title: Re: Porting MAME drivers (vbt's work in progress)
Post by: vbt on November 13, 2016, 02:37:54 PM
(https://s14.postimg.org/62qxcy0r5/image.jpg)
(https://s13.postimg.org/w2y8u7mpz/image.jpg)
(https://s18.postimg.org/686fu239l/image.jpg)
Title: Re: Porting MAME drivers (vbt's work in progress)
Post by: dink on November 13, 2016, 02:43:56 PM
nice vbt!!!
Title: Re: Porting MAME drivers (vbt's work in progress)
Post by: vbt on November 13, 2016, 04:04:30 PM
+ with a little hack :

(http://i.imgur.com/l15CbaW.jpg)
Title: Re: Porting MAME drivers (vbt's work in progress)
Post by: Gab75 on November 13, 2016, 05:44:42 PM
Great... thanks! :)

Just few days ago I was hoping in a porting of "SEGA System E" driver! ;)
Title: Re: Porting MAME drivers (vbt's work in progress)
Post by: vbt on October 01, 2017, 06:26:27 PM
(https://s1.postimg.org/12zf73fkcf/opa.jpg)
(https://s1.postimg.org/16x72651jz/slap.jpg)
Title: Re: Porting MAME drivers (vbt's work in progress)
Post by: vbt on October 14, 2017, 06:41:26 PM
(https://s1.postimg.org/1dmhd83dmn/image.jpg)
Title: Re: Porting MAME drivers (vbt's work in progress)
Post by: vbt on October 21, 2017, 04:01:00 PM
(https://s1.postimg.org/3e757m0r73/astro.jpg)
Title: Re: Porting MAME drivers (vbt's work in progress)
Post by: dink on October 21, 2017, 05:52:44 PM
nice :)
Title: Re: Porting MAME drivers (vbt's work in progress)
Post by: iq_132 on October 21, 2017, 11:24:03 PM
Lovely work VBT!
Title: Re: Porting MAME drivers (vbt's work in progress)
Post by: vbt on October 23, 2017, 05:31:08 PM
thanks ! and here is last game :

(https://s1.postimg.org/7zq5n9tnf3/rifddle.jpg)
Title: Re: Porting MAME drivers (vbt's work in progress)
Post by: Arcadez on October 23, 2017, 05:40:32 PM
@vbt good stuff!!
Title: Re: Porting MAME drivers (vbt's work in progress)
Post by: vbt on November 07, 2018, 08:56:23 PM
fba saturn : it's alive
(https://i.snag.gy/GfwBaM.jpg)
Title: Re: Porting MAME drivers (vbt's work in progress)
Post by: iq_132 on November 08, 2018, 02:28:59 AM
Nice work VBT! Glad to see that you got it going :)
Title: Re: Porting MAME drivers (vbt's work in progress)
Post by: vbt on November 08, 2019, 08:33:04 PM
new beta here :

http://vberthelot.free.fr/fba_beta4/fba_beta4.7z

it adds :

-  MSX
- Atomic Robokid (WIP)
- Black  Tiger (SFX & BGM)
- Fantasy Zone 2
- Omega
- Pang (SFX & BGM)
- Side Arms
- Solomon's Key
- Super Pang (SFX)
- Tetris
- Wonderboy in Monster Land (EN VC)

enjoy !

Big thanks to the fba team for the skills & support

NB : not tested on real saturn
Title: Re: Porting MAME drivers (vbt's work in progress)
Post by: SeiferAlmasy on January 24, 2020, 09:17:04 PM
Excellent work vbt, thank you.
Title: Re: Porting MAME drivers (vbt's work in progress)
Post by: vbt on January 25, 2020, 03:59:12 PM
Excellent work vbt, thank you.
thanks for support !
Title: Re: Porting MAME drivers (vbt's work in progress)
Post by: vbt on December 19, 2021, 04:42:37 PM
i'm still fixing some bugs on saturn version, it's nearly good.
there is one bug annoying me on wbml, each time there is a page transition
it happens when the scrolling moves from 255 to 0, so it displays page 5 instead of page 1

see on pictures, wbml pages 0 to 3 displayed as text

(https://i.ibb.co/2jTvHSB/image.png) (https://ibb.co/WcLkj01)

any ideas ? would it mean scrolling has to be taken into account 1 frame after the displayed image or my scrolling value is wrong on one frame ? but on next frames it doesn't happen.
I got the same trouble with vertical scrolling. so any clue ?

PS : my scrolling value defined before writting the background :
   ss_reg->n2_move_x = (255-((vram[0x80] >> 1) + ((vram[0x81] & 1) << 7))) &0xff;
where vram=&System1VideoRam[0x740]

Title: Re: Porting MAME drivers (vbt's work in progress)
Post by: vbt on December 22, 2021, 07:47:15 PM
(https://i.ibb.co/cbQ7933/image.png) (https://ibb.co/3fcLbdd)
here is the spotted bug
previous pages are 5 & 1
i loop on page are 1 & 2 scrolling is at 0
but the page displayed is page 2 like if scrolling value is still 255