Previous 199869 Revisions Next

r21750 Saturday 9th March, 2013 at 08:30:35 UTC by Fabio Priuli
a last cleanup. nw.
[src/mess/machine]snescart.c

trunk/src/mess/machine/snescart.c
r21749r21750
330330/* This determines if a cart is in Mode 20, 21, 22 or 25; sets state->m_cart[0].mode and
331331 state->m_cart[0].sram_max accordingly; and returns the offset of the internal header
332332 (needed to detect BSX and ST carts) */
333static UINT32 snes_find_hilo_mode( device_image_interface &image, UINT8 *buffer, UINT32 len, int cartid )
333static UINT32 snes_find_hilo_mode( running_machine &machine, UINT8 *buffer, UINT32 len, int cartid )
334334{
335   snes_state *state = image.device().machine().driver_data<snes_state>();
335   snes_state *state = machine.driver_data<snes_state>();
336336   UINT8 valid_mode20, valid_mode21, valid_mode25;
337337   UINT32 retvalue;
338338
r21749r21750
564564static void snes_cart_log_info( running_machine &machine, UINT8* ROM, UINT32 len, int supported )
565565{
566566   snes_state *state = machine.driver_data<snes_state>();
567   device_image_interface *image = dynamic_cast<device_image_interface *>(machine.device("cart"));
568567   char title[21], rom_id[4], company_id[2];
569568   int i, company, has_ram = 0, has_sram = 0;
570   UINT32 hilo_mode = snes_find_hilo_mode(*image, ROM, len, 0);
569   UINT32 hilo_mode = snes_find_hilo_mode(machine, ROM, len, 0);
571570
572571   /* Company */
573572   for (i = 0; i < 2; i++)
r21749r21750
671670   rom_map_setup(m_cart[0].m_rom_size);
672671
673672   // Check if the cart is HiROM or LoROM (and set variables accordingly)
674   int_header_offs = snes_find_hilo_mode(image, m_cart[0].m_rom, m_cart[0].m_rom_size, 0);
673   int_header_offs = snes_find_hilo_mode(machine(), m_cart[0].m_rom, m_cart[0].m_rom_size, 0);
675674
676675   // Detect BS-X carts:
677676   // 1. Detect BS-X Flash Cart

Previous 199869 Revisions Next


© 1997-2024 The MAME Team