Previous 199869 Revisions Next

r35279 Thursday 26th February, 2015 at 14:21:57 UTC by David Haywood
improvements to monkelf (bootleg of avspirit), now playable [iq_132]
[src/mame/drivers]megasys1.c
[src/mame/includes]megasys1.h
[src/mame/video]megasys1.c

trunk/src/mame/drivers/megasys1.c
r243790r243791
41044104   m_rom_maincpu[0x00744/2] = 0x4e71; // weird check, 0xe000e R is a port-based trap?
41054105
41064106   m_maincpu->space(AS_PROGRAM).install_read_handler(0xe0000, 0xe000f, read16_delegate(FUNC(megasys1_state::monkelf_input_r),this));
4107   m_maincpu->space(AS_PROGRAM).install_write_handler(0x44000, 0x443ff, write16_delegate(FUNC(megasys1_state::megasys1_vregs_monkelf_w),this));
4108
4109   // convert bootleg priority format to standard
4110   {
4111      int i;
4112      UINT8 *ROM = memregion("proms")->base();
4113
4114      for (i = 0x1fe; i >= 0; i -= 2) {
4115         ROM[i+0] = ROM[i+1] = (ROM[i/2] >> 4) & 0x0f;
4116      }
4117   }
4118
4119   megasys1_priority_create();
41074120}
41084121
41094122/*************************************
r243790r243791
41344147GAME( 1990, rodlandjb,rodland,  system_A,          rodland,  driver_device,  0,        ROT0,   "bootleg","Rod-Land (Japan bootleg)", 0 )
41354148GAME( 1991, avspirit, 0,        system_B,          avspirit, megasys1_state, avspirit, ROT0,   "Jaleco", "Avenging Spirit", 0 )
41364149GAME( 1990, phantasm, avspirit, system_A,          phantasm, megasys1_state, phantasm, ROT0,   "Jaleco", "Phantasm (Japan)", 0 )
4137GAME( 1990, monkelf,  avspirit, system_B,          avspirit, megasys1_state, monkelf,  ROT0,   "bootleg","Monky Elf (Korean bootleg of Avenging Spirit)", GAME_NOT_WORKING )
4150GAME( 1990, monkelf,  avspirit, system_B,          avspirit, megasys1_state, monkelf,  ROT0,   "bootleg","Monky Elf (Korean bootleg of Avenging Spirit)", 0 )
41384151GAME( 1991, edf,      0,        system_B,          edf,      megasys1_state, edf,      ROT0,   "Jaleco", "E.D.F. : Earth Defense Force", 0 )
41394152GAME( 1991, edfu,     edf,      system_B,          edf,      megasys1_state, edf,      ROT0,   "Jaleco", "E.D.F. : Earth Defense Force (North America)", 0 )
41404153GAME( 1991, edfbl,    edf,      system_Bbl,        edf,      megasys1_state, edfbl,    ROT0,   "bootleg","E.D.F. : Earth Defense Force (bootleg)", GAME_NO_SOUND )
trunk/src/mame/includes/megasys1.h
r243790r243791
102102   DECLARE_WRITE16_MEMBER(megasys1_scrollram_1_w);
103103   DECLARE_WRITE16_MEMBER(megasys1_scrollram_2_w);
104104   DECLARE_WRITE16_MEMBER(megasys1_vregs_A_w);
105   DECLARE_WRITE16_MEMBER(megasys1_vregs_monkelf_w);
105106   DECLARE_READ16_MEMBER(megasys1_vregs_C_r);
106107   DECLARE_WRITE16_MEMBER(megasys1_vregs_C_w);
107108   DECLARE_WRITE16_MEMBER(megasys1_vregs_D_w);
r243790r243791
145146   TIMER_DEVICE_CALLBACK_MEMBER(megasys1B_scanline);
146147   inline void scrollram_w(offs_t offset, UINT16 data, UINT16 mem_mask, int which);
147148   void create_tilemaps();
149   void megasys1_priority_create();
148150   void draw_sprites(screen_device &screen, bitmap_ind16 &bitmap,const rectangle &cliprect);
149151   void rodlandj_gfx_unmangle(const char *region);
150152   void jitsupro_gfx_unmangle(const char *region);
trunk/src/mame/video/megasys1.c
r243790r243791
447447
448448}
449449
450/* Used by monkelf */
451WRITE16_MEMBER(megasys1_state::megasys1_vregs_monkelf_w)
452{
453   UINT16 new_data = COMBINE_DATA(&m_vregs[offset]);
450454
455   switch (offset)
456   {
457      case 0x000/2   :    m_active_layers = new_data; break;
451458
459      case 0x008/2+0 :    m_scrollx[2] = new_data;    break;
460      case 0x008/2+1 :    m_scrolly[2] = new_data;    break;
461      case 0x008/2+2 :    megasys1_set_vreg_flag(2, new_data);        break;
452462
463      // code in routine $280 does this. protection?
464      case 0x200/2+0 :    m_scrollx[0] = new_data - (((new_data & 0x0f) > 0x0d) ? 0x10 : 0); break;
465      case 0x200/2+1 :    m_scrolly[0] = new_data;    break;
466      case 0x200/2+2 :    megasys1_set_vreg_flag(0, new_data);        break;
467
468      // code in routine $280 does this. protection?
469      case 0x208/2+0 :    m_scrollx[1] = new_data - (((new_data & 0x0f) > 0x0b) ? 0x10 : 0); break;
470      case 0x208/2+1 :    m_scrolly[1] = new_data;    break;
471      case 0x208/2+2 :    megasys1_set_vreg_flag(1, new_data);        break;
472
473      case 0x100/2   :    m_sprite_flag = new_data;       break;
474
475      case 0x300/2   :    m_screen_flag = new_data;
476                     if (m_audiocpu)
477                     {
478                        if (new_data & 0x10)
479                           m_audiocpu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
480                        else
481                           m_audiocpu->set_input_line(INPUT_LINE_RESET, CLEAR_LINE);
482                     }
483                     break;
484
485      case 0x308/2   :    soundlatch_word_w(space,0,new_data,0xffff);
486                     m_audiocpu->set_input_line(4, HOLD_LINE);
487                     break;
488
489      default      :  SHOW_WRITE_ERROR("vreg %04X <- %04X",offset*2,data);
490   }
491
492}
493
494
453495/* Used by MS1-C only */
454496READ16_MEMBER(megasys1_state::megasys1_vregs_C_r)
455497{
r243790r243791
739781    the bottom layer's opaque pens, but above its transparent
740782    pens.
741783*/
742
743PALETTE_INIT_MEMBER(megasys1_state,megasys1)
784void megasys1_state::megasys1_priority_create()
744785{
745786   const UINT8 *color_prom = memregion("proms")->base();
746787   int pri_code, offset, i, order;
r243790r243791
900941
901942}
902943
944PALETTE_INIT_MEMBER(megasys1_state,megasys1)
945{
946   megasys1_priority_create();
947}
903948
904949
905950
906951
952
907953/***************************************************************************
908954              Draw the game screen in the given bitmap_ind16.
909955***************************************************************************/


Previous 199869 Revisions Next


© 1997-2024 The MAME Team