MAMEWorld >> Programming
View all threads Index   Flat Mode Flat  

60dBm
MAME Fan
Reged: 12/03/05
Posts: 4
Send PM
Re: Help with Code disassembly
12/20/08 02:23 PM


Thanks for the reply.

From the driver:


static ADDRESS_MAP_START( gunsmoke_map, ADDRESS_SPACE_PROGRAM, 8 )

AM_RANGE(0x0000, 0x7fff) AM_ROM
AM_RANGE(0x8000, 0xbfff) AM_ROMBANK(1)

AM_RANGE(0xc804, 0xc804) AM_WRITE(gunsmoke_c804_w) // ROM bank switch, screen flip



and

ROM_START( gunsmoku )

ROM_REGION( 0x20000, "main", 0 )

ROM_LOAD( "9n_gs03.bin", 0x00000, 0x8000, CRC(592f211b) SHA1(8de44b3cafa3d2ce9aba515cf3ec4bac0bcdeb5b) ) /* Code 0000-7fff */

ROM_LOAD( "10n_gs04.bin", 0x10000, 0x8000, CRC(8d4b423f) SHA1(149274c2ed1526ca1f419fdf8a24059ff138f7f2) ) /* Paged code */

ROM_LOAD( "12n_gs05.bin", 0x18000, 0x8000, CRC(2b5667fb) SHA1(5b689bca1e76d803b4cae22feaa7744fa528e93f) ) /* Paged code */


ROM_LOAD 9n_gs03.bin is straight forward.

Why does ROM_LOAD gs04 and gs05 appear to be loaded 'backwards' into memory? i.e. 0x10000, 0x8000 and 0x18000, 0x8000.

Please help me understand whats going on here. From what I understand about ROM banking is that banking is fooling the CPU into executing two separate programs as a single program. Is this what is happening here?

How can the code be disassembled correctly?

Thanks for your time.







Entire thread
Subject Posted by Posted on
* Help with Code disassembly 60dBm 12/20/08 08:13 AM
. * Re: Help with Code disassembly Vas Crabb  12/20/08 11:43 AM
. * Re: Help with Code disassembly 60dBm  12/20/08 02:23 PM
. * Re: Help with Code disassembly Vas Crabb  12/20/08 03:11 PM
. * Re: Help with Code disassembly 60dBm  12/20/08 04:20 PM
. * Found at C000 60dBm  12/21/08 10:49 PM
. * Re: Found at C000 Vas Crabb  12/21/08 11:38 PM

Extra information Permissions
Moderator:  Pi 
0 registered and 18 anonymous users are browsing this forum.
You cannot start new topics
You cannot reply to topics
HTML is enabled
UBBCode is enabled
Thread views: 5101