Author Topic: MAME to FBA conversion code  (Read 8724 times)

Offline iq_132

  • Administrator
  • *****
  • Posts: 3724
  • Karma: +411/-0
  • Definitely not Dink!
    • NeoSource
MAME to FBA conversion code
« on: January 28, 2005, 01:51:43 AM »
The main idea of this thread is to give a reference library to anyone who wants to port MAME code to FBA.

MAME <--> FBA conversion code


memory_region(REGION_CPU1) -> Neo68KROM
memory_region(REGION_CPU2) -> NeoZ80ROM
memory_region(REGION_GFX1) -> NeoTextROM + 0x20000
memory_region(REGION_GFX3) -> NeoSpriteROM

Here's a site that shows the different data types between C and C++
http://www.chrisdanielson.com/tutorials/win32datatypes.htm

Here's a site that can help explain some common and useful functions:
http://www.cplusplus.com/ref/cstdio/index.html


Offline neo04

  • Jr. Member
  • **
  • Posts: 90
  • Karma: +1/-0
MAME to FBA conversion code
« Reply #1 on: January 28, 2005, 06:33:17 AM »
nice info iq.. thx.. :)

Offline robber804

  • Newbies
  • *
  • Posts: 40
  • Karma: +0/-0
  • Relentless Bastard
MAME to FBA conversion code
« Reply #2 on: January 29, 2005, 01:38:19 AM »
Quote from: iq_132
The main idea of this thread is to give a reference library to anyone who wants to port MAME code to FBA.

MAME <--> FBA conversion code


memory_region(REGION_CPU1) -> Neo68KROM
memory_region(REGION_CPU2) -> NeoZ80ROM
memory_region(REGION_GFX1) -> NeoTextROM + 0x20000
memory_region(REGION_GFX3) -> NeoSpriteROM

Here's a site that shows the different data types between C and C++
http://www.chrisdanielson.com/tutorials/win32datatypes.htm

Here's a site that can help explain some common and useful functions:
http://www.cplusplus.com/ref/cstdio/index.html


Did you finally break down and decide to import some of MAME's functions into FBA?   ;)
-robber804

Offline bms888

  • Jr. Member
  • **
  • Posts: 93
  • Karma: +0/-0
  • Member
MAME to FBA conversion code
« Reply #3 on: March 09, 2005, 02:52:04 AM »
Anyone can tell me how to change this MAME code MRA16_RAM & MWA16_RAM to FBA,thx.

In that means, how to define MRA16_RAM & MWA16_RAM in FBA?

Offline bms888

  • Jr. Member
  • **
  • Posts: 93
  • Karma: +0/-0
  • Member
MAME to FBA conversion code
« Reply #4 on: March 10, 2005, 07:32:49 PM »
Quote from: bms888
Anyone can tell me how to change this MAME code MRA16_RAM & MWA16_RAM to FBA,thx.

In that means, how to define MRA16_RAM & MWA16_RAM in FBA?


I hope some can tell me how to covert this code to FBA,thx.

Code: [Select]


static UINT16 mv0_bank_ram[ 0x10/2 ];

static READ16_HANDLER( kof2003b_prot_r )
{
return mv0_bank_ram[ 1 ];
}

memory_install_read16_handler(0, ADDRESS_SPACE_PROGRAM, 0x??????, 0x??????, 0, 0, MRA16_RAM);
memory_install_write16_handler(0, ADDRESS_SPACE_PROGRAM, 0x??????, 0x??????, 0, 0, MWA16_RAM);

memory_install_read16_handler(0, ADDRESS_SPACE_PROGRAM, 0x??????, 0x??????, 0, 0, kof2003b_prot_r);


then kof10th can work on FBA,^_^.

Offline FerchogtX

  • FBNeo Dev
  • ******
  • Posts: 375
  • Karma: +7/-0
  • FB Alpha Team ;)
    • FB Alpha Plus! Web Site
MAME to FBA conversion code
« Reply #5 on: March 13, 2005, 05:08:03 PM »
Jeje bms, why don't you try you own bankswitch code? (the one you use for svcchaos, kof2003, mslug5 and other games, they include the extra ram needes by that games and even kof10th...
The protection check fro 2fe000, 2fffff mem dirs are in fact the bankswitch needed, this game seems to need only the mvo prot (or bank) bankswitch + 2 extra RAM modules (maybe we have emulated that already in fba)
See ya!!!!!! :D

Good and evil co-exist because of the balance, lies are not part of it...

FB Alpha Plus! site infos updated, see the latest info clicking on my profile link...

Offline netbug

  • Newbies
  • *
  • Posts: 37
  • Karma: +1/-0
  • Member
MAME to FBA conversion code
« Reply #6 on: March 13, 2005, 07:33:22 PM »
FerchogtX was a really clever guy. :D

Offline James33

  • Expert
  • *****
  • Posts: 532
  • Karma: +3/-0
  • The Mame Man
    • Emulation Zone
MAME to FBA conversion code
« Reply #7 on: March 14, 2005, 06:06:39 AM »
Quote from: FerchogtX
Jeje bms, why don't you try you own bankswitch code? (the one you use for svcchaos, kof2003, mslug5 and other games, they include the extra ram needes by that games and even kof10th...
The protection check fro 2fe000, 2fffff mem dirs are in fact the bankswitch needed, this game seems to need only the mvo prot (or bank) bankswitch + 2 extra RAM modules (maybe we have emulated that already in fba)
See ya!!!!!! :D


It does not need the kof2003 bankswitch
IQ Forum Member

Offline FerchogtX

  • FBNeo Dev
  • ******
  • Posts: 375
  • Karma: +7/-0
  • FB Alpha Team ;)
    • FB Alpha Plus! Web Site
MAME to FBA conversion code
« Reply #8 on: March 15, 2005, 09:19:34 PM »
XD check the other posts James... but anyway isn't exactly kof2003 bankswitch
See ya!!!! :D

Good and evil co-exist because of the balance, lies are not part of it...

FB Alpha Plus! site infos updated, see the latest info clicking on my profile link...

Offline James33

  • Expert
  • *****
  • Posts: 532
  • Karma: +3/-0
  • The Mame Man
    • Emulation Zone
MAME to FBA conversion code
« Reply #9 on: March 16, 2005, 12:59:56 AM »
Quote from: FerchogtX
XD check the other posts James... but anyway isn't exactly kof2003 bankswitch
See ya!!!! :D

No need as I have the needed bankswitch code :) And its not MVO or kof2003 bankswitch.
IQ Forum Member