From 5309cc042a63c29188a493b8ffe08a28e9441d04 Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Sun, 27 May 2018 05:00:22 +1000 Subject: [PATCH 01/11] cherry-pick this line (nw) --- src/mame/drivers/fastfred.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mame/drivers/fastfred.cpp b/src/mame/drivers/fastfred.cpp index 8ee6b93d0bb..7fd738761c4 100644 --- a/src/mame/drivers/fastfred.cpp +++ b/src/mame/drivers/fastfred.cpp @@ -24,6 +24,7 @@ void fastfred_state::machine_start() { + galaxold_state::machine_start(); save_item(NAME(m_charbank)); save_item(NAME(m_colorbank)); save_item(NAME(m_nmi_mask)); From 034ba66e3e8c8615a2550524f0d674cb8f9e5b92 Mon Sep 17 00:00:00 2001 From: Olivier Galibert Date: Wed, 23 May 2018 07:04:22 +0200 Subject: [PATCH 02/11] Floppy robustification, better bitstream handling [John Keoni Morris, Peter Ferrie, Olivier Galibert] --- src/devices/imagedev/floppy.cpp | 22 ++++++++-------------- src/lib/formats/flopimg.cpp | 25 +++++++++++++++---------- 2 files changed, 23 insertions(+), 24 deletions(-) diff --git a/src/devices/imagedev/floppy.cpp b/src/devices/imagedev/floppy.cpp index 5ef5668b741..a18308b5f36 100644 --- a/src/devices/imagedev/floppy.cpp +++ b/src/devices/imagedev/floppy.cpp @@ -771,9 +771,10 @@ attotime floppy_image_device::get_next_index_time(std::vector &buf, in { uint32_t next_position; int cells = buf.size(); - if(index+delta < cells) + if(index+delta < cells) { next_position = buf[index+delta] & floppy_image::TIME_MASK; - else { + + } else { if((buf[cells-1]^buf[0]) & floppy_image::MG_MASK) delta--; index = index + delta - cells + 1; @@ -788,14 +789,6 @@ attotime floppy_image_device::get_next_transition(const attotime &from_when) if(!image || mon) return attotime::never; - // If the drive is still spinning up, pretend that no transitions will come - // TODO: Implement a proper spin-up ramp for transition times, also in order - // to cover potential copy protection measures that have direct device - // access (mz) - // MORE TODO: this breaks the tandy2k and pcjr. needs investigation. - //if (ready_counter > 0) - // return attotime::never; - std::vector &buf = image->get_buffer(cyl, ss, subcyl); uint32_t cells = buf.size(); if(cells <= 1) @@ -809,10 +802,11 @@ attotime floppy_image_device::get_next_transition(const attotime &from_when) if(index == -1) return attotime::never; - attotime result = get_next_index_time(buf, index, 1, base); - if(result > from_when) - return result; - return get_next_index_time(buf, index, 2, base); + for(unsigned int i=1;; i++) { + attotime result = get_next_index_time(buf, index, i, base); + if(result > from_when) + return result; + } } void floppy_image_device::write_flux(const attotime &start, const attotime &end, int transition_count, const attotime *transitions) diff --git a/src/lib/formats/flopimg.cpp b/src/lib/formats/flopimg.cpp index 4ffe3e720ad..e6890ea7af3 100644 --- a/src/lib/formats/flopimg.cpp +++ b/src/lib/formats/flopimg.cpp @@ -1681,9 +1681,6 @@ void floppy_image_format_t::normalize_times(std::vector &buffer) void floppy_image_format_t::generate_track_from_bitstream(int track, int head, const uint8_t *trackbuf, int track_size, floppy_image *image, int subtrack, int splice) { - if(splice >= track_size) - splice = 0; - std::vector &dest = image->get_buffer(track, head, subtrack); dest.clear(); @@ -1691,24 +1688,32 @@ void floppy_image_format_t::generate_track_from_bitstream(int track, int head, c for(int i=0; i != track_size; i++) if(trackbuf[i >> 3] & (0x80 >> (i & 7))) inversions++; - int invert_splice = inversions & 1 ? splice : -1; + bool need_flux = inversions & 1; uint32_t cbit = floppy_image::MG_A; uint32_t count = 0; for(int i=0; i != track_size; i++) - if((i == invert_splice) ^ !!(trackbuf[i >> 3] & (0x80 >> (i & 7)))) { - dest.push_back(cbit | (count+1)); + if(trackbuf[i >> 3] & (0x80 >> (i & 7))) { + dest.push_back(cbit | (count+2)); cbit = cbit == floppy_image::MG_A ? floppy_image::MG_B : floppy_image::MG_A; - count = 1; + if(need_flux) { + dest.push_back(cbit | 1); + cbit = cbit == floppy_image::MG_A ? floppy_image::MG_B : floppy_image::MG_A; + count = 1; + } else + count = 2; } else - count += 2; + count += 4; if(count) dest.push_back(cbit | count); normalize_times(dest); - int splpos = uint64_t(200000000) * splice / track_size; - image->set_write_splice_position(track, head, splpos, subtrack); + + if(splice >= 0 || splice < track_size) { + int splpos = uint64_t(200000000) * splice / track_size; + image->set_write_splice_position(track, head, splpos, subtrack); + } } void floppy_image_format_t::generate_track_from_levels(int track, int head, std::vector &trackbuf, int splice_pos, floppy_image *image) From 1253922938683d60e5375c51065f8952f0d8c46b Mon Sep 17 00:00:00 2001 From: Olivier Galibert Date: Sat, 26 May 2018 22:39:50 +0200 Subject: [PATCH 03/11] Forgot the comment (nw) --- src/lib/formats/flopimg.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lib/formats/flopimg.cpp b/src/lib/formats/flopimg.cpp index e6890ea7af3..3a89cb93016 100644 --- a/src/lib/formats/flopimg.cpp +++ b/src/lib/formats/flopimg.cpp @@ -1684,6 +1684,10 @@ void floppy_image_format_t::generate_track_from_bitstream(int track, int head, c std::vector &dest = image->get_buffer(track, head, subtrack); dest.clear(); + // If the bitstream has an odd number of inversions, one needs to be added. + // Put in in the middle of the half window after the center inversion, where + // any fdc ignores it. + int inversions = 0; for(int i=0; i != track_size; i++) if(trackbuf[i >> 3] & (0x80 >> (i & 7))) From f1465f95396d975380eaff4875e70d5ac1b70878 Mon Sep 17 00:00:00 2001 From: Olivier Galibert Date: Sat, 26 May 2018 23:09:56 +0200 Subject: [PATCH 04/11] Oops (nw) --- src/lib/formats/flopimg.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/formats/flopimg.cpp b/src/lib/formats/flopimg.cpp index 3a89cb93016..3d05ec38d03 100644 --- a/src/lib/formats/flopimg.cpp +++ b/src/lib/formats/flopimg.cpp @@ -1701,6 +1701,7 @@ void floppy_image_format_t::generate_track_from_bitstream(int track, int head, c dest.push_back(cbit | (count+2)); cbit = cbit == floppy_image::MG_A ? floppy_image::MG_B : floppy_image::MG_A; if(need_flux) { + need_flux = false; dest.push_back(cbit | 1); cbit = cbit == floppy_image::MG_A ? floppy_image::MG_B : floppy_image::MG_A; count = 1; From 0fe30e8cf264f41194bc2ae5c2ef9802ad3f3ff5 Mon Sep 17 00:00:00 2001 From: angelosa Date: Sat, 26 May 2018 23:38:52 +0200 Subject: [PATCH 05/11] tatsumi.cpp: improved road colors in Cycle Warriors [Angelo Salese] --- src/mame/drivers/tatsumi.cpp | 4 +-- src/mame/includes/tatsumi.h | 4 ++- src/mame/video/tatsumi.cpp | 53 ++++++++++++++++++++++++------------ 3 files changed, 41 insertions(+), 20 deletions(-) diff --git a/src/mame/drivers/tatsumi.cpp b/src/mame/drivers/tatsumi.cpp index 2db25057156..badf319fe19 100644 --- a/src/mame/drivers/tatsumi.cpp +++ b/src/mame/drivers/tatsumi.cpp @@ -635,8 +635,8 @@ static INPUT_PORTS_START( cyclwarr ) PORT_DIPNAME( 0x04, 0x04, "Ticket Dispenser" ) PORT_DIPLOCATION("SW2:3") PORT_DIPSETTING( 0x04, "10000" ) PORT_DIPSETTING( 0x00, "15000" ) - PORT_DIPNAME( 0x18, 0x00, "Machine Type" ) PORT_DIPLOCATION("SW2:4,5") - PORT_DIPSETTING( 0x00, "2 Players" ) + PORT_DIPNAME( 0x18, 0x08, "Machine Type" ) PORT_DIPLOCATION("SW2:4,5") +// PORT_DIPSETTING( 0x00, "2 Players" ) // same as 4 players but text layout is 2p (invalid setting) PORT_DIPSETTING( 0x08, "2 Players" ) PORT_DIPSETTING( 0x10, "3 Players" ) PORT_DIPSETTING( 0x18, "4 Players" ) diff --git a/src/mame/includes/tatsumi.h b/src/mame/includes/tatsumi.h index 9380a6fc62e..186ed7d7029 100644 --- a/src/mame/includes/tatsumi.h +++ b/src/mame/includes/tatsumi.h @@ -194,6 +194,7 @@ public: void init_cyclwarr(); template TILE_GET_INFO_MEMBER(get_tile_info_bigfight); + template TILE_GET_INFO_MEMBER(get_tile_info_cyclwarr_road); DECLARE_VIDEO_START(cyclwarr); DECLARE_VIDEO_START(bigfight); uint32_t screen_update_cyclwarr(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); @@ -222,7 +223,8 @@ private: uint16_t m_bigfight_a40000[2]; uint16_t m_bigfight_bank; uint16_t m_bigfight_last_bank; + uint16_t m_cyclwarr_color_bank; void tile_expand(); - void draw_bg(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect, tilemap_t *src, const uint16_t* scrollx, const uint16_t* scrolly, int xscroll_offset, int yscroll_offset, bool rowscroll_enable); + void draw_bg(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect, tilemap_t *src, const uint16_t* scrollx, const uint16_t* scrolly, int xscroll_offset, int yscroll_offset, bool rowscroll_enable, bool is_road); }; diff --git a/src/mame/video/tatsumi.cpp b/src/mame/video/tatsumi.cpp index 58b18864d2d..3c2e8931a4a 100644 --- a/src/mame/video/tatsumi.cpp +++ b/src/mame/video/tatsumi.cpp @@ -87,6 +87,17 @@ TILE_GET_INFO_MEMBER(cyclwarr_state::get_tile_info_bigfight) tileinfo.mask_data = &m_mask[((tile&0x3ff)|(bank<<10))<<3]; } +template +TILE_GET_INFO_MEMBER(cyclwarr_state::get_tile_info_cyclwarr_road) +{ + int tile=m_cyclwarr_videoram[Bank][(tile_index+0x400)&0x7fff]; + int bank = (m_bigfight_a40000[0] >> (((tile&0xc00)>>10)*4))&0xf; + SET_TILE_INFO_MEMBER(1,(tile&0x3ff)|(bank<<10),((tile>>12)&0xf) | m_cyclwarr_color_bank,0); + // TODO: enables transparent pen on sideways + tileinfo.mask_data = &m_mask[((tile&0x3ff)|(bank<<10))<<3]; +} + + /********************************************************************/ void cyclwarr_state::tile_expand() @@ -124,7 +135,7 @@ void cyclwarr_state::tile_expand() c0base += gx0->rowbytes(); } } - + gx0->set_raw_layout(srcdata, gx0->width(), gx0->height(), gx0->elements(), 8 * gx0->width(), 8 * gx0->width() * gx0->height()); gx0->set_granularity(256); } @@ -156,11 +167,10 @@ VIDEO_START_MEMBER(cyclwarr_state,cyclwarr) { tile_expand(); m_layer[0] = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(cyclwarr_state::get_tile_info_bigfight<0>),this),TILEMAP_SCAN_ROWS,8,8,64,512); - //m_layer[1] = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(cyclwarr_state::get_tile_info_bigfight<0>),this),TILEMAP_SCAN_ROWS,8,8,64,512); - m_layer[1] = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(cyclwarr_state::get_tile_info_bigfight<0>),this),TILEMAP_SCAN_ROWS,8,8,128,256); + m_layer[1] = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(cyclwarr_state::get_tile_info_cyclwarr_road<0>),this),TILEMAP_SCAN_ROWS,8,8,128,256); m_layer[2] = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(cyclwarr_state::get_tile_info_bigfight<1>),this),TILEMAP_SCAN_ROWS,8,8,64,512); m_layer[3] = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(cyclwarr_state::get_tile_info_bigfight<1>),this),TILEMAP_SCAN_ROWS,8,8,64,512); - + m_shadow_pen_array = make_unique_clear(8192); } @@ -900,7 +910,7 @@ void tatsumi_state::update_cluts(int fake_palette_offset, int object_base, int l /**********************************************************************/ // TODO: rowscroll_enable might be selectable somehow -void cyclwarr_state::draw_bg(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect, tilemap_t *src, const uint16_t* scrollx, const uint16_t* scrolly, int xscroll_offset, int yscroll_offset, bool rowscroll_enable) +void cyclwarr_state::draw_bg(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect, tilemap_t *src, const uint16_t* scrollx, const uint16_t* scrolly, int xscroll_offset, int yscroll_offset, bool rowscroll_enable, bool is_road) { rectangle clip; clip.min_x = cliprect.min_x; @@ -908,8 +918,17 @@ void cyclwarr_state::draw_bg(screen_device &screen, bitmap_rgb32 &bitmap, const for (int y=cliprect.min_y; y<=cliprect.max_y; y++) { clip.min_y = clip.max_y = y; - int src_x = scrollx[rowscroll_enable ? y : 0] + xscroll_offset; - int src_y = scrolly[rowscroll_enable ? y : 0] + yscroll_offset; + int y_base = rowscroll_enable ? y : 0; + int src_x = scrollx[y_base] + xscroll_offset; + int src_y = scrolly[y_base] + yscroll_offset; + // special handling for cycle warriors road: it reads in scrolly table bits 15-13 an + // additional tile color bank and per scanline. + if(is_road == true && scrolly[y_base] & 0x8000) + { + m_cyclwarr_color_bank = (scrolly[y_base] >> 13) & 3; + src->mark_all_dirty(); + } + src->set_scrollx(0,src_x); src->set_scrolly(0,src_y); src->draw(screen, bitmap, clip, 0, 0); @@ -1029,14 +1048,14 @@ uint32_t cyclwarr_state::screen_update_cyclwarr(screen_device &screen, bitmap_rg } bitmap.fill(m_palette->pen(0), cliprect); - - draw_bg(screen, bitmap, cliprect, m_layer[3], &m_cyclwarr_videoram[1][0x000], &m_cyclwarr_videoram[1][0x100], 8, -0x80,false); - draw_bg(screen, bitmap, cliprect, m_layer[2], &m_cyclwarr_videoram[1][0x200], &m_cyclwarr_videoram[1][0x300], 8, -0x80,false); - draw_bg(screen, bitmap, cliprect, m_layer[1], &m_cyclwarr_videoram[0][0x000], &m_cyclwarr_videoram[0][0x100], 8, -0x40,true); + + draw_bg(screen, bitmap, cliprect, m_layer[3], &m_cyclwarr_videoram[1][0x000], &m_cyclwarr_videoram[1][0x100], 8, -0x80,false, false); + draw_bg(screen, bitmap, cliprect, m_layer[2], &m_cyclwarr_videoram[1][0x200], &m_cyclwarr_videoram[1][0x300], 8, -0x80,false, false); + draw_bg(screen, bitmap, cliprect, m_layer[1], &m_cyclwarr_videoram[0][0x000], &m_cyclwarr_videoram[0][0x100], 8, -0x40,true, true); update_cluts(8192, 4096, 8192); draw_sprites(bitmap,cliprect,0,(m_sprite_control_ram[0xe0]&0x1000) ? 0x1000 : 0); - draw_bg(screen, bitmap, cliprect, m_layer[0], &m_cyclwarr_videoram[0][0x200], &m_cyclwarr_videoram[0][0x300], 0x10, -0x80,false); - + draw_bg(screen, bitmap, cliprect, m_layer[0], &m_cyclwarr_videoram[0][0x200], &m_cyclwarr_videoram[0][0x300], 0x10, -0x80,false, false); + return 0; } @@ -1053,12 +1072,12 @@ uint32_t cyclwarr_state::screen_update_bigfight(screen_device &screen, bitmap_rg } bitmap.fill(m_palette->pen(0), cliprect); - draw_bg(screen, bitmap, cliprect, m_layer[3], &m_cyclwarr_videoram[1][0x000], &m_cyclwarr_videoram[1][0x100], 8, -0x40,true); - draw_bg(screen, bitmap, cliprect, m_layer[2], &m_cyclwarr_videoram[1][0x200], &m_cyclwarr_videoram[1][0x300], 8, -0x40,true); - draw_bg(screen, bitmap, cliprect, m_layer[1], &m_cyclwarr_videoram[0][0x000], &m_cyclwarr_videoram[0][0x100], 8, -0x40,true); + draw_bg(screen, bitmap, cliprect, m_layer[3], &m_cyclwarr_videoram[1][0x000], &m_cyclwarr_videoram[1][0x100], 8, -0x40,true, false); + draw_bg(screen, bitmap, cliprect, m_layer[2], &m_cyclwarr_videoram[1][0x200], &m_cyclwarr_videoram[1][0x300], 8, -0x40,true, false); + draw_bg(screen, bitmap, cliprect, m_layer[1], &m_cyclwarr_videoram[0][0x000], &m_cyclwarr_videoram[0][0x100], 8, -0x40,true, false); update_cluts(8192, 4096, 8192); draw_sprites(bitmap,cliprect,0,(m_sprite_control_ram[0xe0]&0x1000) ? 0x1000 : 0); - draw_bg(screen, bitmap, cliprect, m_layer[0], &m_cyclwarr_videoram[0][0x200], &m_cyclwarr_videoram[0][0x300], 0x10, -0x40,true); + draw_bg(screen, bitmap, cliprect, m_layer[0], &m_cyclwarr_videoram[0][0x200], &m_cyclwarr_videoram[0][0x300], 0x10, -0x40,true, false); return 0; } From c372746c618fcfbd2d7684290a38af93eee2fd8a Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Sun, 27 May 2018 10:25:02 +1000 Subject: [PATCH 06/11] srcclean (nw) --- src/mame/drivers/tatsumi.cpp | 2 +- src/mame/video/tatsumi.cpp | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/mame/drivers/tatsumi.cpp b/src/mame/drivers/tatsumi.cpp index badf319fe19..ca4215651e4 100644 --- a/src/mame/drivers/tatsumi.cpp +++ b/src/mame/drivers/tatsumi.cpp @@ -636,7 +636,7 @@ static INPUT_PORTS_START( cyclwarr ) PORT_DIPSETTING( 0x04, "10000" ) PORT_DIPSETTING( 0x00, "15000" ) PORT_DIPNAME( 0x18, 0x08, "Machine Type" ) PORT_DIPLOCATION("SW2:4,5") -// PORT_DIPSETTING( 0x00, "2 Players" ) // same as 4 players but text layout is 2p (invalid setting) +// PORT_DIPSETTING( 0x00, "2 Players" ) // same as 4 players but text layout is 2p (invalid setting) PORT_DIPSETTING( 0x08, "2 Players" ) PORT_DIPSETTING( 0x10, "3 Players" ) PORT_DIPSETTING( 0x18, "4 Players" ) diff --git a/src/mame/video/tatsumi.cpp b/src/mame/video/tatsumi.cpp index 3c2e8931a4a..ef3f330c1a9 100644 --- a/src/mame/video/tatsumi.cpp +++ b/src/mame/video/tatsumi.cpp @@ -89,11 +89,11 @@ TILE_GET_INFO_MEMBER(cyclwarr_state::get_tile_info_bigfight) template TILE_GET_INFO_MEMBER(cyclwarr_state::get_tile_info_cyclwarr_road) -{ +{ int tile=m_cyclwarr_videoram[Bank][(tile_index+0x400)&0x7fff]; int bank = (m_bigfight_a40000[0] >> (((tile&0xc00)>>10)*4))&0xf; SET_TILE_INFO_MEMBER(1,(tile&0x3ff)|(bank<<10),((tile>>12)&0xf) | m_cyclwarr_color_bank,0); - // TODO: enables transparent pen on sideways + // TODO: enables transparent pen on sideways tileinfo.mask_data = &m_mask[((tile&0x3ff)|(bank<<10))<<3]; } @@ -135,7 +135,7 @@ void cyclwarr_state::tile_expand() c0base += gx0->rowbytes(); } } - + gx0->set_raw_layout(srcdata, gx0->width(), gx0->height(), gx0->elements(), 8 * gx0->width(), 8 * gx0->width() * gx0->height()); gx0->set_granularity(256); } @@ -170,7 +170,7 @@ VIDEO_START_MEMBER(cyclwarr_state,cyclwarr) m_layer[1] = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(cyclwarr_state::get_tile_info_cyclwarr_road<0>),this),TILEMAP_SCAN_ROWS,8,8,128,256); m_layer[2] = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(cyclwarr_state::get_tile_info_bigfight<1>),this),TILEMAP_SCAN_ROWS,8,8,64,512); m_layer[3] = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(cyclwarr_state::get_tile_info_bigfight<1>),this),TILEMAP_SCAN_ROWS,8,8,64,512); - + m_shadow_pen_array = make_unique_clear(8192); } @@ -921,14 +921,14 @@ void cyclwarr_state::draw_bg(screen_device &screen, bitmap_rgb32 &bitmap, const int y_base = rowscroll_enable ? y : 0; int src_x = scrollx[y_base] + xscroll_offset; int src_y = scrolly[y_base] + yscroll_offset; - // special handling for cycle warriors road: it reads in scrolly table bits 15-13 an + // special handling for cycle warriors road: it reads in scrolly table bits 15-13 an // additional tile color bank and per scanline. if(is_road == true && scrolly[y_base] & 0x8000) { m_cyclwarr_color_bank = (scrolly[y_base] >> 13) & 3; src->mark_all_dirty(); } - + src->set_scrollx(0,src_x); src->set_scrolly(0,src_y); src->draw(screen, bitmap, clip, 0, 0); @@ -1048,14 +1048,14 @@ uint32_t cyclwarr_state::screen_update_cyclwarr(screen_device &screen, bitmap_rg } bitmap.fill(m_palette->pen(0), cliprect); - + draw_bg(screen, bitmap, cliprect, m_layer[3], &m_cyclwarr_videoram[1][0x000], &m_cyclwarr_videoram[1][0x100], 8, -0x80,false, false); draw_bg(screen, bitmap, cliprect, m_layer[2], &m_cyclwarr_videoram[1][0x200], &m_cyclwarr_videoram[1][0x300], 8, -0x80,false, false); draw_bg(screen, bitmap, cliprect, m_layer[1], &m_cyclwarr_videoram[0][0x000], &m_cyclwarr_videoram[0][0x100], 8, -0x40,true, true); update_cluts(8192, 4096, 8192); draw_sprites(bitmap,cliprect,0,(m_sprite_control_ram[0xe0]&0x1000) ? 0x1000 : 0); draw_bg(screen, bitmap, cliprect, m_layer[0], &m_cyclwarr_videoram[0][0x200], &m_cyclwarr_videoram[0][0x300], 0x10, -0x80,false, false); - + return 0; } From a1ecd03c9d6e0e44c301618290629df08dc76ceb Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Sun, 27 May 2018 22:08:35 +1000 Subject: [PATCH 07/11] Fix softfloat3 build with MSVC 32-bit. Apparenly it's all-or-nothing with built-in leading zero count. (nw) --- 3rdparty/softfloat3/build/MAME/platform.h | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/3rdparty/softfloat3/build/MAME/platform.h b/3rdparty/softfloat3/build/MAME/platform.h index 441fdc8d05a..96fc81e348e 100644 --- a/3rdparty/softfloat3/build/MAME/platform.h +++ b/3rdparty/softfloat3/build/MAME/platform.h @@ -54,21 +54,28 @@ Softfloat 3 MAME modifications /*---------------------------------------------------------------------------- *----------------------------------------------------------------------------*/ -// true for GCC and Clang on Intel and ARM, and MSVC on Intel. -#define SOFTFLOAT_BUILTIN_CLZ 1 +#if defined(_MSC_VER) -#ifdef _MSC_VER #define _INC_MALLOC 0 #include // MSVC has __lzcnt16 as well, but opts-GCC.h expects __lzcnt for uint16_t and uint32_t +#if defined(_M_IX86) || defined(_M_AMD64) #define __builtin_clz __lzcnt +#endif // defined(_M_IX86) || defined(_M_AMD64) +#if defined(_M_AMD64) +#define SOFTFLOAT_BUILTIN_CLZ 1 #define __builtin_clzll __lzcnt64 -#else +#endif // defined(_M_AMD64) + +#else // defined(_MSC_VER) + +// true for GCC and Clang on Intel and ARM, and MSVC on Intel. +#define SOFTFLOAT_BUILTIN_CLZ 1 #if defined(PTR64) #define SOFTFLOAT_INTRINSIC_INT128 1 -#endif -#endif +#endif // defined(PTR64) + +#endif // defined(_MSC_VER) #include "opts-GCC.h" - From 8861b163182acbc978af375e5bc782a84275a659 Mon Sep 17 00:00:00 2001 From: AJR Date: Sun, 27 May 2018 11:28:05 -0400 Subject: [PATCH 08/11] MT 6982 (nw) --- src/mame/drivers/coco12.cpp | 1 + src/mame/drivers/tandy1t.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mame/drivers/coco12.cpp b/src/mame/drivers/coco12.cpp index e03146e657a..e736e2c99d5 100644 --- a/src/mame/drivers/coco12.cpp +++ b/src/mame/drivers/coco12.cpp @@ -388,6 +388,7 @@ MACHINE_CONFIG_START(coco_state::coco_sound) MCFG_DEVICE_ADD("dac", DAC_6BIT_BINARY_WEIGHTED, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.125) MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0) MCFG_SOUND_ROUTE(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "dac", -1.0, DAC_VREF_NEG_INPUT) + MCFG_SOUND_ROUTE(0, "sbs", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "sbs", -1.0, DAC_VREF_NEG_INPUT) // Single-bit sound: R22 = 10K DAC_1BIT(config, "sbs", 0).add_route(ALL_OUTPUTS, "speaker", 0.125); diff --git a/src/mame/drivers/tandy1t.cpp b/src/mame/drivers/tandy1t.cpp index d9bf6c9bf88..9084f710007 100644 --- a/src/mame/drivers/tandy1t.cpp +++ b/src/mame/drivers/tandy1t.cpp @@ -420,7 +420,7 @@ void tandy1000_state::machine_start() else m_maincpu->space(AS_PROGRAM).install_readwrite_handler(m_ram->size() - (128*1024), 640*1024 - 1, read8_delegate(FUNC(tandy1000_state::vram_r), this), write8_delegate(FUNC(tandy1000_state::vram_w), this), 0xffff); - machine().device("nvram")->set_base(m_eeprom_ee, sizeof(m_eeprom_ee)); + subdevice("nvram")->set_base(m_eeprom_ee, sizeof(m_eeprom_ee)); } READ8_MEMBER( tandy1000_state::tandy1000_bank_r ) From b247768797c2a5f1fdcdbc78153ee0b1ff9fd0b9 Mon Sep 17 00:00:00 2001 From: DavidHaywood <28625134+DavidHaywood@users.noreply.github.com> Date: Mon, 28 May 2018 01:25:59 +0100 Subject: [PATCH 09/11] gave Tom Tom Magic a joystick and 3 buttons, as shown in attract mode the Joystick at least is needed for high score name entry. played a bit, seems fine so... new WORKING machines Tom Tom Magic [AJRhacker, David Haywood] --- src/mame/drivers/nmk16.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/mame/drivers/nmk16.cpp b/src/mame/drivers/nmk16.cpp index 065cbf8ee64..d582277afb4 100644 --- a/src/mame/drivers/nmk16.cpp +++ b/src/mame/drivers/nmk16.cpp @@ -1442,21 +1442,21 @@ static INPUT_PORTS_START( tomagic ) PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_START("IN1") // $080002.w - PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) + PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) + PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) + PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) - PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) + PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) + PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) + PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) - PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_START("DSW1") @@ -8246,4 +8246,4 @@ GAME( 2001, firehawkv, spec2k, firehawk, firehawkv, nmk16_state, empty GAME( 1991, manybloc, 0, manybloc, manybloc, nmk16_state, init_tharrier, ROT270, "Bee-Oh", "Many Block", MACHINE_NO_COCKTAIL | MACHINE_IMPERFECT_SOUND ) // clone board, different sound / bg hardware, but similar memory maps, same tx layer, sprites etc. -GAME( 1997, tomagic, 0, tomagic, tomagic, nmk16_tomagic_state, init_tomagic, ROT0, "Hobbitron T.K.Trading Co. Ltd.", "Tom Tom Magic", MACHINE_NOT_WORKING ) // there are many gambling related strings in the ROM, and an alt version is called Lucky Ball, possibly that one is a gambling title and this isn't? +GAME( 1997, tomagic, 0, tomagic, tomagic, nmk16_tomagic_state, init_tomagic, ROT0, "Hobbitron T.K.Trading Co. Ltd.", "Tom Tom Magic", 0 ) // there are many gambling related strings in the ROM, and an alt version is called Lucky Ball, possibly that one is a gambling title and this isn't? From 80dacaa17ce65e00e689583c0ccae055e292fbba Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Mon, 28 May 2018 22:11:36 +1000 Subject: [PATCH 10/11] fixup (nw) --- src/mame/drivers/igs017.cpp | 4 ++-- src/mame/drivers/nbmj9195.cpp | 3 ++- src/mame/drivers/seta2.cpp | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/mame/drivers/igs017.cpp b/src/mame/drivers/igs017.cpp index bd9c8761b36..f34bc674f60 100644 --- a/src/mame/drivers/igs017.cpp +++ b/src/mame/drivers/igs017.cpp @@ -4718,8 +4718,8 @@ ROM_START( spkrform ) ROM_END -GAME( 1996, iqblocka, iqblock, iqblocka, iqblocka, igs017_state, init_iqblocka, ROT0, "IGS", "Shuzi Leyuan (V127M, Gambling)", 0 ) -GAME( 1997, iqblockf, iqblock, iqblockf, iqblockf, igs017_state, init_iqblocka, ROT0, "IGS", "IQ Block (V113FR, Gambling)", 0 ) +GAME( 1996, iqblocka, iqblock, iqblocka, iqblocka, igs017_state, init_iqblocka, ROT0, "IGS", "Shuzi Leyuan (V127M, gambling)", 0 ) +GAME( 1997, iqblockf, iqblock, iqblockf, iqblockf, igs017_state, init_iqblocka, ROT0, "IGS", "IQ Block (V113FR, gambling)", 0 ) GAME( 1997, mgdh, 0, mgdha, mgdh, igs017_state, init_mgdh, ROT0, "IGS", "Mahjong Man Guan Daheng (Taiwan, V125T1)", MACHINE_IMPERFECT_COLORS ) // wrong colors in betting screen GAME( 1997, mgdha, mgdh, mgdha, mgdh , igs017_state, init_mgdha, ROT0, "IGS", "Mahjong Man Guan Daheng (Taiwan, V123T1)", 0 ) GAME( 1997, sdmg2, 0, sdmg2, sdmg2, igs017_state, init_sdmg2, ROT0, "IGS", "Mahjong Super Da Man Guan II (China, V754C)", 0 ) diff --git a/src/mame/drivers/nbmj9195.cpp b/src/mame/drivers/nbmj9195.cpp index 2ecffb5ac6c..21e65184d65 100644 --- a/src/mame/drivers/nbmj9195.cpp +++ b/src/mame/drivers/nbmj9195.cpp @@ -3492,6 +3492,7 @@ ROM_START( shabdama ) ROM_END // PCB pics are rather blurry, might better fit in another driver +// LD QUIZ 第4弾 答えたもん勝ち! ROM_START( ldquiz4 ) ROM_REGION( 0x10000, "maincpu", 0 ) // 27512 ROM_LOAD( "1.e3", 0x00000, 0x10000, CRC(49255f66) SHA1(bdd01987331c2aadea7f588d39c48c70cd43fc71) ) @@ -3558,4 +3559,4 @@ GAME( 1994, mjegolf, 0, mjegolf, mjegolf, nbmj9195_state, init_nbmj919 GAME( 1991, shabdama, 0, shabdama, mjuraden, nbmj9195_state, init_nbmj9195, ROT0, "Nichibutsu", "LD Mahjong #4 Shabon-Dama", MACHINE_NOT_WORKING | MACHINE_NO_SOUND | MACHINE_SUPPORTS_SAVE ) -GAME( 1992, ldquiz4, 0, shabdama, mjuraden, nbmj9195_state, init_nbmj9195, ROT0, "Nichibutsu", "LD Quiz 4 - Kotaemon Gachi (Japan)", MACHINE_NOT_WORKING | MACHINE_NO_SOUND | MACHINE_SUPPORTS_SAVE ) +GAME( 1992, ldquiz4, 0, shabdama, mjuraden, nbmj9195_state, init_nbmj9195, ROT0, "Nichibutsu", "LD Quiz dai 4-dan - Kotaetamon Gachi! (Japan)", MACHINE_NOT_WORKING | MACHINE_NO_SOUND | MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/seta2.cpp b/src/mame/drivers/seta2.cpp index 02d86d8226e..5971a9fa713 100644 --- a/src/mame/drivers/seta2.cpp +++ b/src/mame/drivers/seta2.cpp @@ -4364,7 +4364,7 @@ GAME( 2001, wschamp, 0, samshoot, wschamp, seta2_state, empty_init, GAME( 2001, wschampa, wschamp, samshoot, wschamp, seta2_state, empty_init, ROT0, "Sammy USA Corporation", "Wing Shooting Championship V1.01", MACHINE_NO_COCKTAIL | MACHINE_IMPERFECT_GRAPHICS ) GAME( 2001, wschampb, wschamp, samshoot, wschamp, seta2_state, empty_init, ROT0, "Sammy USA Corporation", "Wing Shooting Championship V1.00", MACHINE_NO_COCKTAIL | MACHINE_IMPERFECT_GRAPHICS ) GAME( 2002, trophyh, 0, samshoot, trophyh, seta2_state, empty_init, ROT0, "Sammy USA Corporation", "Trophy Hunting - Bear & Moose V1.0", MACHINE_NO_COCKTAIL | MACHINE_IMPERFECT_GRAPHICS ) -GAME( 2002, trophyht, trophyh, samshoot, trophyht, seta2_state, empty_init, ROT0, "Sammy USA Corporation", "Trophy Hunting - Bear & Moose V1.0 (Location Test)", MACHINE_NO_COCKTAIL | MACHINE_IMPERFECT_GRAPHICS ) +GAME( 2002, trophyht, trophyh, samshoot, trophyht, seta2_state, empty_init, ROT0, "Sammy USA Corporation", "Trophy Hunting - Bear & Moose V1.0 (location test)", MACHINE_NO_COCKTAIL | MACHINE_IMPERFECT_GRAPHICS ) GAME( 2000, funcube, 0, funcube, funcube, funcube_state, init_funcube, ROT0, "Namco", "Funcube (v1.5)", MACHINE_NO_COCKTAIL ) GAME( 2001, funcube2, 0, funcube2, funcube, funcube_state, init_funcube2, ROT0, "Namco", "Funcube 2 (v1.1)", MACHINE_NO_COCKTAIL ) GAME( 2001, funcube3, 0, funcube3, funcube, funcube_state, init_funcube3, ROT0, "Namco", "Funcube 3 (v1.1)", MACHINE_NO_COCKTAIL ) From c5f6a62d59de63f3938ceb84d76eeb99b3fec408 Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Wed, 30 May 2018 02:37:58 +1000 Subject: [PATCH 11/11] version bump (nw) --- android-project/app/src/main/AndroidManifest.xml | 4 ++-- makefile | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/android-project/app/src/main/AndroidManifest.xml b/android-project/app/src/main/AndroidManifest.xml index 5056e2940fc..41aa836fb40 100644 --- a/android-project/app/src/main/AndroidManifest.xml +++ b/android-project/app/src/main/AndroidManifest.xml @@ -4,8 +4,8 @@ --> diff --git a/makefile b/makefile index 463e22e21a0..119ef47816e 100644 --- a/makefile +++ b/makefile @@ -1571,14 +1571,14 @@ endif ifeq (posix,$(SHELLTYPE)) $(GENDIR)/version.cpp: $(GENDIR)/git_desc | $(GEN_FOLDERS) - @echo '#define BARE_BUILD_VERSION "0.197"' > $@ + @echo '#define BARE_BUILD_VERSION "0.198"' > $@ @echo 'extern const char bare_build_version[];' >> $@ @echo 'extern const char build_version[];' >> $@ @echo 'const char bare_build_version[] = BARE_BUILD_VERSION;' >> $@ @echo 'const char build_version[] = BARE_BUILD_VERSION " ($(NEW_GIT_VERSION))";' >> $@ else $(GENDIR)/version.cpp: $(GENDIR)/git_desc - @echo #define BARE_BUILD_VERSION "0.197" > $@ + @echo #define BARE_BUILD_VERSION "0.198" > $@ @echo extern const char bare_build_version[]; >> $@ @echo extern const char build_version[]; >> $@ @echo const char bare_build_version[] = BARE_BUILD_VERSION; >> $@