trunk/src/mame/machine/archimds.c
| r29170 | r29171 | |
| 116 | 116 | address_space &space = m_maincpu->space(AS_PROGRAM); |
| 117 | 117 | static UINT8 *vram = m_region_vram->base(); |
| 118 | 118 | UINT32 size; |
| 119 | UINT32 m_vidc_ccur; |
| 119 | 120 | |
| 120 | 121 | size = m_vidc_vidend-m_vidc_vidstart+0x10; |
| 121 | 122 | |
| 122 | 123 | for(m_vidc_vidcur = 0;m_vidc_vidcur < size;m_vidc_vidcur++) |
| 123 | 124 | vram[m_vidc_vidcur] = (space.read_byte(m_vidc_vidstart+m_vidc_vidcur)); |
| 124 | 125 | |
| 126 | size = m_vidc_vidend-m_vidc_vidstart+0x10; |
| 127 | |
| 128 | for(m_vidc_ccur = 0;m_vidc_ccur < 0x200;m_vidc_ccur++) |
| 129 | m_cursor_vram[m_vidc_ccur] = (space.read_byte(m_vidc_cinit+m_vidc_ccur)); |
| 130 | |
| 125 | 131 | if(m_video_dma_on) |
| 126 | 132 | m_vid_timer->adjust(m_screen->time_until_pos(m_vidc_regs[0xb4])); |
| 127 | 133 | else |
| r29170 | r29171 | |
| 943 | 949 | //printf("MEMC: VIDEND %08x\n",m_vidc_vidend); |
| 944 | 950 | break; |
| 945 | 951 | |
| 952 | case 3: /* cursor init */ |
| 953 | m_vidc_cinit = 0x2000000 | (((data>>2)&0x7fff)*16); |
| 954 | //printf("MEMC: CURSOR %08x\n",((data>>2)&0x7fff)*16); |
| 955 | break; |
| 956 | |
| 946 | 957 | case 4: /* sound start */ |
| 947 | 958 | //logerror("MEMC: SNDSTART %08x\n",data); |
| 948 | 959 | archimedes_clear_irq_b(ARCHIMEDES_IRQB_SOUND_EMPTY); |
trunk/src/mame/includes/archimds.h
| r29170 | r29171 | |
| 81 | 81 | UINT8 m_i2c_clk; |
| 82 | 82 | INT16 m_memc_pages[0x2000]; // the logical RAM area is 32 megs, and the smallest page size is 4k |
| 83 | 83 | UINT32 m_vidc_regs[256]; |
| 84 | UINT8 m_cursor_vram[0x200]; |
| 84 | 85 | UINT8 m_ioc_regs[0x80/4]; |
| 85 | 86 | UINT8 m_vidc_bpp_mode; |
| 86 | 87 | UINT8 m_vidc_interlace; |
| r29170 | r29171 | |
| 120 | 121 | UINT32 m_memc_pagesize; |
| 121 | 122 | int m_memc_latchrom; |
| 122 | 123 | UINT32 m_ioc_timercnt[4], m_ioc_timerout[4]; |
| 123 | | UINT32 m_vidc_vidstart, m_vidc_vidend, m_vidc_vidinit, m_vidc_vidcur; |
| 124 | UINT32 m_vidc_vidstart, m_vidc_vidend, m_vidc_vidinit, m_vidc_vidcur,m_vidc_cinit; |
| 124 | 125 | UINT32 m_vidc_sndstart, m_vidc_sndend, m_vidc_sndcur; |
| 125 | 126 | UINT8 m_video_dma_on,m_audio_dma_on; |
| 126 | 127 | UINT8 m_vidc_pixel_clk; |
trunk/src/mame/video/archimds.c
| r29170 | r29171 | |
| 85 | 85 | { |
| 86 | 86 | pen = vram[count]; |
| 87 | 87 | |
| 88 | | res_x = x+xstart; |
| 89 | | res_y = (y+ystart)*(m_vidc_interlace+1); |
| 90 | | |
| 91 | 88 | for(xi=0;xi<2;xi++) |
| 92 | 89 | { |
| 93 | 90 | res_x = x+xi+xstart; |
| r29170 | r29171 | |
| 145 | 142 | popmessage("Unemulated bpp mode %02x, contact MAME/MESSdev",m_vidc_bpp_mode); |
| 146 | 143 | break; |
| 147 | 144 | } |
| 145 | |
| 146 | |
| 147 | if(0) |
| 148 | { |
| 149 | count = 0; |
| 150 | for(y=0;y<16;y++) |
| 151 | { |
| 152 | for(x=0;x<32;x+=4) |
| 153 | { |
| 154 | for(xi=0;xi<4;xi++) |
| 155 | { |
| 156 | UINT8 cursor_dot; |
| 157 | pen = m_cursor_vram[count]; |
| 158 | |
| 159 | res_x = x+xi+xstart; |
| 160 | res_y = (y+ystart)*(m_vidc_interlace+1); |
| 161 | |
| 162 | cursor_dot = ((pen>>(xi*2))&0x3); |
| 163 | |
| 164 | if(cursor_dot) |
| 165 | { |
| 166 | if(m_vidc_interlace) |
| 167 | { |
| 168 | if (cliprect.contains(res_x, res_y) && (res_x) <= xend && (res_y) <= yend) |
| 169 | bitmap.pix32(res_y, res_x) = m_palette->pen(cursor_dot+0x10); |
| 170 | if (cliprect.contains(res_x, res_y) && (res_x) <= xend && (res_y+1) <= yend) |
| 171 | bitmap.pix32(res_y+1, res_x) = m_palette->pen(cursor_dot+0x10); |
| 172 | } |
| 173 | else |
| 174 | { |
| 175 | if (cliprect.contains(res_x, res_y) && (res_x) <= xend && (res_y) <= yend) |
| 176 | bitmap.pix32(res_y, res_x) = m_palette->pen(cursor_dot+0x10); |
| 177 | } |
| 178 | } |
| 179 | } |
| 180 | |
| 181 | count++; |
| 182 | } |
| 183 | } |
| 184 | } |
| 148 | 185 | } |
| 149 | 186 | |
| 187 | |
| 188 | |
| 150 | 189 | return 0; |
| 151 | 190 | } |