Previous 15994 Revisions Next

r9964 Saturday 8th January, 2011 at 14:27:31 UTC by Miodrag Milanović
Added more ifdefs in some code that is in MAME and MESS too.
TODO:
- ng_aes is fine as it is
- pce and sms code needs to be unified for MAME and MESS in order to work fine together.
[src/mess/drivers]atari.c ng_aes.c
[src/mess/machine]pce.c sms.c

src/mess/machine/sms.c
r9963r9964
862862   }
863863}
864864
865
865#ifdef MESS
866866static WRITE8_HANDLER( sms_korean_zemina_banksw_w )
867867{
868868   sms_state *state = space->machine->driver_data<sms_state>();
r9963r9964
935935      }
936936   }
937937}
938#endif
938939
939940static READ8_HANDLER( sms_kor_nobank_r )
940941{
r9963r9964
16651666   }
16661667}
16671668
1668
1669#ifdef MESS
16691670static void setup_banks( running_machine *machine )
16701671{
16711672   sms_state *state = machine->driver_data<sms_state>();
r9963r9964
16971698      state->banking_bios[5] = state->BIOS + ((2 < state->bios_page_count) ? 0x8000 : 0);
16981699   }
16991700}
1701#endif
17001702
1701
17021703MACHINE_START( sms )
17031704{
17041705   sms_state *state = machine->driver_data<sms_state>();
r9963r9964
17221723   timer_set(machine, attotime_zero, NULL, 0, lightgun_tick);
17231724}
17241725
1725
1726#ifdef MESS
17261727MACHINE_RESET( sms )
17271728{
17281729   address_space *space = cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM);
r9963r9964
17861787
17871788   state->tvdraw_data = 0;
17881789}
1790#endif
17891791
1790
17911792READ8_HANDLER( sms_store_cart_select_r )
17921793{
17931794   return 0xff;
src/mess/machine/pce.c
r9963r9964
8686static UINT8 pce_io_port_options;
8787
8888/* system RAM */
89#ifdef MESS
8990unsigned char *pce_user_ram;    /* scratch RAM at F8 */
91#else
92extern unsigned char *pce_user_ram;    /* scratch RAM at F8 */
93#endif
9094
9195/* CD Unit RAM */
9296UINT8 *pce_cd_ram;         /* 64KB RAM from a CD unit */
r9963r9964
178182#define JOY_CLOCK   0x01
179183#define JOY_RESET   0x02
180184
185#ifdef MESS
181186static int joystick_port_select;        /* internal index of joystick ports */
182187static int joystick_data_select;        /* which nibble of joystick data we want */
188#endif
183189
184190/* prototypes */
185191static void pce_cd_init( running_machine *machine );
r9963r9964
331337   }
332338   return 0;
333339}
334
340#ifdef MESS
335341DRIVER_INIT( pce )
336342{
337343   pce_io_port_options = PCE_JOY_SIG | CONST_SIG;
338344}
339
345#endif
340346DRIVER_INIT( tg16 )
341347{
342348   pce_io_port_options = TG_16_JOY_SIG | CONST_SIG;
r9963r9964
352358   pce_cd_init( machine );
353359}
354360
361#ifdef MESS
355362static UINT8 joy_6b_packet[5];
356363
357364MACHINE_RESET( pce )
r9963r9964
452459
453460   return (ret);
454461}
455
462#endif
456463NVRAM_HANDLER( pce )
457464{
458465   if (read_or_write)
src/mess/drivers/ng_aes.c
r9963r9964
121121   }
122122}
123123
124
124#ifdef MESS
125125void neogeo_set_display_position_interrupt_control( running_machine *machine, UINT16 data )
126126{
127127   neogeo_state *state = machine->driver_data<neogeo_state>();
r9963r9964
153153      adjust_display_position_interrupt_timer(space->machine);
154154   }
155155}
156#endif
156157
157
158158static void update_interrupts( running_machine *machine )
159159{
160160   neogeo_state *state = machine->driver_data<neogeo_state>();
r9963r9964
173173   }
174174}
175175
176
176#ifdef MESS
177177void neogeo_acknowledge_interrupt( running_machine *machine, UINT16 data )
178178{
179179   neogeo_state *state = machine->driver_data<neogeo_state>();
r9963r9964
187187
188188   update_interrupts(machine);
189189}
190#endif
190191
191
192192static TIMER_CALLBACK( display_position_interrupt_callback )
193193{
194194   neogeo_state *state = machine->driver_data<neogeo_state>();
r9963r9964
370370 *  Unmapped memory access
371371 *
372372 *************************************/
373
373#ifdef MESS
374374READ16_HANDLER( neogeo_unmapped_r )
375375{
376376   neogeo_state *state = space->machine->driver_data<neogeo_state>();
r9963r9964
391391
392392   return ret;
393393}
394#endif
394395
395396
396397
397
398398/*************************************
399399 *
400400 *  uPD4990A calendar chip
r9963r9964
640640   memory_set_bankptr(machine, NEOGEO_BANK_CARTRIDGE, &machine->region("maincpu")->base()[state->main_cpu_bank_address]);
641641}
642642
643
643#ifdef MESS
644644void neogeo_set_main_cpu_bank_address( address_space *space, UINT32 bank_address )
645645{
646646   neogeo_state *state = space->machine->driver_data<neogeo_state>();
r9963r9964
651651
652652   _set_main_cpu_bank_address(space->machine);
653653}
654#endif
654655
655
656656static WRITE16_HANDLER( main_cpu_bank_select_w )
657657{
658658   UINT32 bank_address;
src/mess/drivers/atari.c
r9963r9964
322322ADDRESS_MAP_END
323323
324324
325
325#ifdef MESS
326326int atari_input_disabled(void)
327327{
328328   return 0;
329329}
330#endif
330331
331
332332/**************************************************************
333333 *
334334 * Input ports

Previous 15994 Revisions Next


© 1998-2018 The MESS Team