trunk/src/emu/ui/inputmap.c
| r243128 | r243129 | |
| 154 | 154 | void ui_menu_input_specific::populate() |
| 155 | 155 | { |
| 156 | 156 | input_item_data *itemlist = NULL; |
| 157 | ioport_field *field; |
| 158 | ioport_port *port; |
| 157 | 159 | int suborder[SEQ_TYPE_TOTAL]; |
| 158 | 160 | astring tempstring; |
| 159 | | int port_count = 0; |
| 160 | 161 | |
| 161 | 162 | /* create a mini lookup table for sort order based on sequence type */ |
| 162 | 163 | suborder[SEQ_TYPE_STANDARD] = 0; |
| r243128 | r243129 | |
| 164 | 165 | suborder[SEQ_TYPE_INCREMENT] = 2; |
| 165 | 166 | |
| 166 | 167 | /* iterate over the input ports and add menu items */ |
| 167 | | for (ioport_port *port = machine().ioport().first_port(); port != NULL; port = port->next()) |
| 168 | | { |
| 169 | | port_count++; |
| 170 | | for (ioport_field *field = port->first_field(); field != NULL; field = field->next()) |
| 168 | for (port = machine().ioport().first_port(); port != NULL; port = port->next()) |
| 169 | for (field = port->first_field(); field != NULL; field = field->next()) |
| 171 | 170 | { |
| 172 | 171 | const char *name = field->name(); |
| 173 | 172 | |
| r243128 | r243129 | |
| 183 | 182 | { |
| 184 | 183 | sortorder = (field->type() << 2) | (field->player() << 12); |
| 185 | 184 | if (strcmp(field->device().tag(), ":")) |
| 186 | | sortorder |= (port_count & 0xfff) * 0x10000; |
| 185 | sortorder |= 0x10000; |
| 187 | 186 | } |
| 188 | 187 | else |
| 189 | 188 | sortorder = field->type() | 0xf000; |
| r243128 | r243129 | |
| 213 | 212 | } |
| 214 | 213 | } |
| 215 | 214 | } |
| 216 | | } |
| 217 | 215 | |
| 218 | 216 | /* sort and populate the menu in a standard fashion */ |
| 219 | 217 | populate_and_sort(itemlist); |
trunk/src/emu/ui/sliders.c
| r243128 | r243129 | |
| 130 | 130 | |
| 131 | 131 | void ui_menu_sliders::populate() |
| 132 | 132 | { |
| 133 | const slider_state *curslider; |
| 133 | 134 | astring tempstring; |
| 134 | 135 | |
| 135 | | /* add UI sliders */ |
| 136 | | for (const slider_state *curslider = machine().ui().get_slider_list(); curslider != NULL; curslider = curslider->next) |
| 136 | /* add all sliders */ |
| 137 | for (curslider = machine().ui().get_slider_list(); curslider != NULL; curslider = curslider->next) |
| 137 | 138 | { |
| 138 | 139 | INT32 curval = (*curslider->update)(machine(), curslider->arg, &tempstring, SLIDER_NOCHANGE); |
| 139 | 140 | UINT32 flags = 0; |
| r243128 | r243129 | |
| 147 | 148 | break; |
| 148 | 149 | } |
| 149 | 150 | |
| 150 | | /* add OSD sliders */ |
| 151 | | for (const slider_state *curslider = (slider_state*)machine().osd().get_slider_list(); curslider != NULL; curslider = curslider->next) |
| 151 | /* add all sliders */ |
| 152 | for (curslider = (slider_state*)machine().osd().get_slider_list(); curslider != NULL; curslider = curslider->next) |
| 152 | 153 | { |
| 153 | 154 | INT32 curval = (*curslider->update)(machine(), curslider->arg, &tempstring, SLIDER_NOCHANGE); |
| 154 | 155 | UINT32 flags = 0; |
trunk/src/mame/video/gp9001.c
| r243128 | r243129 | |
| 141 | 141 | The alternative option of allowing sprites to render a priority level higher than tilemaps breaks at least the |
| 142 | 142 | 'Welcome to..' screen in Batrider after selecting your character. |
| 143 | 143 | |
| 144 | Batrider Gob-Robo boss however definitely requires SPRITES to still have 16 levels of priority against other |
| 145 | sprites, see http://mametesters.org/view.php?id=5832 |
| 146 | |
| 144 | 147 | It is unknown if the current solution breaks anything. The majority of titles don't make extensive use of the |
| 145 | 148 | priority system. |
| 146 | 149 | |
| 147 | 150 | */ |
| 148 | | #define GP9001_PRIMASK (0x000e) |
| 151 | #define GP9001_PRIMASK (0x000f) |
| 152 | #define GP9001_PRIMASK_TMAPS (0x000e) |
| 149 | 153 | |
| 150 | | |
| 151 | 154 | WRITE16_MEMBER( gp9001vdp_device::gp9001_bg_tmap_w ) |
| 152 | 155 | { |
| 153 | 156 | COMBINE_DATA(&m_vram_bg[offset]); |
| r243128 | r243129 | |
| 171 | 174 | AM_RANGE(0x0000, 0x0fff) AM_RAM_WRITE(gp9001_bg_tmap_w) AM_SHARE("vram_bg") |
| 172 | 175 | AM_RANGE(0x1000, 0x1fff) AM_RAM_WRITE(gp9001_fg_tmap_w) AM_SHARE("vram_fg") |
| 173 | 176 | AM_RANGE(0x2000, 0x2fff) AM_RAM_WRITE(gp9001_top_tmap_w) AM_SHARE("vram_top") |
| 174 | | AM_RANGE(0x3000, 0x37ff) AM_RAM AM_SHARE("spriteram") |
| 175 | | AM_RANGE(0x3800, 0x3fff) AM_RAM // sprite mirror? |
| 177 | AM_RANGE(0x3000, 0x37ff) AM_RAM AM_SHARE("spriteram") AM_MIRROR(0x0800) |
| 178 | // AM_RANGE(0x3800, 0x3fff) AM_RAM // sprite mirror? |
| 176 | 179 | ADDRESS_MAP_END |
| 177 | 180 | |
| 178 | 181 | |
| r243128 | r243129 | |
| 885 | 888 | int realx = (x+scrollx)&0x1ff; |
| 886 | 889 | |
| 887 | 890 | UINT16 pixdat = srcptr[realx]; |
| 888 | | UINT8 pixpri = ((pixdat & (GP9001_PRIMASK<<12))>>12); |
| 891 | UINT8 pixpri = ((pixdat & (GP9001_PRIMASK_TMAPS<<12))>>12); |
| 889 | 892 | |
| 890 | 893 | if (pri_enable[pixpri]) |
| 891 | 894 | { |
trunk/src/mess/drivers/gamate.c
| r243128 | r243129 | |
| 85 | 85 | emu_timer *timer1; |
| 86 | 86 | emu_timer *timer2; |
| 87 | 87 | UINT8 bank_multi; |
| 88 | | UINT8 *m_cart_ptr; |
| 89 | 88 | }; |
| 90 | 89 | |
| 91 | 90 | WRITE8_MEMBER( gamate_state::gamate_cart_protection_w ) |
| r243128 | r243129 | |
| 97 | 96 | card_protection.failed= card_protection.failed || ((card_protection.cartridge_byte&0x80)!=0) != ((data&4)!=0); |
| 98 | 97 | card_protection.bit_shifter++; |
| 99 | 98 | if (card_protection.bit_shifter>=8) { |
| 100 | | card_protection.cartridge_byte=m_cart_ptr[card_protection.address++]; |
| 99 | card_protection.cartridge_byte=m_cart->get_rom_base()[card_protection.address++]; |
| 101 | 100 | card_protection.bit_shifter=0; |
| 102 | 101 | } |
| 103 | 102 | break; |
| r243128 | r243129 | |
| 108 | 107 | |
| 109 | 108 | UINT8 ret=1; |
| 110 | 109 | if (card_protection.bit_shifter==7 && card_protection.unprotected) { |
| 111 | | ret=m_cart_ptr[bank_multi*0x4000]; |
| 110 | ret=m_cart->get_rom_base()[bank_multi*0x4000]; |
| 112 | 111 | } else { |
| 113 | 112 | card_protection.bit_shifter++; |
| 114 | 113 | if (card_protection.bit_shifter==8) { |
| r243128 | r243129 | |
| 133 | 132 | // writes 0x20 |
| 134 | 133 | card_protection.address=0x6005-0x6001; |
| 135 | 134 | card_protection.bit_shifter=0; |
| 136 | | card_protection.cartridge_byte=m_cart_ptr[card_protection.address++];//m_cart_rom[card_protection.address++]; |
| 135 | card_protection.cartridge_byte=m_cart->get_rom_base()[card_protection.address++];//m_cart_rom[card_protection.address++]; |
| 137 | 136 | card_protection.failed=false; |
| 138 | 137 | card_protection.unprotected=false; |
| 139 | 138 | } |
| r243128 | r243129 | |
| 173 | 172 | WRITE8_MEMBER( gamate_state::cart_bankswitchmulti_w ) |
| 174 | 173 | { |
| 175 | 174 | bank_multi=data; |
| 176 | | membank("bankmulti")->set_base(m_cart_ptr+0x4000*data+1); |
| 175 | membank("bankmulti")->set_base(m_cart->get_rom_base()+0x4000*data+1); |
| 177 | 176 | } |
| 178 | 177 | |
| 179 | 178 | WRITE8_MEMBER( gamate_state::cart_bankswitch_w ) |
| 180 | 179 | { |
| 181 | | membank("bank")->set_base(m_cart_ptr+0x4000*data); |
| 180 | membank("bank")->set_base(m_cart->get_rom_base()+0x4000*data); |
| 182 | 181 | } |
| 183 | 182 | |
| 184 | 183 | READ8_MEMBER( gamate_state::gamate_video_r ) |
| r243128 | r243129 | |
| 330 | 329 | |
| 331 | 330 | void gamate_state::machine_start() |
| 332 | 331 | { |
| 333 | | m_cart_ptr = memregion("maincpu")->base() + 0x6000; |
| 334 | 332 | if (m_cart->exists()) { |
| 335 | 333 | // m_maincpu->space(AS_PROGRAM).install_read_handler(0x6000, 0x6000, READ8_DELEGATE(gamate_state, gamate_cart_protection_r)); |
| 336 | | m_cart_ptr = m_cart->get_rom_base(); |
| 337 | 334 | membank("bankmulti")->set_base(m_cart->get_rom_base()+1); |
| 338 | 335 | membank("bank")->set_base(m_cart->get_rom_base()+0x4000); // bankswitched games in reality no offset |
| 339 | 336 | } |