diff --git a/src/Makefile.mingw b/src/Makefile.mingw index d6a237e0f..55b0910e2 100644 --- a/src/Makefile.mingw +++ b/src/Makefile.mingw @@ -31,6 +31,7 @@ LIBS = -mwindows -lwinmm -lopenal.dll -lopenal -lddraw -ldinput8 -ldxguid -ld3d9 86Box.exe: $(OBJ) $(DBOBJ) $(SIDOBJ) $(SLIRPOBJ) $(CC) $(OBJ) $(DBOBJ) $(SIDOBJ) $(SLIRPOBJ) -o "86Box.exe" $(LIBS) + strip "86Box.exe" all : 86Box.exe diff --git a/src/disc_imd.c b/src/disc_imd.c index 966401309..53bb33d3e 100644 --- a/src/disc_imd.c +++ b/src/disc_imd.c @@ -580,9 +580,16 @@ void imd_seek(int drive, int track) id[2] = real_sector; id[3] = (n == 0xFF) ? n_map[actual_sector] : n; ssize = 128 << ((uint32_t) id[3]); - data = imd[drive].track_buffer[side] + track_buf_pos[side]; type = imd[drive].buffer[imd[drive].tracks[track][side].sector_data_offs[actual_sector]]; type = (type >> 1) & 7; + if (type & 1) + { + data = &(imd[drive].buffer[imd[drive].tracks[track][side].sector_data_offs[actual_sector] + 1]); + } + else + { + data = imd[drive].track_buffer[side] + track_buf_pos[side]; + } deleted = bad_crc = 0; if ((type == 2) || (type == 4)) deleted = 1; if ((type == 3) || (type == 4)) bad_crc = 1; @@ -607,12 +614,19 @@ void imd_seek(int drive, int track) ssize = 128 << ((uint32_t) id[3]); ordered_pos = imd[drive].xdf_ordered_pos[id[2]][side]; - data = imd[drive].track_buffer[side] + track_buf_pos[side]; type = imd[drive].buffer[imd[drive].tracks[track][side].sector_data_offs[ordered_pos]]; type = (type >> 1) & 7; deleted = bad_crc = 0; if ((type == 2) || (type == 4)) deleted = 1; if ((type == 3) || (type == 4)) bad_crc = 1; + if (type & 1) + { + data = &(imd[drive].buffer[imd[drive].tracks[track][side].sector_data_offs[ordered_pos] + 1]); + } + else + { + data = imd[drive].track_buffer[side] + track_buf_pos[side]; + } imd_sector_to_buffer(drive, track, side, data, ordered_pos, ssize); if (is_trackx) diff --git a/src/vid_svga.c b/src/vid_svga.c index 9a41776be..4c69bd9e0 100644 --- a/src/vid_svga.c +++ b/src/vid_svga.c @@ -587,13 +587,18 @@ void svga_recalctimings(svga_t *svga) extern int cyc_total; uint32_t svga_mask_addr(uint32_t addr, svga_t *svga) { + uint32_t limit_shift = 0; + if (!(svga->gdcreg[6] & 1)) + { + limit_shift = 1; + } if (svga->vrammask == (svga->vram_limit - 1)) { - return addr % svga->vram_limit; + return addr % (svga->vram_limit >> limit_shift); } else { - return addr & svga->vrammask; + return addr & (svga->vrammask >> limit_shift); } }