| Previous | 199869 Revisions | Next |
| r22089 Monday 25th March, 2013 at 17:18:02 UTC by Fabio Priuli |
|---|
| another tiny cleanup. nw. |
| [src/mame/drivers] | segac2.c segas18.c |
| [src/mame/machine] | megadriv.c megavdp.c megavdp.h |
| r22088 | r22089 | |
|---|---|---|
| 2749 | 2749 | } |
| 2750 | 2750 | |
| 2751 | 2751 | |
| 2752 | ||
| 2753 | ||
| 2754 | ||
| 2755 | void megadriv_reset_vdp(running_machine &machine) | |
| 2756 | { | |
| 2757 | sega_genesis_vdp_device *vdp = machine.device<sega_genesis_vdp_device>("gen_vdp"); // yuck | |
| 2758 | vdp->device_reset_old(); | |
| 2759 | } | |
| 2760 | ||
| 2761 | ||
| 2762 | ||
| 2763 | 2752 | // called at the start of each scanline |
| 2764 | 2753 | TIMER_DEVICE_CALLBACK( megadriv_scanline_timer_callback ) |
| 2765 | 2754 | { |
| r22088 | r22089 | |
|---|---|---|
| 150 | 150 | typedef void (*genesis_vdp_lv4irqline_callback_func)(running_machine &machine, bool state); |
| 151 | 151 | |
| 152 | 152 | TIMER_DEVICE_CALLBACK( megadriv_scanline_timer_callback_alt_timing ); |
| 153 | extern void megadriv_reset_vdp(running_machine &machine); | |
| 154 | 153 | |
| 155 | ||
| 156 | 154 | UINT16 vdp_get_word_from_68k_mem_default(running_machine &machine, UINT32 source, address_space & space68k); |
| 157 | 155 | |
| 158 | 156 |
| r22088 | r22089 | |
|---|---|---|
| 900 | 900 | memset(m_megadrive_ram,0x00,0x10000); |
| 901 | 901 | } |
| 902 | 902 | |
| 903 | m | |
| 903 | m_vdp->device_reset_old(); | |
| 904 | 904 | |
| 905 | ||
| 906 | 905 | // if the system has a 32x, pause the extra CPUs until they are actually turned on |
| 907 | 906 | if (m_32x) |
| 908 | 907 | m_32x->pause_cpu(); |
| r22088 | r22089 | |
|---|---|---|
| 207 | 207 | { |
| 208 | 208 | segaic16_tilemap_reset(machine(), 0); |
| 209 | 209 | |
| 210 | m | |
| 210 | m_vdp->device_reset_old(); | |
| 211 | 211 | |
| 212 | 212 | // if we are running with a real live 8751, we need to boost the interleave at startup |
| 213 | 213 | if (m_mcu != NULL && m_mcu->type() == I8751) |
| r22088 | r22089 | |
|---|---|---|
| 119 | 119 | m_segac2_sp_pal_lookup[2] = 0x20; |
| 120 | 120 | m_segac2_sp_pal_lookup[3] = 0x30; |
| 121 | 121 | |
| 122 | m | |
| 122 | m_vdp->device_reset_old(); | |
| 123 | 123 | |
| 124 | 124 | /* determine how many sound banks */ |
| 125 | 125 | m_sound_banks = 0; |
| r22088 | r22089 | |
| 1262 | 1262 | return 0; |
| 1263 | 1263 | } |
| 1264 | 1264 | |
| 1265 | sega_genesis_vdp_device *vdp = m_vdp; | |
| 1266 | ||
| 1267 | 1265 | /* Copy our screen buffer here */ |
| 1268 | 1266 | for (int y = cliprect.min_y; y <= cliprect.max_y; y++) |
| 1269 | 1267 | { |
| 1270 | 1268 | UINT32* desty = &bitmap.pix32(y, 0); |
| 1271 | 1269 | UINT16* srcy; |
| 1272 | 1270 | |
| 1273 | srcy = vdp->m_render_line_raw; | |
| 1271 | srcy = m_vdp->m_render_line_raw; | |
| 1274 | 1272 | |
| 1275 | 1273 | for (int x = cliprect.min_x; x <= cliprect.max_x; x++) |
| 1276 | 1274 | { |
| Previous | 199869 Revisions | Next |