src/mame/machine/n64.c
| r10200 | r10201 | |
| 33 | 33 | |
| 34 | 34 | READ32_HANDLER( n64_mi_reg_r ) |
| 35 | 35 | { |
| 36 | //printf("mi_reg_r: %08x\n", offset << 2); |
| 36 | 37 | switch (offset) |
| 37 | 38 | { |
| 38 | 39 | case 0x00/4: // MI_MODE_REG |
| r10200 | r10201 | |
| 57 | 58 | |
| 58 | 59 | WRITE32_HANDLER( n64_mi_reg_w ) |
| 59 | 60 | { |
| 61 | //printf("mi_reg_w: %08x = %08x & %08x\n", offset << 2, data, mem_mask); |
| 60 | 62 | switch (offset) |
| 61 | 63 | { |
| 62 | 64 | case 0x00/4: // MI_INIT_MODE_REG |
| r10200 | r10201 | |
| 340 | 342 | address_space *space = cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM); |
| 341 | 343 | int i, c; |
| 342 | 344 | |
| 343 | | if (sp_dma_length == 0) |
| 344 | | { |
| 345 | | return; |
| 346 | | } |
| 347 | | |
| 348 | 345 | sp_dma_length++; |
| 349 | 346 | if ((sp_dma_length & 7) != 0) |
| 350 | 347 | { |
| r10200 | r10201 | |
| 1357 | 1354 | if (pi_first_dma) |
| 1358 | 1355 | { |
| 1359 | 1356 | // TODO: CIC-6105 has different address... |
| 1360 | | space->write_dword(0x00000318, 0x400000); |
| 1357 | space->write_dword(0x00000318, 0x400000); // Switch to 0x800000 to let 6105 games see 8 megs... sometimes |
| 1361 | 1358 | space->write_dword(0x000003f0, 0x800000); |
| 1362 | 1359 | pi_first_dma = 0; |
| 1363 | 1360 | } |
| r10200 | r10201 | |
| 2016 | 2013 | |
| 2017 | 2014 | MACHINE_START( n64 ) |
| 2018 | 2015 | { |
| 2019 | | mips3drc_set_options(machine->device("maincpu"), MIPS3DRC_FASTEST_OPTIONS + MIPS3DRC_STRICT_VERIFY); |
| 2016 | mips3drc_set_options(machine->device("maincpu"), MIPS3DRC_COMPATIBLE_OPTIONS); |
| 2020 | 2017 | |
| 2021 | 2018 | /* configure fast RAM regions for DRC */ |
| 2022 | 2019 | mips3drc_add_fastram(machine->device("maincpu"), 0x00000000, 0x007fffff, FALSE, rdram); |
src/mame/video/n64.c
| r10200 | r10201 | |
| 100 | 100 | |
| 101 | 101 | INT32 hdiff = (n64_vi_hstart & 0x3ff) - ((n64_vi_hstart >> 16) & 0x3ff); |
| 102 | 102 | float hcoeff = ((float)(n64_vi_xscale & 0xfff) / (1 << 10)); |
| 103 | |
| 103 | 104 | UINT32 hres = ((float)hdiff * hcoeff); |
| 104 | 105 | INT32 invisiblewidth = n64_vi_width - hres; |
| 105 | 106 | |
| r10200 | r10201 | |
| 111 | 112 | { |
| 112 | 113 | return; |
| 113 | 114 | } |
| 115 | if(vcoeff < 0.0f || hcoeff < 0.0f) |
| 116 | { |
| 117 | return; |
| 118 | } |
| 114 | 119 | |
| 115 | 120 | if (hres > 640) // Needed by Top Gear Overdrive (E) |
| 116 | 121 | { |
| r10200 | r10201 | |
| 122 | 127 | |
| 123 | 128 | if (frame_buffer) |
| 124 | 129 | { |
| 125 | | for(int j = 0; j < vres; j++) |
| 130 | for(int j = 0; j < vres && j < bitmap->height; j++) |
| 126 | 131 | { |
| 127 | 132 | UINT32 *d = BITMAP_ADDR32(bitmap, j, 0); |
| 128 | 133 | |
| 129 | | for(int i = 0; i < hres; i++) |
| 134 | for(int i = 0; i < hres && i < bitmap->width; i++) |
| 130 | 135 | { |
| 131 | 136 | Color c; |
| 132 | 137 | //int r, g, b; |