diff options
924 files changed, 29421 insertions, 12252 deletions
diff --git a/3rdparty/bgfx/3rdparty/dxsdk/include/dxgitype.h b/3rdparty/bgfx/3rdparty/dxsdk/include/dxgitype.h index 28b706fced2..8cb92ee99b6 100644 --- a/3rdparty/bgfx/3rdparty/dxsdk/include/dxgitype.h +++ b/3rdparty/bgfx/3rdparty/dxsdk/include/dxgitype.h @@ -10,7 +10,7 @@ #define MAKE_DXGI_HRESULT(code) MAKE_HRESULT(1, _FACDXGI, code) #define MAKE_DXGI_STATUS(code) MAKE_HRESULT(0, _FACDXGI, code) -#if defined(__MINGW32__) || !defined(DXGI_ERROR_INVALID_CALL) +#if !defined(DXGI_ERROR_INVALID_CALL) # define DXGI_STATUS_OCCLUDED MAKE_DXGI_STATUS(1) # define DXGI_STATUS_CLIPPED MAKE_DXGI_STATUS(2) # define DXGI_STATUS_NO_REDIRECTION MAKE_DXGI_STATUS(4) diff --git a/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui.cpp b/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui.cpp index 80f4b6eaf03..81a6d0795e8 100644 --- a/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui.cpp +++ b/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui.cpp @@ -1,4 +1,4 @@ -// ImGui library v1.46 WIP +// ImGui library v1.47 WIP // Main code & documentation // See ImGui::ShowTestWindow() in imgui_demo.cpp for demo code. @@ -665,7 +665,7 @@ ImGuiStyle::ImGuiStyle() Colors[ImGuiCol_TitleBgCollapsed] = ImVec4(0.40f, 0.40f, 0.80f, 0.20f); Colors[ImGuiCol_TitleBgActive] = ImVec4(0.50f, 0.50f, 1.00f, 0.55f); Colors[ImGuiCol_MenuBarBg] = ImVec4(0.40f, 0.40f, 0.55f, 0.80f); - Colors[ImGuiCol_ScrollbarBg] = ImVec4(0.40f, 0.40f, 0.80f, 0.15f); + Colors[ImGuiCol_ScrollbarBg] = ImVec4(0.20f, 0.25f, 0.30f, 0.60f); Colors[ImGuiCol_ScrollbarGrab] = ImVec4(0.40f, 0.40f, 0.80f, 0.30f); Colors[ImGuiCol_ScrollbarGrabHovered] = ImVec4(0.40f, 0.40f, 0.80f, 0.40f); Colors[ImGuiCol_ScrollbarGrabActive] = ImVec4(0.80f, 0.50f, 0.50f, 0.40f); @@ -761,6 +761,8 @@ void ImGuiIO::AddInputCharactersUTF8(const char* utf8_chars) // HELPERS //----------------------------------------------------------------------------- +#define IM_F32_TO_INT8(_VAL) ((int)((_VAL) * 255.0f + 0.5f)) + #define IM_INT_MIN (-2147483647-1) #define IM_INT_MAX (2147483647) @@ -1083,10 +1085,11 @@ ImVec4 ImGui::ColorConvertU32ToFloat4(ImU32 in) ImU32 ImGui::ColorConvertFloat4ToU32(const ImVec4& in) { - ImU32 out = ((ImU32)(ImSaturate(in.x)*255.f)); - out |= ((ImU32)(ImSaturate(in.y)*255.f) << 8); - out |= ((ImU32)(ImSaturate(in.z)*255.f) << 16); - out |= ((ImU32)(ImSaturate(in.w)*255.f) << 24); + ImU32 out; + out = ((ImU32)IM_F32_TO_INT8(ImSaturate(in.x))); + out |= ((ImU32)IM_F32_TO_INT8(ImSaturate(in.y))) << 8; + out |= ((ImU32)IM_F32_TO_INT8(ImSaturate(in.z))) << 16; + out |= ((ImU32)IM_F32_TO_INT8(ImSaturate(in.w))) << 24; return out; } @@ -1524,7 +1527,7 @@ ImGuiWindow::ImGuiWindow(const char* name) SetWindowPosAllowFlags = SetWindowSizeAllowFlags = SetWindowCollapsedAllowFlags = ImGuiSetCond_Always | ImGuiSetCond_Once | ImGuiSetCond_FirstUseEver | ImGuiSetCond_Appearing; SetWindowPosCenterWanted = false; - LastFrameDrawn = -1; + LastFrameActive = -1; ItemWidthDefault = 0.0f; FontWindowScale = 1.0f; @@ -3495,7 +3498,7 @@ bool ImGui::Begin(const char* name, bool* p_opened, const ImVec2& size_on_first_ } const int current_frame = ImGui::GetFrameCount(); - const bool first_begin_of_the_frame = (window->LastFrameDrawn != current_frame); + const bool first_begin_of_the_frame = (window->LastFrameActive != current_frame); if (first_begin_of_the_frame) window->Flags = (ImGuiWindowFlags)flags; else @@ -3508,23 +3511,25 @@ bool ImGui::Begin(const char* name, bool* p_opened, const ImVec2& size_on_first_ CheckStacksSize(window, true); IM_ASSERT(parent_window != NULL || !(flags & ImGuiWindowFlags_ChildWindow)); - bool window_was_visible = (window->LastFrameDrawn == current_frame - 1); // Not using !WasActive because the implicit "Debug" window would always toggle off->on + bool window_was_active = (window->LastFrameActive == current_frame - 1); // Not using !WasActive because the implicit "Debug" window would always toggle off->on if (flags & ImGuiWindowFlags_Popup) { ImGuiPopupRef& popup_ref = g.OpenedPopupStack[g.CurrentPopupStack.Size]; - window_was_visible &= (window->PopupID == popup_ref.PopupID); - window_was_visible &= (window == popup_ref.Window); + window_was_active &= (window->PopupID == popup_ref.PopupID); + window_was_active &= (window == popup_ref.Window); popup_ref.Window = window; g.CurrentPopupStack.push_back(popup_ref); window->PopupID = popup_ref.PopupID; } + + const bool window_appearing_after_being_hidden = (window->HiddenFrames == 1); // Process SetNextWindow***() calls bool window_pos_set_by_api = false, window_size_set_by_api = false; if (g.SetNextWindowPosCond) { const ImVec2 backup_cursor_pos = window->DC.CursorPos; // FIXME: not sure of the exact reason of this anymore :( need to look into that. - if (!window_was_visible) window->SetWindowPosAllowFlags |= ImGuiSetCond_Appearing; + if (!window_was_active || window_appearing_after_being_hidden) window->SetWindowPosAllowFlags |= ImGuiSetCond_Appearing; window_pos_set_by_api = (window->SetWindowPosAllowFlags & g.SetNextWindowPosCond) != 0; if (window_pos_set_by_api && ImLengthSqr(g.SetNextWindowPosVal - ImVec2(-FLT_MAX,-FLT_MAX)) < 0.001f) { @@ -3533,16 +3538,16 @@ bool ImGui::Begin(const char* name, bool* p_opened, const ImVec2& size_on_first_ } else { - ImGui::SetWindowPos(g.SetNextWindowPosVal, g.SetNextWindowPosCond); + SetWindowPos(window, g.SetNextWindowPosVal, g.SetNextWindowPosCond); } window->DC.CursorPos = backup_cursor_pos; g.SetNextWindowPosCond = 0; } if (g.SetNextWindowSizeCond) { - if (!window_was_visible) window->SetWindowSizeAllowFlags |= ImGuiSetCond_Appearing; + if (!window_was_active || window_appearing_after_being_hidden) window->SetWindowSizeAllowFlags |= ImGuiSetCond_Appearing; window_size_set_by_api = (window->SetWindowSizeAllowFlags & g.SetNextWindowSizeCond) != 0; - ImGui::SetWindowSize(g.SetNextWindowSizeVal, g.SetNextWindowSizeCond); + SetWindowSize(window, g.SetNextWindowSizeVal, g.SetNextWindowSizeCond); g.SetNextWindowSizeCond = 0; } if (g.SetNextWindowContentSizeCond) @@ -3556,8 +3561,8 @@ bool ImGui::Begin(const char* name, bool* p_opened, const ImVec2& size_on_first_ } if (g.SetNextWindowCollapsedCond) { - if (!window_was_visible) window->SetWindowCollapsedAllowFlags |= ImGuiSetCond_Appearing; - ImGui::SetWindowCollapsed(g.SetNextWindowCollapsedVal, g.SetNextWindowCollapsedCond); + if (!window_was_active || window_appearing_after_being_hidden) window->SetWindowCollapsedAllowFlags |= ImGuiSetCond_Appearing; + SetWindowCollapsed(window, g.SetNextWindowCollapsedVal, g.SetNextWindowCollapsedCond); g.SetNextWindowCollapsedCond = 0; } if (g.SetNextWindowFocus) @@ -3588,7 +3593,7 @@ bool ImGui::Begin(const char* name, bool* p_opened, const ImVec2& size_on_first_ window->BeginCount = 0; window->DrawList->Clear(); window->ClipRect = ImVec4(-FLT_MAX,-FLT_MAX,+FLT_MAX,+FLT_MAX); - window->LastFrameDrawn = current_frame; + window->LastFrameActive = current_frame; window->IDStack.resize(1); // Setup texture, outer clipping rectangle @@ -3599,7 +3604,7 @@ bool ImGui::Begin(const char* name, bool* p_opened, const ImVec2& size_on_first_ PushClipRect(GetVisibleRect()); // New windows appears in front - if (!window_was_visible) + if (!window_was_active) { window->AutoPosLastDirection = -1; @@ -3630,10 +3635,6 @@ bool ImGui::Begin(const char* name, bool* p_opened, const ImVec2& size_on_first_ window->Collapsed = false; } - const bool window_appearing_after_being_hidden = (window->HiddenFrames == 1); - if (window->HiddenFrames > 0) - window->HiddenFrames--; - // SIZE // Save contents size from last frame for auto-fitting (unless explicitly specified) @@ -3641,7 +3642,9 @@ bool ImGui::Begin(const char* name, bool* p_opened, const ImVec2& size_on_first_ window->SizeContents.y = (window->SizeContentsExplicit.y != 0.0f) ? window->SizeContentsExplicit.y : ((window_is_new ? 0.0f : window->DC.CursorMaxPos.y - window->Pos.y) + window->Scroll.y); // Hide popup/tooltip window when first appearing while we measure size (because we recycle them) - if ((flags & (ImGuiWindowFlags_Popup | ImGuiWindowFlags_Tooltip)) != 0 && !window_was_visible) + if (window->HiddenFrames > 0) + window->HiddenFrames--; + if ((flags & (ImGuiWindowFlags_Popup | ImGuiWindowFlags_Tooltip)) != 0 && !window_was_active) { window->HiddenFrames = 1; if (flags & ImGuiWindowFlags_AlwaysAutoResize) @@ -3848,7 +3851,7 @@ bool ImGui::Begin(const char* name, bool* p_opened, const ImVec2& size_on_first_ const ImRect resize_rect(br - ImVec2(resize_corner_size * 0.75f, resize_corner_size * 0.75f), br); const ImGuiID resize_id = window->GetID("#RESIZE"); bool hovered, held; - ButtonBehavior(resize_rect, resize_id, &hovered, &held, true, ImGuiButtonFlags_FlattenChilds); + ButtonBehavior(resize_rect, resize_id, &hovered, &held, ImGuiButtonFlags_FlattenChilds); resize_col = window->Color(held ? ImGuiCol_ResizeGripActive : hovered ? ImGuiCol_ResizeGripHovered : ImGuiCol_ResizeGrip); if (hovered || held) @@ -3961,7 +3964,7 @@ bool ImGui::Begin(const char* name, bool* p_opened, const ImVec2& size_on_first_ window->DC.TreeDepth = 0; window->DC.StateStorage = &window->StateStorage; window->DC.GroupStack.resize(0); - window->MenuColumns.Update(3, style.ItemSpacing.x, !window_was_visible); + window->MenuColumns.Update(3, style.ItemSpacing.x, !window_was_active); if (window->AutoFitFramesX > 0) window->AutoFitFramesX--; @@ -4081,7 +4084,9 @@ static void Scrollbar(ImGuiWindow* window, bool horizontal) const float border_offset = (window->Flags & ImGuiWindowFlags_ShowBorders) ? 1.0f : 0.0f; ImRect bb = horizontal ? ImRect(window->Pos.x + border_offset, window_rect.Max.y - style.ScrollbarSize, window_rect.Max.x - other_scrollbar_size_w, window_rect.Max.y) - : ImRect(window_rect.Max.x - style.ScrollbarSize, window->Pos.y + window->TitleBarHeight() + border_offset, window_rect.Max.x, window_rect.Max.y - other_scrollbar_size_w); + : ImRect(window_rect.Max.x - style.ScrollbarSize, window->Pos.y + border_offset, window_rect.Max.x, window_rect.Max.y - other_scrollbar_size_w); + if (!horizontal) + bb.Min.y += window->TitleBarHeight() + ((window->Flags & ImGuiWindowFlags_MenuBar) ? window->MenuBarHeight() - border_offset : 0.0f); float window_rounding = (window->Flags & ImGuiWindowFlags_ChildWindow) ? style.ChildWindowRounding : style.WindowRounding; int window_rounding_corners; @@ -4107,7 +4112,7 @@ static void Scrollbar(ImGuiWindow* window, bool horizontal) bool held = false; bool hovered = false; const bool previously_held = (g.ActiveId == id); - ImGui::ButtonBehavior(bb, id, &hovered, &held, true); + ImGui::ButtonBehavior(bb, id, &hovered, &held); float scroll_max = ImMax(1.0f, win_size_contents_v - win_size_avail_v); float scroll_ratio = ImSaturate(scroll_v / scroll_max); @@ -5125,7 +5130,7 @@ static inline bool IsWindowContentHoverable(ImGuiWindow* window) return true; } -bool ImGui::ButtonBehavior(const ImRect& bb, ImGuiID id, bool* out_hovered, bool* out_held, bool allow_key_modifiers, ImGuiButtonFlags flags) +bool ImGui::ButtonBehavior(const ImRect& bb, ImGuiID id, bool* out_hovered, bool* out_held, ImGuiButtonFlags flags) { ImGuiState& g = *GImGui; ImGuiWindow* window = GetCurrentWindow(); @@ -5143,7 +5148,7 @@ bool ImGui::ButtonBehavior(const ImRect& bb, ImGuiID id, bool* out_hovered, bool if (hovered) { SetHoveredID(id); - if (allow_key_modifiers || (!g.IO.KeyCtrl && !g.IO.KeyShift && !g.IO.KeyAlt)) + if (!(flags & ImGuiButtonFlags_NoKeyModifiers) || (!g.IO.KeyCtrl && !g.IO.KeyShift && !g.IO.KeyAlt)) { if (g.IO.MouseClicked[0]) { @@ -5214,7 +5219,7 @@ bool ImGui::ButtonEx(const char* label, const ImVec2& size_arg, ImGuiButtonFlags if (window->DC.ButtonRepeat) flags |= ImGuiButtonFlags_Repeat; bool hovered, held; - bool pressed = ButtonBehavior(bb, id, &hovered, &held, true, flags); + bool pressed = ButtonBehavior(bb, id, &hovered, &held, flags); // Render const ImU32 col = window->Color((hovered && held) ? ImGuiCol_ButtonActive : hovered ? ImGuiCol_ButtonHovered : ImGuiCol_Button); @@ -5260,7 +5265,7 @@ bool ImGui::InvisibleButton(const char* str_id, const ImVec2& size_arg) return false; bool hovered, held; - bool pressed = ButtonBehavior(bb, id, &hovered, &held, true); + bool pressed = ButtonBehavior(bb, id, &hovered, &held); return pressed; } @@ -5275,7 +5280,7 @@ static bool CloseWindowButton(bool* p_opened) const ImRect bb(window->Rect().GetTR() + ImVec2(-2.0f-size,2.0f), window->Rect().GetTR() + ImVec2(-2.0f,2.0f+size)); bool hovered, held; - bool pressed = ImGui::ButtonBehavior(bb, id, &hovered, &held, true); + bool pressed = ImGui::ButtonBehavior(bb, id, &hovered, &held); // Render const ImU32 col = window->Color((held && hovered) ? ImGuiCol_CloseButtonActive : hovered ? ImGuiCol_CloseButtonHovered : ImGuiCol_CloseButton); @@ -5346,7 +5351,7 @@ bool ImGui::ImageButton(ImTextureID user_texture_id, const ImVec2& size, const I return false; bool hovered, held; - bool pressed = ButtonBehavior(bb, id, &hovered, &held, true); + bool pressed = ButtonBehavior(bb, id, &hovered, &held); // Render const ImU32 col = window->Color((hovered && held) ? ImGuiCol_ButtonActive : hovered ? ImGuiCol_ButtonHovered : ImGuiCol_Button); @@ -5552,7 +5557,7 @@ bool ImGui::CollapsingHeader(const char* label, const char* str_id, bool display return opened; bool hovered, held; - bool pressed = ButtonBehavior(interact_bb, id, &hovered, &held, false); + bool pressed = ButtonBehavior(interact_bb, id, &hovered, &held, ImGuiButtonFlags_NoKeyModifiers); if (pressed) { opened = !opened; @@ -5942,7 +5947,7 @@ float ImGui::RoundScalar(float value, int decimal_precision) return negative ? -value : value; } -bool ImGui::SliderBehavior(const ImRect& frame_bb, ImGuiID id, float* v, float v_min, float v_max, float power, int decimal_precision, bool horizontal) +bool ImGui::SliderBehavior(const ImRect& frame_bb, ImGuiID id, float* v, float v_min, float v_max, float power, int decimal_precision, ImGuiSliderFlags flags) { ImGuiState& g = *GImGui; ImGuiWindow* window = GetCurrentWindow(); @@ -5952,17 +5957,18 @@ bool ImGui::SliderBehavior(const ImRect& frame_bb, ImGuiID id, float* v, float v RenderFrame(frame_bb.Min, frame_bb.Max, window->Color(ImGuiCol_FrameBg), true, style.FrameRounding); const bool is_non_linear = fabsf(power - 1.0f) > 0.0001f; + const bool is_horizontal = (flags & ImGuiSliderFlags_Vertical) == 0; const float grab_padding = 2.0f; - const float slider_sz = horizontal ? (frame_bb.GetWidth() - grab_padding * 2.0f) : (frame_bb.GetHeight() - grab_padding * 2.0f); + const float slider_sz = is_horizontal ? (frame_bb.GetWidth() - grab_padding * 2.0f) : (frame_bb.GetHeight() - grab_padding * 2.0f); float grab_sz; if (decimal_precision > 0) grab_sz = ImMin(style.GrabMinSize, slider_sz); else grab_sz = ImMin(ImMax(1.0f * (slider_sz / (v_max-v_min+1.0f)), style.GrabMinSize), slider_sz); // Integer sliders, if possible have the grab size represent 1 unit const float slider_usable_sz = slider_sz - grab_sz; - const float slider_usable_pos_min = (horizontal ? frame_bb.Min.x : frame_bb.Min.y) + grab_padding + grab_sz*0.5f; - const float slider_usable_pos_max = (horizontal ? frame_bb.Max.x : frame_bb.Max.y) - grab_padding - grab_sz*0.5f; + const float slider_usable_pos_min = (is_horizontal ? frame_bb.Min.x : frame_bb.Min.y) + grab_padding + grab_sz*0.5f; + const float slider_usable_pos_max = (is_horizontal ? frame_bb.Max.x : frame_bb.Max.y) - grab_padding - grab_sz*0.5f; // For logarithmic sliders that cross over sign boundary we want the exponential increase to be symmetric around 0.0f float linear_zero_pos = 0.0f; // 0.0->1.0f @@ -5985,9 +5991,9 @@ bool ImGui::SliderBehavior(const ImRect& frame_bb, ImGuiID id, float* v, float v { if (g.IO.MouseDown[0]) { - const float mouse_abs_pos = horizontal ? g.IO.MousePos.x : g.IO.MousePos.y; + const float mouse_abs_pos = is_horizontal ? g.IO.MousePos.x : g.IO.MousePos.y; float normalized_pos = ImClamp((mouse_abs_pos - slider_usable_pos_min) / slider_usable_sz, 0.0f, 1.0f); - if (!horizontal) + if (!is_horizontal) normalized_pos = 1.0f - normalized_pos; float new_value; @@ -6056,11 +6062,11 @@ bool ImGui::SliderBehavior(const ImRect& frame_bb, ImGuiID id, float* v, float v } // Draw - if (!horizontal) + if (!is_horizontal) grab_t = 1.0f - grab_t; const float grab_pos = ImLerp(slider_usable_pos_min, slider_usable_pos_max, grab_t); ImRect grab_bb; - if (horizontal) + if (is_horizontal) grab_bb = ImRect(ImVec2(grab_pos - grab_sz*0.5f, frame_bb.Min.y + grab_padding), ImVec2(grab_pos + grab_sz*0.5f, frame_bb.Max.y - grab_padding)); else grab_bb = ImRect(ImVec2(frame_bb.Min.x + grab_padding, grab_pos - grab_sz*0.5f), ImVec2(frame_bb.Max.x - grab_padding, grab_pos + grab_sz*0.5f)); @@ -6124,7 +6130,7 @@ bool ImGui::SliderFloat(const char* label, float* v, float v_min, float v_max, c ItemSize(total_bb, style.FramePadding.y); // Actual slider behavior + render grab - const bool value_changed = SliderBehavior(frame_bb, id, v, v_min, v_max, power, decimal_precision, true); + const bool value_changed = SliderBehavior(frame_bb, id, v, v_min, v_max, power, decimal_precision); // Display value using user-provided display format so user can add prefix/suffix/decorations to the value. char value_buf[64]; @@ -6170,7 +6176,7 @@ bool ImGui::VSliderFloat(const char* label, const ImVec2& size, float* v, float } // Actual slider behavior + render grab - bool value_changed = SliderBehavior(frame_bb, id, v, v_min, v_max, power, decimal_precision, false); + bool value_changed = SliderBehavior(frame_bb, id, v, v_min, v_max, power, decimal_precision, ImGuiSliderFlags_Vertical); // Display value using user-provided display format so user can add prefix/suffix/decorations to the value. // For the vertical slider we allow centered text to overlap the frame padding @@ -6749,7 +6755,7 @@ bool ImGui::Checkbox(const char* label, bool* v) return false; bool hovered, held; - bool pressed = ButtonBehavior(total_bb, id, &hovered, &held, true); + bool pressed = ButtonBehavior(total_bb, id, &hovered, &held); if (pressed) *v = !(*v); @@ -6812,7 +6818,7 @@ bool ImGui::RadioButton(const char* label, bool active) const float radius = check_bb.GetHeight() * 0.5f; bool hovered, held; - bool pressed = ButtonBehavior(total_bb, id, &hovered, &held, true); + bool pressed = ButtonBehavior(total_bb, id, &hovered, &held); window->DrawList->AddCircleFilled(center, radius, window->Color((held && hovered) ? ImGuiCol_FrameBgActive : hovered ? ImGuiCol_FrameBgHovered : ImGuiCol_FrameBg), 16); if (active) @@ -7087,6 +7093,7 @@ static bool InputTextFilterCharacter(unsigned int* p_char, ImGuiInputTextFlags f } // Edit a string of text +// FIXME: This is rather complex partly because we are doing UTF8 > u16 > UTF8 conversions on the go to more easily handle stb_textedit calls. Ideally we should stay in UTF-8 all the time. bool ImGui::InputTextEx(const char* label, char* buf, int buf_size, const ImVec2& size_arg, ImGuiInputTextFlags flags, ImGuiTextEditCallback callback, void* user_data) { ImGuiWindow* window = GetCurrentWindow(); @@ -7174,9 +7181,7 @@ bool ImGui::InputTextEx(const char* label, char* buf, int buf_size, const ImVec2 { // Recycle existing cursor/selection/undo stack but clamp position // Note a single mouse click will override the cursor/position immediately by calling stb_textedit_click handler. - edit_state.StbState.cursor = ImMin(edit_state.StbState.cursor, edit_state.CurLenW); - edit_state.StbState.select_start = ImMin(edit_state.StbState.select_start, edit_state.CurLenW); - edit_state.StbState.select_end = ImMin(edit_state.StbState.select_end, edit_state.CurLenW); + edit_state.CursorClamp(); } else { @@ -7207,6 +7212,16 @@ bool ImGui::InputTextEx(const char* label, char* buf, int buf_size, const ImVec2 if (g.ActiveId == id) { + if (!is_editable && !g.ActiveIdIsJustActivated) + { + // When read-only we always use the live data passed to the function + edit_state.Text.resize(buf_size+1); + const char* buf_end = NULL; + edit_state.CurLenW = ImTextStrFromUtf8(edit_state.Text.Data, edit_state.Text.Size, buf, NULL, &buf_end); + edit_state.CurLenA = (int)(buf_end - buf); + edit_state.CursorClamp(); + } + edit_state.BufSizeA = buf_size; // Although we are active we don't prevent mouse from hovering other elements unless we are interacting right now with the widget. @@ -7256,6 +7271,7 @@ bool ImGui::InputTextEx(const char* label, char* buf, int buf_size, const ImVec2 memset(g.IO.InputCharacters, 0, sizeof(g.IO.InputCharacters)); } + // Handle various key-presses const int k_mask = (is_shift_down ? STB_TEXTEDIT_K_SHIFT : 0); const bool is_ctrl_only = is_ctrl_down && !is_alt_down && !is_shift_down; if (IsKeyPressedMap(ImGuiKey_LeftArrow)) { edit_state.OnKeyPressed(is_ctrl_down ? STB_TEXTEDIT_K_WORDLEFT | k_mask : STB_TEXTEDIT_K_LEFT | k_mask); } @@ -7264,8 +7280,8 @@ bool ImGui::InputTextEx(const char* label, char* buf, int buf_size, const ImVec2 else if (is_multiline && IsKeyPressedMap(ImGuiKey_DownArrow)) { if (is_ctrl_down) SetWindowScrollY(draw_window, draw_window->Scroll.y + g.FontSize); else edit_state.OnKeyPressed(STB_TEXTEDIT_K_DOWN| k_mask); } else if (IsKeyPressedMap(ImGuiKey_Home)) { edit_state.OnKeyPressed(is_ctrl_down ? STB_TEXTEDIT_K_TEXTSTART | k_mask : STB_TEXTEDIT_K_LINESTART | k_mask); } else if (IsKeyPressedMap(ImGuiKey_End)) { edit_state.OnKeyPressed(is_ctrl_down ? STB_TEXTEDIT_K_TEXTEND | k_mask : STB_TEXTEDIT_K_LINEEND | k_mask); } - else if (IsKeyPressedMap(ImGuiKey_Delete) && is_editable) { edit_state.OnKeyPressed(STB_TEXTEDIT_K_DELETE | k_mask); } - else if (IsKeyPressedMap(ImGuiKey_Backspace) && is_editable) { edit_state.OnKeyPressed(STB_TEXTEDIT_K_BACKSPACE | k_mask); } + else if (IsKeyPressedMap(ImGuiKey_Delete) && is_editable) { edit_state.OnKeyPressed(STB_TEXTEDIT_K_DELETE | k_mask); } + else if (IsKeyPressedMap(ImGuiKey_Backspace) && is_editable) { edit_state.OnKeyPressed(STB_TEXTEDIT_K_BACKSPACE | k_mask); } else if (IsKeyPressedMap(ImGuiKey_Enter)) { bool ctrl_enter_for_new_line = (flags & ImGuiInputTextFlags_CtrlEnterForNewLine) != 0; @@ -7274,16 +7290,16 @@ bool ImGui::InputTextEx(const char* label, char* buf, int buf_size, const ImVec2 SetActiveID(0); enter_pressed = true; } - else if (is_editable) // New line + else if (is_editable) { - unsigned int c = '\n'; + unsigned int c = '\n'; // Insert new line if (InputTextFilterCharacter(&c, flags, callback, user_data)) edit_state.OnKeyPressed((int)c); } } else if ((flags & ImGuiInputTextFlags_AllowTabInput) && IsKeyPressedMap(ImGuiKey_Tab) && !is_ctrl_down && !is_shift_down && !is_alt_down && is_editable) { - unsigned int c = '\t'; + unsigned int c = '\t'; // Insert TAB if (InputTextFilterCharacter(&c, flags, callback, user_data)) edit_state.OnKeyPressed((int)c); } @@ -7358,7 +7374,7 @@ bool ImGui::InputTextEx(const char* label, char* buf, int buf_size, const ImVec2 { // Apply new value immediately - copy modified buffer back // Note that as soon as we can focus into the input box, the in-widget value gets priority over any underlying modification of the input buffer - // FIXME: We actually always render 'buf' in RenderTextScrolledClipped + // FIXME: We actually always render 'buf' when calling DrawList->AddText // FIXME-OPT: CPU waste to do this every time the widget is active, should mark dirty state from the stb_textedit callbacks if (is_editable) { @@ -7428,6 +7444,7 @@ bool ImGui::InputTextEx(const char* label, char* buf, int buf_size, const ImVec2 } } + // Copy back to user buffer if (is_editable && strcmp(edit_state.TempTextBuffer.Data, buf) != 0) { ImFormatString(buf, buf_size, "%s", edit_state.TempTextBuffer.Data); @@ -7439,9 +7456,9 @@ bool ImGui::InputTextEx(const char* label, char* buf, int buf_size, const ImVec2 if (!is_multiline) RenderFrame(frame_bb.Min, frame_bb.Max, window->Color(ImGuiCol_FrameBg), true, style.FrameRounding); + // Render + const ImVec4 clip_rect(frame_bb.Min.x, frame_bb.Min.y, frame_bb.Min.x + size.x + style.FramePadding.x*2.0f, frame_bb.Min.y + size.y + style.FramePadding.y*2.0f); ImVec2 render_pos = is_multiline ? draw_window->DC.CursorPos : frame_bb.Min + style.FramePadding; - - ImVec4 clip_rect(frame_bb.Min.x, frame_bb.Min.y, frame_bb.Min.x + size.x + style.FramePadding.x*2.0f, frame_bb.Min.y + size.y + style.FramePadding.y*2.0f); ImVec2 text_size(0.f, 0.f); if (g.ActiveId == id || (edit_state.Id == id && is_multiline && g.ActiveId == draw_window->GetID("#SCROLLY"))) { @@ -7453,40 +7470,44 @@ bool ImGui::InputTextEx(const char* label, char* buf, int buf_size, const ImVec2 // - Measure text height (for scrollbar) // We are attempting to do most of that in **one main pass** to minimize the computation cost (non-negligible for large amount of text) + 2nd pass for selection rendering (we could merge them by an extra refactoring effort) const ImWchar* text_begin = edit_state.Text.Data; - const ImWchar* text_end = text_begin + edit_state.CurLenW; ImVec2 cursor_offset, select_start_offset; { - // Count lines + find lines numbers of cursor and select_start - int matches_remaining = 0; - int matches_line_no[2] = { -1, -999 }; - const ImWchar* matches_ptr[2] = { NULL, NULL }; - matches_ptr[0] = text_begin + edit_state.StbState.cursor; matches_remaining++; + // Count lines + find lines numbers straddling 'cursor' and 'select_start' position. + const ImWchar* searches_input_ptr[2]; + searches_input_ptr[0] = text_begin + edit_state.StbState.cursor; + searches_input_ptr[1] = NULL; + int searches_remaining = 1; + int searches_result_line_number[2] = { -1, -999 }; if (edit_state.StbState.select_start != edit_state.StbState.select_end) { - matches_ptr[1] = text_begin + ImMin(edit_state.StbState.select_start, edit_state.StbState.select_end); - matches_line_no[1] = -1; - matches_remaining++; + searches_input_ptr[1] = text_begin + ImMin(edit_state.StbState.select_start, edit_state.StbState.select_end); + searches_result_line_number[1] = -1; + searches_remaining++; } - matches_remaining += is_multiline ? 1 : 0; // So that we never exit the loop until all lines are counted. + // Iterate all lines to find our line numbers + // In multi-line mode, we never exit the loop until all lines are counted, so add one extra to the searches_remaining counter. + searches_remaining += is_multiline ? 1 : 0; int line_count = 0; - for (const ImWchar* s = text_begin; s < text_end+1; s++) - if ((*s) == '\n' || s == text_end) + for (const ImWchar* s = text_begin; *s != 0; s++) + if (*s == '\n') { line_count++; - if (matches_line_no[0] == -1 && s >= matches_ptr[0]) { matches_line_no[0] = line_count; if (--matches_remaining <= 0) break; } - if (matches_line_no[1] == -1 && s >= matches_ptr[1]) { matches_line_no[1] = line_count; if (--matches_remaining <= 0) break; } + if (searches_result_line_number[0] == -1 && s >= searches_input_ptr[0]) { searches_result_line_number[0] = line_count; if (--searches_remaining <= 0) break; } + if (searches_result_line_number[1] == -1 && s >= searches_input_ptr[1]) { searches_result_line_number[1] = line_count; if (--searches_remaining <= 0) break; } } + line_count++; + if (searches_result_line_number[0] == -1) searches_result_line_number[0] = line_count; + if (searches_result_line_number[1] == -1) searches_result_line_number[1] = line_count; - // Calculate 2d position - IM_ASSERT(matches_line_no[0] != -1); - cursor_offset.x = InputTextCalcTextSizeW(ImStrbolW(matches_ptr[0], text_begin), matches_ptr[0]).x; - cursor_offset.y = matches_line_no[0] * g.FontSize; - if (matches_line_no[1] >= 0) + // Calculate 2d position by finding the beginning of the line and measuring distance + cursor_offset.x = InputTextCalcTextSizeW(ImStrbolW(searches_input_ptr[0], text_begin), searches_input_ptr[0]).x; + cursor_offset.y = searches_result_line_number[0] * g.FontSize; + if (searches_result_line_number[1] >= 0) { - select_start_offset.x = InputTextCalcTextSizeW(ImStrbolW(matches_ptr[1], text_begin), matches_ptr[1]).x; - select_start_offset.y = matches_line_no[1] * g.FontSize; + select_start_offset.x = InputTextCalcTextSizeW(ImStrbolW(searches_input_ptr[1], text_begin), searches_input_ptr[1]).x; + select_start_offset.y = searches_result_line_number[1] * g.FontSize; } // Calculate text height @@ -7525,7 +7546,7 @@ bool ImGui::InputTextEx(const char* label, char* buf, int buf_size, const ImVec2 } } edit_state.CursorFollow = false; - ImVec2 render_scroll = ImVec2(edit_state.ScrollX, 0.0f); + const ImVec2 render_scroll = ImVec2(edit_state.ScrollX, 0.0f); // Draw selection if (edit_state.StbState.select_start != edit_state.StbState.select_end) @@ -7983,7 +8004,7 @@ bool ImGui::Selectable(const char* label, bool selected, ImGuiSelectableFlags fl if (flags & ImGuiSelectableFlags_MenuItem) button_flags |= ImGuiButtonFlags_PressedOnClick|ImGuiButtonFlags_PressedOnRelease; if (flags & ImGuiSelectableFlags_Disabled) button_flags |= ImGuiButtonFlags_Disabled; bool hovered, held; - bool pressed = ButtonBehavior(bb_with_spacing, id, &hovered, &held, true, button_flags); + bool pressed = ButtonBehavior(bb_with_spacing, id, &hovered, &held, button_flags); if (flags & ImGuiSelectableFlags_Disabled) selected = false; @@ -8322,6 +8343,7 @@ void ImGui::EndMenu() } // A little colored square. Return true when clicked. +// FIXME: May want to display/ignore the alpha component in the color display? Yet show it in the tooltip. bool ImGui::ColorButton(const ImVec4& col, bool small_height, bool outline_border) { ImGuiWindow* window = GetCurrentWindow(); @@ -8338,17 +8360,11 @@ bool ImGui::ColorButton(const ImVec4& col, bool small_height, bool outline_borde return false; bool hovered, held; - bool pressed = ButtonBehavior(bb, id, &hovered, &held, true); + bool pressed = ButtonBehavior(bb, id, &hovered, &held); RenderFrame(bb.Min, bb.Max, window->Color(col), outline_border, style.FrameRounding); if (hovered) - { - int ix = (int)(col.x * 255.0f + 0.5f); - int iy = (int)(col.y * 255.0f + 0.5f); - int iz = (int)(col.z * 255.0f + 0.5f); - int iw = (int)(col.w * 255.0f + 0.5f); - ImGui::SetTooltip("Color:\n(%.2f,%.2f,%.2f,%.2f)\n#%02X%02X%02X%02X", col.x, col.y, col.z, col.w, ix, iy, iz, iw); - } + ImGui::SetTooltip("Color:\n(%.2f,%.2f,%.2f,%.2f)\n#%02X%02X%02X%02X", col.x, col.y, col.z, col.w, IM_F32_TO_INT8(col.x), IM_F32_TO_INT8(col.y), IM_F32_TO_INT8(col.z), IM_F32_TO_INT8(col.z)); return pressed; } @@ -8390,7 +8406,7 @@ bool ImGui::ColorEdit4(const char* label, float col[4], bool alpha) if (edit_mode == ImGuiColorEditMode_HSV) ImGui::ColorConvertRGBtoHSV(f[0], f[1], f[2], f[0], f[1], f[2]); - int i[4] = { (int)(f[0] * 255.0f + 0.5f), (int)(f[1] * 255.0f + 0.5f), (int)(f[2] * 255.0f + 0.5f), (int)(f[3] * 255.0f + 0.5f) }; + int i[4] = { IM_F32_TO_INT8(f[0]), IM_F32_TO_INT8(f[1]), IM_F32_TO_INT8(f[2]), IM_F32_TO_INT8(f[3]) }; int components = alpha ? 4 : 3; bool value_changed = false; @@ -8463,6 +8479,10 @@ bool ImGui::ColorEdit4(const char* label, float col[4], bool alpha) const ImVec4 col_display(col[0], col[1], col[2], 1.0f); if (ImGui::ColorButton(col_display)) g.ColorEditModeStorage.SetInt(id, (edit_mode + 1) % 3); // Don't set local copy of 'edit_mode' right away! + + // Recreate our own tooltip over's ColorButton() one because we want to display correct alpha here + if (ImGui::IsItemHovered()) + ImGui::SetTooltip("Color:\n(%.2f,%.2f,%.2f,%.2f)\n#%02X%02X%02X%02X", col[0], col[1], col[2], col[3], IM_F32_TO_INT8(col[0]), IM_F32_TO_INT8(col[1]), IM_F32_TO_INT8(col[2]), IM_F32_TO_INT8(col[3])); if (window->DC.ColorEditMode == ImGuiColorEditMode_UserSelectShowButton) { @@ -8932,6 +8952,7 @@ void ImGui::Value(const char* prefix, float v, const char* float_format) } } +// FIXME: May want to remove those helpers? void ImGui::Color(const char* prefix, const ImVec4& v) { ImGui::Text("%s: (%.2f,%.2f,%.2f,%.2f)", prefix, v.x, v.y, v.z, v.w); diff --git a/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui.h b/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui.h index 7bb0aacc56a..d2c4155d918 100644 --- a/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui.h +++ b/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui.h @@ -1,4 +1,4 @@ -// ImGui library v1.46 WIP +// ImGui library v1.47 WIP // Headers // See imgui.cpp file for documentation. @@ -17,7 +17,7 @@ #include <stdlib.h> // NULL, malloc, free, qsort, atoi #include <string.h> // memset, memmove, memcpy, strlen, strchr, strcpy, strcmp -#define IMGUI_VERSION "1.46 WIP" +#define IMGUI_VERSION "1.47 WIP" // Define assertion handler. #ifndef IM_ASSERT @@ -953,7 +953,7 @@ struct ImGuiTextEditCallbackData ImGuiKey EventKey; // Key pressed (Up/Down/TAB) // Read-only char* Buf; // Current text // Read-write (pointed data only) int BufSize; // // Read-only - bool BufDirty; // Set if you modify Buf directly // Write + bool BufDirty; // Must set if you modify Buf directly // Write int CursorPos; // // Read-write int SelectionStart; // // Read-write (== to SelectionEnd when no selection) int SelectionEnd; // // Read-write diff --git a/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_demo.cpp b/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_demo.cpp index d78630ee5a1..838070dd93c 100644 --- a/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_demo.cpp +++ b/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_demo.cpp @@ -1,4 +1,4 @@ -// ImGui library v1.46 WIP +// ImGui library v1.47 WIP // Demo code // Don't remove this file from your project! It is useful reference code that you can execute. @@ -423,7 +423,18 @@ void ImGui::ShowTestWindow(bool* opened) if (ImGui::TreeNode("Multi-line Text Input")) { static bool read_only = false; - static char text[1024*16] = "// F00F bug\nlabel:\n\tlock cmpxchg8b eax\n"; + static char text[1024*16] = + "/*\n" + " The Pentium F00F bug, shorthand for F0 0F C7 C8,\n" + " the hexadecimal encoding of one offending instruction,\n" + " more formally, the invalid operand with locked CMPXCHG8B\n" + " instruction bug, is a design flaw in the majority of\n" + " Intel Pentium, Pentium MMX, and Pentium OverDrive\n" + " processors (all in the P5 microarchitecture).\n" + "*/\n\n" + "label:\n" + "\tlock cmpxchg8b eax\n"; + ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, ImVec2(0,0)); ImGui::Checkbox("Read-only", &read_only); ImGui::PopStyleVar(); @@ -1724,7 +1735,7 @@ static void ShowExampleAppCustomRendering(bool* opened) if (ImGui::IsItemHovered()) { ImVec2 mouse_pos_in_canvas = ImVec2(ImGui::GetIO().MousePos.x - canvas_pos.x, ImGui::GetIO().MousePos.y - canvas_pos.y); - if (!adding_line && ImGui::GetIO().MouseClicked[0]) + if (!adding_line && ImGui::IsMouseClicked(0)) { points.push_back(mouse_pos_in_canvas); adding_line = true; @@ -1736,9 +1747,9 @@ static void ShowExampleAppCustomRendering(bool* opened) if (!ImGui::GetIO().MouseDown[0]) adding_line = adding_preview = false; } - if (ImGui::GetIO().MouseClicked[1] && !points.empty()) + if (ImGui::IsMouseClicked(1) && !points.empty()) { - adding_line = false; + adding_line = adding_preview = false; points.pop_back(); points.pop_back(); } diff --git a/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_draw.cpp b/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_draw.cpp index 09fcf015430..5baae31170e 100644 --- a/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_draw.cpp +++ b/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_draw.cpp @@ -1,4 +1,4 @@ -// ImGui library v1.46 WIP +// ImGui library v1.47 WIP // Drawing and font code // Contains implementation for @@ -18,7 +18,7 @@ #include <stdio.h> // vsnprintf, sscanf, printf #include <new> // new (ptr) -#ifndef alloca +#if !defined(alloca) && !defined(__FreeBSD__) #if _WIN32 #include <malloc.h> // alloca #else @@ -1082,13 +1082,13 @@ static const char* GetDefaultCompressedFontDataTTFBase85(); static unsigned int Decode85Byte(char c) { return c >= '\\' ? c-36 : c-35; } static void Decode85(const unsigned char* src, unsigned char* dst) { - while (*src) - { - unsigned int tmp = Decode85Byte(src[0]) + 85*(Decode85Byte(src[1]) + 85*(Decode85Byte(src[2]) + 85*(Decode85Byte(src[3]) + 85*Decode85Byte(src[4])))); - dst[0] = ((tmp >> 0) & 0xFF); dst[1] = ((tmp >> 8) & 0xFF); dst[2] = ((tmp >> 16) & 0xFF); dst[3] = ((tmp >> 24) & 0xFF); // We can't assume little-endianess. + while (*src) + { + unsigned int tmp = Decode85Byte(src[0]) + 85*(Decode85Byte(src[1]) + 85*(Decode85Byte(src[2]) + 85*(Decode85Byte(src[3]) + 85*Decode85Byte(src[4])))); + dst[0] = ((tmp >> 0) & 0xFF); dst[1] = ((tmp >> 8) & 0xFF); dst[2] = ((tmp >> 16) & 0xFF); dst[3] = ((tmp >> 24) & 0xFF); // We can't assume little-endianess. src += 5; dst += 4; - } + } } // Load embedded ProggyClean.ttf at size 13, disable oversampling diff --git a/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_internal.h b/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_internal.h index 1fac4326916..8e266b627c5 100644 --- a/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_internal.h +++ b/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_internal.h @@ -1,4 +1,4 @@ -// ImGui library v1.46 WIP +// ImGui library v1.47 WIP // Internals // You may use this file to debug, understand or extend ImGui features but we don't provide any guarantee of forward compatibility! @@ -39,6 +39,7 @@ struct ImGuiWindow; typedef int ImGuiLayoutType; // enum ImGuiLayoutType_ typedef int ImGuiButtonFlags; // enum ImGuiButtonFlags_ typedef int ImGuiTreeNodeFlags; // enum ImGuiTreeNodeFlags_ +typedef int ImGuiSliderFlags; // enum ImGuiSliderFlags_ //------------------------------------------------------------------------- // STB libraries @@ -148,7 +149,8 @@ enum ImGuiButtonFlags_ ImGuiButtonFlags_FlattenChilds = 1 << 3, ImGuiButtonFlags_DontClosePopups = 1 << 4, ImGuiButtonFlags_Disabled = 1 << 5, - ImGuiButtonFlags_AlignTextBaseLine = 1 << 6 + ImGuiButtonFlags_AlignTextBaseLine = 1 << 6, + ImGuiButtonFlags_NoKeyModifiers = 1 << 7 }; enum ImGuiTreeNodeFlags_ @@ -157,6 +159,11 @@ enum ImGuiTreeNodeFlags_ ImGuiTreeNodeFlags_NoAutoExpandOnLog = 1 << 1 }; +enum ImGuiSliderFlags_ +{ + ImGuiSliderFlags_Vertical = 1 << 0, +}; + enum ImGuiSelectableFlagsPrivate_ { // NB: need to be in sync with last value of ImGuiSelectableFlags_ @@ -270,24 +277,25 @@ struct IMGUI_API ImGuiSimpleColumns // Internal state of the currently focused/edited text input box struct IMGUI_API ImGuiTextEditState { - ImGuiID Id; // widget id owning the text state - ImVector<ImWchar> Text; // edit buffer, we need to persist but can't guarantee the persistence of the user-provided buffer. so we copy into own buffer. - ImVector<char> InitialText; // backup of end-user buffer at the time of focus (in UTF-8, unaltered) + ImGuiID Id; // widget id owning the text state + ImVector<ImWchar> Text; // edit buffer, we need to persist but can't guarantee the persistence of the user-provided buffer. so we copy into own buffer. + ImVector<char> InitialText; // backup of end-user buffer at the time of focus (in UTF-8, unaltered) ImVector<char> TempTextBuffer; - int CurLenA, CurLenW; // we need to maintain our buffer length in both UTF-8 and wchar format. - int BufSizeA; // end-user buffer size + int CurLenA, CurLenW; // we need to maintain our buffer length in both UTF-8 and wchar format. + int BufSizeA; // end-user buffer size float ScrollX; ImGuiStb::STB_TexteditState StbState; float CursorAnim; bool CursorFollow; - ImVec2 InputCursorScreenPos; // Cursor position in screen space to be used by IME callback. + ImVec2 InputCursorScreenPos; // Cursor position in screen space to be used by IME callback. bool SelectedAllMouseLock; - ImGuiTextEditState() { memset(this, 0, sizeof(*this)); } - void CursorAnimReset() { CursorAnim = -0.30f; } // After a user-input the cursor stays on for a while without blinking - bool HasSelection() const { return StbState.select_start != StbState.select_end; } - void ClearSelection() { StbState.select_start = StbState.select_end = StbState.cursor; } - void SelectAll() { StbState.select_start = 0; StbState.select_end = CurLenW; StbState.cursor = StbState.select_end; StbState.has_preferred_x = false; } + ImGuiTextEditState() { memset(this, 0, sizeof(*this)); } + void CursorAnimReset() { CursorAnim = -0.30f; } // After a user-input the cursor stays on for a while without blinking + void CursorClamp() { StbState.cursor = ImMin(StbState.cursor, CurLenW); StbState.select_start = ImMin(StbState.select_start, CurLenW); StbState.select_end = ImMin(StbState.select_end, CurLenW); } + bool HasSelection() const { return StbState.select_start != StbState.select_end; } + void ClearSelection() { StbState.select_start = StbState.select_end = StbState.cursor; } + void SelectAll() { StbState.select_start = 0; StbState.select_end = CurLenW; StbState.cursor = StbState.select_end; StbState.has_preferred_x = false; } void OnKeyPressed(int key); }; @@ -598,7 +606,7 @@ struct IMGUI_API ImGuiWindow ImVector<ImGuiID> IDStack; // ID stack. ID are hashes seeded with the value at the top of the stack ImRect ClipRect; // = DrawList->clip_rect_stack.back(). Scissoring / clipping rectangle. x1, y1, x2, y2. ImRect ClippedWindowRect; // = ClipRect just after setup in Begin() - int LastFrameDrawn; + int LastFrameActive; float ItemWidthDefault; ImGuiSimpleColumns MenuColumns; // Simplified columns storage for menu items ImGuiStorage StateStorage; @@ -672,10 +680,10 @@ namespace ImGui IMGUI_API void RenderCollapseTriangle(ImVec2 p_min, bool opened, float scale = 1.0f, bool shadow = false); IMGUI_API void RenderCheckMark(ImVec2 pos, ImU32 col); - IMGUI_API bool ButtonBehavior(const ImRect& bb, ImGuiID id, bool* out_hovered, bool* out_held, bool allow_key_modifiers, ImGuiButtonFlags flags = 0); + IMGUI_API bool ButtonBehavior(const ImRect& bb, ImGuiID id, bool* out_hovered, bool* out_held, ImGuiButtonFlags flags = 0); IMGUI_API bool ButtonEx(const char* label, const ImVec2& size_arg = ImVec2(0,0), ImGuiButtonFlags flags = 0); - IMGUI_API bool SliderBehavior(const ImRect& frame_bb, ImGuiID id, float* v, float v_min, float v_max, float power, int decimal_precision, bool horizontal); + IMGUI_API bool SliderBehavior(const ImRect& frame_bb, ImGuiID id, float* v, float v_min, float v_max, float power, int decimal_precision, ImGuiSliderFlags flags = 0); IMGUI_API bool SliderFloatN(const char* label, float* v, int components, float v_min, float v_max, const char* display_format, float power); IMGUI_API bool SliderIntN(const char* label, int* v, int components, int v_min, int v_max, const char* display_format); diff --git a/3rdparty/bgfx/README.md b/3rdparty/bgfx/README.md index 3b412508723..27ad54916c0 100644 --- a/3rdparty/bgfx/README.md +++ b/3rdparty/bgfx/README.md @@ -73,7 +73,7 @@ https://github.com/emoon/ProDBG - ProDBG is a new debugger under development that will support a variety of targets and operating systems. Currently it's in very early development and primary focusing on Mac as primary target. This is how it currently looks. - + http://www.dogbytegames.com/ Dogbyte Games is an indie mobile developer studio focusing on racing games. @@ -91,10 +91,8 @@ JavaScript for desktop/mobile apps. Idea is to combine the fast workflow and deployment model of web with the performance of native code and GPU acceleration. https://github.com/nem0/LumixEngine LumixEngine is a MIT licensed 3D engine. -The main goal is performance and Unity-like usability. -<a href="http://www.youtube.com/watch?feature=player_embedded&v=eyqk61Yw52E -" target="_blank"><img src="http://img.youtube.com/vi/eyqk61Yw52E/0.jpg" -alt="LumixEngine Terrain Editor" width="640" height="480" border="0" /></a> +The main goal is performance and Unity-like usability. + [Building](https://bkaradzic.github.io/bgfx/build.html) ------------------------------------------------------- diff --git a/3rdparty/bgfx/examples/01-cubes/cubes.cpp b/3rdparty/bgfx/examples/01-cubes/cubes.cpp index d3679d1ea48..4025975b0ee 100644 --- a/3rdparty/bgfx/examples/01-cubes/cubes.cpp +++ b/3rdparty/bgfx/examples/01-cubes/cubes.cpp @@ -57,14 +57,16 @@ static const uint16_t s_cubeIndices[36] = class Cubes : public entry::AppI { - void init(int /*_argc*/, char** /*_argv*/) BX_OVERRIDE + void init(int _argc, char** _argv) BX_OVERRIDE { + Args args(_argc, _argv); + m_width = 1280; m_height = 720; m_debug = BGFX_DEBUG_TEXT; m_reset = BGFX_RESET_VSYNC; - bgfx::init(); + bgfx::init(args.m_type, args.m_pciId); bgfx::reset(m_width, m_height, m_reset); // Enable debug text. diff --git a/3rdparty/bgfx/examples/02-metaballs/fs_metaballs.bin.h b/3rdparty/bgfx/examples/02-metaballs/fs_metaballs.bin.h index f26ec2830b7..694e76a6b0d 100644 --- a/3rdparty/bgfx/examples/02-metaballs/fs_metaballs.bin.h +++ b/3rdparty/bgfx/examples/02-metaballs/fs_metaballs.bin.h @@ -26,35 +26,36 @@ static const uint8_t fs_metaballs_glsl[398] = 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, // gl_FragColor = 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x32, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // tmpvar_2;.}... }; -static const uint8_t fs_metaballs_dx9[429] = +static const uint8_t fs_metaballs_dx9[433] = { - 0x46, 0x53, 0x48, 0x04, 0x03, 0x2c, 0xf5, 0x3f, 0x00, 0x00, 0xa0, 0x01, 0x00, 0x03, 0xff, 0xff, // FSH..,.?........ - 0xfe, 0xff, 0x16, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // ....CTAB....#... + 0x46, 0x53, 0x48, 0x04, 0x03, 0x2c, 0xf5, 0x3f, 0x00, 0x00, 0xa4, 0x01, 0x00, 0x03, 0xff, 0xff, // FSH..,.?........ + 0xfe, 0xff, 0x17, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // ....CTAB....#... 0x00, 0x03, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, // ................ 0x1c, 0x00, 0x00, 0x00, 0x70, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, // ....ps_3_0.Micro 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, // soft (R) HLSL Sh - 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x39, 0x2e, // ader Compiler 9. - 0x32, 0x39, 0x2e, 0x39, 0x35, 0x32, 0x2e, 0x33, 0x31, 0x31, 0x31, 0x00, 0x51, 0x00, 0x00, 0x05, // 29.952.3111.Q... - 0x00, 0x00, 0x0f, 0xa0, 0x00, 0x00, 0xf0, 0x41, 0xcd, 0xcc, 0x0c, 0x40, 0x2f, 0xba, 0xe8, 0x3e, // .......A...@/..> - 0x00, 0x00, 0x80, 0x3f, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x00, 0x00, 0x07, 0x90, // ...?............ - 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x01, 0x80, 0x01, 0x00, 0x07, 0x90, 0x08, 0x00, 0x00, 0x03, // ................ - 0x00, 0x00, 0x01, 0x80, 0x01, 0x00, 0xe4, 0x90, 0x01, 0x00, 0xe4, 0x90, 0x07, 0x00, 0x00, 0x02, // ................ - 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x80, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x01, 0x80, // ................ - 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0xaa, 0x90, 0x20, 0x00, 0x00, 0x03, 0x01, 0x00, 0x01, 0x80, // ........ ....... - 0x00, 0x00, 0x00, 0x81, 0x00, 0x00, 0x00, 0xa0, 0x0f, 0x00, 0x00, 0x02, 0x02, 0x00, 0x01, 0x80, // ................ - 0x00, 0x00, 0x00, 0x90, 0x0f, 0x00, 0x00, 0x02, 0x02, 0x00, 0x02, 0x80, 0x00, 0x00, 0x55, 0x90, // ..............U. - 0x0f, 0x00, 0x00, 0x02, 0x02, 0x00, 0x04, 0x80, 0x00, 0x00, 0xaa, 0x90, 0x05, 0x00, 0x00, 0x03, // ................ - 0x00, 0x00, 0x0e, 0x80, 0x02, 0x00, 0x90, 0x80, 0x00, 0x00, 0x55, 0xa0, 0x0e, 0x00, 0x00, 0x02, // ..........U..... - 0x02, 0x00, 0x01, 0x80, 0x00, 0x00, 0x55, 0x80, 0x0e, 0x00, 0x00, 0x02, 0x02, 0x00, 0x02, 0x80, // ......U......... - 0x00, 0x00, 0xaa, 0x80, 0x0e, 0x00, 0x00, 0x02, 0x02, 0x00, 0x04, 0x80, 0x00, 0x00, 0xff, 0x80, // ................ - 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x07, 0x80, 0x02, 0x00, 0xe4, 0x80, 0x00, 0x00, 0x00, 0x81, // ................ - 0x01, 0x00, 0x00, 0x80, 0x0f, 0x00, 0x00, 0x02, 0x01, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x80, // ................ - 0x0f, 0x00, 0x00, 0x02, 0x01, 0x00, 0x02, 0x80, 0x00, 0x00, 0x55, 0x80, 0x0f, 0x00, 0x00, 0x02, // ..........U..... - 0x01, 0x00, 0x04, 0x80, 0x00, 0x00, 0xaa, 0x80, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x07, 0x80, // ................ - 0x01, 0x00, 0xe4, 0x80, 0x00, 0x00, 0xaa, 0xa0, 0x0e, 0x00, 0x00, 0x02, 0x00, 0x08, 0x01, 0x80, // ................ - 0x00, 0x00, 0x00, 0x80, 0x0e, 0x00, 0x00, 0x02, 0x00, 0x08, 0x02, 0x80, 0x00, 0x00, 0x55, 0x80, // ..............U. - 0x0e, 0x00, 0x00, 0x02, 0x00, 0x08, 0x04, 0x80, 0x00, 0x00, 0xaa, 0x80, 0x01, 0x00, 0x00, 0x02, // ................ - 0x00, 0x08, 0x08, 0x80, 0x00, 0x00, 0xff, 0xa0, 0xff, 0xff, 0x00, 0x00, 0x00, // ............. + 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, 0x30, // ader Compiler 10 + 0x2e, 0x30, 0x2e, 0x31, 0x30, 0x30, 0x31, 0x31, 0x2e, 0x31, 0x36, 0x33, 0x38, 0x34, 0x00, 0xab, // .0.10011.16384.. + 0x51, 0x00, 0x00, 0x05, 0x00, 0x00, 0x0f, 0xa0, 0x00, 0x00, 0xf0, 0x41, 0xcd, 0xcc, 0x0c, 0x40, // Q..........A...@ + 0x2f, 0xba, 0xe8, 0x3e, 0x00, 0x00, 0x80, 0x3f, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, // /..>...?........ + 0x00, 0x00, 0x07, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x01, 0x80, 0x01, 0x00, 0x07, 0x90, // ................ + 0x08, 0x00, 0x00, 0x03, 0x00, 0x00, 0x01, 0x80, 0x01, 0x00, 0xe4, 0x90, 0x01, 0x00, 0xe4, 0x90, // ................ + 0x07, 0x00, 0x00, 0x02, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x80, 0x05, 0x00, 0x00, 0x03, // ................ + 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0xaa, 0x90, 0x20, 0x00, 0x00, 0x03, // ............ ... + 0x01, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x81, 0x00, 0x00, 0x00, 0xa0, 0x0f, 0x00, 0x00, 0x02, // ................ + 0x02, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x90, 0x0f, 0x00, 0x00, 0x02, 0x02, 0x00, 0x02, 0x80, // ................ + 0x00, 0x00, 0x55, 0x90, 0x0f, 0x00, 0x00, 0x02, 0x02, 0x00, 0x04, 0x80, 0x00, 0x00, 0xaa, 0x90, // ..U............. + 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0e, 0x80, 0x02, 0x00, 0x90, 0x80, 0x00, 0x00, 0x55, 0xa0, // ..............U. + 0x0e, 0x00, 0x00, 0x02, 0x02, 0x00, 0x01, 0x80, 0x00, 0x00, 0x55, 0x80, 0x0e, 0x00, 0x00, 0x02, // ..........U..... + 0x02, 0x00, 0x02, 0x80, 0x00, 0x00, 0xaa, 0x80, 0x0e, 0x00, 0x00, 0x02, 0x02, 0x00, 0x04, 0x80, // ................ + 0x00, 0x00, 0xff, 0x80, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x07, 0x80, 0x02, 0x00, 0xe4, 0x80, // ................ + 0x00, 0x00, 0x00, 0x81, 0x01, 0x00, 0x00, 0x80, 0x0f, 0x00, 0x00, 0x02, 0x01, 0x00, 0x01, 0x80, // ................ + 0x00, 0x00, 0x00, 0x80, 0x0f, 0x00, 0x00, 0x02, 0x01, 0x00, 0x02, 0x80, 0x00, 0x00, 0x55, 0x80, // ..............U. + 0x0f, 0x00, 0x00, 0x02, 0x01, 0x00, 0x04, 0x80, 0x00, 0x00, 0xaa, 0x80, 0x05, 0x00, 0x00, 0x03, // ................ + 0x00, 0x00, 0x07, 0x80, 0x01, 0x00, 0xe4, 0x80, 0x00, 0x00, 0xaa, 0xa0, 0x0e, 0x00, 0x00, 0x02, // ................ + 0x00, 0x08, 0x01, 0x80, 0x00, 0x00, 0x00, 0x80, 0x0e, 0x00, 0x00, 0x02, 0x00, 0x08, 0x02, 0x80, // ................ + 0x00, 0x00, 0x55, 0x80, 0x0e, 0x00, 0x00, 0x02, 0x00, 0x08, 0x04, 0x80, 0x00, 0x00, 0xaa, 0x80, // ..U............. + 0x01, 0x00, 0x00, 0x02, 0x00, 0x08, 0x08, 0x80, 0x00, 0x00, 0xff, 0xa0, 0xff, 0xff, 0x00, 0x00, // ................ + 0x00, // . }; static const uint8_t fs_metaballs_dx11[660] = { diff --git a/3rdparty/bgfx/examples/02-metaballs/metaballs.cpp b/3rdparty/bgfx/examples/02-metaballs/metaballs.cpp index 6593f3d33c1..982d248907f 100644 --- a/3rdparty/bgfx/examples/02-metaballs/metaballs.cpp +++ b/3rdparty/bgfx/examples/02-metaballs/metaballs.cpp @@ -4,7 +4,7 @@ */ #include "common.h" -#include <bgfx/bgfx.h> +#include "bgfx_utils.h" // embedded shaders #include "vs_metaballs.bin.h" @@ -464,14 +464,16 @@ uint32_t triangulate(uint8_t* _result, uint32_t _stride, const float* __restrict class Metaballs : public entry::AppI { - void init(int /*_argc*/, char** /*_argv*/) BX_OVERRIDE + void init(int _argc, char** _argv) BX_OVERRIDE { + Args args(_argc, _argv); + m_width = 1280; m_height = 720; m_debug = BGFX_DEBUG_TEXT; m_reset = BGFX_RESET_VSYNC; - bgfx::init(); + bgfx::init(args.m_type, args.m_pciId); bgfx::reset(m_width, m_height, m_reset); // Enable debug text. diff --git a/3rdparty/bgfx/examples/02-metaballs/vs_metaballs.bin.h b/3rdparty/bgfx/examples/02-metaballs/vs_metaballs.bin.h index 70f3e56b654..1e35cc2394e 100644 --- a/3rdparty/bgfx/examples/02-metaballs/vs_metaballs.bin.h +++ b/3rdparty/bgfx/examples/02-metaballs/vs_metaballs.bin.h @@ -35,12 +35,12 @@ static const uint8_t vs_metaballs_glsl[537] = 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x20, 0x3d, 0x20, 0x61, 0x5f, 0x63, 0x6f, 0x6c, // v_color0 = a_col 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // or0;.}... }; -static const uint8_t vs_metaballs_dx9[457] = +static const uint8_t vs_metaballs_dx9[461] = { 0x56, 0x53, 0x48, 0x04, 0x03, 0x2c, 0xf5, 0x3f, 0x02, 0x00, 0x07, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH..,.?...u_mod 0x65, 0x6c, 0x04, 0x20, 0x04, 0x00, 0x03, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, // el. .....u_model - 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x04, 0x00, 0x98, 0x01, // ViewProj........ - 0x00, 0x03, 0xfe, 0xff, 0xfe, 0xff, 0x2e, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, // ........CTAB.... + 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x04, 0x00, 0x9c, 0x01, // ViewProj........ + 0x00, 0x03, 0xfe, 0xff, 0xfe, 0xff, 0x2f, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, // ....../.CTAB.... 0x83, 0x00, 0x00, 0x00, 0x00, 0x03, 0xfe, 0xff, 0x02, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, // ................ 0x00, 0x91, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x02, 0x00, 0x04, 0x00, // ....|...D....... 0x03, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00, // ....L........... @@ -51,21 +51,21 @@ static const uint8_t vs_metaballs_dx9[457] = 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, // ........vs_3_0.M 0x69, 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, // icrosoft (R) HLS 0x4c, 0x20, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, // L Shader Compile - 0x72, 0x20, 0x39, 0x2e, 0x32, 0x39, 0x2e, 0x39, 0x35, 0x32, 0x2e, 0x33, 0x31, 0x31, 0x31, 0x00, // r 9.29.952.3111. - 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, // ................ - 0x03, 0x00, 0x00, 0x80, 0x01, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, // ................ - 0x02, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0xe0, // ................ - 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x01, 0x00, 0x0f, 0xe0, 0x1f, 0x00, 0x00, 0x02, // ................ - 0x05, 0x00, 0x01, 0x80, 0x02, 0x00, 0x07, 0xe0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, // ................ - 0x01, 0x00, 0xe4, 0xa0, 0x02, 0x00, 0x55, 0x90, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, 0x80, // ......U......... - 0x00, 0x00, 0xe4, 0xa0, 0x02, 0x00, 0x00, 0x90, 0x00, 0x00, 0xe4, 0x80, 0x04, 0x00, 0x00, 0x04, // ................ - 0x00, 0x00, 0x0f, 0x80, 0x02, 0x00, 0xe4, 0xa0, 0x02, 0x00, 0xaa, 0x90, 0x00, 0x00, 0xe4, 0x80, // ................ - 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0xe0, 0x00, 0x00, 0xe4, 0x80, 0x03, 0x00, 0xe4, 0xa0, // ................ - 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x07, 0x80, 0x05, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x55, 0x90, // ..............U. - 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x07, 0x80, 0x04, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x90, // ................ - 0x00, 0x00, 0xe4, 0x80, 0x04, 0x00, 0x00, 0x04, 0x02, 0x00, 0x07, 0xe0, 0x06, 0x00, 0xe4, 0xa0, // ................ - 0x01, 0x00, 0xaa, 0x90, 0x00, 0x00, 0xe4, 0x80, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x0f, 0xe0, // ................ - 0x00, 0x00, 0xe4, 0x90, 0xff, 0xff, 0x00, 0x00, 0x00, // ......... + 0x72, 0x20, 0x31, 0x30, 0x2e, 0x30, 0x2e, 0x31, 0x30, 0x30, 0x31, 0x31, 0x2e, 0x31, 0x36, 0x33, // r 10.0.10011.163 + 0x38, 0x34, 0x00, 0xab, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, // 84.............. + 0x1f, 0x00, 0x00, 0x02, 0x03, 0x00, 0x00, 0x80, 0x01, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, // ................ + 0x00, 0x00, 0x00, 0x80, 0x02, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, // ................ + 0x00, 0x00, 0x0f, 0xe0, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x01, 0x00, 0x0f, 0xe0, // ................ + 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x01, 0x80, 0x02, 0x00, 0x07, 0xe0, 0x05, 0x00, 0x00, 0x03, // ................ + 0x00, 0x00, 0x0f, 0x80, 0x01, 0x00, 0xe4, 0xa0, 0x02, 0x00, 0x55, 0x90, 0x04, 0x00, 0x00, 0x04, // ..........U..... + 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0xa0, 0x02, 0x00, 0x00, 0x90, 0x00, 0x00, 0xe4, 0x80, // ................ + 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, 0x80, 0x02, 0x00, 0xe4, 0xa0, 0x02, 0x00, 0xaa, 0x90, // ................ + 0x00, 0x00, 0xe4, 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0xe0, 0x00, 0x00, 0xe4, 0x80, // ................ + 0x03, 0x00, 0xe4, 0xa0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x07, 0x80, 0x05, 0x00, 0xe4, 0xa0, // ................ + 0x01, 0x00, 0x55, 0x90, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x07, 0x80, 0x04, 0x00, 0xe4, 0xa0, // ..U............. + 0x01, 0x00, 0x00, 0x90, 0x00, 0x00, 0xe4, 0x80, 0x04, 0x00, 0x00, 0x04, 0x02, 0x00, 0x07, 0xe0, // ................ + 0x06, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0xaa, 0x90, 0x00, 0x00, 0xe4, 0x80, 0x01, 0x00, 0x00, 0x02, // ................ + 0x01, 0x00, 0x0f, 0xe0, 0x00, 0x00, 0xe4, 0x90, 0xff, 0xff, 0x00, 0x00, 0x00, // ............. }; static const uint8_t vs_metaballs_dx11[726] = { diff --git a/3rdparty/bgfx/examples/03-raymarch/raymarch.cpp b/3rdparty/bgfx/examples/03-raymarch/raymarch.cpp index 7fd619db9fa..1ba4d3ecea4 100644 --- a/3rdparty/bgfx/examples/03-raymarch/raymarch.cpp +++ b/3rdparty/bgfx/examples/03-raymarch/raymarch.cpp @@ -102,14 +102,16 @@ void renderScreenSpaceQuad(uint32_t _view, bgfx::ProgramHandle _program, float _ } } -int _main_(int /*_argc*/, char** /*_argv*/) +int _main_(int _argc, char** _argv) { + Args args(_argc, _argv); + uint32_t width = 1280; uint32_t height = 720; uint32_t debug = BGFX_DEBUG_TEXT; uint32_t reset = BGFX_RESET_VSYNC; - bgfx::init(); + bgfx::init(args.m_type, args.m_pciId); bgfx::reset(width, height, reset); // Enable debug text. diff --git a/3rdparty/bgfx/examples/04-mesh/mesh.cpp b/3rdparty/bgfx/examples/04-mesh/mesh.cpp index bf4c4269333..8c10b2b36d3 100644 --- a/3rdparty/bgfx/examples/04-mesh/mesh.cpp +++ b/3rdparty/bgfx/examples/04-mesh/mesh.cpp @@ -6,14 +6,16 @@ #include "common.h" #include "bgfx_utils.h" -int _main_(int /*_argc*/, char** /*_argv*/) +int _main_(int _argc, char** _argv) { + Args args(_argc, _argv); + uint32_t width = 1280; uint32_t height = 720; uint32_t debug = BGFX_DEBUG_TEXT; uint32_t reset = BGFX_RESET_VSYNC; - bgfx::init(); + bgfx::init(args.m_type, args.m_pciId); bgfx::reset(width, height, reset); // Enable debug text. diff --git a/3rdparty/bgfx/examples/05-instancing/instancing.cpp b/3rdparty/bgfx/examples/05-instancing/instancing.cpp index 2313adccabd..3d9f9505a6e 100644 --- a/3rdparty/bgfx/examples/05-instancing/instancing.cpp +++ b/3rdparty/bgfx/examples/05-instancing/instancing.cpp @@ -55,14 +55,16 @@ static const uint16_t s_cubeIndices[36] = 6, 3, 7, }; -int _main_(int /*_argc*/, char** /*_argv*/) +int _main_(int _argc, char** _argv) { + Args args(_argc, _argv); + uint32_t width = 1280; uint32_t height = 720; uint32_t debug = BGFX_DEBUG_TEXT; uint32_t reset = BGFX_RESET_VSYNC; - bgfx::init(); + bgfx::init(args.m_type, args.m_pciId); bgfx::reset(width, height, reset); // Enable debug text. diff --git a/3rdparty/bgfx/examples/06-bump/bump.cpp b/3rdparty/bgfx/examples/06-bump/bump.cpp index 1cbf74592de..e373bf65253 100644 --- a/3rdparty/bgfx/examples/06-bump/bump.cpp +++ b/3rdparty/bgfx/examples/06-bump/bump.cpp @@ -105,14 +105,16 @@ static const uint16_t s_cubeIndices[36] = class Bump : public entry::AppI { - void init(int /*_argc*/, char** /*_argv*/) BX_OVERRIDE + void init(int _argc, char** _argv) BX_OVERRIDE { + Args args(_argc, _argv); + m_width = 1280; m_height = 720; m_debug = BGFX_DEBUG_TEXT; m_reset = BGFX_RESET_VSYNC; - bgfx::init(); + bgfx::init(args.m_type, args.m_pciId); bgfx::reset(m_width, m_height, m_reset); // Enable debug text. diff --git a/3rdparty/bgfx/examples/07-callback/callback.cpp b/3rdparty/bgfx/examples/07-callback/callback.cpp index fa0b0329d88..0def881acdc 100644 --- a/3rdparty/bgfx/examples/07-callback/callback.cpp +++ b/3rdparty/bgfx/examples/07-callback/callback.cpp @@ -364,8 +364,10 @@ private: uint32_t m_maxBlocks; }; -int _main_(int /*_argc*/, char** /*_argv*/) +int _main_(int _argc, char** _argv) { + Args args(_argc, _argv); + BgfxCallback callback; BgfxAllocator allocator; @@ -376,9 +378,10 @@ int _main_(int /*_argc*/, char** /*_argv*/) bgfx::RendererType::Enum renderers[bgfx::RendererType::Count]; uint8_t numRenderers = bgfx::getSupportedRenderers(renderers); - bgfx::init( - renderers[bx::getHPCounter() % numRenderers] /* randomize renderer */ - , BGFX_PCI_ID_NONE + bgfx::init(bgfx::RendererType::Count == args.m_type + ? renderers[bx::getHPCounter() % numRenderers] /* randomize renderer */ + : args.m_type + , args.m_pciId , 0 , &callback // custom callback handler , &allocator // custom allocator diff --git a/3rdparty/bgfx/examples/08-update/update.cpp b/3rdparty/bgfx/examples/08-update/update.cpp index 51bd8c0213d..cc2fb3149ef 100644 --- a/3rdparty/bgfx/examples/08-update/update.cpp +++ b/3rdparty/bgfx/examples/08-update/update.cpp @@ -34,7 +34,7 @@ struct PosTexcoordVertex bgfx::VertexDecl PosTexcoordVertex::ms_decl; -static PosTexcoordVertex s_cubeVertices[28] = +static PosTexcoordVertex s_m_cubeVertices[28] = { {-1.0f, 1.0f, 1.0f, -1.0f, 1.0f, 1.0f }, { 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f }, @@ -72,7 +72,7 @@ static PosTexcoordVertex s_cubeVertices[28] = { 1.0f, -1.0f, 1.0f, 2.0f, -2.0f, 2.0f }, }; -static const uint16_t s_cubeIndices[36] = +static const uint16_t s_m_cubeIndices[36] = { 0, 1, 2, // 0 1, 3, 2, @@ -112,390 +112,467 @@ static void updateTextureCubeRectBgra8(bgfx::TextureHandle _handle, uint8_t _sid bgfx::updateTextureCube(_handle, _side, 0, _x, _y, _width, _height, mem); } -int _main_(int /*_argc*/, char** /*_argv*/) -{ - uint32_t width = 1280; - uint32_t height = 720; - uint32_t debug = BGFX_DEBUG_TEXT; - uint32_t reset = BGFX_RESET_VSYNC; - - bgfx::init(); - bgfx::reset(width, height, reset); - - // Enable debug text. - bgfx::setDebug(debug); - - // Set view 0 clear state. - bgfx::setViewClear(0 - , BGFX_CLEAR_COLOR|BGFX_CLEAR_DEPTH - , 0x303030ff - , 1.0f - , 0 - ); +static const uint32_t m_textureside = 512; +static const uint32_t m_texture2dSize = 256; - // Create vertex stream declaration. - PosTexcoordVertex::init(); - - bgfx::TextureHandle textures[] = +class Update : public entry::AppI +{ +public: + Update() + : m_cube(m_textureside) { - loadTexture("texture_compression_bc1.dds", BGFX_TEXTURE_U_CLAMP|BGFX_TEXTURE_V_CLAMP), - loadTexture("texture_compression_bc2.dds", BGFX_TEXTURE_U_CLAMP), - loadTexture("texture_compression_bc3.dds", BGFX_TEXTURE_V_CLAMP), - loadTexture("texture_compression_etc1.ktx", BGFX_TEXTURE_U_BORDER|BGFX_TEXTURE_V_BORDER|BGFX_TEXTURE_BORDER_COLOR(1) ), - loadTexture("texture_compression_etc2.ktx"), - loadTexture("texture_compression_ptc12.pvr"), - loadTexture("texture_compression_ptc14.pvr"), - loadTexture("texture_compression_ptc22.pvr"), - loadTexture("texture_compression_ptc24.pvr"), - }; + } - const bgfx::Memory* mem8 = bgfx::alloc(32*32*32); - const bgfx::Memory* mem16f = bgfx::alloc(32*32*32*2); - const bgfx::Memory* mem32f = bgfx::alloc(32*32*32*4); - for (uint8_t zz = 0; zz < 32; ++zz) + void init(int _argc, char** _argv) BX_OVERRIDE { - for (uint8_t yy = 0; yy < 32; ++yy) + Args args(_argc, _argv); + + m_width = 1280; + m_height = 720; + m_debug = BGFX_DEBUG_TEXT; + m_reset = BGFX_RESET_VSYNC; + + bgfx::init(args.m_type, args.m_pciId); + bgfx::reset(m_width, m_height, m_reset); + + // Enable debug text. + bgfx::setDebug(m_debug); + + // Set view 0 clear state. + bgfx::setViewClear(0 + , BGFX_CLEAR_COLOR|BGFX_CLEAR_DEPTH + , 0x303030ff + , 1.0f + , 0 + ); + + // Create vertex stream declaration. + PosTexcoordVertex::init(); + + m_textures[0] = loadTexture("texture_compression_bc1.dds", BGFX_TEXTURE_U_CLAMP|BGFX_TEXTURE_V_CLAMP); + m_textures[1] = loadTexture("texture_compression_bc2.dds", BGFX_TEXTURE_U_CLAMP); + m_textures[2] = loadTexture("texture_compression_bc3.dds", BGFX_TEXTURE_V_CLAMP); + m_textures[3] = loadTexture("texture_compression_etc1.ktx", BGFX_TEXTURE_U_BORDER|BGFX_TEXTURE_V_BORDER|BGFX_TEXTURE_BORDER_COLOR(1) ); + m_textures[4] = loadTexture("texture_compression_etc2.ktx"); + m_textures[5] = loadTexture("texture_compression_ptc12.pvr"); + m_textures[6] = loadTexture("texture_compression_ptc14.pvr"); + m_textures[7] = loadTexture("texture_compression_ptc22.pvr"); + m_textures[8] = loadTexture("texture_compression_ptc24.pvr"); + + const bgfx::Caps* caps = bgfx::getCaps(); + m_texture3DSupported = !!(caps->supported & BGFX_CAPS_TEXTURE_3D); + m_blitSupported = !!(caps->supported & BGFX_CAPS_TEXTURE_BLIT); + m_numm_textures3d = 0; + + if (m_texture3DSupported) { - for (uint8_t xx = 0; xx < 32; ++xx) + const bgfx::Memory* mem8 = bgfx::alloc(32*32*32); + const bgfx::Memory* mem16f = bgfx::alloc(32*32*32*2); + const bgfx::Memory* mem32f = bgfx::alloc(32*32*32*4); + for (uint8_t zz = 0; zz < 32; ++zz) { - const uint32_t offset = ( (zz*32+yy)*32+xx); - const uint32_t val = xx ^ yy ^ zz; - mem8->data[offset] = val<<3; - *(uint16_t*)&mem16f->data[offset*2] = bx::halfFromFloat( (float)val/32.0f); - *(float*)&mem32f->data[offset*4] = (float)val/32.0f; + for (uint8_t yy = 0; yy < 32; ++yy) + { + for (uint8_t xx = 0; xx < 32; ++xx) + { + const uint32_t offset = ( (zz*32+yy)*32+xx); + const uint32_t val = xx ^ yy ^ zz; + mem8->data[offset] = val<<3; + *(uint16_t*)&mem16f->data[offset*2] = bx::halfFromFloat( (float)val/32.0f); + *(float*)&mem32f->data[offset*4] = (float)val/32.0f; + } + } } - } - } - const bgfx::Caps* caps = bgfx::getCaps(); - const bool texture3DSupported = !!(caps->supported & BGFX_CAPS_TEXTURE_3D); + if (0 != (BGFX_CAPS_FORMAT_TEXTURE_2D & caps->formats[bgfx::TextureFormat::R8]) ) + { + m_textures3d[m_numm_textures3d++] = bgfx::createTexture3D(32, 32, 32, 0, bgfx::TextureFormat::R8, BGFX_TEXTURE_U_CLAMP|BGFX_TEXTURE_V_CLAMP|BGFX_TEXTURE_W_CLAMP, mem8); + } - uint32_t numTextures3d = 0; - bgfx::TextureHandle textures3d[3] = {}; + if (0 != (BGFX_CAPS_FORMAT_TEXTURE_2D & caps->formats[bgfx::TextureFormat::R16F]) ) + { + m_textures3d[m_numm_textures3d++] = bgfx::createTexture3D(32, 32, 32, 0, bgfx::TextureFormat::R16F, BGFX_TEXTURE_U_CLAMP|BGFX_TEXTURE_V_CLAMP|BGFX_TEXTURE_W_CLAMP, mem16f); + } - if (texture3DSupported) - { - if (0 != (BGFX_CAPS_FORMAT_TEXTURE_COLOR & caps->formats[bgfx::TextureFormat::R8]) ) - { - textures3d[numTextures3d++] = bgfx::createTexture3D(32, 32, 32, 0, bgfx::TextureFormat::R8, BGFX_TEXTURE_U_CLAMP|BGFX_TEXTURE_V_CLAMP|BGFX_TEXTURE_W_CLAMP, mem8); + if (0 != (BGFX_CAPS_FORMAT_TEXTURE_2D & caps->formats[bgfx::TextureFormat::R32F]) ) + { + m_textures3d[m_numm_textures3d++] = bgfx::createTexture3D(32, 32, 32, 0, bgfx::TextureFormat::R32F, BGFX_TEXTURE_U_CLAMP|BGFX_TEXTURE_V_CLAMP|BGFX_TEXTURE_W_CLAMP, mem32f); + } } - if (0 != (BGFX_CAPS_FORMAT_TEXTURE_COLOR & caps->formats[bgfx::TextureFormat::R16F]) ) - { - textures3d[numTextures3d++] = bgfx::createTexture3D(32, 32, 32, 0, bgfx::TextureFormat::R16F, BGFX_TEXTURE_U_CLAMP|BGFX_TEXTURE_V_CLAMP|BGFX_TEXTURE_W_CLAMP, mem16f); - } + // Create static vertex buffer. + m_vbh = bgfx::createVertexBuffer(bgfx::makeRef(s_m_cubeVertices, sizeof(s_m_cubeVertices) ), PosTexcoordVertex::ms_decl); + + // Create static index buffer. + m_ibh = bgfx::createIndexBuffer(bgfx::makeRef(s_m_cubeIndices, sizeof(s_m_cubeIndices) ) ); - if (0 != (BGFX_CAPS_FORMAT_TEXTURE_COLOR & caps->formats[bgfx::TextureFormat::R32F]) ) + // Create programs. + m_program = loadProgram("vs_update", "fs_update"); + m_programCmp = loadProgram("vs_update", "fs_update_cmp"); + m_program3d.idx = bgfx::invalidHandle; + if (m_texture3DSupported) { - textures3d[numTextures3d++] = bgfx::createTexture3D(32, 32, 32, 0, bgfx::TextureFormat::R32F, BGFX_TEXTURE_U_CLAMP|BGFX_TEXTURE_V_CLAMP|BGFX_TEXTURE_W_CLAMP, mem32f); + m_program3d = loadProgram("vs_update", "fs_update_3d"); } - } - // Create static vertex buffer. - bgfx::VertexBufferHandle vbh = bgfx::createVertexBuffer(bgfx::makeRef(s_cubeVertices, sizeof(s_cubeVertices) ), PosTexcoordVertex::ms_decl); + // Create texture sampler uniforms. + s_texCube = bgfx::createUniform("s_texCube", bgfx::UniformType::Int1); + s_texColor = bgfx::createUniform("s_texColor", bgfx::UniformType::Int1); - // Create static index buffer. - bgfx::IndexBufferHandle ibh = bgfx::createIndexBuffer(bgfx::makeRef(s_cubeIndices, sizeof(s_cubeIndices) ) ); + // Create time uniform. + u_time = bgfx::createUniform("u_time", bgfx::UniformType::Vec4); - // Create programs. - bgfx::ProgramHandle program = loadProgram("vs_update", "fs_update"); - bgfx::ProgramHandle programCmp = loadProgram("vs_update", "fs_update_cmp"); - bgfx::ProgramHandle program3d = BGFX_INVALID_HANDLE; - if (texture3DSupported) - { - program3d = loadProgram("vs_update", "fs_update_3d"); - } + m_textureCube[0] = bgfx::createTextureCube(m_textureside, 1 + , bgfx::TextureFormat::BGRA8 + , BGFX_TEXTURE_MIN_POINT|BGFX_TEXTURE_MAG_POINT|BGFX_TEXTURE_MIP_POINT + ); - // Create texture sampler uniforms. - bgfx::UniformHandle s_texCube = bgfx::createUniform("s_texCube", bgfx::UniformType::Int1); - bgfx::UniformHandle s_texColor = bgfx::createUniform("s_texColor", bgfx::UniformType::Int1); + if (m_blitSupported) + { + m_textureCube[1] = bgfx::createTextureCube(m_textureside, 1 + , bgfx::TextureFormat::BGRA8 + , BGFX_TEXTURE_MIN_POINT|BGFX_TEXTURE_MAG_POINT|BGFX_TEXTURE_MIP_POINT|BGFX_TEXTURE_BLIT_DST + ); + } - // Create time uniform. - bgfx::UniformHandle u_time = bgfx::createUniform("u_time", bgfx::UniformType::Vec4); + m_texture2d = bgfx::createTexture2D(m_texture2dSize, m_texture2dSize, 1 + , bgfx::TextureFormat::BGRA8 + , BGFX_TEXTURE_MIN_POINT|BGFX_TEXTURE_MAG_POINT|BGFX_TEXTURE_MIP_POINT + ); - const uint32_t textureSide = 2048; + m_m_texture2dData = (uint8_t*)malloc(m_texture2dSize*m_texture2dSize*4); - bgfx::TextureHandle textureCube = bgfx::createTextureCube(textureSide, 1 - , bgfx::TextureFormat::BGRA8 - , BGFX_TEXTURE_MIN_POINT|BGFX_TEXTURE_MAG_POINT|BGFX_TEXTURE_MIP_POINT - ); + m_rr = rand()%255; + m_gg = rand()%255; + m_bb = rand()%255; - const uint32_t texture2dSize = 256; + m_hit = 0; + m_miss = 0; - bgfx::TextureHandle texture2d = bgfx::createTexture2D(texture2dSize, texture2dSize, 1 - , bgfx::TextureFormat::BGRA8 - , BGFX_TEXTURE_MIN_POINT|BGFX_TEXTURE_MAG_POINT|BGFX_TEXTURE_MIP_POINT - ); + m_updateTime = 0; + m_timeOffset = bx::getHPCounter(); + } - uint8_t* texture2dData = (uint8_t*)malloc(texture2dSize*texture2dSize*4); + virtual int shutdown() BX_OVERRIDE + { + // m_m_texture2dData is managed from main thread, and it's passed to renderer + // just as MemoryRef. At this point render might be using it. We must wait + // previous frame to finish before we can free it. + bgfx::frame(); + + // Cleanup. + free(m_m_texture2dData); - uint8_t rr = rand()%255; - uint8_t gg = rand()%255; - uint8_t bb = rand()%255; + for (uint32_t ii = 0; ii < BX_COUNTOF(m_textures); ++ii) + { + bgfx::destroyTexture(m_textures[ii]); + } - int64_t updateTime = 0; + for (uint32_t ii = 0; ii < m_numm_textures3d; ++ii) + { + bgfx::destroyTexture(m_textures3d[ii]); + } - RectPackCubeT<256> cube(textureSide); + bgfx::destroyTexture(m_texture2d); + bgfx::destroyTexture(m_textureCube[0]); + if (m_blitSupported) + { + bgfx::destroyTexture(m_textureCube[1]); + } + bgfx::destroyIndexBuffer(m_ibh); + bgfx::destroyVertexBuffer(m_vbh); + if (bgfx::isValid(m_program3d) ) + { + bgfx::destroyProgram(m_program3d); + } + bgfx::destroyProgram(m_programCmp); + bgfx::destroyProgram(m_program); + bgfx::destroyUniform(u_time); + bgfx::destroyUniform(s_texColor); + bgfx::destroyUniform(s_texCube); - uint32_t hit = 0; - uint32_t miss = 0; - std::list<PackCube> quads; + // Shutdown bgfx. + bgfx::shutdown(); - int64_t timeOffset = bx::getHPCounter(); + return 0; + } - while (!entry::processEvents(width, height, debug, reset) ) + bool update() BX_OVERRIDE { - float borderColor[4] = { float(rand()%255)/255.0f, float(rand()%255)/255.0f, float(rand()%255)/255.0f, float(rand()%255)/255.0f }; - bgfx::setPaletteColor(1, borderColor); - - // Set view 0 and 1 viewport. - bgfx::setViewRect(0, 0, 0, width, height); - bgfx::setViewRect(1, 0, 0, width, height); - - // This dummy draw call is here to make sure that view 0 is cleared - // if no other draw calls are submitted to view 0. - bgfx::touch(0); - - int64_t now = bx::getHPCounter(); - static int64_t last = now; - const int64_t frameTime = now - last; - last = now; - const int64_t freq = bx::getHPFrequency(); - const double toMs = 1000.0/double(freq); - float time = (float)( (now - timeOffset)/double(bx::getHPFrequency() ) ); - bgfx::setUniform(u_time, &time); - - // Use debug font to print information about this example. - bgfx::dbgTextClear(); - bgfx::dbgTextPrintf(0, 1, 0x4f, "bgfx/examples/08-update"); - bgfx::dbgTextPrintf(0, 2, 0x6f, "Description: Updating textures."); - bgfx::dbgTextPrintf(0, 3, 0x0f, "Frame: % 7.3f[ms]", double(frameTime)*toMs); - - if (now > updateTime) + if (!entry::processEvents(m_width, m_height, m_debug, m_reset) ) { - PackCube face; - - uint32_t bw = bx::uint16_max(1, rand()%(textureSide/4) ); - uint32_t bh = bx::uint16_max(1, rand()%(textureSide/4) ); - - if (cube.find(bw, bh, face) ) + float borderColor[4] = { float(rand()%255)/255.0f, float(rand()%255)/255.0f, float(rand()%255)/255.0f, float(rand()%255)/255.0f }; + bgfx::setPaletteColor(1, borderColor); + + // Set view 0 and 1 viewport. + bgfx::setViewRect(0, 0, 0, m_width, m_height); + bgfx::setViewRect(1, 0, 0, m_width, m_height); + + // This dummy draw call is here to make sure that view 0 is cleared + // if no other draw calls are submitted to view 0. + bgfx::touch(0); + + int64_t now = bx::getHPCounter(); + static int64_t last = now; + const int64_t frameTime = now - last; + last = now; + const int64_t freq = bx::getHPFrequency(); + const double toMs = 1000.0/double(freq); + float time = (float)( (now - m_timeOffset)/double(bx::getHPFrequency() ) ); + bgfx::setUniform(u_time, &time); + + // Use debug font to print information about this example. + bgfx::dbgTextClear(); + bgfx::dbgTextPrintf(0, 1, 0x4f, "bgfx/examples/08-update"); + bgfx::dbgTextPrintf(0, 2, 0x6f, "Description: Updating m_textures."); + bgfx::dbgTextPrintf(0, 3, 0x0f, "Frame: % 7.3f[ms]", double(frameTime)*toMs); + + if (now > m_updateTime) { - quads.push_back(face); - - ++hit; - const Pack2D& rect = face.m_rect; + PackCube face; - updateTextureCubeRectBgra8(textureCube, face.m_side, rect.m_x, rect.m_y, rect.m_width, rect.m_height, rr, gg, bb); - - rr = rand()%255; - gg = rand()%255; - bb = rand()%255; - } - else - { - ++miss; + uint32_t bw = bx::uint16_max(1, rand()%(m_textureside/4) ); + uint32_t bh = bx::uint16_max(1, rand()%(m_textureside/4) ); - for (uint32_t ii = 0, num = bx::uint32_min(10, (uint32_t)quads.size() ); ii < num; ++ii) + if (m_cube.find(bw, bh, face) ) { - cube.clear(quads.front() ); - quads.pop_front(); - } - } - - { - // Fill rect. - const uint32_t pitch = texture2dSize*4; + m_quads.push_back(face); - const uint16_t tw = rand()%texture2dSize; - const uint16_t th = rand()%texture2dSize; - const uint16_t tx = rand()%(texture2dSize-tw); - const uint16_t ty = rand()%(texture2dSize-th); + ++m_hit; + const Pack2D& rect = face.m_rect; - uint8_t* dst = &texture2dData[(ty*texture2dSize+tx)*4]; - uint8_t* next = dst + pitch; - - // Using makeRef to pass texture memory without copying. - const bgfx::Memory* mem = bgfx::makeRef(dst, tw*th*4); - - for (uint32_t yy = 0; yy < th; ++yy, dst = next, next += pitch) - { - for (uint32_t xx = 0; xx < tw; ++xx, dst += 4) + updateTextureCubeRectBgra8(m_textureCube[0], face.m_side, rect.m_x, rect.m_y, rect.m_width, rect.m_height, m_rr, m_gg, m_bb); + if (m_blitSupported) { - dst[0] = bb; - dst[1] = gg; - dst[2] = rr; - dst[3] = 255; + bgfx::blit(0, m_textureCube[1], 0, rect.m_x, rect.m_y, face.m_side, m_textureCube[0], 0, rect.m_x, rect.m_y, face.m_side, rect.m_width, rect.m_height); } - } - // Pitch here makes possible to pass data from source to destination - // without need for textures and allocated memory to be the same size. - bgfx::updateTexture2D(texture2d, 0, tx, ty, tw, th, mem, pitch); - } - } + m_rr = rand()%255; + m_gg = rand()%255; + m_bb = rand()%255; + } + else + { + ++m_miss; - bgfx::dbgTextPrintf(0, 4, 0x0f, "hit: %d, miss %d", hit, miss); + for (uint32_t ii = 0, num = bx::uint32_min(10, (uint32_t)m_quads.size() ); ii < num; ++ii) + { + face = m_quads.front(); + const Pack2D& rect = face.m_rect; - float at[3] = { 0.0f, 0.0f, 0.0f }; - float eye[3] = { 0.0f, 0.0f, -5.0f }; + updateTextureCubeRectBgra8(m_textureCube[0], face.m_side, rect.m_x, rect.m_y, rect.m_width, rect.m_height, 0, 0, 0); + if (m_blitSupported) + { + bgfx::blit(0, m_textureCube[1], 0, rect.m_x, rect.m_y, face.m_side, m_textureCube[0], 0, rect.m_x, rect.m_y, face.m_side, rect.m_width, rect.m_height); + } - float view[16]; - float proj[16]; - bx::mtxLookAt(view, eye, at); - bx::mtxProj(proj, 60.0f, float(width)/float(height), 0.1f, 100.0f); + m_cube.clear(face); + m_quads.pop_front(); + } + } - // Set view and projection matrix for view 0. - bgfx::setViewTransform(0, view, proj); + { + // Fill rect. + const uint32_t pitch = m_texture2dSize*4; - float mtx[16]; - bx::mtxRotateXY(mtx, time, time*0.37f); + const uint16_t tw = rand()%m_texture2dSize; + const uint16_t th = rand()%m_texture2dSize; + const uint16_t tx = rand()%(m_texture2dSize-tw); + const uint16_t ty = rand()%(m_texture2dSize-th); - // Set model matrix for rendering. - bgfx::setTransform(mtx); + uint8_t* dst = &m_m_texture2dData[(ty*m_texture2dSize+tx)*4]; + uint8_t* next = dst + pitch; - // Set vertex and index buffer. - bgfx::setVertexBuffer(vbh); - bgfx::setIndexBuffer(ibh); + // Using makeRef to pass texture memory without copying. + const bgfx::Memory* mem = bgfx::makeRef(dst, tw*th*4); - // Bind texture. - bgfx::setTexture(0, s_texCube, textureCube); + for (uint32_t yy = 0; yy < th; ++yy, dst = next, next += pitch) + { + for (uint32_t xx = 0; xx < tw; ++xx, dst += 4) + { + dst[0] = m_bb; + dst[1] = m_gg; + dst[2] = m_rr; + dst[3] = 255; + } + } - // Set render states. - bgfx::setState(BGFX_STATE_DEFAULT); + // Pitch here makes possible to pass data from source to destination + // without need for m_textures and allocated memory to be the same size. + bgfx::updateTexture2D(m_texture2d, 0, tx, ty, tw, th, mem, pitch); + } + } - // Submit primitive for rendering to view 0. - bgfx::submit(0, program); + bgfx::dbgTextPrintf(0, 4, 0x0f, "m_hit: %d, m_miss %d", m_hit, m_miss); + float at[3] = { 0.0f, 0.0f, 0.0f }; + float eye[3] = { 0.0f, 0.0f, -5.0f }; - // Set view and projection matrix for view 1. - const float aspectRatio = float(height)/float(width); - const float size = 11.0f; - bx::mtxOrtho(proj, -size, size, size*aspectRatio, -size*aspectRatio, 0.0f, 1000.0f); - bgfx::setViewTransform(1, NULL, proj); + float view[16]; + float proj[16]; + bx::mtxLookAt(view, eye, at); + bx::mtxProj(proj, 60.0f, float(m_width)/float(m_height), 0.1f, 100.0f); + // Set view and projection matrix for view 0. + bgfx::setViewTransform(0, view, proj); - bx::mtxTranslate(mtx, -size+2.0f - BX_COUNTOF(textures)*0.1f*0.5f, 1.9f, 0.0f); + for (uint32_t ii = 0; ii < 1 + uint32_t(m_blitSupported); ++ii) + { + float mtx[16]; + bx::mtxSRT(mtx, 1.0f, 1.0f, 1.0f, time, time*0.37f, 0.0f, -1.5f*m_blitSupported + ii*3.0f, 0.0f, 0.0f); - // Set model matrix for rendering. - bgfx::setTransform(mtx); + // Set model matrix for rendering. + bgfx::setTransform(mtx); - // Set vertex and index buffer. - bgfx::setVertexBuffer(vbh); - bgfx::setIndexBuffer(ibh); + // Set vertex and index buffer. + bgfx::setVertexBuffer(m_vbh); + bgfx::setIndexBuffer(m_ibh); - // Bind texture. - bgfx::setTexture(0, s_texColor, texture2d); + // Bind texture. + bgfx::setTexture(0, s_texCube, m_textureCube[ii]); - // Set render states. - bgfx::setState(BGFX_STATE_DEFAULT); + // Set render states. + bgfx::setState(BGFX_STATE_DEFAULT); - // Submit primitive for rendering to view 1. - bgfx::submit(1, programCmp); + // Submit primitive for rendering to view 0. + bgfx::submit(0, m_program); + } - const float xpos = -size+2.0f - BX_COUNTOF(textures)*0.1f*0.5f; + // Set view and projection matrix for view 1. + const float aspectRatio = float(m_height)/float(m_width); + const float size = 11.0f; + bx::mtxOrtho(proj, -size, size, size*aspectRatio, -size*aspectRatio, 0.0f, 1000.0f); + bgfx::setViewTransform(1, NULL, proj); - for (uint32_t ii = 0; ii < BX_COUNTOF(textures); ++ii) - { - bx::mtxTranslate(mtx, xpos + ii*2.1f, size-6.5f, 0.0f); + float mtx[16]; + bx::mtxTranslate(mtx, -size+2.0f - BX_COUNTOF(m_textures)*0.1f*0.5f, 1.9f, 0.0f); // Set model matrix for rendering. bgfx::setTransform(mtx); // Set vertex and index buffer. - bgfx::setVertexBuffer(vbh); - bgfx::setIndexBuffer(ibh, 0, 6); + bgfx::setVertexBuffer(m_vbh); + bgfx::setIndexBuffer(m_ibh); // Bind texture. - bgfx::setTexture(0, s_texColor, textures[ii]); + bgfx::setTexture(0, s_texColor, m_texture2d); // Set render states. bgfx::setState(BGFX_STATE_DEFAULT); // Submit primitive for rendering to view 1. - bgfx::submit(1, programCmp); - } + bgfx::submit(1, m_programCmp); - for (uint32_t ii = 0; ii < numTextures3d; ++ii) - { - bx::mtxTranslate(mtx, xpos + ii*2.1f, -size+6.5f, 0.0f); + const float xpos = -size+2.0f - BX_COUNTOF(m_textures)*0.1f*0.5f; - // Set model matrix for rendering. - bgfx::setTransform(mtx); + for (uint32_t ii = 0; ii < BX_COUNTOF(m_textures); ++ii) + { + bx::mtxTranslate(mtx, xpos + ii*2.1f, size-6.5f, 0.0f); - // Set vertex and index buffer. - bgfx::setVertexBuffer(vbh); - bgfx::setIndexBuffer(ibh, 0, 6); + // Set model matrix for rendering. + bgfx::setTransform(mtx); - // Bind texture. - bgfx::setTexture(0, s_texColor, textures3d[ii]); + // Set vertex and index buffer. + bgfx::setVertexBuffer(m_vbh); + bgfx::setIndexBuffer(m_ibh, 0, 6); - // Set render states. - bgfx::setState(BGFX_STATE_DEFAULT); + // Bind texture. + bgfx::setTexture(0, s_texColor, m_textures[ii]); - // Submit primitive for rendering to view 1. - bgfx::submit(1, program3d); - } + // Set render states. + bgfx::setState(BGFX_STATE_DEFAULT); - for (uint32_t ii = 0; ii < 4; ++ii) - { - bx::mtxTranslate(mtx, xpos + (size-2.0f)*2.1f, -size+6.5f + ii*2.1f, 0.0f); + // Submit primitive for rendering to view 1. + bgfx::submit(1, m_programCmp); + } - // Set model matrix for rendering. - bgfx::setTransform(mtx); + for (uint32_t ii = 0; ii < m_numm_textures3d; ++ii) + { + bx::mtxTranslate(mtx, xpos + ii*2.1f, -size+6.5f, 0.0f); - // Set vertex and index buffer. - bgfx::setVertexBuffer(vbh, 24, 4); - bgfx::setIndexBuffer(ibh, 0, 6); + // Set model matrix for rendering. + bgfx::setTransform(mtx); - // Bind texture. - bgfx::setTexture(0, s_texColor, textures[ii]); + // Set vertex and index buffer. + bgfx::setVertexBuffer(m_vbh); + bgfx::setIndexBuffer(m_ibh, 0, 6); - // Set render states. - bgfx::setState(BGFX_STATE_DEFAULT); + // Bind texture. + bgfx::setTexture(0, s_texColor, m_textures3d[ii]); - // Submit primitive for rendering to view 1. - bgfx::submit(1, programCmp); - } + // Set render states. + bgfx::setState(BGFX_STATE_DEFAULT); - // Advance to next frame. Rendering thread will be kicked to - // process submitted rendering primitives. - bgfx::frame(); - } + // Submit primitive for rendering to view 1. + bgfx::submit(1, m_program3d); + } - // texture2dData is managed from main thread, and it's passed to renderer - // just as MemoryRef. At this point render might be using it. We must wait - // previous frame to finish before we can free it. - bgfx::frame(); + for (uint32_t ii = 0; ii < 4; ++ii) + { + bx::mtxTranslate(mtx, xpos + (size-2.0f)*2.1f, -size+6.5f + ii*2.1f, 0.0f); - // Cleanup. - free(texture2dData); + // Set model matrix for rendering. + bgfx::setTransform(mtx); - for (uint32_t ii = 0; ii < BX_COUNTOF(textures); ++ii) - { - bgfx::destroyTexture(textures[ii]); - } + // Set vertex and index buffer. + bgfx::setVertexBuffer(m_vbh, 24, 4); + bgfx::setIndexBuffer(m_ibh, 0, 6); - for (uint32_t ii = 0; ii < numTextures3d; ++ii) - { - bgfx::destroyTexture(textures3d[ii]); - } + // Bind texture. + bgfx::setTexture(0, s_texColor, m_textures[ii]); - bgfx::destroyTexture(texture2d); - bgfx::destroyTexture(textureCube); - bgfx::destroyIndexBuffer(ibh); - bgfx::destroyVertexBuffer(vbh); - if (bgfx::isValid(program3d) ) - { - bgfx::destroyProgram(program3d); + // Set render states. + bgfx::setState(BGFX_STATE_DEFAULT); + + // Submit primitive for rendering to view 1. + bgfx::submit(1, m_programCmp); + } + + // Advance to next frame. Rendering thread will be kicked to + // process submitted rendering primitives. + bgfx::frame(); + return true; + } + + return false; } - bgfx::destroyProgram(programCmp); - bgfx::destroyProgram(program); - bgfx::destroyUniform(u_time); - bgfx::destroyUniform(s_texColor); - bgfx::destroyUniform(s_texCube); - // Shutdown bgfx. - bgfx::shutdown(); + uint8_t* m_m_texture2dData; + + uint32_t m_width; + uint32_t m_height; + uint32_t m_debug; + uint32_t m_reset; + + uint32_t m_numm_textures3d; + bool m_texture3DSupported; + bool m_blitSupported; + + std::list<PackCube> m_quads; + RectPackCubeT<256> m_cube; + int64_t m_updateTime; + int64_t m_timeOffset; + + uint32_t m_hit; + uint32_t m_miss; + + uint8_t m_rr; + uint8_t m_gg; + uint8_t m_bb; + + bgfx::TextureHandle m_textures[9]; + bgfx::TextureHandle m_textures3d[3]; + bgfx::TextureHandle m_texture2d; + bgfx::TextureHandle m_textureCube[2]; + bgfx::IndexBufferHandle m_ibh; + bgfx::VertexBufferHandle m_vbh; + bgfx::ProgramHandle m_program3d; + bgfx::ProgramHandle m_programCmp; + bgfx::ProgramHandle m_program; + bgfx::UniformHandle u_time; + bgfx::UniformHandle s_texColor; + bgfx::UniformHandle s_texCube; - return 0; -} +}; + +ENTRY_IMPLEMENT_MAIN(Update); diff --git a/3rdparty/bgfx/examples/09-hdr/hdr.cpp b/3rdparty/bgfx/examples/09-hdr/hdr.cpp index 9ad7eb5aeca..a5985f45e75 100644 --- a/3rdparty/bgfx/examples/09-hdr/hdr.cpp +++ b/3rdparty/bgfx/examples/09-hdr/hdr.cpp @@ -141,14 +141,16 @@ inline float square(float _x) class HDR : public entry::AppI { - void init(int /*_argc*/, char** /*_argv*/) BX_OVERRIDE + void init(int _argc, char** _argv) BX_OVERRIDE { - m_width = 1280; + Args args(_argc, _argv); + + m_width = 1280; m_height = 720; - m_debug = BGFX_DEBUG_TEXT; - m_reset = BGFX_RESET_VSYNC; + m_debug = BGFX_DEBUG_TEXT; + m_reset = BGFX_RESET_VSYNC; - bgfx::init(); + bgfx::init(args.m_type, args.m_pciId); bgfx::reset(m_width, m_height, m_reset); // Enable m_debug text. @@ -215,6 +217,16 @@ class HDR : public entry::AppI m_bright = bgfx::createFrameBuffer(bgfx::BackbufferRatio::Half, bgfx::TextureFormat::BGRA8); m_blur = bgfx::createFrameBuffer(bgfx::BackbufferRatio::Eighth, bgfx::TextureFormat::BGRA8); + m_lumBgra8 = 0; + if ( (BGFX_CAPS_TEXTURE_BLIT|BGFX_CAPS_TEXTURE_READ_BACK) == (bgfx::getCaps()->supported & (BGFX_CAPS_TEXTURE_BLIT|BGFX_CAPS_TEXTURE_READ_BACK) ) ) + { + m_rb = bgfx::createTexture2D(1, 1, 1, bgfx::TextureFormat::BGRA8, BGFX_TEXTURE_READ_BACK); + } + else + { + m_rb.idx = bgfx::invalidHandle; + } + // Imgui. imguiCreate(); @@ -259,6 +271,10 @@ class HDR : public entry::AppI bgfx::destroyProgram(m_blurProgram); bgfx::destroyProgram(m_brightProgram); bgfx::destroyTexture(m_uffizi); + if (bgfx::isValid(m_rb) ) + { + bgfx::destroyTexture(m_rb); + } bgfx::destroyUniform(s_texCube); bgfx::destroyUniform(s_texColor); @@ -306,7 +322,7 @@ class HDR : public entry::AppI , m_height ); - imguiBeginScrollArea("Settings", m_width - m_width / 5 - 10, 10, m_width / 5, m_height / 3, &m_scrollArea); + imguiBeginScrollArea("Settings", m_width - m_width / 5 - 10, 10, m_width / 5, m_height / 2, &m_scrollArea); imguiSeparatorLine(); imguiSlider("Speed", m_speed, 0.0f, 1.0f, 0.01f); @@ -316,6 +332,14 @@ class HDR : public entry::AppI imguiSlider("White point", m_white, 0.1f, 2.0f, 0.01f); imguiSlider("Threshold", m_threshold, 0.1f, 2.0f, 0.01f); + if (bgfx::isValid(m_rb) ) + { + union { uint32_t color; uint8_t bgra[4]; } cast = { m_lumBgra8 }; + float exponent = cast.bgra[3]/255.0f * 255.0f - 128.0f; + float lumAvg = cast.bgra[2]/255.0f * exp2(exponent); + imguiSlider("Lum Avg", lumAvg, 0.0f, 1.0f, 0.01f, false); + } + imguiEndScrollArea(); imguiEndFrame(); @@ -341,7 +365,7 @@ class HDR : public entry::AppI // Set views. for (uint32_t ii = 0; ii < 6; ++ii) { - bgfx::setViewRect(ii, 0, 0, m_width, m_height); + bgfx::setViewRect(ii, 0, 0, bgfx::BackbufferRatio::Equal); } bgfx::setViewFrameBuffer(0, m_fbh); bgfx::setViewFrameBuffer(1, m_fbh); @@ -362,13 +386,13 @@ class HDR : public entry::AppI bgfx::setViewRect(6, 0, 0, 1, 1); bgfx::setViewFrameBuffer(6, m_lum[4]); - bgfx::setViewRect(7, 0, 0, m_width/2, m_height/2); + bgfx::setViewRect(7, 0, 0, bgfx::BackbufferRatio::Half); bgfx::setViewFrameBuffer(7, m_bright); - bgfx::setViewRect(8, 0, 0, m_width/8, m_height/8); + bgfx::setViewRect(8, 0, 0, bgfx::BackbufferRatio::Eighth); bgfx::setViewFrameBuffer(8, m_blur); - bgfx::setViewRect(9, 0, 0, m_width, m_height); + bgfx::setViewRect(9, 0, 0, bgfx::BackbufferRatio::Equal); float view[16]; float proj[16]; @@ -473,6 +497,12 @@ class HDR : public entry::AppI screenSpaceQuad( (float)m_width, (float)m_height, s_originBottomLeft); bgfx::submit(9, m_tonemapProgram); + if (bgfx::isValid(m_rb) ) + { + bgfx::blit(9, m_rb, 0, 0, m_lum[4]); + bgfx::readTexture(m_rb, &m_lumBgra8); + } + // Advance to next frame. Rendering thread will be kicked to // process submitted rendering primitives. bgfx::frame(); @@ -505,6 +535,7 @@ class HDR : public entry::AppI Mesh* m_mesh; bgfx::TextureHandle m_fbtextures[2]; + bgfx::TextureHandle m_rb; bgfx::FrameBufferHandle m_fbh; bgfx::FrameBufferHandle m_lum[5]; bgfx::FrameBufferHandle m_bright; @@ -514,6 +545,7 @@ class HDR : public entry::AppI uint32_t m_height; uint32_t m_debug; uint32_t m_reset; + uint32_t m_lumBgra8; uint32_t m_oldWidth; uint32_t m_oldHeight; diff --git a/3rdparty/bgfx/examples/10-font/font.cpp b/3rdparty/bgfx/examples/10-font/font.cpp index 660ff2998af..1701e566c41 100644 --- a/3rdparty/bgfx/examples/10-font/font.cpp +++ b/3rdparty/bgfx/examples/10-font/font.cpp @@ -4,8 +4,8 @@ */ #include "common.h" +#include "bgfx_utils.h" -#include <bgfx/bgfx.h> #include <bx/timer.h> #include <bx/string.h> #include <bx/fpumath.h> @@ -46,15 +46,16 @@ TrueTypeHandle loadTtf(FontManager* _fm, const char* _filePath) return invalid; } -int _main_(int /*_argc*/, char** /*_argv*/) +int _main_(int _argc, char** _argv) { + Args args(_argc, _argv); + uint32_t width = 1280; uint32_t height = 720; uint32_t debug = BGFX_DEBUG_TEXT; uint32_t reset = BGFX_RESET_VSYNC; - bgfx::init(); - + bgfx::init(args.m_type, args.m_pciId); bgfx::reset(width, height, reset); // Enable debug text. diff --git a/3rdparty/bgfx/examples/11-fontsdf/fontsdf.cpp b/3rdparty/bgfx/examples/11-fontsdf/fontsdf.cpp index d54d4756cd8..72881bb908e 100644 --- a/3rdparty/bgfx/examples/11-fontsdf/fontsdf.cpp +++ b/3rdparty/bgfx/examples/11-fontsdf/fontsdf.cpp @@ -64,15 +64,16 @@ TrueTypeHandle loadTtf(FontManager* _fm, const char* _filePath) return invalid; } -int _main_(int /*_argc*/, char** /*_argv*/) +int _main_(int _argc, char** _argv) { + Args args(_argc, _argv); + uint32_t width = 1280; uint32_t height = 720; uint32_t debug = BGFX_DEBUG_TEXT; uint32_t reset = BGFX_RESET_VSYNC; - bgfx::init(); - + bgfx::init(args.m_type, args.m_pciId); bgfx::reset(width, height, reset); // Enable debug text. diff --git a/3rdparty/bgfx/examples/12-lod/fs_tree.sc b/3rdparty/bgfx/examples/12-lod/fs_tree.sc index 4ff3b4805ea..7b8e0fbb1f6 100644 --- a/3rdparty/bgfx/examples/12-lod/fs_tree.sc +++ b/3rdparty/bgfx/examples/12-lod/fs_tree.sc @@ -7,8 +7,8 @@ $input v_pos, v_view, v_normal, v_texcoord0 #include "../common/common.sh" -SAMPLER2D(u_texColor, 0); -SAMPLER2D(u_texStipple, 1); +SAMPLER2D(s_texColor, 0); +SAMPLER2D(s_texStipple, 1); uniform vec4 u_stipple; vec2 blinn(vec3 _lightDir, vec3 _normal, vec3 _viewDir) @@ -23,8 +23,8 @@ void main() { vec2 viewport = (u_viewRect.zw - u_viewRect.xy) * vec2(1.0/8.0, 1.0/4.0); vec2 stippleUV = viewport*(v_pos.xy*0.5 + 0.5); - vec4 color = texture2D(u_texColor, v_texcoord0); - if ( (u_stipple.x - texture2D(u_texStipple,stippleUV).x)*u_stipple.y > u_stipple.z + vec4 color = texture2D(s_texColor, v_texcoord0); + if ( (u_stipple.x - texture2D(s_texStipple, stippleUV).x)*u_stipple.y > u_stipple.z || color.w < 0.5) { discard; @@ -34,7 +34,7 @@ void main() vec3 normal = normalize(v_normal); vec3 view = normalize(v_view); vec2 bln = blinn(lightDir, normal, view); - float l = saturate(bln.y); + float l = saturate(bln.y) + 0.12; color.xyz = toLinear(color.xyz)*l; gl_FragColor = toGamma(color); diff --git a/3rdparty/bgfx/examples/12-lod/lod.cpp b/3rdparty/bgfx/examples/12-lod/lod.cpp index c57d7bd820d..d47cc3708c5 100644 --- a/3rdparty/bgfx/examples/12-lod/lod.cpp +++ b/3rdparty/bgfx/examples/12-lod/lod.cpp @@ -15,7 +15,7 @@ struct KnightPos int32_t m_y; }; -KnightPos knightTour[8*4] = +static const KnightPos knightTour[8*4] = { {0,0}, {1,2}, {3,3}, {4,1}, {5,3}, {7,2}, {6,0}, {5,2}, {7,3}, {6,1}, {4,0}, {3,2}, {2,0}, {0,1}, {1,3}, {2,1}, @@ -23,273 +23,297 @@ KnightPos knightTour[8*4] = {7,1}, {6,3}, {5,1}, {7,0}, {6,2}, {4,3}, {3,1}, {2,3}, }; -int _main_(int /*_argc*/, char** /*_argv*/) +class Lod : public entry::AppI { - uint32_t width = 1280; - uint32_t height = 720; - uint32_t debug = BGFX_DEBUG_TEXT; - uint32_t reset = BGFX_RESET_VSYNC; + void init(int _argc, char** _argv) BX_OVERRIDE + { + Args args(_argc, _argv); - bgfx::init(); - bgfx::reset(width, height, reset); + m_width = 1280; + m_height = 720; + m_debug = BGFX_DEBUG_TEXT; + m_reset = BGFX_RESET_VSYNC; - // Enable debug text. - bgfx::setDebug(debug); + bgfx::init(args.m_type, args.m_pciId); + bgfx::reset(m_width, m_height, m_reset); - // Set view 0 clear state. - bgfx::setViewClear(0 - , BGFX_CLEAR_COLOR|BGFX_CLEAR_DEPTH - , 0x303030ff - , 1.0f - , 0 - ); + // Enable debug text. + bgfx::setDebug(m_debug); - bgfx::UniformHandle s_texColor = bgfx::createUniform("s_texColor", bgfx::UniformType::Int1); - bgfx::UniformHandle s_texStipple = bgfx::createUniform("s_texStipple", bgfx::UniformType::Int1); - bgfx::UniformHandle u_stipple = bgfx::createUniform("u_stipple", bgfx::UniformType::Vec4); + // Set view 0 clear state. + bgfx::setViewClear(0 + , BGFX_CLEAR_COLOR|BGFX_CLEAR_DEPTH + , 0x303030ff + , 1.0f + , 0 + ); - bgfx::ProgramHandle program = loadProgram("vs_tree", "fs_tree"); + s_texColor = bgfx::createUniform("s_texColor", bgfx::UniformType::Int1); + s_texStipple = bgfx::createUniform("s_texStipple", bgfx::UniformType::Int1); + u_stipple = bgfx::createUniform("u_stipple", bgfx::UniformType::Vec4); - bgfx::TextureHandle textureLeafs = loadTexture("leafs1.dds"); - bgfx::TextureHandle textureBark = loadTexture("bark1.dds"); + m_program = loadProgram("vs_tree", "fs_tree"); - bgfx::TextureHandle textureStipple; + m_textureLeafs = loadTexture("leafs1.dds"); + m_textureBark = loadTexture("bark1.dds"); - const bgfx::Memory* stippleTex = bgfx::alloc(8*4); - memset(stippleTex->data, 0, stippleTex->size); + const bgfx::Memory* stippleTex = bgfx::alloc(8*4); + memset(stippleTex->data, 0, stippleTex->size); - for (uint32_t ii = 0; ii < 32; ++ii) - { - stippleTex->data[knightTour[ii].m_y * 8 + knightTour[ii].m_x] = ii*4; - } + for (uint32_t ii = 0; ii < 32; ++ii) + { + stippleTex->data[knightTour[ii].m_y * 8 + knightTour[ii].m_x] = ii*4; + } - textureStipple = bgfx::createTexture2D(8, 4, 1 + m_textureStipple = bgfx::createTexture2D(8, 4, 1 , bgfx::TextureFormat::R8 , BGFX_TEXTURE_MAG_POINT|BGFX_TEXTURE_MIN_POINT , stippleTex ); - Mesh* meshTop[3] = - { - meshLoad("meshes/tree1b_lod0_1.bin"), - meshLoad("meshes/tree1b_lod1_1.bin"), - meshLoad("meshes/tree1b_lod2_1.bin"), - }; + m_meshTop[0] = meshLoad("meshes/tree1b_lod0_1.bin"); + m_meshTop[1] = meshLoad("meshes/tree1b_lod1_1.bin"); + m_meshTop[2] = meshLoad("meshes/tree1b_lod2_1.bin"); - Mesh* meshTrunk[3] = - { - meshLoad("meshes/tree1b_lod0_2.bin"), - meshLoad("meshes/tree1b_lod1_2.bin"), - meshLoad("meshes/tree1b_lod2_2.bin"), - }; - - // Imgui. - imguiCreate(); - - const uint64_t stateCommon = 0 - | BGFX_STATE_RGB_WRITE - | BGFX_STATE_ALPHA_WRITE - | BGFX_STATE_DEPTH_TEST_LESS - | BGFX_STATE_CULL_CCW - | BGFX_STATE_MSAA - ; - - const uint64_t stateTransparent = stateCommon - | BGFX_STATE_BLEND_ALPHA - ; - - const uint64_t stateOpaque = stateCommon - | BGFX_STATE_DEPTH_WRITE - ; - - int32_t scrollArea = 0; - - bool transitions = true; - int transitionFrame = 0; - int currLOD = 0; - int targetLOD = 0; - - float at[3] = { 0.0f, 1.0f, 0.0f }; - float eye[3] = { 0.0f, 1.0f, -2.0f }; - - entry::MouseState mouseState; - while (!entry::processEvents(width, height, debug, reset, &mouseState) ) - { - imguiBeginFrame(mouseState.m_mx - , mouseState.m_my - , (mouseState.m_buttons[entry::MouseButton::Left ] ? IMGUI_MBUT_LEFT : 0) - | (mouseState.m_buttons[entry::MouseButton::Right ] ? IMGUI_MBUT_RIGHT : 0) - | (mouseState.m_buttons[entry::MouseButton::Middle] ? IMGUI_MBUT_MIDDLE : 0) - , mouseState.m_mz - , width - , height - ); + m_meshTrunk[0] = meshLoad("meshes/tree1b_lod0_2.bin"); + m_meshTrunk[1] = meshLoad("meshes/tree1b_lod1_2.bin"); + m_meshTrunk[2] = meshLoad("meshes/tree1b_lod2_2.bin"); - imguiBeginScrollArea("Toggle transitions", width - width / 5 - 10, 10, width / 5, height / 6, &scrollArea); - imguiSeparatorLine(); + // Imgui. + imguiCreate(); - if (imguiButton(transitions ? "ON" : "OFF") ) - { - transitions = !transitions; - } + m_scrollArea = 0; + m_transitions = true; - static float distance = 2.0f; - imguiSlider("Distance", distance, 2.0f, 6.0f, .01f); + m_transitionFrame = 0; + m_currLod = 0; + m_targetLod = 0; + } + + virtual int shutdown() BX_OVERRIDE + { + imguiDestroy(); - imguiEndScrollArea(); - imguiEndFrame(); + for (uint32_t ii = 0; ii < BX_COUNTOF(m_meshTop); ++ii) + { + meshUnload(m_meshTop[ii]); + meshUnload(m_meshTrunk[ii]); + } - // Set view 0 default viewport. - bgfx::setViewRect(0, 0, 0, width, height); + // Cleanup. + bgfx::destroyProgram(m_program); - // This dummy draw call is here to make sure that view 0 is cleared - // if no other draw calls are submitted to view 0. - bgfx::touch(0); + bgfx::destroyUniform(s_texColor); + bgfx::destroyUniform(s_texStipple); + bgfx::destroyUniform(u_stipple); - int64_t now = bx::getHPCounter(); - static int64_t last = now; - const int64_t frameTime = now - last; - last = now; - const double freq = double(bx::getHPFrequency() ); - const double toMs = 1000.0/freq; + bgfx::destroyTexture(m_textureStipple); + bgfx::destroyTexture(m_textureLeafs); + bgfx::destroyTexture(m_textureBark); - // Use debug font to print information about this example. - bgfx::dbgTextClear(); - bgfx::dbgTextPrintf(0, 1, 0x4f, "bgfx/examples/12-lod"); - bgfx::dbgTextPrintf(0, 2, 0x6f, "Description: Mesh LOD transitions."); - bgfx::dbgTextPrintf(0, 3, 0x0f, "Frame: % 7.3f[ms]", double(frameTime)*toMs); - bgfx::dbgTextPrintf(0, 4, transitions ? 0x2f : 0x1f, transitions ? "Transitions on" : "Transitions off"); + // Shutdown bgfx. + bgfx::shutdown(); - eye[2] = -distance; + return 0; + } - // Set view and projection matrix for view 0. - const bgfx::HMD* hmd = bgfx::getHMD(); - if (NULL != hmd && 0 != (hmd->flags & BGFX_HMD_RENDERING) ) + bool update() BX_OVERRIDE + { + if (!entry::processEvents(m_width, m_height, m_debug, m_reset, &m_mouseState) ) { - float view[16]; - bx::mtxQuatTranslationHMD(view, hmd->eye[0].rotation, eye); + imguiBeginFrame(m_mouseState.m_mx + , m_mouseState.m_my + , (m_mouseState.m_buttons[entry::MouseButton::Left ] ? IMGUI_MBUT_LEFT : 0) + | (m_mouseState.m_buttons[entry::MouseButton::Right ] ? IMGUI_MBUT_RIGHT : 0) + | (m_mouseState.m_buttons[entry::MouseButton::Middle] ? IMGUI_MBUT_MIDDLE : 0) + , m_mouseState.m_mz + , m_width + , m_height + ); + + imguiBeginScrollArea("Toggle transitions", m_width - m_width / 5 - 10, 10, m_width / 5, m_height / 6, &m_scrollArea); + imguiSeparatorLine(); + + if (imguiButton(m_transitions ? "ON" : "OFF") ) + { + m_transitions = !m_transitions; + } - float proj[16]; - bx::mtxProj(proj, hmd->eye[0].fov, 0.1f, 100.0f); + static float distance = 2.0f; + imguiSlider("Distance", distance, 2.0f, 6.0f, 0.01f); - bgfx::setViewTransform(0, view, proj); + imguiEndScrollArea(); + imguiEndFrame(); // Set view 0 default viewport. - // - // Use HMD's width/height since HMD's internal frame buffer size - // might be much larger than window size. - bgfx::setViewRect(0, 0, 0, hmd->width, hmd->height); - } - else - { - float view[16]; - bx::mtxLookAt(view, eye, at); + bgfx::setViewRect(0, 0, 0, m_width, m_height); + + // This dummy draw call is here to make sure that view 0 is cleared + // if no other draw calls are submitted to view 0. + bgfx::touch(0); + + int64_t now = bx::getHPCounter(); + static int64_t last = now; + const int64_t frameTime = now - last; + last = now; + const double freq = double(bx::getHPFrequency() ); + const double toMs = 1000.0/freq; + + // Use debug font to print information about this example. + bgfx::dbgTextClear(); + bgfx::dbgTextPrintf(0, 1, 0x4f, "bgfx/examples/12-lod"); + bgfx::dbgTextPrintf(0, 2, 0x6f, "Description: Mesh LOD transitions."); + bgfx::dbgTextPrintf(0, 3, 0x0f, "Frame: % 7.3f[ms]", double(frameTime)*toMs); + + float at[3] = { 0.0f, 1.0f, 0.0f }; + float eye[3] = { 0.0f, 2.0f, -distance }; + + // Set view and projection matrix for view 0. + const bgfx::HMD* hmd = bgfx::getHMD(); + if (NULL != hmd && 0 != (hmd->flags & BGFX_HMD_RENDERING) ) + { + float view[16]; + bx::mtxQuatTranslationHMD(view, hmd->eye[0].rotation, eye); - float proj[16]; - bx::mtxProj(proj, 60.0f, float(width)/float(height), 0.1f, 100.0f); - bgfx::setViewTransform(0, view, proj); + float proj[16]; + bx::mtxProj(proj, hmd->eye[0].fov, 0.1f, 100.0f); - // Set view 0 default viewport. - bgfx::setViewRect(0, 0, 0, width, height); - } + bgfx::setViewTransform(0, view, proj); - float mtx[16]; - bx::mtxScale(mtx, 0.1f, 0.1f, 0.1f); + // Set view 0 default viewport. + // + // Use HMD's m_width/m_height since HMD's internal frame buffer size + // might be much larger than window size. + bgfx::setViewRect(0, 0, 0, hmd->width, hmd->height); + } + else + { + float view[16]; + bx::mtxLookAt(view, eye, at); - float stipple[3]; - float stippleInv[3]; + float proj[16]; + bx::mtxProj(proj, 60.0f, float(m_width)/float(m_height), 0.1f, 100.0f); + bgfx::setViewTransform(0, view, proj); - const int currentLODframe = transitions ? 32-transitionFrame : 32; - const int mainLOD = transitions ? currLOD : targetLOD; + // Set view 0 default viewport. + bgfx::setViewRect(0, 0, 0, m_width, m_height); + } - stipple[0] = 0.0f; - stipple[1] = -1.0f; - stipple[2] = (float(currentLODframe)*4.0f/255.0f) - (1.0f/255.0f); + float mtx[16]; + bx::mtxScale(mtx, 0.1f, 0.1f, 0.1f); - stippleInv[0] = (float(31)*4.0f/255.0f); - stippleInv[1] = 1.0f; - stippleInv[2] = (float(transitionFrame)*4.0f/255.0f) - (1.0f/255.0f); + float stipple[3]; + float stippleInv[3]; - bgfx::setTexture(0, s_texColor, textureBark); - bgfx::setTexture(1, s_texStipple, textureStipple); - bgfx::setUniform(u_stipple, stipple); - meshSubmit(meshTrunk[mainLOD], 0, program, mtx, stateOpaque); + const int currentLODframe = m_transitions ? 32-m_transitionFrame : 32; + const int mainLOD = m_transitions ? m_currLod : m_targetLod; - bgfx::setTexture(0, s_texColor, textureLeafs); - bgfx::setTexture(1, s_texStipple, textureStipple); - bgfx::setUniform(u_stipple, stipple); - meshSubmit(meshTop[mainLOD], 0, program, mtx, stateTransparent); + stipple[0] = 0.0f; + stipple[1] = -1.0f; + stipple[2] = (float(currentLODframe)*4.0f/255.0f) - (1.0f/255.0f); - if (transitions - && (transitionFrame != 0) ) - { - bgfx::setTexture(0, s_texColor, textureBark); - bgfx::setTexture(1, s_texStipple, textureStipple); - bgfx::setUniform(u_stipple, stippleInv); - meshSubmit(meshTrunk[targetLOD], 0, program, mtx, stateOpaque); - - bgfx::setTexture(0, s_texColor, textureLeafs); - bgfx::setTexture(1, s_texStipple, textureStipple); - bgfx::setUniform(u_stipple, stippleInv); - meshSubmit(meshTop[targetLOD], 0, program, mtx, stateTransparent); - } + stippleInv[0] = (float(31)*4.0f/255.0f); + stippleInv[1] = 1.0f; + stippleInv[2] = (float(m_transitionFrame)*4.0f/255.0f) - (1.0f/255.0f); - int lod = 0; - if (eye[2] < -2.5f) - { - lod = 1; - } + const uint64_t stateTransparent = 0 + | BGFX_STATE_RGB_WRITE + | BGFX_STATE_ALPHA_WRITE + | BGFX_STATE_DEPTH_TEST_LESS + | BGFX_STATE_CULL_CCW + | BGFX_STATE_MSAA + | BGFX_STATE_BLEND_ALPHA + ; - if (eye[2] < -5.0f) - { - lod = 2; - } + const uint64_t stateOpaque = BGFX_STATE_DEFAULT; - if (targetLOD!=lod) - { - if (targetLOD==currLOD) + bgfx::setTexture(0, s_texColor, m_textureBark); + bgfx::setTexture(1, s_texStipple, m_textureStipple); + bgfx::setUniform(u_stipple, stipple); + meshSubmit(m_meshTrunk[mainLOD], 0, m_program, mtx, stateOpaque); + + bgfx::setTexture(0, s_texColor, m_textureLeafs); + bgfx::setTexture(1, s_texStipple, m_textureStipple); + bgfx::setUniform(u_stipple, stipple); + meshSubmit(m_meshTop[mainLOD], 0, m_program, mtx, stateTransparent); + + if (m_transitions + && (m_transitionFrame != 0) ) { - targetLOD = lod; + bgfx::setTexture(0, s_texColor, m_textureBark); + bgfx::setTexture(1, s_texStipple, m_textureStipple); + bgfx::setUniform(u_stipple, stippleInv); + meshSubmit(m_meshTrunk[m_targetLod], 0, m_program, mtx, stateOpaque); + + bgfx::setTexture(0, s_texColor, m_textureLeafs); + bgfx::setTexture(1, s_texStipple, m_textureStipple); + bgfx::setUniform(u_stipple, stippleInv); + meshSubmit(m_meshTop[m_targetLod], 0, m_program, mtx, stateTransparent); } - } - if (currLOD != targetLOD) - { - transitionFrame++; - } + int lod = 0; + if (eye[2] < -2.5f) + { + lod = 1; + } - if (transitionFrame>32) - { - currLOD = targetLOD; - transitionFrame = 0; - } + if (eye[2] < -5.0f) + { + lod = 2; + } - // Advance to next frame. Rendering thread will be kicked to - // process submitted rendering primitives. - bgfx::frame(); - } + if (m_targetLod != lod) + { + if (m_targetLod == m_currLod) + { + m_targetLod = lod; + } + } - imguiDestroy(); + if (m_currLod != m_targetLod) + { + m_transitionFrame++; + } - for (uint32_t ii = 0; ii < 3; ++ii) - { - meshUnload(meshTop[ii]); - meshUnload(meshTrunk[ii]); - } + if (m_transitionFrame > 32) + { + m_currLod = m_targetLod; + m_transitionFrame = 0; + } - // Cleanup. - bgfx::destroyProgram(program); + // Advance to next frame. Rendering thread will be kicked to + // process submitted rendering primitives. + bgfx::frame(); - bgfx::destroyUniform(s_texColor); - bgfx::destroyUniform(s_texStipple); - bgfx::destroyUniform(u_stipple); + return true; + } - bgfx::destroyTexture(textureStipple); - bgfx::destroyTexture(textureLeafs); - bgfx::destroyTexture(textureBark); + return false; + } - // Shutdown bgfx. - bgfx::shutdown(); + entry::MouseState m_mouseState; + uint32_t m_width; + uint32_t m_height; + uint32_t m_debug; + uint32_t m_reset; + + Mesh* m_meshTop[3]; + Mesh* m_meshTrunk[3]; + + bgfx::ProgramHandle m_program; + bgfx::UniformHandle s_texColor; + bgfx::UniformHandle s_texStipple; + bgfx::UniformHandle u_stipple; + + bgfx::TextureHandle m_textureStipple; + bgfx::TextureHandle m_textureLeafs; + bgfx::TextureHandle m_textureBark; + + int32_t m_scrollArea; + int32_t m_transitionFrame; + int32_t m_currLod; + int32_t m_targetLod; + bool m_transitions; +}; - return 0; -} +ENTRY_IMPLEMENT_MAIN(Lod); diff --git a/3rdparty/bgfx/examples/13-stencil/fs_stencil_texture_lightning.sc b/3rdparty/bgfx/examples/13-stencil/fs_stencil_texture_lightning.sc index 07ce0c84297..43e4ff38190 100644 --- a/3rdparty/bgfx/examples/13-stencil/fs_stencil_texture_lightning.sc +++ b/3rdparty/bgfx/examples/13-stencil/fs_stencil_texture_lightning.sc @@ -16,7 +16,7 @@ uniform vec4 u_color; uniform vec4 u_specular_shininess; uniform vec4 u_lightPosRadius[MAX_NUM_LIGHTS]; uniform vec4 u_lightRgbInnerR[MAX_NUM_LIGHTS]; -SAMPLER2D(u_texColor, 0); +SAMPLER2D(s_texColor, 0); #define u_ambientPass u_params.x #define u_lightingPass u_params.y @@ -80,7 +80,7 @@ void main() } lightColor *= u_lightingPass; - vec3 color = toLinear(texture2D(u_texColor, v_texcoord0)).xyz; + vec3 color = toLinear(texture2D(s_texColor, v_texcoord0)).xyz; vec3 ambient = toGamma(ambientColor * color); vec3 diffuse = toGamma(lightColor * color); diff --git a/3rdparty/bgfx/examples/13-stencil/stencil.cpp b/3rdparty/bgfx/examples/13-stencil/stencil.cpp index 7a1e90d2834..168c19ba569 100644 --- a/3rdparty/bgfx/examples/13-stencil/stencil.cpp +++ b/3rdparty/bgfx/examples/13-stencil/stencil.cpp @@ -828,15 +828,17 @@ struct Mesh GroupArray m_groups; }; -int _main_(int /*_argc*/, char** /*_argv*/) +int _main_(int _argc, char** _argv) { + Args args(_argc, _argv); + ViewState viewState(1280, 720); ClearValues clearValues(0x30303000, 1.0f, 0); uint32_t debug = BGFX_DEBUG_TEXT; uint32_t reset = BGFX_RESET_VSYNC; - bgfx::init(); + bgfx::init(args.m_type, args.m_pciId); bgfx::reset(viewState.m_width, viewState.m_height, reset); // Enable debug text. diff --git a/3rdparty/bgfx/examples/14-shadowvolumes/shadowvolumes.cpp b/3rdparty/bgfx/examples/14-shadowvolumes/shadowvolumes.cpp index 17a19ab566c..f8d5061204f 100644 --- a/3rdparty/bgfx/examples/14-shadowvolumes/shadowvolumes.cpp +++ b/3rdparty/bgfx/examples/14-shadowvolumes/shadowvolumes.cpp @@ -1850,15 +1850,17 @@ bool clipTest(const float* _planes, uint8_t _planeNum, const Mesh& _mesh, const return false; } -int _main_(int /*_argc*/, char** /*_argv*/) +int _main_(int _argc, char** _argv) { + Args args(_argc, _argv); + ViewState viewState(1280, 720); ClearValues clearValues = {0x00000000, 1.0f, 0}; uint32_t debug = BGFX_DEBUG_TEXT; uint32_t reset = BGFX_RESET_VSYNC; - bgfx::init(); + bgfx::init(args.m_type, args.m_pciId); bgfx::reset(viewState.m_width, viewState.m_height, reset); // Enable debug text. diff --git a/3rdparty/bgfx/examples/15-shadowmaps-simple/fs_sms_shadow.sh b/3rdparty/bgfx/examples/15-shadowmaps-simple/fs_sms_shadow.sh index f3a88945cf5..a38a90f2ffc 100644 --- a/3rdparty/bgfx/examples/15-shadowmaps-simple/fs_sms_shadow.sh +++ b/3rdparty/bgfx/examples/15-shadowmaps-simple/fs_sms_shadow.sh @@ -7,10 +7,10 @@ uniform vec4 u_lightPos; #if SHADOW_PACKED_DEPTH -SAMPLER2D(u_shadowMap, 0); +SAMPLER2D(s_shadowMap, 0); # define Sampler sampler2D #else -SAMPLER2DSHADOW(u_shadowMap, 0); +SAMPLER2DSHADOW(s_shadowMap, 0); # define Sampler sampler2DShadow #endif // SHADOW_PACKED_DEPTH @@ -90,7 +90,7 @@ void main() vec2 lc = lit(ld, n, vd, 1.0); vec2 texelSize = vec2_splat(1.0/512.0); - float visibility = PCF(u_shadowMap, v_shadowcoord, shadowMapBias, texelSize); + float visibility = PCF(s_shadowMap, v_shadowcoord, shadowMapBias, texelSize); vec3 ambient = 0.1 * color; vec3 brdf = (lc.x + lc.y) * color * visibility; diff --git a/3rdparty/bgfx/examples/15-shadowmaps-simple/shadowmaps_simple.cpp b/3rdparty/bgfx/examples/15-shadowmaps-simple/shadowmaps_simple.cpp index 513a37f2579..badef17db12 100644 --- a/3rdparty/bgfx/examples/15-shadowmaps-simple/shadowmaps_simple.cpp +++ b/3rdparty/bgfx/examples/15-shadowmaps-simple/shadowmaps_simple.cpp @@ -66,14 +66,16 @@ static const uint16_t s_planeIndices[] = 1, 3, 2, }; -int _main_(int /*_argc*/, char** /*_argv*/) +int _main_(int _argc, char** _argv) { + Args args(_argc, _argv); + uint32_t width = 1280; uint32_t height = 720; uint32_t debug = BGFX_DEBUG_TEXT; uint32_t reset = BGFX_RESET_VSYNC; - bgfx::init(); + bgfx::init(args.m_type, args.m_pciId); bgfx::reset(width, height, reset); bgfx::RendererType::Enum renderer = bgfx::getRendererType(); diff --git a/3rdparty/bgfx/examples/16-shadowmaps/fs_shadowmaps_color_lightning.sh b/3rdparty/bgfx/examples/16-shadowmaps/fs_shadowmaps_color_lightning.sh index 9c19212a3f0..f2090508904 100644 --- a/3rdparty/bgfx/examples/16-shadowmaps/fs_shadowmaps_color_lightning.sh +++ b/3rdparty/bgfx/examples/16-shadowmaps/fs_shadowmaps_color_lightning.sh @@ -29,10 +29,10 @@ uniform vec4 u_tetraNormalBlue; uniform vec4 u_tetraNormalRed; #endif -SAMPLER2D(u_shadowMap0, 4); -SAMPLER2D(u_shadowMap1, 5); -SAMPLER2D(u_shadowMap2, 6); -SAMPLER2D(u_shadowMap3, 7); +SAMPLER2D(s_shadowMap0, 4); +SAMPLER2D(s_shadowMap1, 5); +SAMPLER2D(s_shadowMap2, 6); +SAMPLER2D(s_shadowMap3, 7); struct Shader { diff --git a/3rdparty/bgfx/examples/16-shadowmaps/fs_shadowmaps_color_lightning_main.sh b/3rdparty/bgfx/examples/16-shadowmaps/fs_shadowmaps_color_lightning_main.sh index 3e3373e6278..f5393d06db5 100644 --- a/3rdparty/bgfx/examples/16-shadowmaps/fs_shadowmaps_color_lightning_main.sh +++ b/3rdparty/bgfx/examples/16-shadowmaps/fs_shadowmaps_color_lightning_main.sh @@ -48,7 +48,15 @@ float coverage = texcoordInRange(shadowcoord.xy/shadowcoord.w) * 0.4; colorCoverage = vec3(-coverage, coverage, -coverage); - visibility = computeVisibility(u_shadowMap0, shadowcoord, u_shadowMapBias, u_smSamplingParams, texelSize, u_shadowMapDepthMultiplier, u_shadowMapMinVariance, u_shadowMapHardness); + visibility = computeVisibility(s_shadowMap0 + , shadowcoord + , u_shadowMapBias + , u_smSamplingParams + , texelSize + , u_shadowMapDepthMultiplier + , u_shadowMapMinVariance + , u_shadowMapHardness + ); } else if (selection1) { @@ -56,7 +64,15 @@ float coverage = texcoordInRange(shadowcoord.xy/shadowcoord.w) * 0.4; colorCoverage = vec3(coverage, coverage, -coverage); - visibility = computeVisibility(u_shadowMap1, shadowcoord, u_shadowMapBias, u_smSamplingParams, texelSize/2.0, u_shadowMapDepthMultiplier, u_shadowMapMinVariance, u_shadowMapHardness); + visibility = computeVisibility(s_shadowMap1 + , shadowcoord + , u_shadowMapBias + , u_smSamplingParams + , texelSize/2.0 + , u_shadowMapDepthMultiplier + , u_shadowMapMinVariance + , u_shadowMapHardness + ); } else if (selection2) { @@ -64,7 +80,15 @@ float coverage = texcoordInRange(shadowcoord.xy/shadowcoord.w) * 0.4; colorCoverage = vec3(-coverage, -coverage, coverage); - visibility = computeVisibility(u_shadowMap2, shadowcoord, u_shadowMapBias, u_smSamplingParams, texelSize/3.0, u_shadowMapDepthMultiplier, u_shadowMapMinVariance, u_shadowMapHardness); + visibility = computeVisibility(s_shadowMap2 + , shadowcoord + , u_shadowMapBias + , u_smSamplingParams + , texelSize/3.0 + , u_shadowMapDepthMultiplier + , u_shadowMapMinVariance + , u_shadowMapHardness + ); } else //selection3 { @@ -72,7 +96,15 @@ float coverage = texcoordInRange(shadowcoord.xy/shadowcoord.w) * 0.4; colorCoverage = vec3(coverage, -coverage, -coverage); - visibility = computeVisibility(u_shadowMap3, shadowcoord, u_shadowMapBias, u_smSamplingParams, texelSize/4.0, u_shadowMapDepthMultiplier, u_shadowMapMinVariance, u_shadowMapHardness); + visibility = computeVisibility(s_shadowMap3 + , shadowcoord + , u_shadowMapBias + , u_smSamplingParams + , texelSize/4.0 + , u_shadowMapDepthMultiplier + , u_shadowMapMinVariance + , u_shadowMapHardness + ); } #elif SM_OMNI vec2 texelSize = vec2_splat(u_shadowMapTexelSize/4.0); @@ -115,14 +147,30 @@ colorCoverage = vec3(coverage, -coverage, -coverage); } - visibility = computeVisibility(u_shadowMap0, shadowcoord, u_shadowMapBias, u_smSamplingParams, texelSize, u_shadowMapDepthMultiplier, u_shadowMapMinVariance, u_shadowMapHardness); + visibility = computeVisibility(s_shadowMap0 + , shadowcoord + , u_shadowMapBias + , u_smSamplingParams + , texelSize + , u_shadowMapDepthMultiplier + , u_shadowMapMinVariance + , u_shadowMapHardness + ); #else vec2 texelSize = vec2_splat(u_shadowMapTexelSize); float coverage = texcoordInRange(v_shadowcoord.xy/v_shadowcoord.w) * 0.3; colorCoverage = vec3(coverage, -coverage, -coverage); - visibility = computeVisibility(u_shadowMap0, v_shadowcoord, u_shadowMapBias, u_smSamplingParams, texelSize, u_shadowMapDepthMultiplier, u_shadowMapMinVariance, u_shadowMapHardness); + visibility = computeVisibility(s_shadowMap0 + , v_shadowcoord + , u_shadowMapBias + , u_smSamplingParams + , texelSize + , u_shadowMapDepthMultiplier + , u_shadowMapMinVariance + , u_shadowMapHardness + ); #endif vec3 v = v_view; diff --git a/3rdparty/bgfx/examples/16-shadowmaps/fs_shadowmaps_color_texture.sc b/3rdparty/bgfx/examples/16-shadowmaps/fs_shadowmaps_color_texture.sc index eea20d8ffb2..b81e40d192c 100644 --- a/3rdparty/bgfx/examples/16-shadowmaps/fs_shadowmaps_color_texture.sc +++ b/3rdparty/bgfx/examples/16-shadowmaps/fs_shadowmaps_color_texture.sc @@ -7,13 +7,13 @@ $input v_texcoord0 #include "../common/common.sh" uniform vec4 u_color; -SAMPLER2D(u_texColor, 0); +SAMPLER2D(s_texColor, 0); void main() { - vec4 tcolor = toLinear(texture2D(u_texColor, v_texcoord0)); + vec4 tcolor = toLinear(texture2D(s_texColor, v_texcoord0)); - if (tcolor.x < 0.1) //OK for now. + if (tcolor.x < 0.1) { discard; } diff --git a/3rdparty/bgfx/examples/16-shadowmaps/fs_shadowmaps_hblur.sc b/3rdparty/bgfx/examples/16-shadowmaps/fs_shadowmaps_hblur.sc index 7c4186ed187..7f226049ee9 100644 --- a/3rdparty/bgfx/examples/16-shadowmaps/fs_shadowmaps_hblur.sc +++ b/3rdparty/bgfx/examples/16-shadowmaps/fs_shadowmaps_hblur.sc @@ -6,9 +6,15 @@ $input v_texcoord0, v_texcoord1, v_texcoord2, v_texcoord3, v_texcoord4 */ #include "common.sh" -SAMPLER2D(u_shadowMap0, 4); +SAMPLER2D(s_shadowMap0, 4); void main() { - gl_FragColor = blur9(u_shadowMap0, v_texcoord0, v_texcoord1, v_texcoord2, v_texcoord3, v_texcoord4); + gl_FragColor = blur9(s_shadowMap0 + , v_texcoord0 + , v_texcoord1 + , v_texcoord2 + , v_texcoord3 + , v_texcoord4 + ); } diff --git a/3rdparty/bgfx/examples/16-shadowmaps/fs_shadowmaps_hblur_vsm.sc b/3rdparty/bgfx/examples/16-shadowmaps/fs_shadowmaps_hblur_vsm.sc index 50f96c5fcb6..1173ef7b525 100644 --- a/3rdparty/bgfx/examples/16-shadowmaps/fs_shadowmaps_hblur_vsm.sc +++ b/3rdparty/bgfx/examples/16-shadowmaps/fs_shadowmaps_hblur_vsm.sc @@ -6,10 +6,15 @@ $input v_texcoord0, v_texcoord1, v_texcoord2, v_texcoord3, v_texcoord4 */ #include "common.sh" -SAMPLER2D(u_shadowMap0, 4); +SAMPLER2D(s_shadowMap0, 4); void main() { - gl_FragColor = blur9VSM(u_shadowMap0, v_texcoord0, v_texcoord1, v_texcoord2, v_texcoord3, v_texcoord4); + gl_FragColor = blur9VSM(s_shadowMap0 + , v_texcoord0 + , v_texcoord1 + , v_texcoord2 + , v_texcoord3 + , v_texcoord4 + ); } - diff --git a/3rdparty/bgfx/examples/16-shadowmaps/fs_shadowmaps_texture.sc b/3rdparty/bgfx/examples/16-shadowmaps/fs_shadowmaps_texture.sc index 42c2781422d..0f33138b7ff 100644 --- a/3rdparty/bgfx/examples/16-shadowmaps/fs_shadowmaps_texture.sc +++ b/3rdparty/bgfx/examples/16-shadowmaps/fs_shadowmaps_texture.sc @@ -6,9 +6,9 @@ $input v_texcoord0 */ #include "../common/common.sh" -SAMPLER2D(u_texColor, 0); +SAMPLER2D(s_texColor, 0); void main() { - gl_FragColor = texture2D(u_texColor, v_texcoord0); + gl_FragColor = texture2D(s_texColor, v_texcoord0); } diff --git a/3rdparty/bgfx/examples/16-shadowmaps/fs_shadowmaps_unpackdepth.sc b/3rdparty/bgfx/examples/16-shadowmaps/fs_shadowmaps_unpackdepth.sc index 592a1d926d9..c3ed6e0ec7a 100644 --- a/3rdparty/bgfx/examples/16-shadowmaps/fs_shadowmaps_unpackdepth.sc +++ b/3rdparty/bgfx/examples/16-shadowmaps/fs_shadowmaps_unpackdepth.sc @@ -6,14 +6,14 @@ $input v_texcoord0 */ #include "../common/common.sh" -SAMPLER2D(u_shadowMap0, 4); +SAMPLER2D(s_shadowMap0, 4); uniform vec4 u_params2; #define u_depthValuePow u_params2.x void main() { - float depth = unpackRgbaToFloat(texture2D(u_shadowMap0, v_texcoord0) ); + float depth = unpackRgbaToFloat(texture2D(s_shadowMap0, v_texcoord0) ); vec3 rgba = pow(vec3_splat(depth), vec3_splat(u_depthValuePow) ); gl_FragColor = vec4(rgba, 1.0); } diff --git a/3rdparty/bgfx/examples/16-shadowmaps/fs_shadowmaps_unpackdepth_vsm.sc b/3rdparty/bgfx/examples/16-shadowmaps/fs_shadowmaps_unpackdepth_vsm.sc index c81ba1856f6..2e2792ce47e 100644 --- a/3rdparty/bgfx/examples/16-shadowmaps/fs_shadowmaps_unpackdepth_vsm.sc +++ b/3rdparty/bgfx/examples/16-shadowmaps/fs_shadowmaps_unpackdepth_vsm.sc @@ -6,14 +6,14 @@ $input v_texcoord0 */ #include "../common/common.sh" -SAMPLER2D(u_shadowMap0, 4); +SAMPLER2D(s_shadowMap0, 4); uniform vec4 u_params2; #define u_depthValuePow u_params2.x void main() { - vec4 val = texture2D(u_shadowMap0, v_texcoord0); + vec4 val = texture2D(s_shadowMap0, v_texcoord0); float depth = unpackHalfFloat(val.rg); vec3 rgba = pow(vec3_splat(depth), vec3_splat(u_depthValuePow) ); gl_FragColor = vec4(rgba, 1.0); diff --git a/3rdparty/bgfx/examples/16-shadowmaps/fs_shadowmaps_vblur.sc b/3rdparty/bgfx/examples/16-shadowmaps/fs_shadowmaps_vblur.sc index 7c4186ed187..7f226049ee9 100644 --- a/3rdparty/bgfx/examples/16-shadowmaps/fs_shadowmaps_vblur.sc +++ b/3rdparty/bgfx/examples/16-shadowmaps/fs_shadowmaps_vblur.sc @@ -6,9 +6,15 @@ $input v_texcoord0, v_texcoord1, v_texcoord2, v_texcoord3, v_texcoord4 */ #include "common.sh" -SAMPLER2D(u_shadowMap0, 4); +SAMPLER2D(s_shadowMap0, 4); void main() { - gl_FragColor = blur9(u_shadowMap0, v_texcoord0, v_texcoord1, v_texcoord2, v_texcoord3, v_texcoord4); + gl_FragColor = blur9(s_shadowMap0 + , v_texcoord0 + , v_texcoord1 + , v_texcoord2 + , v_texcoord3 + , v_texcoord4 + ); } diff --git a/3rdparty/bgfx/examples/16-shadowmaps/fs_shadowmaps_vblur_vsm.sc b/3rdparty/bgfx/examples/16-shadowmaps/fs_shadowmaps_vblur_vsm.sc index 50f96c5fcb6..1173ef7b525 100644 --- a/3rdparty/bgfx/examples/16-shadowmaps/fs_shadowmaps_vblur_vsm.sc +++ b/3rdparty/bgfx/examples/16-shadowmaps/fs_shadowmaps_vblur_vsm.sc @@ -6,10 +6,15 @@ $input v_texcoord0, v_texcoord1, v_texcoord2, v_texcoord3, v_texcoord4 */ #include "common.sh" -SAMPLER2D(u_shadowMap0, 4); +SAMPLER2D(s_shadowMap0, 4); void main() { - gl_FragColor = blur9VSM(u_shadowMap0, v_texcoord0, v_texcoord1, v_texcoord2, v_texcoord3, v_texcoord4); + gl_FragColor = blur9VSM(s_shadowMap0 + , v_texcoord0 + , v_texcoord1 + , v_texcoord2 + , v_texcoord3 + , v_texcoord4 + ); } - diff --git a/3rdparty/bgfx/examples/16-shadowmaps/shadowmaps.cpp b/3rdparty/bgfx/examples/16-shadowmaps/shadowmaps.cpp index 34ce52c36d2..050e639ae06 100644 --- a/3rdparty/bgfx/examples/16-shadowmaps/shadowmaps.cpp +++ b/3rdparty/bgfx/examples/16-shadowmaps/shadowmaps.cpp @@ -223,8 +223,8 @@ static const uint16_t s_planeIndices[] = static bool s_flipV = false; static float s_texelHalf = 0.0f; -static bgfx::UniformHandle u_texColor; -static bgfx::UniformHandle u_shadowMap[ShadowMapRenderTargets::Count]; +static bgfx::UniformHandle s_texColor; +static bgfx::UniformHandle s_shadowMap[ShadowMapRenderTargets::Count]; static bgfx::FrameBufferHandle s_rtShadowMap[ShadowMapRenderTargets::Count]; static bgfx::FrameBufferHandle s_rtBlur; @@ -1012,12 +1012,12 @@ struct Mesh // Set textures. if (bgfx::invalidHandle != _texture.idx) { - bgfx::setTexture(0, u_texColor, _texture); + bgfx::setTexture(0, s_texColor, _texture); } for (uint8_t ii = 0; ii < ShadowMapRenderTargets::Count; ++ii) { - bgfx::setTexture(4 + ii, u_shadowMap[ii], s_rtShadowMap[ii]); + bgfx::setTexture(4 + ii, s_shadowMap[ii], s_rtShadowMap[ii]); } // Apply render state. @@ -1313,15 +1313,17 @@ struct ShadowMapSettings #undef IMGUI_FLOAT_PARAM }; -int _main_(int /*_argc*/, char** /*_argv*/) +int _main_(int _argc, char** _argv) { + Args args(_argc, _argv); + uint32_t debug = BGFX_DEBUG_TEXT; uint32_t reset = BGFX_RESET_VSYNC; ViewState viewState(1280, 720); ClearValues clearValues(0x00000000, 1.0f, 0); - bgfx::init(); + bgfx::init(args.m_type, args.m_pciId); bgfx::reset(viewState.m_width, viewState.m_height, reset); // Enable debug text. @@ -1349,11 +1351,11 @@ int _main_(int /*_argc*/, char** /*_argv*/) // Uniforms. s_uniforms.init(); - u_texColor = bgfx::createUniform("u_texColor", bgfx::UniformType::Int1); - u_shadowMap[0] = bgfx::createUniform("u_shadowMap0", bgfx::UniformType::Int1); - u_shadowMap[1] = bgfx::createUniform("u_shadowMap1", bgfx::UniformType::Int1); - u_shadowMap[2] = bgfx::createUniform("u_shadowMap2", bgfx::UniformType::Int1); - u_shadowMap[3] = bgfx::createUniform("u_shadowMap3", bgfx::UniformType::Int1); + s_texColor = bgfx::createUniform("s_texColor", bgfx::UniformType::Int1); + s_shadowMap[0] = bgfx::createUniform("s_shadowMap0", bgfx::UniformType::Int1); + s_shadowMap[1] = bgfx::createUniform("s_shadowMap1", bgfx::UniformType::Int1); + s_shadowMap[2] = bgfx::createUniform("s_shadowMap2", bgfx::UniformType::Int1); + s_shadowMap[3] = bgfx::createUniform("s_shadowMap3", bgfx::UniformType::Int1); // Programs. s_programs.init(); @@ -2812,12 +2814,12 @@ int _main_(int /*_argc*/, char** /*_argv*/) if (bVsmOrEsm && currentSmSettings->m_doBlur) { - bgfx::setTexture(4, u_shadowMap[0], s_rtShadowMap[0]); + bgfx::setTexture(4, s_shadowMap[0], s_rtShadowMap[0]); bgfx::setState(BGFX_STATE_RGB_WRITE|BGFX_STATE_ALPHA_WRITE); screenSpaceQuad(currentShadowMapSizef, currentShadowMapSizef, s_flipV); bgfx::submit(RENDERVIEW_VBLUR_0_ID, s_programs.m_vBlur[depthType]); - bgfx::setTexture(4, u_shadowMap[0], s_rtBlur); + bgfx::setTexture(4, s_shadowMap[0], s_rtBlur); bgfx::setState(BGFX_STATE_RGB_WRITE|BGFX_STATE_ALPHA_WRITE); screenSpaceQuad(currentShadowMapSizef, currentShadowMapSizef, s_flipV); bgfx::submit(RENDERVIEW_HBLUR_0_ID, s_programs.m_hBlur[depthType]); @@ -2828,12 +2830,12 @@ int _main_(int /*_argc*/, char** /*_argv*/) { const uint8_t viewId = RENDERVIEW_VBLUR_0_ID + jj; - bgfx::setTexture(4, u_shadowMap[0], s_rtShadowMap[ii]); + bgfx::setTexture(4, s_shadowMap[0], s_rtShadowMap[ii]); bgfx::setState(BGFX_STATE_RGB_WRITE|BGFX_STATE_ALPHA_WRITE); screenSpaceQuad(currentShadowMapSizef, currentShadowMapSizef, s_flipV); bgfx::submit(viewId, s_programs.m_vBlur[depthType]); - bgfx::setTexture(4, u_shadowMap[0], s_rtBlur); + bgfx::setTexture(4, s_shadowMap[0], s_rtBlur); bgfx::setState(BGFX_STATE_RGB_WRITE|BGFX_STATE_ALPHA_WRITE); screenSpaceQuad(currentShadowMapSizef, currentShadowMapSizef, s_flipV); bgfx::submit(viewId+1, s_programs.m_hBlur[depthType]); @@ -3063,7 +3065,7 @@ int _main_(int /*_argc*/, char** /*_argv*/) // Draw depth rect. if (settings.m_drawDepthBuffer) { - bgfx::setTexture(4, u_shadowMap[0], s_rtShadowMap[0]); + bgfx::setTexture(4, s_shadowMap[0], s_rtShadowMap[0]); bgfx::setState(BGFX_STATE_RGB_WRITE|BGFX_STATE_ALPHA_WRITE); screenSpaceQuad(currentShadowMapSizef, currentShadowMapSizef, s_flipV); bgfx::submit(RENDERVIEW_DRAWDEPTH_0_ID, s_programs.m_drawDepth[depthType]); @@ -3072,7 +3074,7 @@ int _main_(int /*_argc*/, char** /*_argv*/) { for (uint8_t ii = 1; ii < settings.m_numSplits; ++ii) { - bgfx::setTexture(4, u_shadowMap[0], s_rtShadowMap[ii]); + bgfx::setTexture(4, s_shadowMap[0], s_rtShadowMap[ii]); bgfx::setState(BGFX_STATE_RGB_WRITE|BGFX_STATE_ALPHA_WRITE); screenSpaceQuad(currentShadowMapSizef, currentShadowMapSizef, s_flipV); bgfx::submit(RENDERVIEW_DRAWDEPTH_0_ID+ii, s_programs.m_drawDepth[depthType]); @@ -3145,11 +3147,11 @@ int _main_(int /*_argc*/, char** /*_argv*/) s_programs.destroy(); - bgfx::destroyUniform(u_texColor); - bgfx::destroyUniform(u_shadowMap[3]); - bgfx::destroyUniform(u_shadowMap[2]); - bgfx::destroyUniform(u_shadowMap[1]); - bgfx::destroyUniform(u_shadowMap[0]); + bgfx::destroyUniform(s_texColor); + bgfx::destroyUniform(s_shadowMap[3]); + bgfx::destroyUniform(s_shadowMap[2]); + bgfx::destroyUniform(s_shadowMap[1]); + bgfx::destroyUniform(s_shadowMap[0]); s_uniforms.destroy(); diff --git a/3rdparty/bgfx/examples/17-drawstress/drawstress.cpp b/3rdparty/bgfx/examples/17-drawstress/drawstress.cpp index 1f40768b370..ff035625e9d 100644 --- a/3rdparty/bgfx/examples/17-drawstress/drawstress.cpp +++ b/3rdparty/bgfx/examples/17-drawstress/drawstress.cpp @@ -3,10 +3,10 @@ * License: http://www.opensource.org/licenses/BSD-2-Clause */ -#include <bgfx/bgfx.h> -#include <bx/uint32_t.h> - #include "common.h" +#include "bgfx_utils.h" + +#include <bx/uint32_t.h> #include "imgui/imgui.h" // embedded shaders @@ -72,8 +72,10 @@ static const int64_t lowwm = 1000000/57; class DrawStress : public entry::AppI { - void init(int /*_argc*/, char** /*_argv*/) BX_OVERRIDE + void init(int _argc, char** _argv) BX_OVERRIDE { + Args args(_argc, _argv); + m_width = 1280; m_height = 720; m_debug = BGFX_DEBUG_TEXT; @@ -91,7 +93,7 @@ class DrawStress : public entry::AppI m_deltaTimeAvgNs = 0; m_numFrames = 0; - bgfx::init(); + bgfx::init(args.m_type, args.m_pciId); bgfx::reset(m_width, m_height, m_reset); const bgfx::Caps* caps = bgfx::getCaps(); diff --git a/3rdparty/bgfx/examples/17-drawstress/fs_drawstress.bin.h b/3rdparty/bgfx/examples/17-drawstress/fs_drawstress.bin.h index cf32868ff42..684132a061e 100644 --- a/3rdparty/bgfx/examples/17-drawstress/fs_drawstress.bin.h +++ b/3rdparty/bgfx/examples/17-drawstress/fs_drawstress.bin.h @@ -7,17 +7,17 @@ static const uint8_t fs_drawstress_glsl[89] = 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, // ragColor = v_col 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // or0;.}... }; -static const uint8_t fs_drawstress_dx9[137] = +static const uint8_t fs_drawstress_dx9[141] = { - 0x46, 0x53, 0x48, 0x04, 0xa4, 0x8b, 0xef, 0x49, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x03, 0xff, 0xff, // FSH....I..|..... - 0xfe, 0xff, 0x16, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // ....CTAB....#... + 0x46, 0x53, 0x48, 0x04, 0xa4, 0x8b, 0xef, 0x49, 0x00, 0x00, 0x80, 0x00, 0x00, 0x03, 0xff, 0xff, // FSH....I........ + 0xfe, 0xff, 0x17, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // ....CTAB....#... 0x00, 0x03, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, // ................ 0x1c, 0x00, 0x00, 0x00, 0x70, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, // ....ps_3_0.Micro 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, // soft (R) HLSL Sh - 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x39, 0x2e, // ader Compiler 9. - 0x32, 0x39, 0x2e, 0x39, 0x35, 0x32, 0x2e, 0x33, 0x31, 0x31, 0x31, 0x00, 0x1f, 0x00, 0x00, 0x02, // 29.952.3111..... - 0x0a, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, 0x01, 0x00, 0x00, 0x02, 0x00, 0x08, 0x0f, 0x80, // ................ - 0x00, 0x00, 0xe4, 0x90, 0xff, 0xff, 0x00, 0x00, 0x00, // ......... + 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, 0x30, // ader Compiler 10 + 0x2e, 0x30, 0x2e, 0x31, 0x30, 0x30, 0x31, 0x31, 0x2e, 0x31, 0x36, 0x33, 0x38, 0x34, 0x00, 0xab, // .0.10011.16384.. + 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, 0x01, 0x00, 0x00, 0x02, // ................ + 0x00, 0x08, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0x90, 0xff, 0xff, 0x00, 0x00, 0x00, // ............. }; static const uint8_t fs_drawstress_dx11[260] = { diff --git a/3rdparty/bgfx/examples/17-drawstress/vs_drawstress.bin.h b/3rdparty/bgfx/examples/17-drawstress/vs_drawstress.bin.h index 27cb89d15c3..2a2fcef2ada 100644 --- a/3rdparty/bgfx/examples/17-drawstress/vs_drawstress.bin.h +++ b/3rdparty/bgfx/examples/17-drawstress/vs_drawstress.bin.h @@ -22,11 +22,11 @@ static const uint8_t vs_drawstress_glsl[325] = 0x6c, 0x6f, 0x72, 0x30, 0x20, 0x3d, 0x20, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, // lor0 = a_color0; 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // .}... }; -static const uint8_t vs_drawstress_dx9[319] = +static const uint8_t vs_drawstress_dx9[323] = { 0x56, 0x53, 0x48, 0x04, 0xa4, 0x8b, 0xef, 0x49, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH....I...u_mod 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x04, 0x00, // elViewProj...... - 0x1c, 0x01, 0x00, 0x03, 0xfe, 0xff, 0xfe, 0xff, 0x23, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, // ........#.CTAB.. + 0x20, 0x01, 0x00, 0x03, 0xfe, 0xff, 0xfe, 0xff, 0x24, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, // .......$.CTAB.. 0x00, 0x00, 0x57, 0x00, 0x00, 0x00, 0x00, 0x03, 0xfe, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, // ..W............. 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x02, 0x00, // ......P...0..... 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, // ......@.......u_ @@ -34,16 +34,17 @@ static const uint8_t vs_drawstress_dx9[319] = 0x03, 0x00, 0x04, 0x00, 0x04, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0x73, // ..............vs 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, // _3_0.Microsoft ( 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, // R) HLSL Shader C - 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x39, 0x2e, 0x32, 0x39, 0x2e, 0x39, 0x35, 0x32, // ompiler 9.29.952 - 0x2e, 0x33, 0x31, 0x31, 0x31, 0x00, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x00, 0x00, // .3111........... - 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x0f, 0x90, 0x1f, 0x00, // ................ - 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0xe0, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, // ................ - 0x00, 0x80, 0x01, 0x00, 0x0f, 0xe0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, 0x01, 0x00, // ................ - 0xe4, 0xa0, 0x01, 0x00, 0x55, 0x90, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, // ....U........... - 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x90, 0x00, 0x00, 0xe4, 0x80, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, // ................ - 0x0f, 0x80, 0x02, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0xaa, 0x90, 0x00, 0x00, 0xe4, 0x80, 0x02, 0x00, // ................ - 0x00, 0x03, 0x00, 0x00, 0x0f, 0xe0, 0x00, 0x00, 0xe4, 0x80, 0x03, 0x00, 0xe4, 0xa0, 0x01, 0x00, // ................ - 0x00, 0x02, 0x01, 0x00, 0x0f, 0xe0, 0x00, 0x00, 0xe4, 0x90, 0xff, 0xff, 0x00, 0x00, 0x00, // ............... + 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, 0x30, 0x2e, 0x30, 0x2e, 0x31, 0x30, 0x30, // ompiler 10.0.100 + 0x31, 0x31, 0x2e, 0x31, 0x36, 0x33, 0x38, 0x34, 0x00, 0xab, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, // 11.16384........ + 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, // ................ + 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0xe0, 0x1f, 0x00, // ................ + 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x01, 0x00, 0x0f, 0xe0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, // ................ + 0x0f, 0x80, 0x01, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x55, 0x90, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, // ........U....... + 0x0f, 0x80, 0x00, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x90, 0x00, 0x00, 0xe4, 0x80, 0x04, 0x00, // ................ + 0x00, 0x04, 0x00, 0x00, 0x0f, 0x80, 0x02, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0xaa, 0x90, 0x00, 0x00, // ................ + 0xe4, 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0xe0, 0x00, 0x00, 0xe4, 0x80, 0x03, 0x00, // ................ + 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x0f, 0xe0, 0x00, 0x00, 0xe4, 0x90, 0xff, 0xff, // ................ + 0x00, 0x00, 0x00, // ... }; static const uint8_t vs_drawstress_dx11[510] = { diff --git a/3rdparty/bgfx/examples/18-ibl/ibl.cpp b/3rdparty/bgfx/examples/18-ibl/ibl.cpp index 2d98aba5ac2..8f9f13a3ce1 100644 --- a/3rdparty/bgfx/examples/18-ibl/ibl.cpp +++ b/3rdparty/bgfx/examples/18-ibl/ibl.cpp @@ -213,14 +213,16 @@ struct LightProbe bgfx::TextureHandle m_texIrr; }; -int _main_(int /*_argc*/, char** /*_argv*/) +int _main_(int _argc, char** _argv) { + Args args(_argc, _argv); + uint32_t width = 1280; uint32_t height = 720; uint32_t debug = BGFX_DEBUG_TEXT; uint32_t reset = BGFX_RESET_VSYNC; - bgfx::init(); + bgfx::init(args.m_type, args.m_pciId); bgfx::reset(width, height, reset); // Enable debug text. diff --git a/3rdparty/bgfx/examples/19-oit/fs_oit_wb_blit.sc b/3rdparty/bgfx/examples/19-oit/fs_oit_wb_blit.sc index d6b1157dbce..6380967d150 100644 --- a/3rdparty/bgfx/examples/19-oit/fs_oit_wb_blit.sc +++ b/3rdparty/bgfx/examples/19-oit/fs_oit_wb_blit.sc @@ -7,12 +7,12 @@ $input v_texcoord0 #include "../common/common.sh" -SAMPLER2D(u_texColor0, 0); -SAMPLER2D(u_texColor1, 1); +SAMPLER2D(s_texColor0, 0); +SAMPLER2D(s_texColor1, 1); void main() { - vec4 accum = texture2D(u_texColor0, v_texcoord0); - float opacity = texture2D(u_texColor1, v_texcoord0).x; + vec4 accum = texture2D(s_texColor0, v_texcoord0); + float opacity = texture2D(s_texColor1, v_texcoord0).x; gl_FragColor = vec4(accum.xyz / clamp(accum.w, 1e-4, 5e4), opacity); } diff --git a/3rdparty/bgfx/examples/19-oit/fs_oit_wb_separate_blit.sc b/3rdparty/bgfx/examples/19-oit/fs_oit_wb_separate_blit.sc index 9c3a9ed1cf8..195c5ff7d27 100644 --- a/3rdparty/bgfx/examples/19-oit/fs_oit_wb_separate_blit.sc +++ b/3rdparty/bgfx/examples/19-oit/fs_oit_wb_separate_blit.sc @@ -7,13 +7,13 @@ $input v_texcoord0 #include "../common/common.sh" -SAMPLER2D(u_texColor0, 0); -SAMPLER2D(u_texColor1, 1); +SAMPLER2D(s_texColor0, 0); +SAMPLER2D(s_texColor1, 1); void main() { - vec4 accum = texture2D(u_texColor0, v_texcoord0); + vec4 accum = texture2D(s_texColor0, v_texcoord0); float opacity = accum.w; - float weight = texture2D(u_texColor1, v_texcoord0).x; + float weight = texture2D(s_texColor1, v_texcoord0).x; gl_FragColor = vec4(accum.xyz / clamp(weight, 1e-4, 5e4), opacity); } diff --git a/3rdparty/bgfx/examples/19-oit/oit.cpp b/3rdparty/bgfx/examples/19-oit/oit.cpp index 7457364e86e..c25f39621b2 100644 --- a/3rdparty/bgfx/examples/19-oit/oit.cpp +++ b/3rdparty/bgfx/examples/19-oit/oit.cpp @@ -146,14 +146,16 @@ void screenSpaceQuad(float _textureWidth, float _textureHeight, bool _originBott } } -int _main_(int /*_argc*/, char** /*_argv*/) +int _main_(int _argc, char** _argv) { + Args args(_argc, _argv); + uint32_t width = 1280; uint32_t height = 720; uint32_t debug = BGFX_DEBUG_TEXT; uint32_t reset = BGFX_RESET_VSYNC; - bgfx::init(); + bgfx::init(args.m_type, args.m_pciId); bgfx::reset(width, height, reset); // Create vertex stream declaration. diff --git a/3rdparty/bgfx/examples/20-nanovg/nanovg.cpp b/3rdparty/bgfx/examples/20-nanovg/nanovg.cpp index 2f4060a40b8..3f31e2c6cbe 100644 --- a/3rdparty/bgfx/examples/20-nanovg/nanovg.cpp +++ b/3rdparty/bgfx/examples/20-nanovg/nanovg.cpp @@ -22,11 +22,11 @@ // #include "common.h" +#include "bgfx_utils.h" #include <stdio.h> #include <math.h> -#include <bgfx/bgfx.h> #include <bx/string.h> #include <bx/timer.h> #include "entry/entry.h" @@ -1201,14 +1201,16 @@ void renderDemo(struct NVGcontext* vg, float mx, float my, float width, float he nvgRestore(vg); } -int _main_(int /*_argc*/, char** /*_argv*/) +int _main_(int _argc, char** _argv) { + Args args(_argc, _argv); + uint32_t width = 1280; uint32_t height = 720; uint32_t debug = BGFX_DEBUG_TEXT; uint32_t reset = BGFX_RESET_VSYNC; - bgfx::init(); + bgfx::init(args.m_type, args.m_pciId); bgfx::reset(width, height, reset); // Enable debug text. diff --git a/3rdparty/bgfx/examples/21-deferred/deferred.cpp b/3rdparty/bgfx/examples/21-deferred/deferred.cpp index 019b8920518..f1201363036 100644 --- a/3rdparty/bgfx/examples/21-deferred/deferred.cpp +++ b/3rdparty/bgfx/examples/21-deferred/deferred.cpp @@ -215,14 +215,16 @@ void screenSpaceQuad(float _textureWidth, float _textureHeight, float _texelHalf class Deferred : public entry::AppI { - void init(int /*_argc*/, char** /*_argv*/) BX_OVERRIDE + void init(int _argc, char** _argv) BX_OVERRIDE { - m_width = 1280; + Args args(_argc, _argv); + + m_width = 1280; m_height = 720; - m_debug = BGFX_DEBUG_TEXT; - m_reset = BGFX_RESET_VSYNC; + m_debug = BGFX_DEBUG_TEXT; + m_reset = BGFX_RESET_VSYNC; - bgfx::init(); + bgfx::init(args.m_type, args.m_pciId); bgfx::reset(m_width, m_height, m_reset); // Enable m_debug text. @@ -410,9 +412,9 @@ class Deferred : public entry::AppI else { if (m_oldWidth != m_width - || m_oldHeight != m_height - || m_oldReset != m_reset - || !bgfx::isValid(m_gbuffer) ) + || m_oldHeight != m_height + || m_oldReset != m_reset + || !bgfx::isValid(m_gbuffer) ) { // Recreate variable size render targets when resolution changes. m_oldWidth = m_width; diff --git a/3rdparty/bgfx/examples/22-windows/windows.cpp b/3rdparty/bgfx/examples/22-windows/windows.cpp index 36156fce478..24187e27fbf 100644 --- a/3rdparty/bgfx/examples/22-windows/windows.cpp +++ b/3rdparty/bgfx/examples/22-windows/windows.cpp @@ -92,14 +92,16 @@ static const InputBinding s_bindings[] = INPUT_BINDING_END }; -int _main_(int /*_argc*/, char** /*_argv*/) +int _main_(int _argc, char** _argv) { + Args args(_argc, _argv); + uint32_t width = 1280; uint32_t height = 720; uint32_t debug = BGFX_DEBUG_TEXT; uint32_t reset = BGFX_RESET_VSYNC; - bgfx::init(); + bgfx::init(args.m_type, args.m_pciId); bgfx::reset(width, height, reset); const bgfx::Caps* caps = bgfx::getCaps(); diff --git a/3rdparty/bgfx/examples/23-vectordisplay/main.cpp b/3rdparty/bgfx/examples/23-vectordisplay/main.cpp index f0999cb723f..2cd1574a4be 100644 --- a/3rdparty/bgfx/examples/23-vectordisplay/main.cpp +++ b/3rdparty/bgfx/examples/23-vectordisplay/main.cpp @@ -30,14 +30,16 @@ struct PosColorVertex bgfx::VertexDecl PosColorVertex::ms_decl; -int _main_(int /*_argc*/, char** /*_argv*/) +int _main_(int _argc, char** _argv) { + Args args(_argc, _argv); + uint32_t width = 1280; uint32_t height = 720; uint32_t debug = BGFX_DEBUG_TEXT; uint32_t reset = BGFX_RESET_VSYNC; - bgfx::init(); + bgfx::init(args.m_type, args.m_pciId); bgfx::reset(width, height, reset); const bgfx::RendererType::Enum renderer = bgfx::getRendererType(); diff --git a/3rdparty/bgfx/examples/24-nbody/nbody.cpp b/3rdparty/bgfx/examples/24-nbody/nbody.cpp index 854a55a7aea..dbd978b4f01 100644 --- a/3rdparty/bgfx/examples/24-nbody/nbody.cpp +++ b/3rdparty/bgfx/examples/24-nbody/nbody.cpp @@ -96,14 +96,16 @@ static const float s_quadVertices[] = static const uint16_t s_quadIndices[] = { 0, 1, 2, 2, 3, 0, }; -int _main_(int /*_argc*/, char** /*_argv*/) +int _main_(int _argc, char** _argv) { + Args args(_argc, _argv); + uint32_t width = 1280; uint32_t height = 720; uint32_t debug = BGFX_DEBUG_TEXT; uint32_t reset = BGFX_RESET_VSYNC; - bgfx::init(); + bgfx::init(args.m_type, args.m_pciId); bgfx::reset(width, height, reset); // Enable debug text. diff --git a/3rdparty/bgfx/examples/common/bgfx_utils.cpp b/3rdparty/bgfx/examples/common/bgfx_utils.cpp index 386062c065d..b1897c8f592 100644 --- a/3rdparty/bgfx/examples/common/bgfx_utils.cpp +++ b/3rdparty/bgfx/examples/common/bgfx_utils.cpp @@ -13,8 +13,9 @@ namespace stl = tinystl; #include <bgfx/bgfx.h> -#include <bx/readerwriter.h> +#include <bx/commandline.h> #include <bx/fpumath.h> +#include <bx/readerwriter.h> #include <bx/string.h> #include "entry/entry.h" #include <ib-compress/indexbufferdecompression.h> @@ -621,3 +622,59 @@ void meshSubmit(const Mesh* _mesh, const MeshState*const* _state, uint8_t _numPa { _mesh->submit(_state, _numPasses, _mtx, _numMatrices); } + +Args::Args(int _argc, char** _argv) + : m_type(bgfx::RendererType::Count) + , m_pciId(BGFX_PCI_ID_NONE) +{ + bx::CommandLine cmdLine(_argc, (const char**)_argv); + + if (cmdLine.hasArg("gl") ) + { + m_type = bgfx::RendererType::OpenGL; + } + else if (cmdLine.hasArg("noop") + || cmdLine.hasArg("vk") ) + { + m_type = bgfx::RendererType::OpenGL; + } + else if (BX_ENABLED(BX_PLATFORM_WINDOWS) ) + { + if (cmdLine.hasArg("d3d9") ) + { + m_type = bgfx::RendererType::Direct3D9; + } + else if (cmdLine.hasArg("d3d11") ) + { + m_type = bgfx::RendererType::Direct3D11; + } + else if (cmdLine.hasArg("d3d12") ) + { + m_type = bgfx::RendererType::Direct3D12; + } + } + else if (BX_ENABLED(BX_PLATFORM_OSX) ) + { + if (cmdLine.hasArg("mtl") ) + { + m_type = bgfx::RendererType::Metal; + } + } + + if (cmdLine.hasArg("amd") ) + { + m_pciId = BGFX_PCI_ID_AMD; + } + else if (cmdLine.hasArg("nvidia") ) + { + m_pciId = BGFX_PCI_ID_NVIDIA; + } + else if (cmdLine.hasArg("intel") ) + { + m_pciId = BGFX_PCI_ID_INTEL; + } + else if (cmdLine.hasArg("sw") ) + { + m_pciId = BGFX_PCI_ID_SOFTWARE_RASTERIZER; + } +} diff --git a/3rdparty/bgfx/examples/common/bgfx_utils.h b/3rdparty/bgfx/examples/common/bgfx_utils.h index 2938abff1b9..a2427e51182 100644 --- a/3rdparty/bgfx/examples/common/bgfx_utils.h +++ b/3rdparty/bgfx/examples/common/bgfx_utils.h @@ -43,4 +43,12 @@ void meshStateDestroy(MeshState* _meshState); void meshSubmit(const Mesh* _mesh, uint8_t _id, bgfx::ProgramHandle _program, const float* _mtx, uint64_t _state = BGFX_STATE_MASK); void meshSubmit(const Mesh* _mesh, const MeshState*const* _state, uint8_t _numPasses, const float* _mtx, uint16_t _numMatrices = 1); +struct Args +{ + Args(int _argc, char** _argv); + + bgfx::RendererType::Enum m_type; + uint16_t m_pciId; +}; + #endif // BGFX_UTILS_H_HEADER_GUARD diff --git a/3rdparty/bgfx/examples/common/entry/entry.cpp b/3rdparty/bgfx/examples/common/entry/entry.cpp index 61dbe0b3c9c..08ac26e4e66 100644 --- a/3rdparty/bgfx/examples/common/entry/entry.cpp +++ b/3rdparty/bgfx/examples/common/entry/entry.cpp @@ -319,6 +319,10 @@ BX_PRAGMA_DIAGNOSTIC_POP(); int runApp(AppI* _app, int _argc, char** _argv) { _app->init(_argc, _argv); + bgfx::frame(); + + WindowHandle defaultWindow = { 0 }; + setWindowSize(defaultWindow, ENTRY_DEFAULT_WIDTH, ENTRY_DEFAULT_HEIGHT); #if BX_PLATFORM_EMSCRIPTEN s_app = _app; @@ -349,6 +353,7 @@ BX_PRAGMA_DIAGNOSTIC_POP(); entry::WindowHandle defaultWindow = { 0 }; entry::setWindowTitle(defaultWindow, bx::baseName(_argv[0]) ); + setWindowSize(defaultWindow, ENTRY_DEFAULT_WIDTH, ENTRY_DEFAULT_HEIGHT); int32_t result = ::_main_(_argc, _argv); @@ -464,10 +469,10 @@ BX_PRAGMA_DIAGNOSTIC_POP(); case Event::Window: break; - case Event::Suspend: - break; + case Event::Suspend: + break; - default: + default: break; } } @@ -616,6 +621,9 @@ BX_PRAGMA_DIAGNOSTIC_POP(); } break; + case Event::Suspend: + break; + default: break; } diff --git a/3rdparty/bgfx/examples/common/entry/entry_osx.mm b/3rdparty/bgfx/examples/common/entry/entry_osx.mm index 5b59fe06c84..14ddf60418a 100644 --- a/3rdparty/bgfx/examples/common/entry/entry_osx.mm +++ b/3rdparty/bgfx/examples/common/entry/entry_osx.mm @@ -444,7 +444,7 @@ namespace entry const float centerY = (screenRect.size.height - (float)ENTRY_DEFAULT_HEIGHT)*0.5f; m_windowAlloc.alloc(); - NSRect rect = NSMakeRect(centerX, centerY, (float)ENTRY_DEFAULT_WIDTH, (float)ENTRY_DEFAULT_HEIGHT); + NSRect rect = NSMakeRect(centerX, centerY, ENTRY_DEFAULT_WIDTH, ENTRY_DEFAULT_HEIGHT); NSWindow* window = [[NSWindow alloc] initWithContentRect:rect styleMask:m_style diff --git a/3rdparty/bgfx/examples/common/entry/entry_x11.cpp b/3rdparty/bgfx/examples/common/entry/entry_x11.cpp index 16b7af4ffa1..9dd0919cb14 100644 --- a/3rdparty/bgfx/examples/common/entry/entry_x11.cpp +++ b/3rdparty/bgfx/examples/common/entry/entry_x11.cpp @@ -316,7 +316,7 @@ namespace entry m_window[0] = XCreateWindow(m_display , m_root , 0, 0 - , ENTRY_DEFAULT_WIDTH, ENTRY_DEFAULT_HEIGHT, 0 + , 1, 1, 0 , m_depth , InputOutput , m_visual @@ -362,7 +362,7 @@ namespace entry thread.init(mte.threadFunc, &mte); WindowHandle defaultWindow = { 0 }; - m_eventQueue.postSizeEvent(defaultWindow, ENTRY_DEFAULT_WIDTH, ENTRY_DEFAULT_HEIGHT); + m_eventQueue.postSizeEvent(defaultWindow, 1, 1); s_joystick.init(); diff --git a/3rdparty/bgfx/examples/common/font/fs_font_basic.bin.h b/3rdparty/bgfx/examples/common/font/fs_font_basic.bin.h index 69a3484dc65..4bf319a2ecf 100644 --- a/3rdparty/bgfx/examples/common/font/fs_font_basic.bin.h +++ b/3rdparty/bgfx/examples/common/font/fs_font_basic.bin.h @@ -36,37 +36,38 @@ static const uint8_t fs_font_basic_glsl[553] = 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, // ragColor = tmpva 0x72, 0x5f, 0x34, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // r_4;.}... }; -static const uint8_t fs_font_basic_dx9[462] = +static const uint8_t fs_font_basic_dx9[466] = { 0x46, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, // FSH........s_tex - 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x01, 0x00, 0x00, 0x01, 0x00, 0xb0, 0x01, 0x00, 0x03, 0xff, // Color0.......... - 0xff, 0xfe, 0xff, 0x22, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x53, 0x00, 0x00, // ...".CTAB....S.. + 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x01, 0x00, 0x00, 0x01, 0x00, 0xb4, 0x01, 0x00, 0x03, 0xff, // Color0.......... + 0xff, 0xfe, 0xff, 0x23, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x53, 0x00, 0x00, // ...#.CTAB....S.. 0x00, 0x00, 0x03, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, // ................ 0x00, 0x4c, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, // .L...0.......... 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, // .<.......s_texCo 0x6c, 0x6f, 0x72, 0x00, 0xab, 0x04, 0x00, 0x0e, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, // lor............. 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, // .....ps_3_0.Micr 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, // osoft (R) HLSL S - 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x39, // hader Compiler 9 - 0x2e, 0x32, 0x39, 0x2e, 0x39, 0x35, 0x32, 0x2e, 0x33, 0x31, 0x31, 0x31, 0x00, 0x51, 0x00, 0x00, // .29.952.3111.Q.. - 0x05, 0x00, 0x00, 0x0f, 0xa0, 0x00, 0x00, 0x80, 0x40, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, // ........@...?... - 0x00, 0x00, 0x00, 0x80, 0x3f, 0x51, 0x00, 0x00, 0x05, 0x01, 0x00, 0x0f, 0xa0, 0x00, 0x00, 0x00, // ....?Q.......... - 0x80, 0x00, 0x00, 0x80, 0xbf, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x40, 0xc0, 0x1f, 0x00, 0x00, // ...........@.... - 0x02, 0x0a, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, // ................ - 0x80, 0x01, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x98, 0x00, 0x08, 0x0f, // ................ - 0xa0, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x01, 0x80, 0x01, 0x00, 0xff, 0x90, 0x00, 0x00, 0x00, // ................ - 0xa0, 0x00, 0x00, 0x55, 0xa0, 0x13, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x00, // ...U............ - 0x80, 0x58, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x80, 0x00, 0x00, 0x55, 0x81, 0x00, 0x00, 0xaa, // .X.........U.... - 0xa0, 0x00, 0x00, 0xff, 0xa0, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x00, // ................ - 0x80, 0x00, 0x00, 0x55, 0x81, 0x58, 0x00, 0x00, 0x04, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, // ...U.X.......... - 0x80, 0x00, 0x00, 0xaa, 0xa0, 0x00, 0x00, 0xaa, 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x01, // ................ - 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x55, 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, // .......U........ - 0x80, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0xe4, 0xa0, 0x58, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, // .........X...... - 0x80, 0x00, 0x00, 0xe4, 0x8c, 0x00, 0x00, 0xff, 0xa0, 0x00, 0x00, 0xaa, 0xa0, 0x42, 0x00, 0x00, // .............B.. - 0x03, 0x01, 0x00, 0x0f, 0x80, 0x01, 0x00, 0xe4, 0x90, 0x00, 0x08, 0xe4, 0xa0, 0x09, 0x00, 0x00, // ................ - 0x03, 0x00, 0x00, 0x01, 0x80, 0x01, 0x00, 0xc6, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x05, 0x00, 0x00, // ................ - 0x03, 0x00, 0x08, 0x08, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0xff, 0x90, 0x01, 0x00, 0x00, // ................ - 0x02, 0x00, 0x08, 0x07, 0x80, 0x00, 0x00, 0xe4, 0x90, 0xff, 0xff, 0x00, 0x00, 0x00, // .............. + 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, // hader Compiler 1 + 0x30, 0x2e, 0x30, 0x2e, 0x31, 0x30, 0x30, 0x31, 0x31, 0x2e, 0x31, 0x36, 0x33, 0x38, 0x34, 0x00, // 0.0.10011.16384. + 0xab, 0x51, 0x00, 0x00, 0x05, 0x00, 0x00, 0x0f, 0xa0, 0x00, 0x00, 0x80, 0x40, 0x00, 0x00, 0x00, // .Q..........@... + 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x51, 0x00, 0x00, 0x05, 0x01, 0x00, 0x0f, // ?.......?Q...... + 0xa0, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x80, 0xbf, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x40, // ...............@ + 0xc0, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, // ................ + 0x02, 0x05, 0x00, 0x00, 0x80, 0x01, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // ................ + 0x98, 0x00, 0x08, 0x0f, 0xa0, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x01, 0x80, 0x01, 0x00, 0xff, // ................ + 0x90, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x55, 0xa0, 0x13, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02, // .......U........ + 0x80, 0x00, 0x00, 0x00, 0x80, 0x58, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x80, 0x00, 0x00, 0x55, // .....X.........U + 0x81, 0x00, 0x00, 0xaa, 0xa0, 0x00, 0x00, 0xff, 0xa0, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x02, // ................ + 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x55, 0x81, 0x58, 0x00, 0x00, 0x04, 0x00, 0x00, 0x01, // .......U.X...... + 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0xaa, 0xa0, 0x00, 0x00, 0xaa, 0x80, 0x02, 0x00, 0x00, // ................ + 0x03, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x55, 0x80, 0x02, 0x00, 0x00, // ...........U.... + 0x03, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0xe4, 0xa0, 0x58, 0x00, 0x00, // .............X.. + 0x04, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0x8c, 0x00, 0x00, 0xff, 0xa0, 0x00, 0x00, 0xaa, // ................ + 0xa0, 0x42, 0x00, 0x00, 0x03, 0x01, 0x00, 0x0f, 0x80, 0x01, 0x00, 0xe4, 0x90, 0x00, 0x08, 0xe4, // .B.............. + 0xa0, 0x09, 0x00, 0x00, 0x03, 0x00, 0x00, 0x01, 0x80, 0x01, 0x00, 0xc6, 0x80, 0x00, 0x00, 0xe4, // ................ + 0x80, 0x05, 0x00, 0x00, 0x03, 0x00, 0x08, 0x08, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0xff, // ................ + 0x90, 0x01, 0x00, 0x00, 0x02, 0x00, 0x08, 0x07, 0x80, 0x00, 0x00, 0xe4, 0x90, 0xff, 0xff, 0x00, // ................ + 0x00, 0x00, // .. }; static const uint8_t fs_font_basic_dx11[617] = { diff --git a/3rdparty/bgfx/examples/common/font/fs_font_distance_field.bin.h b/3rdparty/bgfx/examples/common/font/fs_font_distance_field.bin.h index 030ec333753..9bd34a78a05 100644 --- a/3rdparty/bgfx/examples/common/font/fs_font_distance_field.bin.h +++ b/3rdparty/bgfx/examples/common/font/fs_font_distance_field.bin.h @@ -65,56 +65,56 @@ static const uint8_t fs_font_distance_field_glsl[1019] = 0x5f, 0x46, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x74, 0x6d, 0x70, // _FragColor = tmp 0x76, 0x61, 0x72, 0x5f, 0x39, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // var_9;.}... }; -static const uint8_t fs_font_distance_field_dx9[754] = +static const uint8_t fs_font_distance_field_dx9[758] = { 0x46, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, // FSH........s_tex - 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x01, 0x00, 0x00, 0x01, 0x00, 0xd4, 0x02, 0x00, 0x03, 0xff, // Color0.......... - 0xff, 0xfe, 0xff, 0x22, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x53, 0x00, 0x00, // ...".CTAB....S.. + 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x01, 0x00, 0x00, 0x01, 0x00, 0xd8, 0x02, 0x00, 0x03, 0xff, // Color0.......... + 0xff, 0xfe, 0xff, 0x23, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x53, 0x00, 0x00, // ...#.CTAB....S.. 0x00, 0x00, 0x03, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, // ................ 0x00, 0x4c, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, // .L...0.......... 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, // .<.......s_texCo 0x6c, 0x6f, 0x72, 0x00, 0xab, 0x04, 0x00, 0x0e, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, // lor............. 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, // .....ps_3_0.Micr 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, // osoft (R) HLSL S - 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x39, // hader Compiler 9 - 0x2e, 0x32, 0x39, 0x2e, 0x39, 0x35, 0x32, 0x2e, 0x33, 0x31, 0x31, 0x31, 0x00, 0x51, 0x00, 0x00, // .29.952.3111.Q.. - 0x05, 0x00, 0x00, 0x0f, 0xa0, 0x00, 0x00, 0x80, 0x40, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, // ........@...?... - 0x00, 0x00, 0x00, 0x80, 0x3f, 0x51, 0x00, 0x00, 0x05, 0x01, 0x00, 0x0f, 0xa0, 0x00, 0x00, 0x00, // ....?Q.......... - 0x80, 0x00, 0x00, 0x80, 0xbf, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x40, 0xc0, 0x51, 0x00, 0x00, // ...........@.Q.. - 0x05, 0x02, 0x00, 0x0f, 0xa0, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, // ........A...?... - 0xc0, 0x00, 0x00, 0x40, 0x40, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, // ...@@........... - 0x90, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x01, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, // ................ - 0x02, 0x00, 0x00, 0x00, 0x98, 0x00, 0x08, 0x0f, 0xa0, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x01, // ................ - 0x80, 0x01, 0x00, 0xff, 0x90, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x55, 0xa0, 0x13, 0x00, 0x00, // ...........U.... - 0x02, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x00, 0x80, 0x58, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, // .........X...... - 0x80, 0x00, 0x00, 0x55, 0x81, 0x00, 0x00, 0xaa, 0xa0, 0x00, 0x00, 0xff, 0xa0, 0x02, 0x00, 0x00, // ...U............ - 0x03, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x55, 0x81, 0x58, 0x00, 0x00, // ...........U.X.. - 0x04, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0xaa, 0xa0, 0x00, 0x00, 0xaa, // ................ - 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x55, // ...............U - 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0xe4, // ................ - 0xa0, 0x58, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0x8c, 0x00, 0x00, 0xff, // .X.............. - 0xa0, 0x00, 0x00, 0xaa, 0xa0, 0x42, 0x00, 0x00, 0x03, 0x01, 0x00, 0x0f, 0x80, 0x01, 0x00, 0xe4, // .....B.......... - 0x90, 0x00, 0x08, 0xe4, 0xa0, 0x09, 0x00, 0x00, 0x03, 0x00, 0x00, 0x01, 0x80, 0x01, 0x00, 0xc6, // ................ - 0x80, 0x00, 0x00, 0xe4, 0x80, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x0e, 0x80, 0x01, 0x00, 0x90, // ................ - 0x91, 0x5c, 0x00, 0x00, 0x02, 0x00, 0x00, 0x0e, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x08, 0x00, 0x00, // ................ - 0x03, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0xf9, 0x80, 0x00, 0x00, 0xf9, 0x80, 0x07, 0x00, 0x00, // ................ - 0x02, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x55, 0x80, 0x06, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02, // .......U........ - 0x80, 0x00, 0x00, 0x55, 0x80, 0x5b, 0x00, 0x00, 0x02, 0x01, 0x00, 0x07, 0x80, 0x01, 0x00, 0xe4, // ...U.[.......... - 0x90, 0x08, 0x00, 0x00, 0x03, 0x00, 0x00, 0x04, 0x80, 0x01, 0x00, 0xe4, 0x80, 0x01, 0x00, 0xe4, // ................ - 0x80, 0x07, 0x00, 0x00, 0x02, 0x00, 0x00, 0x04, 0x80, 0x00, 0x00, 0xaa, 0x80, 0x06, 0x00, 0x00, // ................ - 0x02, 0x00, 0x00, 0x04, 0x80, 0x00, 0x00, 0xaa, 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x02, // ................ - 0x80, 0x00, 0x00, 0x55, 0x80, 0x00, 0x00, 0xaa, 0x80, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, // ...U............ - 0x80, 0x00, 0x00, 0x55, 0x80, 0x02, 0x00, 0x00, 0xa1, 0x02, 0x00, 0x55, 0xa0, 0x04, 0x00, 0x00, // ...U.......U.... - 0x04, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x55, 0x80, 0x02, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x55, // .......U.......U - 0xa0, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x03, 0x80, 0x00, 0x00, 0xaa, 0x81, 0x00, 0x00, 0xe4, // ................ - 0x80, 0x06, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x55, 0x80, 0x05, 0x00, 0x00, // ...........U.... - 0x03, 0x00, 0x00, 0x11, 0x80, 0x00, 0x00, 0x55, 0x80, 0x00, 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, // .......U........ - 0x04, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x00, 0x80, 0x02, 0x00, 0xaa, 0xa0, 0x02, 0x00, 0xff, // ................ - 0xa0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, // ................ - 0x80, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x55, // ...............U - 0x80, 0x05, 0x00, 0x00, 0x03, 0x00, 0x08, 0x08, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0xff, // ................ - 0x90, 0x01, 0x00, 0x00, 0x02, 0x00, 0x08, 0x07, 0x80, 0x00, 0x00, 0xe4, 0x90, 0xff, 0xff, 0x00, // ................ - 0x00, 0x00, // .. + 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, // hader Compiler 1 + 0x30, 0x2e, 0x30, 0x2e, 0x31, 0x30, 0x30, 0x31, 0x31, 0x2e, 0x31, 0x36, 0x33, 0x38, 0x34, 0x00, // 0.0.10011.16384. + 0xab, 0x51, 0x00, 0x00, 0x05, 0x00, 0x00, 0x0f, 0xa0, 0x00, 0x00, 0x80, 0x40, 0x00, 0x00, 0x00, // .Q..........@... + 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x51, 0x00, 0x00, 0x05, 0x01, 0x00, 0x0f, // ?.......?Q...... + 0xa0, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x80, 0xbf, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x40, // ...............@ + 0xc0, 0x51, 0x00, 0x00, 0x05, 0x02, 0x00, 0x0f, 0xa0, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0x00, // .Q..........A... + 0x3f, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x40, 0x40, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, // ?......@@....... + 0x80, 0x00, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x01, 0x00, 0x0f, // ................ + 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x98, 0x00, 0x08, 0x0f, 0xa0, 0x04, 0x00, 0x00, // ................ + 0x04, 0x00, 0x00, 0x01, 0x80, 0x01, 0x00, 0xff, 0x90, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x55, // ...............U + 0xa0, 0x13, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x00, 0x80, 0x58, 0x00, 0x00, // .............X.. + 0x04, 0x00, 0x00, 0x04, 0x80, 0x00, 0x00, 0x55, 0x81, 0x00, 0x00, 0xaa, 0xa0, 0x00, 0x00, 0xff, // .......U........ + 0xa0, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x55, // ...............U + 0x81, 0x58, 0x00, 0x00, 0x04, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0xaa, // .X.............. + 0xa0, 0x00, 0x00, 0xaa, 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, // ................ + 0x80, 0x00, 0x00, 0x55, 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0x00, // ...U............ + 0x80, 0x01, 0x00, 0xe4, 0xa0, 0x58, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0xe4, // .....X.......... + 0x8c, 0x00, 0x00, 0xff, 0xa0, 0x00, 0x00, 0xaa, 0xa0, 0x42, 0x00, 0x00, 0x03, 0x01, 0x00, 0x0f, // .........B...... + 0x80, 0x01, 0x00, 0xe4, 0x90, 0x00, 0x08, 0xe4, 0xa0, 0x09, 0x00, 0x00, 0x03, 0x00, 0x00, 0x01, // ................ + 0x80, 0x01, 0x00, 0xc6, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x0e, // ................ + 0x80, 0x01, 0x00, 0x90, 0x91, 0x5c, 0x00, 0x00, 0x02, 0x00, 0x00, 0x0e, 0x80, 0x00, 0x00, 0xe4, // ................ + 0x80, 0x08, 0x00, 0x00, 0x03, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0xf9, 0x80, 0x00, 0x00, 0xf9, // ................ + 0x80, 0x07, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x55, 0x80, 0x06, 0x00, 0x00, // ...........U.... + 0x02, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x55, 0x80, 0x5b, 0x00, 0x00, 0x02, 0x01, 0x00, 0x07, // .......U.[...... + 0x80, 0x01, 0x00, 0xe4, 0x90, 0x08, 0x00, 0x00, 0x03, 0x00, 0x00, 0x04, 0x80, 0x01, 0x00, 0xe4, // ................ + 0x80, 0x01, 0x00, 0xe4, 0x80, 0x07, 0x00, 0x00, 0x02, 0x00, 0x00, 0x04, 0x80, 0x00, 0x00, 0xaa, // ................ + 0x80, 0x06, 0x00, 0x00, 0x02, 0x00, 0x00, 0x04, 0x80, 0x00, 0x00, 0xaa, 0x80, 0x02, 0x00, 0x00, // ................ + 0x03, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x55, 0x80, 0x00, 0x00, 0xaa, 0x80, 0x04, 0x00, 0x00, // .......U........ + 0x04, 0x00, 0x00, 0x04, 0x80, 0x00, 0x00, 0x55, 0x80, 0x02, 0x00, 0x00, 0xa1, 0x02, 0x00, 0x55, // .......U.......U + 0xa0, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x55, 0x80, 0x02, 0x00, 0x00, // ...........U.... + 0xa0, 0x02, 0x00, 0x55, 0xa0, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x03, 0x80, 0x00, 0x00, 0xaa, // ...U............ + 0x81, 0x00, 0x00, 0xe4, 0x80, 0x06, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x55, // ...............U + 0x80, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x11, 0x80, 0x00, 0x00, 0x55, 0x80, 0x00, 0x00, 0x00, // ...........U.... + 0x80, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x00, 0x80, 0x02, 0x00, 0xaa, // ................ + 0xa0, 0x02, 0x00, 0xff, 0xa0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, // ................ + 0x80, 0x00, 0x00, 0x00, 0x80, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, // ................ + 0x80, 0x00, 0x00, 0x55, 0x80, 0x05, 0x00, 0x00, 0x03, 0x00, 0x08, 0x08, 0x80, 0x00, 0x00, 0x00, // ...U............ + 0x80, 0x00, 0x00, 0xff, 0x90, 0x01, 0x00, 0x00, 0x02, 0x00, 0x08, 0x07, 0x80, 0x00, 0x00, 0xe4, // ................ + 0x90, 0xff, 0xff, 0x00, 0x00, 0x00, // ...... }; static const uint8_t fs_font_distance_field_dx11[1053] = { diff --git a/3rdparty/bgfx/examples/common/font/fs_font_distance_field_subpixel.bin.h b/3rdparty/bgfx/examples/common/font/fs_font_distance_field_subpixel.bin.h index 46bdf5ab710..154481dc393 100644 --- a/3rdparty/bgfx/examples/common/font/fs_font_distance_field_subpixel.bin.h +++ b/3rdparty/bgfx/examples/common/font/fs_font_distance_field_subpixel.bin.h @@ -81,65 +81,65 @@ static const uint8_t fs_font_distance_field_subpixel_glsl[1268] = 0x20, 0x2a, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x2e, 0x77, 0x29, 0x3b, 0x0a, // * v_color0.w);. 0x7d, 0x0a, 0x0a, 0x00, // }... }; -static const uint8_t fs_font_distance_field_subpixel_dx9[902] = +static const uint8_t fs_font_distance_field_subpixel_dx9[906] = { 0x46, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, // FSH........s_tex - 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x01, 0x00, 0x00, 0x01, 0x00, 0x68, 0x03, 0x00, 0x03, 0xff, // Color0.....h.... - 0xff, 0xfe, 0xff, 0x22, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x53, 0x00, 0x00, // ...".CTAB....S.. + 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x01, 0x00, 0x00, 0x01, 0x00, 0x6c, 0x03, 0x00, 0x03, 0xff, // Color0.....l.... + 0xff, 0xfe, 0xff, 0x23, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x53, 0x00, 0x00, // ...#.CTAB....S.. 0x00, 0x00, 0x03, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, // ................ 0x00, 0x4c, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, // .L...0.......... 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, // .<.......s_texCo 0x6c, 0x6f, 0x72, 0x00, 0xab, 0x04, 0x00, 0x0e, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, // lor............. 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, // .....ps_3_0.Micr 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, // osoft (R) HLSL S - 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x39, // hader Compiler 9 - 0x2e, 0x32, 0x39, 0x2e, 0x39, 0x35, 0x32, 0x2e, 0x33, 0x31, 0x31, 0x31, 0x00, 0x51, 0x00, 0x00, // .29.952.3111.Q.. - 0x05, 0x00, 0x00, 0x0f, 0xa0, 0x00, 0x00, 0x80, 0x40, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, // ........@...?... - 0x00, 0x00, 0x00, 0x80, 0x3f, 0x51, 0x00, 0x00, 0x05, 0x01, 0x00, 0x0f, 0xa0, 0x00, 0x00, 0x00, // ....?Q.......... - 0x80, 0x00, 0x00, 0x80, 0xbf, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x40, 0xc0, 0x51, 0x00, 0x00, // ...........@.Q.. - 0x05, 0x02, 0x00, 0x0f, 0xa0, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x40, 0x40, 0x00, 0x00, 0x00, // ...........@@... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x51, 0x00, 0x00, 0x05, 0x03, 0x00, 0x0f, 0xa0, 0xc1, 0xaa, 0x2a, // .....Q.........* - 0x3e, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, // >...A...?....... - 0x02, 0x0a, 0x00, 0x00, 0x80, 0x00, 0x00, 0x08, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, // ................ - 0x80, 0x01, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x98, 0x00, 0x08, 0x0f, // ................ - 0xa0, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x01, 0x80, 0x01, 0x00, 0xff, 0x90, 0x00, 0x00, 0x00, // ................ - 0xa0, 0x00, 0x00, 0x55, 0xa0, 0x13, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x00, // ...U............ - 0x80, 0x58, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x80, 0x00, 0x00, 0x55, 0x81, 0x00, 0x00, 0xaa, // .X.........U.... - 0xa0, 0x00, 0x00, 0xff, 0xa0, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x00, // ................ - 0x80, 0x00, 0x00, 0x55, 0x81, 0x58, 0x00, 0x00, 0x04, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, // ...U.X.......... - 0x80, 0x00, 0x00, 0xaa, 0xa0, 0x00, 0x00, 0xaa, 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x01, // ................ - 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x55, 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, // .......U........ - 0x80, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0xe4, 0xa0, 0x58, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, // .........X...... - 0x80, 0x00, 0x00, 0xe4, 0x8c, 0x00, 0x00, 0xff, 0xa0, 0x00, 0x00, 0xaa, 0xa0, 0x5b, 0x00, 0x00, // .............[.. - 0x02, 0x01, 0x00, 0x07, 0x80, 0x01, 0x00, 0xe4, 0x90, 0x04, 0x00, 0x00, 0x04, 0x02, 0x00, 0x07, // ................ - 0x80, 0x01, 0x00, 0xe4, 0x80, 0x03, 0x00, 0x00, 0xa1, 0x01, 0x00, 0xe4, 0x90, 0x42, 0x00, 0x00, // .............B.. - 0x03, 0x02, 0x00, 0x0f, 0x80, 0x02, 0x00, 0xe4, 0x80, 0x00, 0x08, 0xe4, 0xa0, 0x09, 0x00, 0x00, // ................ - 0x03, 0x02, 0x00, 0x01, 0x80, 0x02, 0x00, 0xc6, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x04, 0x00, 0x00, // ................ - 0x04, 0x03, 0x00, 0x07, 0x80, 0x01, 0x00, 0xe4, 0x80, 0x03, 0x00, 0x00, 0xa0, 0x01, 0x00, 0xe4, // ................ - 0x90, 0x08, 0x00, 0x00, 0x03, 0x01, 0x00, 0x01, 0x80, 0x01, 0x00, 0xe4, 0x80, 0x01, 0x00, 0xe4, // ................ - 0x80, 0x07, 0x00, 0x00, 0x02, 0x01, 0x00, 0x01, 0x80, 0x01, 0x00, 0x00, 0x80, 0x06, 0x00, 0x00, // ................ - 0x02, 0x01, 0x00, 0x01, 0x80, 0x01, 0x00, 0x00, 0x80, 0x42, 0x00, 0x00, 0x03, 0x03, 0x00, 0x0f, // .........B...... - 0x80, 0x03, 0x00, 0xe4, 0x80, 0x00, 0x08, 0xe4, 0xa0, 0x09, 0x00, 0x00, 0x03, 0x02, 0x00, 0x04, // ................ - 0x80, 0x03, 0x00, 0xc6, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x01, // ................ - 0x80, 0x02, 0x00, 0xaa, 0x80, 0x02, 0x00, 0x00, 0x80, 0x05, 0x00, 0x00, 0x03, 0x02, 0x00, 0x02, // ................ - 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x55, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x07, // .......U........ - 0x80, 0x01, 0x00, 0xe4, 0x91, 0x5c, 0x00, 0x00, 0x02, 0x00, 0x00, 0x07, 0x80, 0x00, 0x00, 0xe4, // ................ - 0x80, 0x08, 0x00, 0x00, 0x03, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x00, 0x00, 0xe4, // ................ - 0x80, 0x07, 0x00, 0x00, 0x02, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x80, 0x06, 0x00, 0x00, // ................ - 0x02, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x01, // ................ - 0x80, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x02, // ................ - 0x80, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x55, 0xa1, 0x03, 0x00, 0xaa, 0xa0, 0x04, 0x00, 0x00, // .......U........ - 0x04, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x55, 0xa0, 0x03, 0x00, 0xaa, // ...........U.... - 0xa0, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x55, 0x81, 0x00, 0x00, 0x00, // ...........U.... - 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0e, 0x80, 0x00, 0x00, 0x55, 0x81, 0x02, 0x00, 0x90, // ...........U.... - 0x80, 0x05, 0x00, 0x00, 0x03, 0x00, 0x08, 0x08, 0x80, 0x02, 0x00, 0x55, 0x80, 0x00, 0x00, 0xff, // ...........U.... - 0x90, 0x06, 0x00, 0x00, 0x02, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x80, 0x05, 0x00, 0x00, // ................ - 0x03, 0x00, 0x00, 0x17, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0xf9, 0x80, 0x04, 0x00, 0x00, // ................ - 0x04, 0x01, 0x00, 0x07, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x02, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x55, // ...............U - 0xa0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x07, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x00, 0x00, 0xe4, // ................ - 0x80, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x07, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x01, 0x00, 0xe4, // ................ - 0x80, 0x05, 0x00, 0x00, 0x03, 0x00, 0x08, 0x07, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x00, 0x00, 0xff, // ................ - 0x90, 0xff, 0xff, 0x00, 0x00, 0x00, // ...... + 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, // hader Compiler 1 + 0x30, 0x2e, 0x30, 0x2e, 0x31, 0x30, 0x30, 0x31, 0x31, 0x2e, 0x31, 0x36, 0x33, 0x38, 0x34, 0x00, // 0.0.10011.16384. + 0xab, 0x51, 0x00, 0x00, 0x05, 0x00, 0x00, 0x0f, 0xa0, 0x00, 0x00, 0x80, 0x40, 0x00, 0x00, 0x00, // .Q..........@... + 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x51, 0x00, 0x00, 0x05, 0x01, 0x00, 0x0f, // ?.......?Q...... + 0xa0, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x80, 0xbf, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x40, // ...............@ + 0xc0, 0x51, 0x00, 0x00, 0x05, 0x02, 0x00, 0x0f, 0xa0, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x40, // .Q.............@ + 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x51, 0x00, 0x00, 0x05, 0x03, 0x00, 0x0f, // @........Q...... + 0xa0, 0xc1, 0xaa, 0x2a, 0x3e, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, // ...*>...A...?... + 0x00, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x00, 0x00, 0x08, 0x90, 0x1f, 0x00, 0x00, // ................ + 0x02, 0x05, 0x00, 0x00, 0x80, 0x01, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // ................ + 0x98, 0x00, 0x08, 0x0f, 0xa0, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x01, 0x80, 0x01, 0x00, 0xff, // ................ + 0x90, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x55, 0xa0, 0x13, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02, // .......U........ + 0x80, 0x00, 0x00, 0x00, 0x80, 0x58, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x80, 0x00, 0x00, 0x55, // .....X.........U + 0x81, 0x00, 0x00, 0xaa, 0xa0, 0x00, 0x00, 0xff, 0xa0, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x02, // ................ + 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x55, 0x81, 0x58, 0x00, 0x00, 0x04, 0x00, 0x00, 0x01, // .......U.X...... + 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0xaa, 0xa0, 0x00, 0x00, 0xaa, 0x80, 0x02, 0x00, 0x00, // ................ + 0x03, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x55, 0x80, 0x02, 0x00, 0x00, // ...........U.... + 0x03, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0xe4, 0xa0, 0x58, 0x00, 0x00, // .............X.. + 0x04, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0x8c, 0x00, 0x00, 0xff, 0xa0, 0x00, 0x00, 0xaa, // ................ + 0xa0, 0x5b, 0x00, 0x00, 0x02, 0x01, 0x00, 0x07, 0x80, 0x01, 0x00, 0xe4, 0x90, 0x04, 0x00, 0x00, // .[.............. + 0x04, 0x02, 0x00, 0x07, 0x80, 0x01, 0x00, 0xe4, 0x80, 0x03, 0x00, 0x00, 0xa1, 0x01, 0x00, 0xe4, // ................ + 0x90, 0x42, 0x00, 0x00, 0x03, 0x02, 0x00, 0x0f, 0x80, 0x02, 0x00, 0xe4, 0x80, 0x00, 0x08, 0xe4, // .B.............. + 0xa0, 0x09, 0x00, 0x00, 0x03, 0x02, 0x00, 0x01, 0x80, 0x02, 0x00, 0xc6, 0x80, 0x00, 0x00, 0xe4, // ................ + 0x80, 0x04, 0x00, 0x00, 0x04, 0x03, 0x00, 0x07, 0x80, 0x01, 0x00, 0xe4, 0x80, 0x03, 0x00, 0x00, // ................ + 0xa0, 0x01, 0x00, 0xe4, 0x90, 0x08, 0x00, 0x00, 0x03, 0x01, 0x00, 0x01, 0x80, 0x01, 0x00, 0xe4, // ................ + 0x80, 0x01, 0x00, 0xe4, 0x80, 0x07, 0x00, 0x00, 0x02, 0x01, 0x00, 0x01, 0x80, 0x01, 0x00, 0x00, // ................ + 0x80, 0x06, 0x00, 0x00, 0x02, 0x01, 0x00, 0x01, 0x80, 0x01, 0x00, 0x00, 0x80, 0x42, 0x00, 0x00, // .............B.. + 0x03, 0x03, 0x00, 0x0f, 0x80, 0x03, 0x00, 0xe4, 0x80, 0x00, 0x08, 0xe4, 0xa0, 0x09, 0x00, 0x00, // ................ + 0x03, 0x02, 0x00, 0x04, 0x80, 0x03, 0x00, 0xc6, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x02, 0x00, 0x00, // ................ + 0x03, 0x00, 0x00, 0x01, 0x80, 0x02, 0x00, 0xaa, 0x80, 0x02, 0x00, 0x00, 0x80, 0x05, 0x00, 0x00, // ................ + 0x03, 0x02, 0x00, 0x02, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x55, 0xa0, 0x01, 0x00, 0x00, // ...........U.... + 0x02, 0x00, 0x00, 0x07, 0x80, 0x01, 0x00, 0xe4, 0x91, 0x5c, 0x00, 0x00, 0x02, 0x00, 0x00, 0x07, // ................ + 0x80, 0x00, 0x00, 0xe4, 0x80, 0x08, 0x00, 0x00, 0x03, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0xe4, // ................ + 0x80, 0x00, 0x00, 0xe4, 0x80, 0x07, 0x00, 0x00, 0x02, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, // ................ + 0x80, 0x06, 0x00, 0x00, 0x02, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x80, 0x02, 0x00, 0x00, // ................ + 0x03, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, // ................ + 0x04, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x55, 0xa1, 0x03, 0x00, 0xaa, // ...........U.... + 0xa0, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x55, // ...............U + 0xa0, 0x03, 0x00, 0xaa, 0xa0, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x55, // ...............U + 0x81, 0x00, 0x00, 0x00, 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0e, 0x80, 0x00, 0x00, 0x55, // ...............U + 0x81, 0x02, 0x00, 0x90, 0x80, 0x05, 0x00, 0x00, 0x03, 0x00, 0x08, 0x08, 0x80, 0x02, 0x00, 0x55, // ...............U + 0x80, 0x00, 0x00, 0xff, 0x90, 0x06, 0x00, 0x00, 0x02, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, // ................ + 0x80, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x17, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0xf9, // ................ + 0x80, 0x04, 0x00, 0x00, 0x04, 0x01, 0x00, 0x07, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x02, 0x00, 0x00, // ................ + 0xa0, 0x02, 0x00, 0x55, 0xa0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x07, 0x80, 0x00, 0x00, 0xe4, // ...U............ + 0x80, 0x00, 0x00, 0xe4, 0x80, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x07, 0x80, 0x00, 0x00, 0xe4, // ................ + 0x80, 0x01, 0x00, 0xe4, 0x80, 0x05, 0x00, 0x00, 0x03, 0x00, 0x08, 0x07, 0x80, 0x00, 0x00, 0xe4, // ................ + 0x80, 0x00, 0x00, 0xff, 0x90, 0xff, 0xff, 0x00, 0x00, 0x00, // .......... }; static const uint8_t fs_font_distance_field_subpixel_dx11[1305] = { diff --git a/3rdparty/bgfx/examples/common/font/vs_font_basic.bin.h b/3rdparty/bgfx/examples/common/font/vs_font_basic.bin.h index 5df95fa7cce..884743b9973 100644 --- a/3rdparty/bgfx/examples/common/font/vs_font_basic.bin.h +++ b/3rdparty/bgfx/examples/common/font/vs_font_basic.bin.h @@ -28,11 +28,11 @@ static const uint8_t vs_font_basic_glsl[431] = 0x64, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x20, 0x3d, // d0;. v_color0 = 0x20, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // a_color0;.}... }; -static const uint8_t vs_font_basic_dx9[335] = +static const uint8_t vs_font_basic_dx9[339] = { 0x56, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH........u_mod 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x04, 0x00, // elViewProj...... - 0x2c, 0x01, 0x00, 0x03, 0xfe, 0xff, 0xfe, 0xff, 0x23, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, // ,.......#.CTAB.. + 0x30, 0x01, 0x00, 0x03, 0xfe, 0xff, 0xfe, 0xff, 0x24, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, // 0.......$.CTAB.. 0x00, 0x00, 0x57, 0x00, 0x00, 0x00, 0x00, 0x03, 0xfe, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, // ..W............. 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x02, 0x00, // ......P...0..... 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, // ......@.......u_ @@ -40,17 +40,18 @@ static const uint8_t vs_font_basic_dx9[335] = 0x03, 0x00, 0x04, 0x00, 0x04, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0x73, // ..............vs 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, // _3_0.Microsoft ( 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, // R) HLSL Shader C - 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x39, 0x2e, 0x32, 0x39, 0x2e, 0x39, 0x35, 0x32, // ompiler 9.29.952 - 0x2e, 0x33, 0x31, 0x31, 0x31, 0x00, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x00, 0x00, // .3111........... - 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x0f, 0x90, 0x1f, 0x00, // ................ - 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x02, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, // ................ - 0x00, 0x80, 0x00, 0x00, 0x0f, 0xe0, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x01, 0x00, // ................ - 0x0f, 0xe0, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x02, 0x00, 0x0f, 0xe0, 0x05, 0x00, // ................ - 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, 0x01, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x55, 0x90, 0x04, 0x00, // ............U... - 0x00, 0x04, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x90, 0x00, 0x00, // ................ - 0xe4, 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0xe0, 0x00, 0x00, 0xe4, 0x80, 0x03, 0x00, // ................ - 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x0f, 0xe0, 0x00, 0x00, 0xe4, 0x90, 0x01, 0x00, // ................ - 0x00, 0x02, 0x02, 0x00, 0x0f, 0xe0, 0x02, 0x00, 0xe4, 0x90, 0xff, 0xff, 0x00, 0x00, 0x00, // ............... + 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, 0x30, 0x2e, 0x30, 0x2e, 0x31, 0x30, 0x30, // ompiler 10.0.100 + 0x31, 0x31, 0x2e, 0x31, 0x36, 0x33, 0x38, 0x34, 0x00, 0xab, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, // 11.16384........ + 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, // ................ + 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x02, 0x00, 0x0f, 0x90, 0x1f, 0x00, // ................ + 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0xe0, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, // ................ + 0x00, 0x80, 0x01, 0x00, 0x0f, 0xe0, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x02, 0x00, // ................ + 0x0f, 0xe0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, 0x01, 0x00, 0xe4, 0xa0, 0x01, 0x00, // ................ + 0x55, 0x90, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0xa0, 0x01, 0x00, // U............... + 0x00, 0x90, 0x00, 0x00, 0xe4, 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0xe0, 0x00, 0x00, // ................ + 0xe4, 0x80, 0x03, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x0f, 0xe0, 0x00, 0x00, // ................ + 0xe4, 0x90, 0x01, 0x00, 0x00, 0x02, 0x02, 0x00, 0x0f, 0xe0, 0x02, 0x00, 0xe4, 0x90, 0xff, 0xff, // ................ + 0x00, 0x00, 0x00, // ... }; static const uint8_t vs_font_basic_dx11[580] = { diff --git a/3rdparty/bgfx/examples/common/font/vs_font_distance_field.bin.h b/3rdparty/bgfx/examples/common/font/vs_font_distance_field.bin.h index 6fea18b931a..ebc7589c408 100644 --- a/3rdparty/bgfx/examples/common/font/vs_font_distance_field.bin.h +++ b/3rdparty/bgfx/examples/common/font/vs_font_distance_field.bin.h @@ -28,11 +28,11 @@ static const uint8_t vs_font_distance_field_glsl[431] = 0x64, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x20, 0x3d, // d0;. v_color0 = 0x20, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // a_color0;.}... }; -static const uint8_t vs_font_distance_field_dx9[335] = +static const uint8_t vs_font_distance_field_dx9[339] = { 0x56, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH........u_mod 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x04, 0x00, // elViewProj...... - 0x2c, 0x01, 0x00, 0x03, 0xfe, 0xff, 0xfe, 0xff, 0x23, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, // ,.......#.CTAB.. + 0x30, 0x01, 0x00, 0x03, 0xfe, 0xff, 0xfe, 0xff, 0x24, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, // 0.......$.CTAB.. 0x00, 0x00, 0x57, 0x00, 0x00, 0x00, 0x00, 0x03, 0xfe, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, // ..W............. 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x02, 0x00, // ......P...0..... 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, // ......@.......u_ @@ -40,17 +40,18 @@ static const uint8_t vs_font_distance_field_dx9[335] = 0x03, 0x00, 0x04, 0x00, 0x04, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0x73, // ..............vs 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, // _3_0.Microsoft ( 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, // R) HLSL Shader C - 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x39, 0x2e, 0x32, 0x39, 0x2e, 0x39, 0x35, 0x32, // ompiler 9.29.952 - 0x2e, 0x33, 0x31, 0x31, 0x31, 0x00, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x00, 0x00, // .3111........... - 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x0f, 0x90, 0x1f, 0x00, // ................ - 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x02, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, // ................ - 0x00, 0x80, 0x00, 0x00, 0x0f, 0xe0, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x01, 0x00, // ................ - 0x0f, 0xe0, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x02, 0x00, 0x0f, 0xe0, 0x05, 0x00, // ................ - 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, 0x01, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x55, 0x90, 0x04, 0x00, // ............U... - 0x00, 0x04, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x90, 0x00, 0x00, // ................ - 0xe4, 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0xe0, 0x00, 0x00, 0xe4, 0x80, 0x03, 0x00, // ................ - 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x0f, 0xe0, 0x00, 0x00, 0xe4, 0x90, 0x01, 0x00, // ................ - 0x00, 0x02, 0x02, 0x00, 0x0f, 0xe0, 0x02, 0x00, 0xe4, 0x90, 0xff, 0xff, 0x00, 0x00, 0x00, // ............... + 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, 0x30, 0x2e, 0x30, 0x2e, 0x31, 0x30, 0x30, // ompiler 10.0.100 + 0x31, 0x31, 0x2e, 0x31, 0x36, 0x33, 0x38, 0x34, 0x00, 0xab, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, // 11.16384........ + 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, // ................ + 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x02, 0x00, 0x0f, 0x90, 0x1f, 0x00, // ................ + 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0xe0, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, // ................ + 0x00, 0x80, 0x01, 0x00, 0x0f, 0xe0, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x02, 0x00, // ................ + 0x0f, 0xe0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, 0x01, 0x00, 0xe4, 0xa0, 0x01, 0x00, // ................ + 0x55, 0x90, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0xa0, 0x01, 0x00, // U............... + 0x00, 0x90, 0x00, 0x00, 0xe4, 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0xe0, 0x00, 0x00, // ................ + 0xe4, 0x80, 0x03, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x0f, 0xe0, 0x00, 0x00, // ................ + 0xe4, 0x90, 0x01, 0x00, 0x00, 0x02, 0x02, 0x00, 0x0f, 0xe0, 0x02, 0x00, 0xe4, 0x90, 0xff, 0xff, // ................ + 0x00, 0x00, 0x00, // ... }; static const uint8_t vs_font_distance_field_dx11[580] = { diff --git a/3rdparty/bgfx/examples/common/font/vs_font_distance_field_subpixel.bin.h b/3rdparty/bgfx/examples/common/font/vs_font_distance_field_subpixel.bin.h index bd885e453e3..6b0d75236d6 100644 --- a/3rdparty/bgfx/examples/common/font/vs_font_distance_field_subpixel.bin.h +++ b/3rdparty/bgfx/examples/common/font/vs_font_distance_field_subpixel.bin.h @@ -28,11 +28,11 @@ static const uint8_t vs_font_distance_field_subpixel_glsl[431] = 0x64, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x20, 0x3d, // d0;. v_color0 = 0x20, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // a_color0;.}... }; -static const uint8_t vs_font_distance_field_subpixel_dx9[335] = +static const uint8_t vs_font_distance_field_subpixel_dx9[339] = { 0x56, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH........u_mod 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x04, 0x00, // elViewProj...... - 0x2c, 0x01, 0x00, 0x03, 0xfe, 0xff, 0xfe, 0xff, 0x23, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, // ,.......#.CTAB.. + 0x30, 0x01, 0x00, 0x03, 0xfe, 0xff, 0xfe, 0xff, 0x24, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, // 0.......$.CTAB.. 0x00, 0x00, 0x57, 0x00, 0x00, 0x00, 0x00, 0x03, 0xfe, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, // ..W............. 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x02, 0x00, // ......P...0..... 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, // ......@.......u_ @@ -40,17 +40,18 @@ static const uint8_t vs_font_distance_field_subpixel_dx9[335] = 0x03, 0x00, 0x04, 0x00, 0x04, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0x73, // ..............vs 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, // _3_0.Microsoft ( 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, // R) HLSL Shader C - 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x39, 0x2e, 0x32, 0x39, 0x2e, 0x39, 0x35, 0x32, // ompiler 9.29.952 - 0x2e, 0x33, 0x31, 0x31, 0x31, 0x00, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x00, 0x00, // .3111........... - 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x0f, 0x90, 0x1f, 0x00, // ................ - 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x02, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, // ................ - 0x00, 0x80, 0x00, 0x00, 0x0f, 0xe0, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x01, 0x00, // ................ - 0x0f, 0xe0, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x02, 0x00, 0x0f, 0xe0, 0x05, 0x00, // ................ - 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, 0x01, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x55, 0x90, 0x04, 0x00, // ............U... - 0x00, 0x04, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x90, 0x00, 0x00, // ................ - 0xe4, 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0xe0, 0x00, 0x00, 0xe4, 0x80, 0x03, 0x00, // ................ - 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x0f, 0xe0, 0x00, 0x00, 0xe4, 0x90, 0x01, 0x00, // ................ - 0x00, 0x02, 0x02, 0x00, 0x0f, 0xe0, 0x02, 0x00, 0xe4, 0x90, 0xff, 0xff, 0x00, 0x00, 0x00, // ............... + 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, 0x30, 0x2e, 0x30, 0x2e, 0x31, 0x30, 0x30, // ompiler 10.0.100 + 0x31, 0x31, 0x2e, 0x31, 0x36, 0x33, 0x38, 0x34, 0x00, 0xab, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, // 11.16384........ + 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, // ................ + 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x02, 0x00, 0x0f, 0x90, 0x1f, 0x00, // ................ + 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0xe0, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, // ................ + 0x00, 0x80, 0x01, 0x00, 0x0f, 0xe0, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x02, 0x00, // ................ + 0x0f, 0xe0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, 0x01, 0x00, 0xe4, 0xa0, 0x01, 0x00, // ................ + 0x55, 0x90, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0xa0, 0x01, 0x00, // U............... + 0x00, 0x90, 0x00, 0x00, 0xe4, 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0xe0, 0x00, 0x00, // ................ + 0xe4, 0x80, 0x03, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x0f, 0xe0, 0x00, 0x00, // ................ + 0xe4, 0x90, 0x01, 0x00, 0x00, 0x02, 0x02, 0x00, 0x0f, 0xe0, 0x02, 0x00, 0xe4, 0x90, 0xff, 0xff, // ................ + 0x00, 0x00, 0x00, // ... }; static const uint8_t vs_font_distance_field_subpixel_dx11[580] = { diff --git a/3rdparty/bgfx/examples/common/imgui/fs_imgui_color.bin.h b/3rdparty/bgfx/examples/common/imgui/fs_imgui_color.bin.h index 611a46bc560..d64b2bdf7ca 100644 --- a/3rdparty/bgfx/examples/common/imgui/fs_imgui_color.bin.h +++ b/3rdparty/bgfx/examples/common/imgui/fs_imgui_color.bin.h @@ -7,17 +7,17 @@ static const uint8_t fs_imgui_color_glsl[89] = 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, // ragColor = v_col 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // or0;.}... }; -static const uint8_t fs_imgui_color_dx9[137] = +static const uint8_t fs_imgui_color_dx9[141] = { - 0x46, 0x53, 0x48, 0x04, 0xa4, 0x8b, 0xef, 0x49, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x03, 0xff, 0xff, // FSH....I..|..... - 0xfe, 0xff, 0x16, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // ....CTAB....#... + 0x46, 0x53, 0x48, 0x04, 0xa4, 0x8b, 0xef, 0x49, 0x00, 0x00, 0x80, 0x00, 0x00, 0x03, 0xff, 0xff, // FSH....I........ + 0xfe, 0xff, 0x17, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // ....CTAB....#... 0x00, 0x03, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, // ................ 0x1c, 0x00, 0x00, 0x00, 0x70, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, // ....ps_3_0.Micro 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, // soft (R) HLSL Sh - 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x39, 0x2e, // ader Compiler 9. - 0x32, 0x39, 0x2e, 0x39, 0x35, 0x32, 0x2e, 0x33, 0x31, 0x31, 0x31, 0x00, 0x1f, 0x00, 0x00, 0x02, // 29.952.3111..... - 0x0a, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, 0x01, 0x00, 0x00, 0x02, 0x00, 0x08, 0x0f, 0x80, // ................ - 0x00, 0x00, 0xe4, 0x90, 0xff, 0xff, 0x00, 0x00, 0x00, // ......... + 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, 0x30, // ader Compiler 10 + 0x2e, 0x30, 0x2e, 0x31, 0x30, 0x30, 0x31, 0x31, 0x2e, 0x31, 0x36, 0x33, 0x38, 0x34, 0x00, 0xab, // .0.10011.16384.. + 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, 0x01, 0x00, 0x00, 0x02, // ................ + 0x00, 0x08, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0x90, 0xff, 0xff, 0x00, 0x00, 0x00, // ............. }; static const uint8_t fs_imgui_color_dx11[260] = { diff --git a/3rdparty/bgfx/examples/common/imgui/fs_imgui_cubemap.bin.h b/3rdparty/bgfx/examples/common/imgui/fs_imgui_cubemap.bin.h index 265aef506c1..f274ada3d9c 100644 --- a/3rdparty/bgfx/examples/common/imgui/fs_imgui_cubemap.bin.h +++ b/3rdparty/bgfx/examples/common/imgui/fs_imgui_cubemap.bin.h @@ -24,12 +24,12 @@ static const uint8_t fs_imgui_cubemap_glsl[363] = 0x5f, 0x46, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x74, 0x6d, 0x70, // _FragColor = tmp 0x76, 0x61, 0x72, 0x5f, 0x31, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // var_1;.}... }; -static const uint8_t fs_imgui_cubemap_dx9[390] = +static const uint8_t fs_imgui_cubemap_dx9[394] = { 0x46, 0x53, 0x48, 0x04, 0xe3, 0xc2, 0x5c, 0x65, 0x02, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, // FSH....e...s_tex 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x01, 0x00, 0x00, 0x01, 0x00, 0x11, 0x75, 0x5f, 0x69, 0x6d, // Color0......u_im 0x61, 0x67, 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x01, 0x00, // ageLodEnabled... - 0x00, 0x01, 0x00, 0x50, 0x01, 0x00, 0x03, 0xff, 0xff, 0xfe, 0xff, 0x30, 0x00, 0x43, 0x54, 0x41, // ...P.......0.CTA + 0x00, 0x01, 0x00, 0x54, 0x01, 0x00, 0x03, 0xff, 0xff, 0xfe, 0xff, 0x31, 0x00, 0x43, 0x54, 0x41, // ...T.......1.CTA 0x42, 0x1c, 0x00, 0x00, 0x00, 0x8b, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0x02, 0x00, 0x00, // B............... 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, // .............D.. 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .........P...... @@ -40,17 +40,17 @@ static const uint8_t fs_imgui_cubemap_dx9[390] = 0x65, 0x64, 0x00, 0xab, 0xab, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x04, 0x00, 0x01, 0x00, 0x00, // ed.............. 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, // .....ps_3_0.Micr 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, // osoft (R) HLSL S - 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x39, // hader Compiler 9 - 0x2e, 0x32, 0x39, 0x2e, 0x39, 0x35, 0x32, 0x2e, 0x33, 0x31, 0x31, 0x31, 0x00, 0x51, 0x00, 0x00, // .29.952.3111.Q.. - 0x05, 0x01, 0x00, 0x0f, 0xa0, 0xcd, 0xcc, 0x4c, 0x3f, 0xcd, 0xcc, 0x4c, 0x3e, 0x00, 0x00, 0x00, // .......L?..L>... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x02, 0x03, 0x00, 0x00, 0x80, 0x00, 0x00, 0x07, // ................ - 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x98, 0x00, 0x08, 0x0f, 0xa0, 0x01, 0x00, 0x00, // ................ - 0x02, 0x00, 0x00, 0x07, 0x80, 0x00, 0x00, 0xe4, 0x90, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x08, // ................ - 0x80, 0x00, 0x00, 0x00, 0xa0, 0x5f, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0xe4, // ....._.......... - 0x80, 0x00, 0x08, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x00, 0x08, 0x07, 0x80, 0x00, 0x00, 0xe4, // ................ - 0x80, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x55, 0xa0, 0x04, 0x00, 0x00, // ...........U.... - 0x04, 0x00, 0x08, 0x08, 0x80, 0x00, 0x00, 0x55, 0x80, 0x01, 0x00, 0x00, 0xa0, 0x01, 0x00, 0x55, // .......U.......U - 0xa0, 0xff, 0xff, 0x00, 0x00, 0x00, // ...... + 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, // hader Compiler 1 + 0x30, 0x2e, 0x30, 0x2e, 0x31, 0x30, 0x30, 0x31, 0x31, 0x2e, 0x31, 0x36, 0x33, 0x38, 0x34, 0x00, // 0.0.10011.16384. + 0xab, 0x51, 0x00, 0x00, 0x05, 0x01, 0x00, 0x0f, 0xa0, 0xcd, 0xcc, 0x4c, 0x3f, 0xcd, 0xcc, 0x4c, // .Q.........L?..L + 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x02, 0x03, 0x00, 0x00, // >............... + 0x80, 0x00, 0x00, 0x07, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x98, 0x00, 0x08, 0x0f, // ................ + 0xa0, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x07, 0x80, 0x00, 0x00, 0xe4, 0x90, 0x01, 0x00, 0x00, // ................ + 0x02, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0x00, 0xa0, 0x5f, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, // ........._...... + 0x80, 0x00, 0x00, 0xe4, 0x80, 0x00, 0x08, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x00, 0x08, 0x07, // ................ + 0x80, 0x00, 0x00, 0xe4, 0x80, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x55, // ...............U + 0xa0, 0x04, 0x00, 0x00, 0x04, 0x00, 0x08, 0x08, 0x80, 0x00, 0x00, 0x55, 0x80, 0x01, 0x00, 0x00, // ...........U.... + 0xa0, 0x01, 0x00, 0x55, 0xa0, 0xff, 0xff, 0x00, 0x00, 0x00, // ...U...... }; static const uint8_t fs_imgui_cubemap_dx11[441] = { diff --git a/3rdparty/bgfx/examples/common/imgui/fs_imgui_image.bin.h b/3rdparty/bgfx/examples/common/imgui/fs_imgui_image.bin.h index 8496e53c794..618848fa5a1 100644 --- a/3rdparty/bgfx/examples/common/imgui/fs_imgui_image.bin.h +++ b/3rdparty/bgfx/examples/common/imgui/fs_imgui_image.bin.h @@ -24,12 +24,12 @@ static const uint8_t fs_imgui_image_glsl[360] = 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, // agColor = tmpvar 0x5f, 0x31, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // _1;.}... }; -static const uint8_t fs_imgui_image_dx9[394] = +static const uint8_t fs_imgui_image_dx9[398] = { 0x46, 0x53, 0x48, 0x04, 0x6f, 0x1e, 0x3e, 0x3c, 0x02, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, // FSH.o.><...s_tex 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x01, 0x00, 0x00, 0x01, 0x00, 0x11, 0x75, 0x5f, 0x69, 0x6d, // Color0......u_im 0x61, 0x67, 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x01, 0x00, // ageLodEnabled... - 0x00, 0x01, 0x00, 0x54, 0x01, 0x00, 0x03, 0xff, 0xff, 0xfe, 0xff, 0x30, 0x00, 0x43, 0x54, 0x41, // ...T.......0.CTA + 0x00, 0x01, 0x00, 0x58, 0x01, 0x00, 0x03, 0xff, 0xff, 0xfe, 0xff, 0x31, 0x00, 0x43, 0x54, 0x41, // ...X.......1.CTA 0x42, 0x1c, 0x00, 0x00, 0x00, 0x8b, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0x02, 0x00, 0x00, // B............... 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, // .............D.. 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .........P...... @@ -40,17 +40,17 @@ static const uint8_t fs_imgui_image_dx9[394] = 0x65, 0x64, 0x00, 0xab, 0xab, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x04, 0x00, 0x01, 0x00, 0x00, // ed.............. 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, // .....ps_3_0.Micr 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, // osoft (R) HLSL S - 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x39, // hader Compiler 9 - 0x2e, 0x32, 0x39, 0x2e, 0x39, 0x35, 0x32, 0x2e, 0x33, 0x31, 0x31, 0x31, 0x00, 0x51, 0x00, 0x00, // .29.952.3111.Q.. - 0x05, 0x01, 0x00, 0x0f, 0xa0, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0xcd, 0xcc, 0x4c, // ........?......L - 0x3f, 0xcd, 0xcc, 0x4c, 0x3e, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x00, 0x00, 0x03, // ?..L>........... - 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x90, 0x00, 0x08, 0x0f, 0xa0, 0x05, 0x00, 0x00, // ................ - 0x03, 0x00, 0x00, 0x07, 0x80, 0x01, 0x00, 0xd0, 0xa0, 0x00, 0x00, 0xc4, 0x90, 0x01, 0x00, 0x00, // ................ - 0x02, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0x00, 0xa0, 0x5f, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, // ........._...... - 0x80, 0x00, 0x00, 0xe4, 0x80, 0x00, 0x08, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x00, 0x08, 0x07, // ................ - 0x80, 0x00, 0x00, 0xe4, 0x80, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x0c, 0x80, 0x01, 0x00, 0xe4, // ................ - 0xa0, 0x04, 0x00, 0x00, 0x04, 0x00, 0x08, 0x08, 0x80, 0x00, 0x00, 0x55, 0xa0, 0x00, 0x00, 0xaa, // ...........U.... - 0x80, 0x00, 0x00, 0xff, 0x80, 0xff, 0xff, 0x00, 0x00, 0x00, // .......... + 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, // hader Compiler 1 + 0x30, 0x2e, 0x30, 0x2e, 0x31, 0x30, 0x30, 0x31, 0x31, 0x2e, 0x31, 0x36, 0x33, 0x38, 0x34, 0x00, // 0.0.10011.16384. + 0xab, 0x51, 0x00, 0x00, 0x05, 0x01, 0x00, 0x0f, 0xa0, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, // .Q..........?... + 0x00, 0xcd, 0xcc, 0x4c, 0x3f, 0xcd, 0xcc, 0x4c, 0x3e, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, // ...L?..L>....... + 0x80, 0x00, 0x00, 0x03, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x90, 0x00, 0x08, 0x0f, // ................ + 0xa0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x07, 0x80, 0x01, 0x00, 0xd0, 0xa0, 0x00, 0x00, 0xc4, // ................ + 0x90, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0x00, 0xa0, 0x5f, 0x00, 0x00, // ............._.. + 0x03, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x00, 0x08, 0xe4, 0xa0, 0x01, 0x00, 0x00, // ................ + 0x02, 0x00, 0x08, 0x07, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x0c, // ................ + 0x80, 0x01, 0x00, 0xe4, 0xa0, 0x04, 0x00, 0x00, 0x04, 0x00, 0x08, 0x08, 0x80, 0x00, 0x00, 0x55, // ...............U + 0xa0, 0x00, 0x00, 0xaa, 0x80, 0x00, 0x00, 0xff, 0x80, 0xff, 0xff, 0x00, 0x00, 0x00, // .............. }; static const uint8_t fs_imgui_image_dx11[445] = { diff --git a/3rdparty/bgfx/examples/common/imgui/fs_imgui_image_swizz.bin.h b/3rdparty/bgfx/examples/common/imgui/fs_imgui_image_swizz.bin.h index 237bdb1e10c..593de84d168 100644 --- a/3rdparty/bgfx/examples/common/imgui/fs_imgui_image_swizz.bin.h +++ b/3rdparty/bgfx/examples/common/imgui/fs_imgui_image_swizz.bin.h @@ -28,13 +28,13 @@ static const uint8_t fs_imgui_image_swizz_glsl[425] = 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, // ragColor = tmpva 0x72, 0x5f, 0x31, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // r_1;.}... }; -static const uint8_t fs_imgui_image_swizz_dx9[458] = +static const uint8_t fs_imgui_image_swizz_dx9[462] = { 0x46, 0x53, 0x48, 0x04, 0x6f, 0x1e, 0x3e, 0x3c, 0x03, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, // FSH.o.><...s_tex 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x01, 0x00, 0x00, 0x01, 0x00, 0x11, 0x75, 0x5f, 0x69, 0x6d, // Color0......u_im 0x61, 0x67, 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x01, 0x00, // ageLodEnabled... 0x00, 0x01, 0x00, 0x09, 0x75, 0x5f, 0x73, 0x77, 0x69, 0x7a, 0x7a, 0x6c, 0x65, 0x12, 0x01, 0x01, // ....u_swizzle... - 0x00, 0x01, 0x00, 0x84, 0x01, 0x00, 0x03, 0xff, 0xff, 0xfe, 0xff, 0x38, 0x00, 0x43, 0x54, 0x41, // ...........8.CTA + 0x00, 0x01, 0x00, 0x88, 0x01, 0x00, 0x03, 0xff, 0xff, 0xfe, 0xff, 0x39, 0x00, 0x43, 0x54, 0x41, // ...........9.CTA 0x42, 0x1c, 0x00, 0x00, 0x00, 0xa9, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0x03, 0x00, 0x00, // B............... 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0xa2, 0x00, 0x00, 0x00, 0x58, 0x00, 0x00, // .............X.. 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .........d...... @@ -47,18 +47,18 @@ static const uint8_t fs_imgui_image_swizz_dx9[458] = 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x73, 0x77, 0x69, 0x7a, 0x7a, // .........u_swizz 0x6c, 0x65, 0x00, 0x70, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, // le.ps_3_0.Micros 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, // oft (R) HLSL Sha - 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x39, 0x2e, 0x32, // der Compiler 9.2 - 0x39, 0x2e, 0x39, 0x35, 0x32, 0x2e, 0x33, 0x31, 0x31, 0x31, 0x00, 0xab, 0xab, 0x51, 0x00, 0x00, // 9.952.3111...Q.. - 0x05, 0x02, 0x00, 0x0f, 0xa0, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0xcd, 0xcc, 0x4c, // ........?......L - 0x3f, 0xcd, 0xcc, 0x4c, 0x3e, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x00, 0x00, 0x03, // ?..L>........... - 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x90, 0x00, 0x08, 0x0f, 0xa0, 0x05, 0x00, 0x00, // ................ - 0x03, 0x00, 0x00, 0x07, 0x80, 0x02, 0x00, 0xd0, 0xa0, 0x00, 0x00, 0xc4, 0x90, 0x01, 0x00, 0x00, // ................ - 0x02, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0x00, 0xa0, 0x5f, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, // ........._...... - 0x80, 0x00, 0x00, 0xe4, 0x80, 0x00, 0x08, 0xe4, 0xa0, 0x09, 0x00, 0x00, 0x03, 0x00, 0x00, 0x01, // ................ - 0x80, 0x00, 0x00, 0xe4, 0x80, 0x01, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x0c, // ................ - 0x80, 0x02, 0x00, 0xe4, 0xa0, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x55, // ...............U - 0xa0, 0x00, 0x00, 0xaa, 0x80, 0x00, 0x00, 0xff, 0x80, 0x01, 0x00, 0x00, 0x02, 0x00, 0x08, 0x0f, // ................ - 0x80, 0x00, 0x00, 0x40, 0x80, 0xff, 0xff, 0x00, 0x00, 0x00, // ...@...... + 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, 0x30, 0x2e, // der Compiler 10. + 0x30, 0x2e, 0x31, 0x30, 0x30, 0x31, 0x31, 0x2e, 0x31, 0x36, 0x33, 0x38, 0x34, 0x00, 0xab, 0xab, // 0.10011.16384... + 0xab, 0x51, 0x00, 0x00, 0x05, 0x02, 0x00, 0x0f, 0xa0, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, // .Q..........?... + 0x00, 0xcd, 0xcc, 0x4c, 0x3f, 0xcd, 0xcc, 0x4c, 0x3e, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, // ...L?..L>....... + 0x80, 0x00, 0x00, 0x03, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x90, 0x00, 0x08, 0x0f, // ................ + 0xa0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x07, 0x80, 0x02, 0x00, 0xd0, 0xa0, 0x00, 0x00, 0xc4, // ................ + 0x90, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0x00, 0xa0, 0x5f, 0x00, 0x00, // ............._.. + 0x03, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x00, 0x08, 0xe4, 0xa0, 0x09, 0x00, 0x00, // ................ + 0x03, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x01, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, // ................ + 0x02, 0x00, 0x00, 0x0c, 0x80, 0x02, 0x00, 0xe4, 0xa0, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x02, // ................ + 0x80, 0x00, 0x00, 0x55, 0xa0, 0x00, 0x00, 0xaa, 0x80, 0x00, 0x00, 0xff, 0x80, 0x01, 0x00, 0x00, // ...U............ + 0x02, 0x00, 0x08, 0x0f, 0x80, 0x00, 0x00, 0x40, 0x80, 0xff, 0xff, 0x00, 0x00, 0x00, // .......@...... }; static const uint8_t fs_imgui_image_swizz_dx11[493] = { diff --git a/3rdparty/bgfx/examples/common/imgui/fs_imgui_latlong.bin.h b/3rdparty/bgfx/examples/common/imgui/fs_imgui_latlong.bin.h index 5a54b079fe2..14d7aef3e0b 100644 --- a/3rdparty/bgfx/examples/common/imgui/fs_imgui_latlong.bin.h +++ b/3rdparty/bgfx/examples/common/imgui/fs_imgui_latlong.bin.h @@ -42,12 +42,12 @@ static const uint8_t fs_imgui_latlong_glsl[651] = 0x5f, 0x46, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x74, 0x6d, 0x70, // _FragColor = tmp 0x76, 0x61, 0x72, 0x5f, 0x34, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // var_4;.}... }; -static const uint8_t fs_imgui_latlong_dx9[554] = +static const uint8_t fs_imgui_latlong_dx9[558] = { 0x46, 0x53, 0x48, 0x04, 0x6f, 0x1e, 0x3e, 0x3c, 0x02, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, // FSH.o.><...s_tex 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x01, 0x00, 0x00, 0x01, 0x00, 0x11, 0x75, 0x5f, 0x69, 0x6d, // Color0......u_im 0x61, 0x67, 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x01, 0x00, // ageLodEnabled... - 0x00, 0x01, 0x00, 0xf4, 0x01, 0x00, 0x03, 0xff, 0xff, 0xfe, 0xff, 0x30, 0x00, 0x43, 0x54, 0x41, // ...........0.CTA + 0x00, 0x01, 0x00, 0xf8, 0x01, 0x00, 0x03, 0xff, 0xff, 0xfe, 0xff, 0x31, 0x00, 0x43, 0x54, 0x41, // ...........1.CTA 0x42, 0x1c, 0x00, 0x00, 0x00, 0x8b, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0x02, 0x00, 0x00, // B............... 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, // .............D.. 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .........P...... @@ -58,27 +58,27 @@ static const uint8_t fs_imgui_latlong_dx9[554] = 0x65, 0x64, 0x00, 0xab, 0xab, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x04, 0x00, 0x01, 0x00, 0x00, // ed.............. 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, // .....ps_3_0.Micr 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, // osoft (R) HLSL S - 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x39, // hader Compiler 9 - 0x2e, 0x32, 0x39, 0x2e, 0x39, 0x35, 0x32, 0x2e, 0x33, 0x31, 0x31, 0x31, 0x00, 0x51, 0x00, 0x00, // .29.952.3111.Q.. - 0x05, 0x01, 0x00, 0x0f, 0xa0, 0x00, 0x00, 0x00, 0x3f, 0xdb, 0x0f, 0xc9, 0x40, 0xdb, 0x0f, 0x49, // ........?...@..I - 0xc0, 0x00, 0x00, 0x00, 0x00, 0x51, 0x00, 0x00, 0x05, 0x02, 0x00, 0x0f, 0xa0, 0xcd, 0xcc, 0x4c, // .....Q.........L - 0x3f, 0xcd, 0xcc, 0x4c, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, // ?..L>........... - 0x02, 0x05, 0x00, 0x00, 0x80, 0x00, 0x00, 0x03, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // ................ - 0x98, 0x00, 0x08, 0x0f, 0xa0, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x01, 0x80, 0x01, 0x00, 0x00, // ................ - 0xa0, 0x00, 0x00, 0x00, 0x90, 0x13, 0x00, 0x00, 0x02, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, // ................ - 0x80, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x55, // ...............U - 0xa0, 0x01, 0x00, 0xaa, 0xa0, 0x25, 0x00, 0x00, 0x02, 0x01, 0x00, 0x03, 0x80, 0x00, 0x00, 0x00, // .....%.......... - 0x80, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x55, 0x90, 0x01, 0x00, 0x00, // ...........U.... - 0xa0, 0x01, 0x00, 0x00, 0xa0, 0x13, 0x00, 0x00, 0x02, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, // ................ - 0x80, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x55, // ...............U - 0xa0, 0x01, 0x00, 0xaa, 0xa0, 0x25, 0x00, 0x00, 0x02, 0x02, 0x00, 0x03, 0x80, 0x00, 0x00, 0x00, // .....%.......... - 0x80, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x05, 0x80, 0x01, 0x00, 0xc5, 0x80, 0x02, 0x00, 0x55, // ...............U - 0x81, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02, 0x80, 0x02, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, // ................ - 0x02, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0x00, 0xa0, 0x5f, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, // ........._...... - 0x80, 0x00, 0x00, 0xe4, 0x80, 0x00, 0x08, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x00, 0x08, 0x07, // ................ - 0x80, 0x00, 0x00, 0xe4, 0x80, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x55, // ...............U - 0xa0, 0x04, 0x00, 0x00, 0x04, 0x00, 0x08, 0x08, 0x80, 0x00, 0x00, 0x55, 0x80, 0x02, 0x00, 0x00, // ...........U.... - 0xa0, 0x02, 0x00, 0x55, 0xa0, 0xff, 0xff, 0x00, 0x00, 0x00, // ...U...... + 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, // hader Compiler 1 + 0x30, 0x2e, 0x30, 0x2e, 0x31, 0x30, 0x30, 0x31, 0x31, 0x2e, 0x31, 0x36, 0x33, 0x38, 0x34, 0x00, // 0.0.10011.16384. + 0xab, 0x51, 0x00, 0x00, 0x05, 0x01, 0x00, 0x0f, 0xa0, 0x00, 0x00, 0x00, 0x3f, 0xdb, 0x0f, 0xc9, // .Q..........?... + 0x40, 0xdb, 0x0f, 0x49, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x51, 0x00, 0x00, 0x05, 0x02, 0x00, 0x0f, // @..I.....Q...... + 0xa0, 0xcd, 0xcc, 0x4c, 0x3f, 0xcd, 0xcc, 0x4c, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ...L?..L>....... + 0x00, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x00, 0x00, 0x03, 0x90, 0x1f, 0x00, 0x00, // ................ + 0x02, 0x00, 0x00, 0x00, 0x98, 0x00, 0x08, 0x0f, 0xa0, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x01, // ................ + 0x80, 0x01, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x90, 0x13, 0x00, 0x00, 0x02, 0x00, 0x00, 0x01, // ................ + 0x80, 0x00, 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, // ................ + 0x80, 0x01, 0x00, 0x55, 0xa0, 0x01, 0x00, 0xaa, 0xa0, 0x25, 0x00, 0x00, 0x02, 0x01, 0x00, 0x03, // ...U.....%...... + 0x80, 0x00, 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x55, // ...............U + 0x90, 0x01, 0x00, 0x00, 0xa0, 0x01, 0x00, 0x00, 0xa0, 0x13, 0x00, 0x00, 0x02, 0x00, 0x00, 0x01, // ................ + 0x80, 0x00, 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, // ................ + 0x80, 0x01, 0x00, 0x55, 0xa0, 0x01, 0x00, 0xaa, 0xa0, 0x25, 0x00, 0x00, 0x02, 0x02, 0x00, 0x03, // ...U.....%...... + 0x80, 0x00, 0x00, 0x00, 0x80, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x05, 0x80, 0x01, 0x00, 0xc5, // ................ + 0x80, 0x02, 0x00, 0x55, 0x81, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02, 0x80, 0x02, 0x00, 0x00, // ...U............ + 0x80, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0x00, 0xa0, 0x5f, 0x00, 0x00, // ............._.. + 0x03, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x00, 0x08, 0xe4, 0xa0, 0x01, 0x00, 0x00, // ................ + 0x02, 0x00, 0x08, 0x07, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02, // ................ + 0x80, 0x00, 0x00, 0x55, 0xa0, 0x04, 0x00, 0x00, 0x04, 0x00, 0x08, 0x08, 0x80, 0x00, 0x00, 0x55, // ...U...........U + 0x80, 0x02, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x55, 0xa0, 0xff, 0xff, 0x00, 0x00, 0x00, // .......U...... }; static const uint8_t fs_imgui_latlong_dx11[617] = { diff --git a/3rdparty/bgfx/examples/common/imgui/fs_imgui_texture.bin.h b/3rdparty/bgfx/examples/common/imgui/fs_imgui_texture.bin.h index 08d722db698..5fc0768dd13 100644 --- a/3rdparty/bgfx/examples/common/imgui/fs_imgui_texture.bin.h +++ b/3rdparty/bgfx/examples/common/imgui/fs_imgui_texture.bin.h @@ -20,25 +20,25 @@ static const uint8_t fs_imgui_texture_glsl[290] = 0x72, 0x20, 0x3d, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x3b, 0x0a, 0x7d, 0x0a, // r = tmpvar_1;.}. 0x0a, 0x00, // .. }; -static const uint8_t fs_imgui_texture_dx9[258] = +static const uint8_t fs_imgui_texture_dx9[262] = { 0x46, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, // FSH........s_tex - 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x01, 0x00, 0x00, 0x01, 0x00, 0xe4, 0x00, 0x00, 0x03, 0xff, // Color0.......... - 0xff, 0xfe, 0xff, 0x22, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x53, 0x00, 0x00, // ...".CTAB....S.. + 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x01, 0x00, 0x00, 0x01, 0x00, 0xe8, 0x00, 0x00, 0x03, 0xff, // Color0.......... + 0xff, 0xfe, 0xff, 0x23, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x53, 0x00, 0x00, // ...#.CTAB....S.. 0x00, 0x00, 0x03, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, // ................ 0x00, 0x4c, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, // .L...0.......... 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, // .<.......s_texCo 0x6c, 0x6f, 0x72, 0x00, 0xab, 0x04, 0x00, 0x0c, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, // lor............. 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, // .....ps_3_0.Micr 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, // osoft (R) HLSL S - 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x39, // hader Compiler 9 - 0x2e, 0x32, 0x39, 0x2e, 0x39, 0x35, 0x32, 0x2e, 0x33, 0x31, 0x31, 0x31, 0x00, 0x1f, 0x00, 0x00, // .29.952.3111.... - 0x02, 0x0a, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, // ................ - 0x80, 0x01, 0x00, 0x03, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x90, 0x00, 0x08, 0x0f, // ................ - 0xa0, 0x42, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, 0x01, 0x00, 0xe4, 0x90, 0x00, 0x08, 0xe4, // .B.............. - 0xa0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x08, 0x08, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0xff, // ................ - 0x90, 0x01, 0x00, 0x00, 0x02, 0x00, 0x08, 0x07, 0x80, 0x00, 0x00, 0xe4, 0x90, 0xff, 0xff, 0x00, // ................ - 0x00, 0x00, // .. + 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, // hader Compiler 1 + 0x30, 0x2e, 0x30, 0x2e, 0x31, 0x30, 0x30, 0x31, 0x31, 0x2e, 0x31, 0x36, 0x33, 0x38, 0x34, 0x00, // 0.0.10011.16384. + 0xab, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, // ................ + 0x02, 0x05, 0x00, 0x00, 0x80, 0x01, 0x00, 0x03, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // ................ + 0x90, 0x00, 0x08, 0x0f, 0xa0, 0x42, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, 0x01, 0x00, 0xe4, // .....B.......... + 0x90, 0x00, 0x08, 0xe4, 0xa0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x08, 0x08, 0x80, 0x00, 0x00, 0x00, // ................ + 0x80, 0x00, 0x00, 0xff, 0x90, 0x01, 0x00, 0x00, 0x02, 0x00, 0x08, 0x07, 0x80, 0x00, 0x00, 0xe4, // ................ + 0x90, 0xff, 0xff, 0x00, 0x00, 0x00, // ...... }; static const uint8_t fs_imgui_texture_dx11[421] = { diff --git a/3rdparty/bgfx/examples/common/imgui/fs_ocornut_imgui.bin.h b/3rdparty/bgfx/examples/common/imgui/fs_ocornut_imgui.bin.h index ed79a9399c5..bbfafdf88d5 100644 --- a/3rdparty/bgfx/examples/common/imgui/fs_ocornut_imgui.bin.h +++ b/3rdparty/bgfx/examples/common/imgui/fs_ocornut_imgui.bin.h @@ -16,10 +16,10 @@ static const uint8_t fs_ocornut_imgui_glsl[238] = 0x20, 0x3d, 0x20, 0x28, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x20, 0x2a, 0x20, 0x76, // = (tmpvar_1 * v 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x29, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // _color0);.}... }; -static const uint8_t fs_ocornut_imgui_dx9[237] = +static const uint8_t fs_ocornut_imgui_dx9[241] = { 0x46, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x05, 0x73, 0x5f, 0x74, 0x65, 0x78, // FSH........s_tex - 0x30, 0x01, 0x00, 0x00, 0x01, 0x00, 0xd4, 0x00, 0x00, 0x03, 0xff, 0xff, 0xfe, 0xff, 0x21, 0x00, // 0.............!. + 0x30, 0x01, 0x00, 0x00, 0x01, 0x00, 0xd8, 0x00, 0x00, 0x03, 0xff, 0xff, 0xfe, 0xff, 0x22, 0x00, // 0.............". 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x4f, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, // CTAB....O....... 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, // ............H... 0x30, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x38, 0x00, 0x00, 0x00, // 0...........8... @@ -27,12 +27,13 @@ static const uint8_t fs_ocornut_imgui_dx9[237] = 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x73, 0x5f, 0x33, // ............ps_3 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, // _0.Microsoft (R) 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, // HLSL Shader Com - 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x39, 0x2e, 0x32, 0x39, 0x2e, 0x39, 0x35, 0x32, 0x2e, 0x33, // piler 9.29.952.3 - 0x31, 0x31, 0x31, 0x00, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, // 111............. - 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x01, 0x00, 0x03, 0x90, 0x1f, 0x00, 0x00, 0x02, // ................ - 0x00, 0x00, 0x00, 0x90, 0x00, 0x08, 0x0f, 0xa0, 0x42, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, // ........B....... - 0x01, 0x00, 0xe4, 0x90, 0x00, 0x08, 0xe4, 0xa0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x08, 0x0f, 0x80, // ................ - 0x00, 0x00, 0xe4, 0x80, 0x00, 0x00, 0xe4, 0x90, 0xff, 0xff, 0x00, 0x00, 0x00, // ............. + 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, 0x30, 0x2e, 0x30, 0x2e, 0x31, 0x30, 0x30, 0x31, 0x31, // piler 10.0.10011 + 0x2e, 0x31, 0x36, 0x33, 0x38, 0x34, 0x00, 0xab, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, // .16384.......... + 0x00, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x01, 0x00, 0x03, 0x90, // ................ + 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x90, 0x00, 0x08, 0x0f, 0xa0, 0x42, 0x00, 0x00, 0x03, // ............B... + 0x00, 0x00, 0x0f, 0x80, 0x01, 0x00, 0xe4, 0x90, 0x00, 0x08, 0xe4, 0xa0, 0x05, 0x00, 0x00, 0x03, // ................ + 0x00, 0x08, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x00, 0x00, 0xe4, 0x90, 0xff, 0xff, 0x00, 0x00, // ................ + 0x00, // . }; static const uint8_t fs_ocornut_imgui_dx11[396] = { diff --git a/3rdparty/bgfx/examples/common/imgui/ocornut_imgui.cpp b/3rdparty/bgfx/examples/common/imgui/ocornut_imgui.cpp index 8efddcc65f8..7c49ec06ea2 100644 --- a/3rdparty/bgfx/examples/common/imgui/ocornut_imgui.cpp +++ b/3rdparty/bgfx/examples/common/imgui/ocornut_imgui.cpp @@ -57,7 +57,7 @@ public: #endif // USE_ENTRY } - virtual ~PlatformWindow() BX_OVERRIDE + virtual ~PlatformWindow() { } @@ -197,7 +197,7 @@ public: { } - virtual ~WindowManager() BX_OVERRIDE + virtual ~WindowManager() { } diff --git a/3rdparty/bgfx/examples/common/imgui/vs_imgui_color.bin.h b/3rdparty/bgfx/examples/common/imgui/vs_imgui_color.bin.h index 4867ea1a86c..1b8aa95fb28 100644 --- a/3rdparty/bgfx/examples/common/imgui/vs_imgui_color.bin.h +++ b/3rdparty/bgfx/examples/common/imgui/vs_imgui_color.bin.h @@ -22,27 +22,27 @@ static const uint8_t vs_imgui_color_glsl[324] = 0x6f, 0x72, 0x30, 0x20, 0x3d, 0x20, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, // or0 = a_color0;. 0x7d, 0x0a, 0x0a, 0x00, // }... }; -static const uint8_t vs_imgui_color_dx9[290] = +static const uint8_t vs_imgui_color_dx9[294] = { 0x56, 0x53, 0x48, 0x04, 0xa4, 0x8b, 0xef, 0x49, 0x01, 0x00, 0x0a, 0x75, 0x5f, 0x76, 0x69, 0x65, // VSH....I...u_vie - 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x04, 0x00, 0x04, 0x01, 0x00, 0x03, 0xfe, // wProj........... - 0xff, 0xfe, 0xff, 0x22, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x53, 0x00, 0x00, // ...".CTAB....S.. + 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x04, 0x00, 0x08, 0x01, 0x00, 0x03, 0xfe, // wProj........... + 0xff, 0xfe, 0xff, 0x23, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x53, 0x00, 0x00, // ...#.CTAB....S.. 0x00, 0x00, 0x03, 0xfe, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, // ................ 0x00, 0x4c, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, // .L...0.......... 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, // .<.......u_viewP 0x72, 0x6f, 0x6a, 0x00, 0xab, 0x03, 0x00, 0x03, 0x00, 0x04, 0x00, 0x04, 0x00, 0x01, 0x00, 0x00, // roj............. 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, // .....vs_3_0.Micr 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, // osoft (R) HLSL S - 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x39, // hader Compiler 9 - 0x2e, 0x32, 0x39, 0x2e, 0x39, 0x35, 0x32, 0x2e, 0x33, 0x31, 0x31, 0x31, 0x00, 0x1f, 0x00, 0x00, // .29.952.3111.... - 0x02, 0x0a, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // ................ - 0x80, 0x01, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, // ................ - 0xe0, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x01, 0x00, 0x0f, 0xe0, 0x05, 0x00, 0x00, // ................ - 0x03, 0x00, 0x00, 0x0f, 0x80, 0x01, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x55, 0x90, 0x04, 0x00, 0x00, // ...........U.... - 0x04, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x90, 0x00, 0x00, 0xe4, // ................ - 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0xe0, 0x00, 0x00, 0xe4, 0x80, 0x03, 0x00, 0xe4, // ................ - 0xa0, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x0f, 0xe0, 0x00, 0x00, 0xe4, 0x90, 0xff, 0xff, 0x00, // ................ - 0x00, 0x00, // .. + 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, // hader Compiler 1 + 0x30, 0x2e, 0x30, 0x2e, 0x31, 0x30, 0x30, 0x31, 0x31, 0x2e, 0x31, 0x36, 0x33, 0x38, 0x34, 0x00, // 0.0.10011.16384. + 0xab, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, // ................ + 0x02, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // ................ + 0x80, 0x00, 0x00, 0x0f, 0xe0, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x01, 0x00, 0x0f, // ................ + 0xe0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, 0x01, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x55, // ...............U + 0x90, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, // ................ + 0x90, 0x00, 0x00, 0xe4, 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0xe0, 0x00, 0x00, 0xe4, // ................ + 0x80, 0x03, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x0f, 0xe0, 0x00, 0x00, 0xe4, // ................ + 0x90, 0xff, 0xff, 0x00, 0x00, 0x00, // ...... }; static const uint8_t vs_imgui_color_dx11[465] = { diff --git a/3rdparty/bgfx/examples/common/imgui/vs_imgui_cubemap.bin.h b/3rdparty/bgfx/examples/common/imgui/vs_imgui_cubemap.bin.h index 6467376b5a7..154c4e416e3 100644 --- a/3rdparty/bgfx/examples/common/imgui/vs_imgui_cubemap.bin.h +++ b/3rdparty/bgfx/examples/common/imgui/vs_imgui_cubemap.bin.h @@ -22,11 +22,11 @@ static const uint8_t vs_imgui_cubemap_glsl[329] = 0x72, 0x6d, 0x61, 0x6c, 0x20, 0x3d, 0x20, 0x61, 0x5f, 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x2e, // rmal = a_normal. 0x78, 0x79, 0x7a, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // xyz;.}... }; -static const uint8_t vs_imgui_cubemap_dx9[319] = +static const uint8_t vs_imgui_cubemap_dx9[323] = { 0x56, 0x53, 0x48, 0x04, 0xe3, 0xc2, 0x5c, 0x65, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH....e...u_mod 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x04, 0x00, // elViewProj...... - 0x1c, 0x01, 0x00, 0x03, 0xfe, 0xff, 0xfe, 0xff, 0x23, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, // ........#.CTAB.. + 0x20, 0x01, 0x00, 0x03, 0xfe, 0xff, 0xfe, 0xff, 0x24, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, // .......$.CTAB.. 0x00, 0x00, 0x57, 0x00, 0x00, 0x00, 0x00, 0x03, 0xfe, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, // ..W............. 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x02, 0x00, // ......P...0..... 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, // ......@.......u_ @@ -34,16 +34,17 @@ static const uint8_t vs_imgui_cubemap_dx9[319] = 0x03, 0x00, 0x04, 0x00, 0x04, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0x73, // ..............vs 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, // _3_0.Microsoft ( 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, // R) HLSL Shader C - 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x39, 0x2e, 0x32, 0x39, 0x2e, 0x39, 0x35, 0x32, // ompiler 9.29.952 - 0x2e, 0x33, 0x31, 0x31, 0x31, 0x00, 0x1f, 0x00, 0x00, 0x02, 0x03, 0x00, 0x00, 0x80, 0x00, 0x00, // .3111........... - 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x0f, 0x90, 0x1f, 0x00, // ................ - 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0xe0, 0x1f, 0x00, 0x00, 0x02, 0x03, 0x00, // ................ - 0x00, 0x80, 0x01, 0x00, 0x07, 0xe0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, 0x01, 0x00, // ................ - 0xe4, 0xa0, 0x01, 0x00, 0x55, 0x90, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, // ....U........... - 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x90, 0x00, 0x00, 0xe4, 0x80, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, // ................ - 0x0f, 0x80, 0x02, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0xaa, 0x90, 0x00, 0x00, 0xe4, 0x80, 0x02, 0x00, // ................ - 0x00, 0x03, 0x00, 0x00, 0x0f, 0xe0, 0x00, 0x00, 0xe4, 0x80, 0x03, 0x00, 0xe4, 0xa0, 0x01, 0x00, // ................ - 0x00, 0x02, 0x01, 0x00, 0x07, 0xe0, 0x00, 0x00, 0xe4, 0x90, 0xff, 0xff, 0x00, 0x00, 0x00, // ............... + 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, 0x30, 0x2e, 0x30, 0x2e, 0x31, 0x30, 0x30, // ompiler 10.0.100 + 0x31, 0x31, 0x2e, 0x31, 0x36, 0x33, 0x38, 0x34, 0x00, 0xab, 0x1f, 0x00, 0x00, 0x02, 0x03, 0x00, // 11.16384........ + 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, // ................ + 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0xe0, 0x1f, 0x00, // ................ + 0x00, 0x02, 0x03, 0x00, 0x00, 0x80, 0x01, 0x00, 0x07, 0xe0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, // ................ + 0x0f, 0x80, 0x01, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x55, 0x90, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, // ........U....... + 0x0f, 0x80, 0x00, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x90, 0x00, 0x00, 0xe4, 0x80, 0x04, 0x00, // ................ + 0x00, 0x04, 0x00, 0x00, 0x0f, 0x80, 0x02, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0xaa, 0x90, 0x00, 0x00, // ................ + 0xe4, 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0xe0, 0x00, 0x00, 0xe4, 0x80, 0x03, 0x00, // ................ + 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x07, 0xe0, 0x00, 0x00, 0xe4, 0x90, 0xff, 0xff, // ................ + 0x00, 0x00, 0x00, // ... }; static const uint8_t vs_imgui_cubemap_dx11[510] = { diff --git a/3rdparty/bgfx/examples/common/imgui/vs_imgui_image.bin.h b/3rdparty/bgfx/examples/common/imgui/vs_imgui_image.bin.h index b34b38c4122..f3711052b08 100644 --- a/3rdparty/bgfx/examples/common/imgui/vs_imgui_image.bin.h +++ b/3rdparty/bgfx/examples/common/imgui/vs_imgui_image.bin.h @@ -22,27 +22,27 @@ static const uint8_t vs_imgui_image_glsl[336] = 0x20, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x20, 0x3d, 0x20, 0x61, // v_texcoord0 = a 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // _texcoord0;.}... }; -static const uint8_t vs_imgui_image_dx9[290] = +static const uint8_t vs_imgui_image_dx9[294] = { 0x56, 0x53, 0x48, 0x04, 0x6f, 0x1e, 0x3e, 0x3c, 0x01, 0x00, 0x0a, 0x75, 0x5f, 0x76, 0x69, 0x65, // VSH.o.><...u_vie - 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x04, 0x00, 0x04, 0x01, 0x00, 0x03, 0xfe, // wProj........... - 0xff, 0xfe, 0xff, 0x22, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x53, 0x00, 0x00, // ...".CTAB....S.. + 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x04, 0x00, 0x08, 0x01, 0x00, 0x03, 0xfe, // wProj........... + 0xff, 0xfe, 0xff, 0x23, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x53, 0x00, 0x00, // ...#.CTAB....S.. 0x00, 0x00, 0x03, 0xfe, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, // ................ 0x00, 0x4c, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, // .L...0.......... 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, // .<.......u_viewP 0x72, 0x6f, 0x6a, 0x00, 0xab, 0x03, 0x00, 0x03, 0x00, 0x04, 0x00, 0x04, 0x00, 0x01, 0x00, 0x00, // roj............. 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, // .....vs_3_0.Micr 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, // osoft (R) HLSL S - 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x39, // hader Compiler 9 - 0x2e, 0x32, 0x39, 0x2e, 0x39, 0x35, 0x32, 0x2e, 0x33, 0x31, 0x31, 0x31, 0x00, 0x1f, 0x00, 0x00, // .29.952.3111.... - 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, // ................ - 0x80, 0x01, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, // ................ - 0xe0, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x01, 0x00, 0x03, 0xe0, 0x05, 0x00, 0x00, // ................ - 0x03, 0x00, 0x00, 0x0f, 0x80, 0x01, 0x00, 0xe4, 0xa0, 0x00, 0x00, 0x55, 0x90, 0x04, 0x00, 0x00, // ...........U.... - 0x04, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0xa0, 0x00, 0x00, 0x00, 0x90, 0x00, 0x00, 0xe4, // ................ - 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0xe0, 0x00, 0x00, 0xe4, 0x80, 0x03, 0x00, 0xe4, // ................ - 0xa0, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x03, 0xe0, 0x01, 0x00, 0xe4, 0x90, 0xff, 0xff, 0x00, // ................ - 0x00, 0x00, // .. + 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, // hader Compiler 1 + 0x30, 0x2e, 0x30, 0x2e, 0x31, 0x30, 0x30, 0x31, 0x31, 0x2e, 0x31, 0x36, 0x33, 0x38, 0x34, 0x00, // 0.0.10011.16384. + 0xab, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, // ................ + 0x02, 0x05, 0x00, 0x00, 0x80, 0x01, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // ................ + 0x80, 0x00, 0x00, 0x0f, 0xe0, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x01, 0x00, 0x03, // ................ + 0xe0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, 0x01, 0x00, 0xe4, 0xa0, 0x00, 0x00, 0x55, // ...............U + 0x90, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0xa0, 0x00, 0x00, 0x00, // ................ + 0x90, 0x00, 0x00, 0xe4, 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0xe0, 0x00, 0x00, 0xe4, // ................ + 0x80, 0x03, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x03, 0xe0, 0x01, 0x00, 0xe4, // ................ + 0x90, 0xff, 0xff, 0x00, 0x00, 0x00, // ...... }; static const uint8_t vs_imgui_image_dx11[473] = { diff --git a/3rdparty/bgfx/examples/common/imgui/vs_imgui_latlong.bin.h b/3rdparty/bgfx/examples/common/imgui/vs_imgui_latlong.bin.h index 8b84198ba33..4cf8bb28af7 100644 --- a/3rdparty/bgfx/examples/common/imgui/vs_imgui_latlong.bin.h +++ b/3rdparty/bgfx/examples/common/imgui/vs_imgui_latlong.bin.h @@ -23,11 +23,11 @@ static const uint8_t vs_imgui_latlong_glsl[337] = 0x61, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, // a_texcoord0;.}.. 0x00, // . }; -static const uint8_t vs_imgui_latlong_dx9[319] = +static const uint8_t vs_imgui_latlong_dx9[323] = { 0x56, 0x53, 0x48, 0x04, 0x6f, 0x1e, 0x3e, 0x3c, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH.o.><...u_mod 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x04, 0x00, // elViewProj...... - 0x1c, 0x01, 0x00, 0x03, 0xfe, 0xff, 0xfe, 0xff, 0x23, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, // ........#.CTAB.. + 0x20, 0x01, 0x00, 0x03, 0xfe, 0xff, 0xfe, 0xff, 0x24, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, // .......$.CTAB.. 0x00, 0x00, 0x57, 0x00, 0x00, 0x00, 0x00, 0x03, 0xfe, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, // ..W............. 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x02, 0x00, // ......P...0..... 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, // ......@.......u_ @@ -35,16 +35,17 @@ static const uint8_t vs_imgui_latlong_dx9[319] = 0x03, 0x00, 0x04, 0x00, 0x04, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0x73, // ..............vs 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, // _3_0.Microsoft ( 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, // R) HLSL Shader C - 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x39, 0x2e, 0x32, 0x39, 0x2e, 0x39, 0x35, 0x32, // ompiler 9.29.952 - 0x2e, 0x33, 0x31, 0x31, 0x31, 0x00, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, // .3111........... - 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x01, 0x00, 0x0f, 0x90, 0x1f, 0x00, // ................ - 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0xe0, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, // ................ - 0x00, 0x80, 0x01, 0x00, 0x03, 0xe0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, 0x01, 0x00, // ................ - 0xe4, 0xa0, 0x00, 0x00, 0x55, 0x90, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, // ....U........... - 0xe4, 0xa0, 0x00, 0x00, 0x00, 0x90, 0x00, 0x00, 0xe4, 0x80, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, // ................ - 0x0f, 0x80, 0x02, 0x00, 0xe4, 0xa0, 0x00, 0x00, 0xaa, 0x90, 0x00, 0x00, 0xe4, 0x80, 0x02, 0x00, // ................ - 0x00, 0x03, 0x00, 0x00, 0x0f, 0xe0, 0x00, 0x00, 0xe4, 0x80, 0x03, 0x00, 0xe4, 0xa0, 0x01, 0x00, // ................ - 0x00, 0x02, 0x01, 0x00, 0x03, 0xe0, 0x01, 0x00, 0xe4, 0x90, 0xff, 0xff, 0x00, 0x00, 0x00, // ............... + 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, 0x30, 0x2e, 0x30, 0x2e, 0x31, 0x30, 0x30, // ompiler 10.0.100 + 0x31, 0x31, 0x2e, 0x31, 0x36, 0x33, 0x38, 0x34, 0x00, 0xab, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, // 11.16384........ + 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x01, 0x00, // ................ + 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0xe0, 0x1f, 0x00, // ................ + 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x01, 0x00, 0x03, 0xe0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, // ................ + 0x0f, 0x80, 0x01, 0x00, 0xe4, 0xa0, 0x00, 0x00, 0x55, 0x90, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, // ........U....... + 0x0f, 0x80, 0x00, 0x00, 0xe4, 0xa0, 0x00, 0x00, 0x00, 0x90, 0x00, 0x00, 0xe4, 0x80, 0x04, 0x00, // ................ + 0x00, 0x04, 0x00, 0x00, 0x0f, 0x80, 0x02, 0x00, 0xe4, 0xa0, 0x00, 0x00, 0xaa, 0x90, 0x00, 0x00, // ................ + 0xe4, 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0xe0, 0x00, 0x00, 0xe4, 0x80, 0x03, 0x00, // ................ + 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x03, 0xe0, 0x01, 0x00, 0xe4, 0x90, 0xff, 0xff, // ................ + 0x00, 0x00, 0x00, // ... }; static const uint8_t vs_imgui_latlong_dx11[518] = { diff --git a/3rdparty/bgfx/examples/common/imgui/vs_imgui_texture.bin.h b/3rdparty/bgfx/examples/common/imgui/vs_imgui_texture.bin.h index a5c839c5c08..34ab3e2da96 100644 --- a/3rdparty/bgfx/examples/common/imgui/vs_imgui_texture.bin.h +++ b/3rdparty/bgfx/examples/common/imgui/vs_imgui_texture.bin.h @@ -28,29 +28,29 @@ static const uint8_t vs_imgui_texture_glsl[419] = 0x72, 0x30, 0x20, 0x3d, 0x20, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x7d, // r0 = a_color0;.} 0x0a, 0x0a, 0x00, // ... }; -static const uint8_t vs_imgui_texture_dx9[326] = +static const uint8_t vs_imgui_texture_dx9[330] = { 0x56, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0a, 0x75, 0x5f, 0x76, 0x69, 0x65, // VSH........u_vie - 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x04, 0x00, 0x28, 0x01, 0x00, 0x03, 0xfe, // wProj......(.... - 0xff, 0xfe, 0xff, 0x22, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x53, 0x00, 0x00, // ...".CTAB....S.. + 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x04, 0x00, 0x2c, 0x01, 0x00, 0x03, 0xfe, // wProj......,.... + 0xff, 0xfe, 0xff, 0x23, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x53, 0x00, 0x00, // ...#.CTAB....S.. 0x00, 0x00, 0x03, 0xfe, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, // ................ 0x00, 0x4c, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, // .L...0.......... 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, // .<.......u_viewP 0x72, 0x6f, 0x6a, 0x00, 0xab, 0x03, 0x00, 0x03, 0x00, 0x04, 0x00, 0x04, 0x00, 0x01, 0x00, 0x00, // roj............. 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, // .....vs_3_0.Micr 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, // osoft (R) HLSL S - 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x39, // hader Compiler 9 - 0x2e, 0x32, 0x39, 0x2e, 0x39, 0x35, 0x32, 0x2e, 0x33, 0x31, 0x31, 0x31, 0x00, 0x1f, 0x00, 0x00, // .29.952.3111.... - 0x02, 0x0a, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // ................ - 0x80, 0x01, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x02, 0x00, 0x0f, // ................ - 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0xe0, 0x1f, 0x00, 0x00, // ................ - 0x02, 0x0a, 0x00, 0x00, 0x80, 0x01, 0x00, 0x0f, 0xe0, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, // ................ - 0x80, 0x02, 0x00, 0x03, 0xe0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, 0x01, 0x00, 0xe4, // ................ - 0xa0, 0x01, 0x00, 0x55, 0x90, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0xe4, // ...U............ - 0xa0, 0x01, 0x00, 0x00, 0x90, 0x00, 0x00, 0xe4, 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, // ................ - 0xe0, 0x00, 0x00, 0xe4, 0x80, 0x03, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x0f, // ................ - 0xe0, 0x00, 0x00, 0xe4, 0x90, 0x01, 0x00, 0x00, 0x02, 0x02, 0x00, 0x03, 0xe0, 0x02, 0x00, 0xe4, // ................ - 0x90, 0xff, 0xff, 0x00, 0x00, 0x00, // ...... + 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, // hader Compiler 1 + 0x30, 0x2e, 0x30, 0x2e, 0x31, 0x30, 0x30, 0x31, 0x31, 0x2e, 0x31, 0x36, 0x33, 0x38, 0x34, 0x00, // 0.0.10011.16384. + 0xab, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, // ................ + 0x02, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, // ................ + 0x80, 0x02, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, // ................ + 0xe0, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x01, 0x00, 0x0f, 0xe0, 0x1f, 0x00, 0x00, // ................ + 0x02, 0x05, 0x00, 0x00, 0x80, 0x02, 0x00, 0x03, 0xe0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, // ................ + 0x80, 0x01, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x55, 0x90, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, // .......U........ + 0x80, 0x00, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x90, 0x00, 0x00, 0xe4, 0x80, 0x02, 0x00, 0x00, // ................ + 0x03, 0x00, 0x00, 0x0f, 0xe0, 0x00, 0x00, 0xe4, 0x80, 0x03, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, // ................ + 0x02, 0x01, 0x00, 0x0f, 0xe0, 0x00, 0x00, 0xe4, 0x90, 0x01, 0x00, 0x00, 0x02, 0x02, 0x00, 0x03, // ................ + 0xe0, 0x02, 0x00, 0xe4, 0x90, 0xff, 0xff, 0x00, 0x00, 0x00, // .......... }; static const uint8_t vs_imgui_texture_dx11[575] = { diff --git a/3rdparty/bgfx/examples/common/imgui/vs_ocornut_imgui.bin.h b/3rdparty/bgfx/examples/common/imgui/vs_ocornut_imgui.bin.h index ba968aaa2a6..81ed318597a 100644 --- a/3rdparty/bgfx/examples/common/imgui/vs_ocornut_imgui.bin.h +++ b/3rdparty/bgfx/examples/common/imgui/vs_ocornut_imgui.bin.h @@ -34,11 +34,11 @@ static const uint8_t vs_ocornut_imgui_glsl[523] = 0x20, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x20, 0x3d, 0x20, 0x61, 0x5f, 0x63, // v_color0 = a_c 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // olor0;.}... }; -static const uint8_t vs_ocornut_imgui_dx9[367] = +static const uint8_t vs_ocornut_imgui_dx9[371] = { 0x56, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0b, 0x75, 0x5f, 0x76, 0x69, 0x65, // VSH........u_vie - 0x77, 0x54, 0x65, 0x78, 0x65, 0x6c, 0x02, 0x01, 0x00, 0x00, 0x01, 0x00, 0x50, 0x01, 0x00, 0x03, // wTexel......P... - 0xfe, 0xff, 0xfe, 0xff, 0x22, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x53, 0x00, // ....".CTAB....S. + 0x77, 0x54, 0x65, 0x78, 0x65, 0x6c, 0x02, 0x01, 0x00, 0x00, 0x01, 0x00, 0x54, 0x01, 0x00, 0x03, // wTexel......T... + 0xfe, 0xff, 0xfe, 0xff, 0x23, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x53, 0x00, // ....#.CTAB....S. 0x00, 0x00, 0x00, 0x03, 0xfe, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, // ................ 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, // ..L...0......... 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, // ..<.......u_view @@ -46,19 +46,20 @@ static const uint8_t vs_ocornut_imgui_dx9[367] = 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, // ......vs_3_0.Mic 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, // rosoft (R) HLSL 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, // Shader Compiler - 0x39, 0x2e, 0x32, 0x39, 0x2e, 0x39, 0x35, 0x32, 0x2e, 0x33, 0x31, 0x31, 0x31, 0x00, 0x51, 0x00, // 9.29.952.3111.Q. - 0x00, 0x05, 0x01, 0x00, 0x0f, 0xa0, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x80, 0xbf, 0x00, 0x00, // .........@...... - 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x00, 0x00, // .?.............. - 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x0f, 0x90, 0x1f, 0x00, // ................ - 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x02, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, // ................ - 0x00, 0x80, 0x00, 0x00, 0x0f, 0xe0, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x01, 0x00, // ................ - 0x0f, 0xe0, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x02, 0x00, 0x03, 0xe0, 0x05, 0x00, // ................ - 0x00, 0x03, 0x00, 0x00, 0x03, 0x80, 0x00, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0xe4, 0x90, 0x04, 0x00, // ................ - 0x00, 0x04, 0x00, 0x00, 0x01, 0xe0, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0xa0, 0x01, 0x00, // ................ - 0x55, 0xa0, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x02, 0xe0, 0x00, 0x00, 0x55, 0x80, 0x01, 0x00, // U...........U... - 0x00, 0xa1, 0x01, 0x00, 0xaa, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x0c, 0xe0, 0x01, 0x00, // ................ - 0xb4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x0f, 0xe0, 0x00, 0x00, 0xe4, 0x90, 0x01, 0x00, // ................ - 0x00, 0x02, 0x02, 0x00, 0x03, 0xe0, 0x02, 0x00, 0xe4, 0x90, 0xff, 0xff, 0x00, 0x00, 0x00, // ............... + 0x31, 0x30, 0x2e, 0x30, 0x2e, 0x31, 0x30, 0x30, 0x31, 0x31, 0x2e, 0x31, 0x36, 0x33, 0x38, 0x34, // 10.0.10011.16384 + 0x00, 0xab, 0x51, 0x00, 0x00, 0x05, 0x01, 0x00, 0x0f, 0xa0, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, // ..Q..........@.. + 0x80, 0xbf, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, // .....?.......... + 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, // ................ + 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x02, 0x00, 0x0f, 0x90, 0x1f, 0x00, // ................ + 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0xe0, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, // ................ + 0x00, 0x80, 0x01, 0x00, 0x0f, 0xe0, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x02, 0x00, // ................ + 0x03, 0xe0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x03, 0x80, 0x00, 0x00, 0xe4, 0xa0, 0x01, 0x00, // ................ + 0xe4, 0x90, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x01, 0xe0, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, // ................ + 0x00, 0xa0, 0x01, 0x00, 0x55, 0xa0, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x02, 0xe0, 0x00, 0x00, // ....U........... + 0x55, 0x80, 0x01, 0x00, 0x00, 0xa1, 0x01, 0x00, 0xaa, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, // U............... + 0x0c, 0xe0, 0x01, 0x00, 0xb4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x0f, 0xe0, 0x00, 0x00, // ................ + 0xe4, 0x90, 0x01, 0x00, 0x00, 0x02, 0x02, 0x00, 0x03, 0xe0, 0x02, 0x00, 0xe4, 0x90, 0xff, 0xff, // ................ + 0x00, 0x00, 0x00, // ... }; static const uint8_t vs_ocornut_imgui_dx11[612] = { diff --git a/3rdparty/bgfx/examples/common/nanovg/fs_nanovg_fill.bin.h b/3rdparty/bgfx/examples/common/nanovg/fs_nanovg_fill.bin.h index f2de36d49ad..c7ed6294e86 100644 --- a/3rdparty/bgfx/examples/common/nanovg/fs_nanovg_fill.bin.h +++ b/3rdparty/bgfx/examples/common/nanovg/fs_nanovg_fill.bin.h @@ -195,7 +195,7 @@ static const uint8_t fs_nanovg_fill_glsl[3095] = 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x5f, // gColor = result_ 0x31, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // 1;.}... }; -static const uint8_t fs_nanovg_fill_dx9[1543] = +static const uint8_t fs_nanovg_fill_dx9[1547] = { 0x46, 0x53, 0x48, 0x04, 0xcf, 0xda, 0x1b, 0x94, 0x08, 0x00, 0x05, 0x73, 0x5f, 0x74, 0x65, 0x78, // FSH........s_tex 0x30, 0x01, 0x00, 0x00, 0x01, 0x00, 0x0e, 0x75, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x74, 0x52, // 0......u_extentR @@ -206,8 +206,8 @@ static const uint8_t fs_nanovg_fill_dx9[1543] = 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x01, 0x0a, 0x00, 0x01, 0x00, 0x11, 0x75, 0x5f, // _params.......u_ 0x73, 0x63, 0x69, 0x73, 0x73, 0x6f, 0x72, 0x45, 0x78, 0x74, 0x53, 0x63, 0x61, 0x6c, 0x65, 0x12, // scissorExtScale. 0x01, 0x08, 0x00, 0x01, 0x00, 0x0c, 0x75, 0x5f, 0x73, 0x63, 0x69, 0x73, 0x73, 0x6f, 0x72, 0x4d, // ......u_scissorM - 0x61, 0x74, 0x13, 0x01, 0x00, 0x00, 0x03, 0x00, 0x6c, 0x05, 0x00, 0x03, 0xff, 0xff, 0xfe, 0xff, // at......l....... - 0x63, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x57, 0x01, 0x00, 0x00, 0x00, 0x03, // c.CTAB....W..... + 0x61, 0x74, 0x13, 0x01, 0x00, 0x00, 0x03, 0x00, 0x70, 0x05, 0x00, 0x03, 0xff, 0xff, 0xfe, 0xff, // at......p....... + 0x64, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x57, 0x01, 0x00, 0x00, 0x00, 0x03, // d.CTAB....W..... 0xff, 0xff, 0x08, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x50, 0x01, // ..............P. 0x00, 0x00, 0xbc, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0xc4, 0x00, // ................ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd4, 0x00, 0x00, 0x00, 0x02, 0x00, 0x09, 0x00, 0x01, 0x00, // ................ @@ -231,69 +231,69 @@ static const uint8_t fs_nanovg_fill_dx9[1543] = 0x6f, 0x72, 0x4d, 0x61, 0x74, 0x00, 0x70, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, // orMat.ps_3_0.Mic 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, // rosoft (R) HLSL 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, // Shader Compiler - 0x39, 0x2e, 0x32, 0x39, 0x2e, 0x39, 0x35, 0x32, 0x2e, 0x33, 0x31, 0x31, 0x31, 0x00, 0x51, 0x00, // 9.29.952.3111.Q. - 0x00, 0x05, 0x0b, 0x00, 0x0f, 0xa0, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, // .........?...@.. - 0x80, 0xbf, 0x00, 0x00, 0x80, 0x3f, 0x51, 0x00, 0x00, 0x05, 0x0c, 0x00, 0x0f, 0xa0, 0x00, 0x00, // .....?Q......... - 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, // .....?..@@...... - 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x00, 0x00, 0x03, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, // ................ - 0x01, 0x80, 0x01, 0x00, 0x03, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x90, 0x00, 0x08, // ................ - 0x0f, 0xa0, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x01, 0x80, 0x01, 0x00, 0x00, 0x90, 0x0b, 0x00, // ................ - 0x55, 0xa0, 0x0b, 0x00, 0xaa, 0xa0, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, // U............... - 0x00, 0x8c, 0x0b, 0x00, 0xff, 0xa0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, // ................ - 0x00, 0x80, 0x0a, 0x00, 0x55, 0xa0, 0x0a, 0x00, 0x00, 0x03, 0x01, 0x00, 0x01, 0x80, 0x00, 0x00, // ....U........... - 0x00, 0x80, 0x0b, 0x00, 0xff, 0xa0, 0x0a, 0x00, 0x00, 0x03, 0x00, 0x00, 0x01, 0x80, 0x01, 0x00, // ................ - 0x55, 0x90, 0x0b, 0x00, 0xff, 0xa0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, // U............... - 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x06, 0x80, 0x04, 0x00, // ................ - 0xd0, 0xa0, 0x00, 0x00, 0x55, 0x90, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x06, 0x80, 0x03, 0x00, // ....U........... - 0xd0, 0xa0, 0x00, 0x00, 0x00, 0x90, 0x00, 0x00, 0xe4, 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, // ................ - 0x06, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x05, 0x00, 0xd0, 0xa0, 0x06, 0x00, 0x00, 0x02, 0x01, 0x00, // ................ - 0x01, 0x80, 0x09, 0x00, 0x00, 0xa0, 0x06, 0x00, 0x00, 0x02, 0x01, 0x00, 0x02, 0x80, 0x09, 0x00, // ................ - 0x55, 0xa0, 0x05, 0x00, 0x00, 0x03, 0x01, 0x00, 0x03, 0x80, 0x00, 0x00, 0xe9, 0x80, 0x01, 0x00, // U............... - 0xe4, 0x80, 0x05, 0x00, 0x00, 0x03, 0x01, 0x00, 0x0c, 0x80, 0x01, 0x00, 0x44, 0xa0, 0x00, 0x00, // ............D... - 0x55, 0x90, 0x04, 0x00, 0x00, 0x04, 0x01, 0x00, 0x0c, 0x80, 0x00, 0x00, 0x44, 0xa0, 0x00, 0x00, // U...........D... - 0x00, 0x90, 0x01, 0x00, 0xe4, 0x80, 0x02, 0x00, 0x00, 0x03, 0x01, 0x00, 0x0c, 0x80, 0x01, 0x00, // ................ - 0xe4, 0x80, 0x02, 0x00, 0x44, 0xa0, 0x02, 0x00, 0x00, 0x03, 0x01, 0x00, 0x0c, 0x80, 0x01, 0x00, // ....D........... - 0xe4, 0x8b, 0x08, 0x00, 0x44, 0xa1, 0x01, 0x00, 0x00, 0x02, 0x02, 0x00, 0x07, 0x80, 0x0b, 0x00, // ....D........... - 0xe4, 0xa0, 0x04, 0x00, 0x00, 0x04, 0x01, 0x00, 0x1c, 0x80, 0x01, 0x00, 0xe4, 0x80, 0x08, 0x00, // ................ - 0xe4, 0xa1, 0x02, 0x00, 0x00, 0x80, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x08, 0x80, 0x01, 0x00, // ................ - 0xff, 0x80, 0x01, 0x00, 0xaa, 0x80, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, // ................ - 0xff, 0x80, 0x00, 0x00, 0x00, 0x80, 0x02, 0x00, 0x00, 0x03, 0x01, 0x00, 0x04, 0x80, 0x02, 0x00, // ................ - 0xaa, 0x80, 0x0a, 0x00, 0xff, 0xa0, 0x23, 0x00, 0x00, 0x02, 0x02, 0x00, 0x0c, 0x80, 0x0a, 0x00, // ......#......... - 0xb4, 0xa0, 0x42, 0x00, 0x00, 0x03, 0x03, 0x00, 0x0f, 0x80, 0x01, 0x00, 0xe4, 0x80, 0x00, 0x08, // ..B............. - 0xe4, 0xa0, 0x04, 0x00, 0x00, 0x04, 0x04, 0x00, 0x0f, 0x80, 0x03, 0x00, 0x00, 0x80, 0x0c, 0x00, // ................ - 0x40, 0xa0, 0x0c, 0x00, 0x15, 0xa0, 0x58, 0x00, 0x00, 0x04, 0x03, 0x00, 0x0f, 0x80, 0x02, 0x00, // @.....X......... - 0xff, 0x81, 0x03, 0x00, 0xe4, 0x80, 0x04, 0x00, 0xe4, 0x80, 0x05, 0x00, 0x00, 0x03, 0x03, 0x00, // ................ - 0x08, 0x80, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0xff, 0x80, 0x29, 0x00, 0x02, 0x02, 0x0a, 0x00, // ..........)..... - 0xff, 0xa0, 0x02, 0x00, 0x55, 0x80, 0x01, 0x00, 0x00, 0x02, 0x04, 0x00, 0x0f, 0x80, 0x0b, 0x00, // ....U........... - 0xff, 0xa0, 0x2a, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x02, 0x05, 0x00, 0x04, 0x80, 0x0c, 0x00, // ..*............. - 0xaa, 0xa0, 0x29, 0x00, 0x02, 0x02, 0x0a, 0x00, 0xff, 0xa0, 0x05, 0x00, 0xaa, 0x80, 0x42, 0x00, // ..)...........B. - 0x00, 0x03, 0x05, 0x00, 0x0f, 0x80, 0x01, 0x00, 0xe4, 0x90, 0x00, 0x08, 0xe4, 0xa0, 0x04, 0x00, // ................ - 0x00, 0x04, 0x06, 0x00, 0x0f, 0x80, 0x05, 0x00, 0x00, 0x80, 0x0c, 0x00, 0x40, 0xa0, 0x0c, 0x00, // ............@... - 0x15, 0xa0, 0x58, 0x00, 0x00, 0x04, 0x05, 0x00, 0x0f, 0x80, 0x02, 0x00, 0xff, 0x81, 0x05, 0x00, // ..X............. - 0xe4, 0x80, 0x06, 0x00, 0xe4, 0x80, 0x05, 0x00, 0x00, 0x03, 0x05, 0x00, 0x08, 0x80, 0x00, 0x00, // ................ - 0xff, 0x80, 0x05, 0x00, 0xff, 0x80, 0x05, 0x00, 0x00, 0x03, 0x04, 0x00, 0x0f, 0x80, 0x05, 0x00, // ................ - 0xe4, 0x80, 0x06, 0x00, 0xe4, 0xa0, 0x2a, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x02, 0x04, 0x00, // ......*......... - 0x0f, 0x80, 0x0c, 0x00, 0x00, 0xa0, 0x2b, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x00, 0x00, 0x58, 0x00, // ......+...+...X. - 0x00, 0x04, 0x01, 0x00, 0x0f, 0x80, 0x01, 0x00, 0xaa, 0x8c, 0x03, 0x00, 0xe4, 0x80, 0x04, 0x00, // ................ - 0xe4, 0x80, 0x02, 0x00, 0x00, 0x03, 0x02, 0x00, 0x0a, 0x80, 0x09, 0x00, 0xaa, 0xa1, 0x09, 0x00, // ................ - 0x60, 0xa0, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x06, 0x80, 0x00, 0x00, 0xe4, 0x8b, 0x02, 0x00, // `............... - 0xf4, 0x81, 0x0b, 0x00, 0x00, 0x03, 0x02, 0x00, 0x0a, 0x80, 0x00, 0x00, 0xa4, 0x80, 0x0c, 0x00, // ................ - 0x00, 0xa0, 0x5a, 0x00, 0x00, 0x04, 0x00, 0x00, 0x08, 0x80, 0x02, 0x00, 0xed, 0x80, 0x02, 0x00, // ..Z............. - 0xed, 0x80, 0x0c, 0x00, 0x00, 0xa0, 0x07, 0x00, 0x00, 0x02, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, // ................ - 0xff, 0x80, 0x06, 0x00, 0x00, 0x02, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0xff, 0x80, 0x0b, 0x00, // ................ - 0x00, 0x03, 0x02, 0x00, 0x02, 0x80, 0x00, 0x00, 0x55, 0x80, 0x00, 0x00, 0xaa, 0x80, 0x0a, 0x00, // ........U....... - 0x00, 0x03, 0x00, 0x00, 0x02, 0x80, 0x02, 0x00, 0x55, 0x80, 0x0c, 0x00, 0x00, 0xa0, 0x02, 0x00, // ........U....... - 0x00, 0x03, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0xff, 0x80, 0x00, 0x00, 0x55, 0x80, 0x02, 0x00, // ............U... - 0x00, 0x03, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x55, 0x80, 0x09, 0x00, 0xaa, 0xa1, 0x04, 0x00, // ........U....... - 0x00, 0x04, 0x00, 0x00, 0x02, 0x80, 0x0a, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x00, 0x80, 0x00, 0x00, // ................ - 0x55, 0x80, 0x06, 0x00, 0x00, 0x02, 0x00, 0x00, 0x04, 0x80, 0x0a, 0x00, 0x00, 0xa0, 0x05, 0x00, // U............... - 0x00, 0x03, 0x00, 0x00, 0x12, 0x80, 0x00, 0x00, 0xaa, 0x80, 0x00, 0x00, 0x55, 0x80, 0x01, 0x00, // ............U... - 0x00, 0x02, 0x03, 0x00, 0x0f, 0x80, 0x06, 0x00, 0xe4, 0xa0, 0x02, 0x00, 0x00, 0x03, 0x03, 0x00, // ................ - 0x0f, 0x80, 0x03, 0x00, 0xe4, 0x81, 0x07, 0x00, 0xe4, 0xa0, 0x04, 0x00, 0x00, 0x04, 0x03, 0x00, // ................ - 0x0f, 0x80, 0x00, 0x00, 0x55, 0x80, 0x03, 0x00, 0xe4, 0x80, 0x06, 0x00, 0xe4, 0xa0, 0x05, 0x00, // ....U........... - 0x00, 0x03, 0x03, 0x00, 0x08, 0x80, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0xff, 0x80, 0x58, 0x00, // ..............X. - 0x00, 0x04, 0x00, 0x08, 0x0f, 0x80, 0x02, 0x00, 0xaa, 0x81, 0x03, 0x00, 0xe4, 0x80, 0x01, 0x00, // ................ - 0xe4, 0x80, 0xff, 0xff, 0x00, 0x00, 0x00, // ....... + 0x31, 0x30, 0x2e, 0x30, 0x2e, 0x31, 0x30, 0x30, 0x31, 0x31, 0x2e, 0x31, 0x36, 0x33, 0x38, 0x34, // 10.0.10011.16384 + 0x00, 0xab, 0x51, 0x00, 0x00, 0x05, 0x0b, 0x00, 0x0f, 0xa0, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, // ..Q..........?.. + 0x00, 0x40, 0x00, 0x00, 0x80, 0xbf, 0x00, 0x00, 0x80, 0x3f, 0x51, 0x00, 0x00, 0x05, 0x0c, 0x00, // .@.......?Q..... + 0x0f, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x40, 0x40, 0x00, 0x00, // .........?..@@.. + 0x00, 0x00, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x00, 0x00, 0x03, 0x90, 0x1f, 0x00, // ................ + 0x00, 0x02, 0x05, 0x00, 0x01, 0x80, 0x01, 0x00, 0x03, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, // ................ + 0x00, 0x90, 0x00, 0x08, 0x0f, 0xa0, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x01, 0x80, 0x01, 0x00, // ................ + 0x00, 0x90, 0x0b, 0x00, 0x55, 0xa0, 0x0b, 0x00, 0xaa, 0xa0, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, // ....U........... + 0x01, 0x80, 0x00, 0x00, 0x00, 0x8c, 0x0b, 0x00, 0xff, 0xa0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, // ................ + 0x01, 0x80, 0x00, 0x00, 0x00, 0x80, 0x0a, 0x00, 0x55, 0xa0, 0x0a, 0x00, 0x00, 0x03, 0x01, 0x00, // ........U....... + 0x01, 0x80, 0x00, 0x00, 0x00, 0x80, 0x0b, 0x00, 0xff, 0xa0, 0x0a, 0x00, 0x00, 0x03, 0x00, 0x00, // ................ + 0x01, 0x80, 0x01, 0x00, 0x55, 0x90, 0x0b, 0x00, 0xff, 0xa0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, // ....U........... + 0x01, 0x80, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, // ................ + 0x06, 0x80, 0x04, 0x00, 0xd0, 0xa0, 0x00, 0x00, 0x55, 0x90, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, // ........U....... + 0x06, 0x80, 0x03, 0x00, 0xd0, 0xa0, 0x00, 0x00, 0x00, 0x90, 0x00, 0x00, 0xe4, 0x80, 0x02, 0x00, // ................ + 0x00, 0x03, 0x00, 0x00, 0x06, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x05, 0x00, 0xd0, 0xa0, 0x06, 0x00, // ................ + 0x00, 0x02, 0x01, 0x00, 0x01, 0x80, 0x09, 0x00, 0x00, 0xa0, 0x06, 0x00, 0x00, 0x02, 0x01, 0x00, // ................ + 0x02, 0x80, 0x09, 0x00, 0x55, 0xa0, 0x05, 0x00, 0x00, 0x03, 0x01, 0x00, 0x03, 0x80, 0x00, 0x00, // ....U........... + 0xe9, 0x80, 0x01, 0x00, 0xe4, 0x80, 0x05, 0x00, 0x00, 0x03, 0x01, 0x00, 0x0c, 0x80, 0x01, 0x00, // ................ + 0x44, 0xa0, 0x00, 0x00, 0x55, 0x90, 0x04, 0x00, 0x00, 0x04, 0x01, 0x00, 0x0c, 0x80, 0x00, 0x00, // D...U........... + 0x44, 0xa0, 0x00, 0x00, 0x00, 0x90, 0x01, 0x00, 0xe4, 0x80, 0x02, 0x00, 0x00, 0x03, 0x01, 0x00, // D............... + 0x0c, 0x80, 0x01, 0x00, 0xe4, 0x80, 0x02, 0x00, 0x44, 0xa0, 0x02, 0x00, 0x00, 0x03, 0x01, 0x00, // ........D....... + 0x0c, 0x80, 0x01, 0x00, 0xe4, 0x8b, 0x08, 0x00, 0x44, 0xa1, 0x01, 0x00, 0x00, 0x02, 0x02, 0x00, // ........D....... + 0x07, 0x80, 0x0b, 0x00, 0xe4, 0xa0, 0x04, 0x00, 0x00, 0x04, 0x01, 0x00, 0x1c, 0x80, 0x01, 0x00, // ................ + 0xe4, 0x80, 0x08, 0x00, 0xe4, 0xa1, 0x02, 0x00, 0x00, 0x80, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, // ................ + 0x08, 0x80, 0x01, 0x00, 0xff, 0x80, 0x01, 0x00, 0xaa, 0x80, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, // ................ + 0x01, 0x80, 0x00, 0x00, 0xff, 0x80, 0x00, 0x00, 0x00, 0x80, 0x02, 0x00, 0x00, 0x03, 0x01, 0x00, // ................ + 0x04, 0x80, 0x02, 0x00, 0xaa, 0x80, 0x0a, 0x00, 0xff, 0xa0, 0x23, 0x00, 0x00, 0x02, 0x02, 0x00, // ..........#..... + 0x0c, 0x80, 0x0a, 0x00, 0xb4, 0xa0, 0x42, 0x00, 0x00, 0x03, 0x03, 0x00, 0x0f, 0x80, 0x01, 0x00, // ......B......... + 0xe4, 0x80, 0x00, 0x08, 0xe4, 0xa0, 0x04, 0x00, 0x00, 0x04, 0x04, 0x00, 0x0f, 0x80, 0x03, 0x00, // ................ + 0x00, 0x80, 0x0c, 0x00, 0x40, 0xa0, 0x0c, 0x00, 0x15, 0xa0, 0x58, 0x00, 0x00, 0x04, 0x03, 0x00, // ....@.....X..... + 0x0f, 0x80, 0x02, 0x00, 0xff, 0x81, 0x03, 0x00, 0xe4, 0x80, 0x04, 0x00, 0xe4, 0x80, 0x05, 0x00, // ................ + 0x00, 0x03, 0x03, 0x00, 0x08, 0x80, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0xff, 0x80, 0x29, 0x00, // ..............). + 0x02, 0x02, 0x0a, 0x00, 0xff, 0xa0, 0x02, 0x00, 0x55, 0x80, 0x01, 0x00, 0x00, 0x02, 0x04, 0x00, // ........U....... + 0x0f, 0x80, 0x0b, 0x00, 0xff, 0xa0, 0x2a, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x02, 0x05, 0x00, // ......*......... + 0x04, 0x80, 0x0c, 0x00, 0xaa, 0xa0, 0x29, 0x00, 0x02, 0x02, 0x0a, 0x00, 0xff, 0xa0, 0x05, 0x00, // ......)......... + 0xaa, 0x80, 0x42, 0x00, 0x00, 0x03, 0x05, 0x00, 0x0f, 0x80, 0x01, 0x00, 0xe4, 0x90, 0x00, 0x08, // ..B............. + 0xe4, 0xa0, 0x04, 0x00, 0x00, 0x04, 0x06, 0x00, 0x0f, 0x80, 0x05, 0x00, 0x00, 0x80, 0x0c, 0x00, // ................ + 0x40, 0xa0, 0x0c, 0x00, 0x15, 0xa0, 0x58, 0x00, 0x00, 0x04, 0x05, 0x00, 0x0f, 0x80, 0x02, 0x00, // @.....X......... + 0xff, 0x81, 0x05, 0x00, 0xe4, 0x80, 0x06, 0x00, 0xe4, 0x80, 0x05, 0x00, 0x00, 0x03, 0x05, 0x00, // ................ + 0x08, 0x80, 0x00, 0x00, 0xff, 0x80, 0x05, 0x00, 0xff, 0x80, 0x05, 0x00, 0x00, 0x03, 0x04, 0x00, // ................ + 0x0f, 0x80, 0x05, 0x00, 0xe4, 0x80, 0x06, 0x00, 0xe4, 0xa0, 0x2a, 0x00, 0x00, 0x00, 0x01, 0x00, // ..........*..... + 0x00, 0x02, 0x04, 0x00, 0x0f, 0x80, 0x0c, 0x00, 0x00, 0xa0, 0x2b, 0x00, 0x00, 0x00, 0x2b, 0x00, // ..........+...+. + 0x00, 0x00, 0x58, 0x00, 0x00, 0x04, 0x01, 0x00, 0x0f, 0x80, 0x01, 0x00, 0xaa, 0x8c, 0x03, 0x00, // ..X............. + 0xe4, 0x80, 0x04, 0x00, 0xe4, 0x80, 0x02, 0x00, 0x00, 0x03, 0x02, 0x00, 0x0a, 0x80, 0x09, 0x00, // ................ + 0xaa, 0xa1, 0x09, 0x00, 0x60, 0xa0, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x06, 0x80, 0x00, 0x00, // ....`........... + 0xe4, 0x8b, 0x02, 0x00, 0xf4, 0x81, 0x0b, 0x00, 0x00, 0x03, 0x02, 0x00, 0x0a, 0x80, 0x00, 0x00, // ................ + 0xa4, 0x80, 0x0c, 0x00, 0x00, 0xa0, 0x5a, 0x00, 0x00, 0x04, 0x00, 0x00, 0x08, 0x80, 0x02, 0x00, // ......Z......... + 0xed, 0x80, 0x02, 0x00, 0xed, 0x80, 0x0c, 0x00, 0x00, 0xa0, 0x07, 0x00, 0x00, 0x02, 0x00, 0x00, // ................ + 0x08, 0x80, 0x00, 0x00, 0xff, 0x80, 0x06, 0x00, 0x00, 0x02, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, // ................ + 0xff, 0x80, 0x0b, 0x00, 0x00, 0x03, 0x02, 0x00, 0x02, 0x80, 0x00, 0x00, 0x55, 0x80, 0x00, 0x00, // ............U... + 0xaa, 0x80, 0x0a, 0x00, 0x00, 0x03, 0x00, 0x00, 0x02, 0x80, 0x02, 0x00, 0x55, 0x80, 0x0c, 0x00, // ............U... + 0x00, 0xa0, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0xff, 0x80, 0x00, 0x00, // ................ + 0x55, 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x55, 0x80, 0x09, 0x00, // U...........U... + 0xaa, 0xa1, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x02, 0x80, 0x0a, 0x00, 0x00, 0xa0, 0x02, 0x00, // ................ + 0x00, 0x80, 0x00, 0x00, 0x55, 0x80, 0x06, 0x00, 0x00, 0x02, 0x00, 0x00, 0x04, 0x80, 0x0a, 0x00, // ....U........... + 0x00, 0xa0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x12, 0x80, 0x00, 0x00, 0xaa, 0x80, 0x00, 0x00, // ................ + 0x55, 0x80, 0x01, 0x00, 0x00, 0x02, 0x03, 0x00, 0x0f, 0x80, 0x06, 0x00, 0xe4, 0xa0, 0x02, 0x00, // U............... + 0x00, 0x03, 0x03, 0x00, 0x0f, 0x80, 0x03, 0x00, 0xe4, 0x81, 0x07, 0x00, 0xe4, 0xa0, 0x04, 0x00, // ................ + 0x00, 0x04, 0x03, 0x00, 0x0f, 0x80, 0x00, 0x00, 0x55, 0x80, 0x03, 0x00, 0xe4, 0x80, 0x06, 0x00, // ........U....... + 0xe4, 0xa0, 0x05, 0x00, 0x00, 0x03, 0x03, 0x00, 0x08, 0x80, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, // ................ + 0xff, 0x80, 0x58, 0x00, 0x00, 0x04, 0x00, 0x08, 0x0f, 0x80, 0x02, 0x00, 0xaa, 0x81, 0x03, 0x00, // ..X............. + 0xe4, 0x80, 0x01, 0x00, 0xe4, 0x80, 0xff, 0xff, 0x00, 0x00, 0x00, // ........... }; static const uint8_t fs_nanovg_fill_dx11[2298] = { diff --git a/3rdparty/bgfx/examples/common/nanovg/nanovg_bgfx.cpp b/3rdparty/bgfx/examples/common/nanovg/nanovg_bgfx.cpp index 263c1b31b94..5891dc546e2 100644 --- a/3rdparty/bgfx/examples/common/nanovg/nanovg_bgfx.cpp +++ b/3rdparty/bgfx/examples/common/nanovg/nanovg_bgfx.cpp @@ -251,7 +251,7 @@ namespace vs_nanovg_fill = bgfx::makeRef(vs_nanovg_fill_mtl, sizeof(vs_nanovg_fill_mtl) ); fs_nanovg_fill = bgfx::makeRef(fs_nanovg_fill_mtl, sizeof(fs_nanovg_fill_mtl) ); break; - + default: vs_nanovg_fill = bgfx::makeRef(vs_nanovg_fill_glsl, sizeof(vs_nanovg_fill_glsl) ); fs_nanovg_fill = bgfx::makeRef(fs_nanovg_fill_glsl, sizeof(fs_nanovg_fill_glsl) ); diff --git a/3rdparty/bgfx/examples/common/nanovg/vs_nanovg_fill.bin.h b/3rdparty/bgfx/examples/common/nanovg/vs_nanovg_fill.bin.h index aeac0d14115..e744417898c 100644 --- a/3rdparty/bgfx/examples/common/nanovg/vs_nanovg_fill.bin.h +++ b/3rdparty/bgfx/examples/common/nanovg/vs_nanovg_fill.bin.h @@ -35,12 +35,12 @@ static const uint8_t vs_nanovg_fill_glsl[541] = 0x20, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x74, // gl_Position = t 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // mpvar_1;.}... }; -static const uint8_t vs_nanovg_fill_dx9[432] = +static const uint8_t vs_nanovg_fill_dx9[436] = { 0x56, 0x53, 0x48, 0x04, 0xcf, 0xda, 0x1b, 0x94, 0x02, 0x00, 0x0b, 0x75, 0x5f, 0x68, 0x61, 0x6c, // VSH........u_hal 0x66, 0x54, 0x65, 0x78, 0x65, 0x6c, 0x02, 0x01, 0x01, 0x00, 0x01, 0x00, 0x0a, 0x75, 0x5f, 0x76, // fTexel.......u_v - 0x69, 0x65, 0x77, 0x53, 0x69, 0x7a, 0x65, 0x02, 0x01, 0x00, 0x00, 0x01, 0x00, 0x80, 0x01, 0x00, // iewSize......... - 0x03, 0xfe, 0xff, 0xfe, 0xff, 0x2a, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x72, // .....*.CTAB....r + 0x69, 0x65, 0x77, 0x53, 0x69, 0x7a, 0x65, 0x02, 0x01, 0x00, 0x00, 0x01, 0x00, 0x84, 0x01, 0x00, // iewSize......... + 0x03, 0xfe, 0xff, 0xfe, 0xff, 0x2b, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x72, // .....+.CTAB....r 0x00, 0x00, 0x00, 0x00, 0x03, 0xfe, 0xff, 0x02, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, // ................ 0x91, 0x00, 0x00, 0x6b, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x02, 0x00, 0x01, 0x00, 0x01, // ...k...D........ 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x02, // ...P.......`.... @@ -50,20 +50,21 @@ static const uint8_t vs_nanovg_fill_dx9[432] = 0x77, 0x53, 0x69, 0x7a, 0x65, 0x00, 0x76, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, // wSize.vs_3_0.Mic 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, // rosoft (R) HLSL 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, // Shader Compiler - 0x39, 0x2e, 0x32, 0x39, 0x2e, 0x39, 0x35, 0x32, 0x2e, 0x33, 0x31, 0x31, 0x31, 0x00, 0xab, 0x51, // 9.29.952.3111..Q - 0x00, 0x00, 0x05, 0x02, 0x00, 0x0f, 0xa0, 0x00, 0x00, 0x80, 0xbf, 0x00, 0x00, 0x80, 0x3f, 0x00, // ..............?. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, // ................ - 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x01, 0x00, 0x0f, 0x90, 0x1f, // ................ - 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0xe0, 0x1f, 0x00, 0x00, 0x02, 0x05, // ................ - 0x00, 0x00, 0x80, 0x01, 0x00, 0x03, 0xe0, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x01, 0x80, 0x02, // ................ - 0x00, 0x03, 0xe0, 0x02, 0x00, 0x00, 0x03, 0x02, 0x00, 0x03, 0xe0, 0x01, 0x00, 0xe4, 0xa0, 0x01, // ................ - 0x00, 0xe4, 0x90, 0x06, 0x00, 0x00, 0x02, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0xa0, 0x02, // ................ - 0x00, 0x00, 0x03, 0x00, 0x00, 0x06, 0x80, 0x00, 0x00, 0xd0, 0x90, 0x00, 0x00, 0xd0, 0x90, 0x04, // ................ - 0x00, 0x00, 0x04, 0x00, 0x00, 0x01, 0xe0, 0x00, 0x00, 0x55, 0x80, 0x00, 0x00, 0x00, 0x80, 0x02, // .........U...... - 0x00, 0x00, 0xa0, 0x06, 0x00, 0x00, 0x02, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x55, 0xa0, 0x04, // .............U.. - 0x00, 0x00, 0x04, 0x00, 0x00, 0x02, 0xe0, 0x00, 0x00, 0xaa, 0x80, 0x00, 0x00, 0x00, 0x81, 0x02, // ................ - 0x00, 0x55, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x0c, 0xe0, 0x02, 0x00, 0x64, 0xa0, 0x01, // .U...........d.. - 0x00, 0x00, 0x02, 0x01, 0x00, 0x03, 0xe0, 0x00, 0x00, 0xe4, 0x90, 0xff, 0xff, 0x00, 0x00, 0x00, // ................ + 0x31, 0x30, 0x2e, 0x30, 0x2e, 0x31, 0x30, 0x30, 0x31, 0x31, 0x2e, 0x31, 0x36, 0x33, 0x38, 0x34, // 10.0.10011.16384 + 0x00, 0xab, 0xab, 0x51, 0x00, 0x00, 0x05, 0x02, 0x00, 0x0f, 0xa0, 0x00, 0x00, 0x80, 0xbf, 0x00, // ...Q............ + 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x02, 0x00, // ..?............. + 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x01, // ................ + 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0xe0, 0x1f, // ................ + 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x01, 0x00, 0x03, 0xe0, 0x1f, 0x00, 0x00, 0x02, 0x05, // ................ + 0x00, 0x01, 0x80, 0x02, 0x00, 0x03, 0xe0, 0x02, 0x00, 0x00, 0x03, 0x02, 0x00, 0x03, 0xe0, 0x01, // ................ + 0x00, 0xe4, 0xa0, 0x01, 0x00, 0xe4, 0x90, 0x06, 0x00, 0x00, 0x02, 0x00, 0x00, 0x01, 0x80, 0x00, // ................ + 0x00, 0x00, 0xa0, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x06, 0x80, 0x00, 0x00, 0xd0, 0x90, 0x00, // ................ + 0x00, 0xd0, 0x90, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x01, 0xe0, 0x00, 0x00, 0x55, 0x80, 0x00, // .............U.. + 0x00, 0x00, 0x80, 0x02, 0x00, 0x00, 0xa0, 0x06, 0x00, 0x00, 0x02, 0x00, 0x00, 0x01, 0x80, 0x00, // ................ + 0x00, 0x55, 0xa0, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x02, 0xe0, 0x00, 0x00, 0xaa, 0x80, 0x00, // .U.............. + 0x00, 0x00, 0x81, 0x02, 0x00, 0x55, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x0c, 0xe0, 0x02, // .....U.......... + 0x00, 0x64, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x03, 0xe0, 0x00, 0x00, 0xe4, 0x90, 0xff, // .d.............. + 0xff, 0x00, 0x00, 0x00, // .... }; static const uint8_t vs_nanovg_fill_dx11[577] = { diff --git a/3rdparty/bgfx/examples/runtime/meshes/bunny.bin b/3rdparty/bgfx/examples/runtime/meshes/bunny.bin Binary files differindex 202927eb20c..b34244a745d 100644 --- a/3rdparty/bgfx/examples/runtime/meshes/bunny.bin +++ b/3rdparty/bgfx/examples/runtime/meshes/bunny.bin diff --git a/3rdparty/bgfx/examples/runtime/meshes/bunny_decimated.bin b/3rdparty/bgfx/examples/runtime/meshes/bunny_decimated.bin Binary files differindex d1adad383f5..d2f2f07e3f6 100644 --- a/3rdparty/bgfx/examples/runtime/meshes/bunny_decimated.bin +++ b/3rdparty/bgfx/examples/runtime/meshes/bunny_decimated.bin diff --git a/3rdparty/bgfx/examples/runtime/meshes/bunny_patched.bin b/3rdparty/bgfx/examples/runtime/meshes/bunny_patched.bin Binary files differindex 33f79a93a8e..217bffeb5ab 100644 --- a/3rdparty/bgfx/examples/runtime/meshes/bunny_patched.bin +++ b/3rdparty/bgfx/examples/runtime/meshes/bunny_patched.bin diff --git a/3rdparty/bgfx/examples/runtime/meshes/column.bin b/3rdparty/bgfx/examples/runtime/meshes/column.bin Binary files differindex 1a295c0b0ba..2d1d1dc5dd3 100644 --- a/3rdparty/bgfx/examples/runtime/meshes/column.bin +++ b/3rdparty/bgfx/examples/runtime/meshes/column.bin diff --git a/3rdparty/bgfx/examples/runtime/meshes/cube.bin b/3rdparty/bgfx/examples/runtime/meshes/cube.bin Binary files differindex 9395fc6a3f6..874c9408e58 100644 --- a/3rdparty/bgfx/examples/runtime/meshes/cube.bin +++ b/3rdparty/bgfx/examples/runtime/meshes/cube.bin diff --git a/3rdparty/bgfx/examples/runtime/meshes/hollowcube.bin b/3rdparty/bgfx/examples/runtime/meshes/hollowcube.bin Binary files differindex 5b93992a965..69a4a38c125 100644 --- a/3rdparty/bgfx/examples/runtime/meshes/hollowcube.bin +++ b/3rdparty/bgfx/examples/runtime/meshes/hollowcube.bin diff --git a/3rdparty/bgfx/examples/runtime/meshes/platform.bin b/3rdparty/bgfx/examples/runtime/meshes/platform.bin Binary files differindex de63c2457b8..27b604341e2 100644 --- a/3rdparty/bgfx/examples/runtime/meshes/platform.bin +++ b/3rdparty/bgfx/examples/runtime/meshes/platform.bin diff --git a/3rdparty/bgfx/examples/runtime/meshes/tree.bin b/3rdparty/bgfx/examples/runtime/meshes/tree.bin Binary files differindex cc3170efc15..6daa0cef736 100644 --- a/3rdparty/bgfx/examples/runtime/meshes/tree.bin +++ b/3rdparty/bgfx/examples/runtime/meshes/tree.bin diff --git a/3rdparty/bgfx/examples/runtime/meshes/tree1b_lod0_1.bin b/3rdparty/bgfx/examples/runtime/meshes/tree1b_lod0_1.bin Binary files differindex fc4b18b3c6f..dcce8a7aaa4 100644 --- a/3rdparty/bgfx/examples/runtime/meshes/tree1b_lod0_1.bin +++ b/3rdparty/bgfx/examples/runtime/meshes/tree1b_lod0_1.bin diff --git a/3rdparty/bgfx/examples/runtime/meshes/tree1b_lod0_2.bin b/3rdparty/bgfx/examples/runtime/meshes/tree1b_lod0_2.bin Binary files differindex 19658b28b1d..c7cdb1dd67b 100644 --- a/3rdparty/bgfx/examples/runtime/meshes/tree1b_lod0_2.bin +++ b/3rdparty/bgfx/examples/runtime/meshes/tree1b_lod0_2.bin diff --git a/3rdparty/bgfx/examples/runtime/meshes/tree1b_lod1_1.bin b/3rdparty/bgfx/examples/runtime/meshes/tree1b_lod1_1.bin Binary files differindex e775c77e3c7..d27ea1f0e45 100644 --- a/3rdparty/bgfx/examples/runtime/meshes/tree1b_lod1_1.bin +++ b/3rdparty/bgfx/examples/runtime/meshes/tree1b_lod1_1.bin diff --git a/3rdparty/bgfx/examples/runtime/meshes/tree1b_lod1_2.bin b/3rdparty/bgfx/examples/runtime/meshes/tree1b_lod1_2.bin Binary files differindex a5a28b74a78..08d57375fc2 100644 --- a/3rdparty/bgfx/examples/runtime/meshes/tree1b_lod1_2.bin +++ b/3rdparty/bgfx/examples/runtime/meshes/tree1b_lod1_2.bin diff --git a/3rdparty/bgfx/examples/runtime/meshes/tree1b_lod2_1.bin b/3rdparty/bgfx/examples/runtime/meshes/tree1b_lod2_1.bin Binary files differindex 9ba1f45d3f2..4b8d4b7d275 100644 --- a/3rdparty/bgfx/examples/runtime/meshes/tree1b_lod2_1.bin +++ b/3rdparty/bgfx/examples/runtime/meshes/tree1b_lod2_1.bin diff --git a/3rdparty/bgfx/examples/runtime/meshes/tree1b_lod2_2.bin b/3rdparty/bgfx/examples/runtime/meshes/tree1b_lod2_2.bin Binary files differindex 2f046b506de..821151e0d9d 100644 --- a/3rdparty/bgfx/examples/runtime/meshes/tree1b_lod2_2.bin +++ b/3rdparty/bgfx/examples/runtime/meshes/tree1b_lod2_2.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_oit_wb_blit.bin b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_oit_wb_blit.bin Binary files differindex 3cb4d722e14..77b88f46d8d 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_oit_wb_blit.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_oit_wb_blit.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_oit_wb_separate_blit.bin b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_oit_wb_separate_blit.bin Binary files differindex faf0106bb12..4515d187d73 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_oit_wb_separate_blit.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_oit_wb_separate_blit.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_particle.bin b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_particle.bin Binary files differindex 0b6b5ca926c..e9ac1a71c49 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_particle.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_particle.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_esm.bin b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_esm.bin Binary files differindex 9adc52e608c..e599c4ec016 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_esm.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_esm.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_esm_csm.bin b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_esm_csm.bin Binary files differindex 6af5d39a43c..c2ac4161f46 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_esm_csm.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_esm_csm.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_esm_linear.bin b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_esm_linear.bin Binary files differindex 327fec56972..acb5c01247e 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_esm_linear.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_esm_linear.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_esm_linear_csm.bin b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_esm_linear_csm.bin Binary files differindex 611a3aaa90a..3430e96d811 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_esm_linear_csm.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_esm_linear_csm.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_esm_linear_omni.bin b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_esm_linear_omni.bin Binary files differindex 175b7f1d951..6c4859be087 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_esm_linear_omni.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_esm_linear_omni.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_esm_omni.bin b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_esm_omni.bin Binary files differindex bc3e865aa95..95467349adc 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_esm_omni.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_esm_omni.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_hard.bin b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_hard.bin Binary files differindex 765fcc0d729..d1612f8ca11 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_hard.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_hard.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_hard_csm.bin b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_hard_csm.bin Binary files differindex c39380b7869..f6b2ac6587d 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_hard_csm.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_hard_csm.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_hard_linear.bin b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_hard_linear.bin Binary files differindex 276ccbeddcd..52ac4285db6 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_hard_linear.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_hard_linear.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_hard_linear_csm.bin b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_hard_linear_csm.bin Binary files differindex e4004b021c3..221a4278dd8 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_hard_linear_csm.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_hard_linear_csm.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_hard_linear_omni.bin b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_hard_linear_omni.bin Binary files differindex a77a1d2a787..03b37762125 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_hard_linear_omni.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_hard_linear_omni.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_hard_omni.bin b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_hard_omni.bin Binary files differindex 25b5e800b19..11f1c23b014 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_hard_omni.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_hard_omni.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_pcf.bin b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_pcf.bin Binary files differindex 5930f492b42..19d9bba4d4a 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_pcf.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_pcf.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_pcf_csm.bin b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_pcf_csm.bin Binary files differindex 58a4434cfdd..9581dddcd64 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_pcf_csm.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_pcf_csm.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_pcf_linear.bin b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_pcf_linear.bin Binary files differindex 63ce03cee0f..8746b286f44 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_pcf_linear.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_pcf_linear.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_pcf_linear_csm.bin b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_pcf_linear_csm.bin Binary files differindex f3e7b7f82af..9957e3b8588 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_pcf_linear_csm.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_pcf_linear_csm.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_pcf_linear_omni.bin b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_pcf_linear_omni.bin Binary files differindex 4654cf33e9b..3c72697a9d3 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_pcf_linear_omni.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_pcf_linear_omni.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_pcf_omni.bin b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_pcf_omni.bin Binary files differindex a1369295751..834b235eebe 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_pcf_omni.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_pcf_omni.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_vsm.bin b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_vsm.bin Binary files differindex 75de94d5d7e..0ae83c419f1 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_vsm.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_vsm.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_vsm_csm.bin b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_vsm_csm.bin Binary files differindex 4b99893b6be..87536cda4d4 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_vsm_csm.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_vsm_csm.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_vsm_linear.bin b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_vsm_linear.bin Binary files differindex 96745e909fe..5129fdb6b0b 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_vsm_linear.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_vsm_linear.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_vsm_linear_csm.bin b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_vsm_linear_csm.bin Binary files differindex 32e7e3b55f9..08a5970da44 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_vsm_linear_csm.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_vsm_linear_csm.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_vsm_linear_omni.bin b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_vsm_linear_omni.bin Binary files differindex 7e22436b4ef..39d3bff0226 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_vsm_linear_omni.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_vsm_linear_omni.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_vsm_omni.bin b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_vsm_omni.bin Binary files differindex 8bf0df91f13..0991b66851f 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_vsm_omni.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_vsm_omni.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_texture.bin b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_texture.bin Binary files differindex c2e9abff4f3..91b9ec7b7a1 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_texture.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_texture.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_hblur.bin b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_hblur.bin Binary files differindex 50abe5a34e9..29c825647fb 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_hblur.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_hblur.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_hblur_vsm.bin b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_hblur_vsm.bin Binary files differindex 2bb9efb6c8b..31537c44f98 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_hblur_vsm.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_hblur_vsm.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_texture.bin b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_texture.bin Binary files differindex c40ab8f0508..3406a9c63ce 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_texture.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_texture.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_unpackdepth.bin b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_unpackdepth.bin Binary files differindex 9f0ee665dd8..490815ca33b 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_unpackdepth.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_unpackdepth.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_unpackdepth_vsm.bin b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_unpackdepth_vsm.bin Binary files differindex c9d2106ab65..84c229fdd9e 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_unpackdepth_vsm.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_unpackdepth_vsm.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_vblur.bin b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_vblur.bin Binary files differindex 50abe5a34e9..29c825647fb 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_vblur.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_vblur.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_vblur_vsm.bin b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_vblur_vsm.bin Binary files differindex 2bb9efb6c8b..31537c44f98 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_vblur_vsm.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_vblur_vsm.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_sms_mesh.bin b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_sms_mesh.bin Binary files differindex 32fa218efb4..4207c645f2f 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_sms_mesh.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_sms_mesh.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_sms_mesh_pd.bin b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_sms_mesh_pd.bin Binary files differindex 00d1f8a4a6a..5f675f24a27 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_sms_mesh_pd.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_sms_mesh_pd.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_stencil_texture_lightning.bin b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_stencil_texture_lightning.bin Binary files differindex e7405f58ad5..05648ed06ea 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_stencil_texture_lightning.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_stencil_texture_lightning.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_tree.bin b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_tree.bin Binary files differindex 018b83c8ea1..9b7564ecfd5 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_tree.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_tree.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_bump.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_bump.bin Binary files differindex a074cd8a3e2..2cc6dbea34d 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_bump.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_bump.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_callback.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_callback.bin Binary files differindex 57876856254..9dadf5e9261 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_callback.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_callback.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_cubes.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_cubes.bin Binary files differindex bdffeb9c076..5bfd5497f0b 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_cubes.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_cubes.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_deferred_combine.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_deferred_combine.bin Binary files differindex cc13a509ba8..fc355b76371 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_deferred_combine.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_deferred_combine.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_deferred_debug.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_deferred_debug.bin Binary files differindex 4cac33773e7..33a85bb2955 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_deferred_debug.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_deferred_debug.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_deferred_debug_line.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_deferred_debug_line.bin Binary files differindex bdffeb9c076..5bfd5497f0b 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_deferred_debug_line.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_deferred_debug_line.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_deferred_geom.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_deferred_geom.bin Binary files differindex c8cbf705ea2..f9f1020c1e6 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_deferred_geom.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_deferred_geom.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_deferred_light.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_deferred_light.bin Binary files differindex 5c16613bad5..78cbbc32f25 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_deferred_light.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_deferred_light.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_hdr_blur.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_hdr_blur.bin Binary files differindex f426518b036..4d331a3cab1 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_hdr_blur.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_hdr_blur.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_hdr_bright.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_hdr_bright.bin Binary files differindex 38c67736508..1670d6734f8 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_hdr_bright.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_hdr_bright.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_hdr_lum.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_hdr_lum.bin Binary files differindex f2be253e8b7..e5ca082614c 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_hdr_lum.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_hdr_lum.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_hdr_lumavg.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_hdr_lumavg.bin Binary files differindex 0fe106a0adb..b73df0e1d7f 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_hdr_lumavg.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_hdr_lumavg.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_hdr_mesh.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_hdr_mesh.bin Binary files differindex 7c2c50723bd..7553b3acc94 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_hdr_mesh.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_hdr_mesh.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_hdr_skybox.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_hdr_skybox.bin Binary files differindex 0598ce6cc4f..d02ad5de9e4 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_hdr_skybox.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_hdr_skybox.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_hdr_tonemap.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_hdr_tonemap.bin Binary files differindex f9c5bdf5f56..993845cb75b 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_hdr_tonemap.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_hdr_tonemap.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_ibl_mesh.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_ibl_mesh.bin Binary files differindex 873b11cf560..3a3ecaba313 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_ibl_mesh.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_ibl_mesh.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_ibl_skybox.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_ibl_skybox.bin Binary files differindex a68ed6cf51d..2e49131b0a3 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_ibl_skybox.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_ibl_skybox.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_instancing.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_instancing.bin Binary files differindex bdffeb9c076..5bfd5497f0b 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_instancing.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_instancing.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_mesh.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_mesh.bin Binary files differindex 09e8453a1d6..ac5cc0d0512 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_mesh.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_mesh.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_oit.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_oit.bin Binary files differindex 38475da682f..05269c3a821 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_oit.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_oit.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_oit_wb.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_oit_wb.bin Binary files differindex b041df0bda7..29c0b1608bd 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_oit_wb.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_oit_wb.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_oit_wb_blit.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_oit_wb_blit.bin Binary files differindex c51c81e1b96..b209ea65d9d 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_oit_wb_blit.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_oit_wb_blit.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_oit_wb_separate.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_oit_wb_separate.bin Binary files differindex 332cd07bc4a..4c5d7f1b374 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_oit_wb_separate.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_oit_wb_separate.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_oit_wb_separate_blit.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_oit_wb_separate_blit.bin Binary files differindex c1f188e8370..ff4c6e01b17 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_oit_wb_separate_blit.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_oit_wb_separate_blit.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_particle.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_particle.bin Binary files differindex c52033f7e3b..c20337adffc 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_particle.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_particle.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_raymarching.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_raymarching.bin Binary files differindex d3cd94464fb..64a2ea353d2 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_raymarching.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_raymarching.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_black.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_black.bin Binary files differindex 1759b12105b..b48ca9a9d75 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_black.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_black.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_esm.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_esm.bin Binary files differindex 0ebc05de809..99f5564ce4d 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_esm.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_esm.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_esm_csm.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_esm_csm.bin Binary files differindex ae8d997d040..420080db2fd 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_esm_csm.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_esm_csm.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_esm_linear.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_esm_linear.bin Binary files differindex 06d600bc563..2b80ccad6c3 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_esm_linear.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_esm_linear.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_esm_linear_csm.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_esm_linear_csm.bin Binary files differindex c797f9d359a..3bbfea99ae7 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_esm_linear_csm.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_esm_linear_csm.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_esm_linear_omni.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_esm_linear_omni.bin Binary files differindex 83a7200e42b..c9d81f6fa64 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_esm_linear_omni.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_esm_linear_omni.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_esm_omni.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_esm_omni.bin Binary files differindex 30a32b876fb..308f93ef2e3 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_esm_omni.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_esm_omni.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_hard.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_hard.bin Binary files differindex 8d671384108..3de4dcbce87 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_hard.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_hard.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_hard_csm.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_hard_csm.bin Binary files differindex 7550ab771be..c53e8814a34 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_hard_csm.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_hard_csm.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_hard_linear.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_hard_linear.bin Binary files differindex c1837a5cc7f..d29c6e8c1ed 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_hard_linear.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_hard_linear.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_hard_linear_csm.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_hard_linear_csm.bin Binary files differindex 2f7a8e6a477..ca069354ca4 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_hard_linear_csm.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_hard_linear_csm.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_hard_linear_omni.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_hard_linear_omni.bin Binary files differindex b20f27e5f50..c316724a908 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_hard_linear_omni.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_hard_linear_omni.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_hard_omni.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_hard_omni.bin Binary files differindex 285976d1c62..bef6549d95b 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_hard_omni.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_hard_omni.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_pcf.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_pcf.bin Binary files differindex 008536682f4..55bce42f02a 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_pcf.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_pcf.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_pcf_csm.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_pcf_csm.bin Binary files differindex aedb20eb619..7427157c5fa 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_pcf_csm.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_pcf_csm.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_pcf_linear.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_pcf_linear.bin Binary files differindex 57c763439b5..a8c173e3c39 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_pcf_linear.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_pcf_linear.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_pcf_linear_csm.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_pcf_linear_csm.bin Binary files differindex 1ba9fc72be1..984458101ee 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_pcf_linear_csm.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_pcf_linear_csm.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_pcf_linear_omni.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_pcf_linear_omni.bin Binary files differindex 66abdeb2efd..e96824aae10 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_pcf_linear_omni.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_pcf_linear_omni.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_pcf_omni.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_pcf_omni.bin Binary files differindex 2a2d3b3481e..bf00e8523f3 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_pcf_omni.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_pcf_omni.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_vsm.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_vsm.bin Binary files differindex 7e8b0bdc566..ac96c99da43 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_vsm.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_vsm.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_vsm_csm.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_vsm_csm.bin Binary files differindex f3a1ecd2586..0e69a3950ac 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_vsm_csm.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_vsm_csm.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_vsm_linear.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_vsm_linear.bin Binary files differindex d6a5555fd04..a1ce662b545 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_vsm_linear.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_vsm_linear.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_vsm_linear_csm.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_vsm_linear_csm.bin Binary files differindex 1e355c21a89..80befb85a01 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_vsm_linear_csm.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_vsm_linear_csm.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_vsm_linear_omni.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_vsm_linear_omni.bin Binary files differindex 50b94e1c5cf..f0bdfd66f7b 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_vsm_linear_omni.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_vsm_linear_omni.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_vsm_omni.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_vsm_omni.bin Binary files differindex 5e82a73b20f..856c659ffe6 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_vsm_omni.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_vsm_omni.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_texture.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_texture.bin Binary files differindex 816e771389e..769c938165e 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_texture.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_texture.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_hblur.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_hblur.bin Binary files differindex 0014266fb98..35f6b45a29d 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_hblur.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_hblur.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_hblur_vsm.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_hblur_vsm.bin Binary files differindex 088921490a0..4a9dd81714e 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_hblur_vsm.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_hblur_vsm.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_packdepth.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_packdepth.bin Binary files differindex 4a693345ca4..605ede3bb29 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_packdepth.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_packdepth.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_packdepth_linear.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_packdepth_linear.bin Binary files differindex 1c98ebebaa9..e73a81647e3 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_packdepth_linear.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_packdepth_linear.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_packdepth_vsm.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_packdepth_vsm.bin Binary files differindex f146f09bfc0..227ada1b7b9 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_packdepth_vsm.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_packdepth_vsm.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_packdepth_vsm_linear.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_packdepth_vsm_linear.bin Binary files differindex 89745b960ce..a83254c5e89 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_packdepth_vsm_linear.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_packdepth_vsm_linear.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_texture.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_texture.bin Binary files differindex c8d44342e49..33a85bb2955 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_texture.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_texture.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_unpackdepth.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_unpackdepth.bin Binary files differindex bab1a305755..6fa413cd90c 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_unpackdepth.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_unpackdepth.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_unpackdepth_vsm.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_unpackdepth_vsm.bin Binary files differindex 55c5f9e10ca..23cba5789f1 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_unpackdepth_vsm.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_unpackdepth_vsm.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_vblur.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_vblur.bin Binary files differindex 0014266fb98..35f6b45a29d 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_vblur.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_vblur.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_vblur_vsm.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_vblur_vsm.bin Binary files differindex 088921490a0..4a9dd81714e 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_vblur_vsm.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_vblur_vsm.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_color_lightning.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_color_lightning.bin Binary files differindex d2b3c50f5ec..3502c300df9 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_color_lightning.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_color_lightning.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_color_texture.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_color_texture.bin Binary files differindex 3b34c1191f9..769c938165e 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_color_texture.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_color_texture.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_svbackblank.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_svbackblank.bin Binary files differindex f35fe6e1dfd..7528dcbf854 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_svbackblank.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_svbackblank.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_svbackcolor.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_svbackcolor.bin Binary files differindex 57089f27fe2..e240cc56e5f 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_svbackcolor.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_svbackcolor.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_svbacktex1.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_svbacktex1.bin Binary files differindex 49110e0ed14..19ca642da9a 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_svbacktex1.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_svbacktex1.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_svbacktex2.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_svbacktex2.bin Binary files differindex 7752be6658d..e4fa04e2975 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_svbacktex2.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_svbacktex2.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_svfrontblank.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_svfrontblank.bin Binary files differindex b201b42a274..a3163370c84 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_svfrontblank.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_svfrontblank.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_svfrontcolor.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_svfrontcolor.bin Binary files differindex 57089f27fe2..e240cc56e5f 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_svfrontcolor.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_svfrontcolor.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_svfronttex1.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_svfronttex1.bin Binary files differindex 49110e0ed14..19ca642da9a 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_svfronttex1.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_svfronttex1.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_svfronttex2.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_svfronttex2.bin Binary files differindex 7752be6658d..e4fa04e2975 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_svfronttex2.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_svfronttex2.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_svside.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_svside.bin Binary files differindex 4ba5d987404..29eab256097 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_svside.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_svside.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_svsideblank.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_svsideblank.bin Binary files differindex 95a432fd6e7..3b5a8f31a62 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_svsideblank.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_svsideblank.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_svsidecolor.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_svsidecolor.bin Binary files differindex 6e349468748..40f240d9f77 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_svsidecolor.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_svsidecolor.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_svsidetex.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_svsidetex.bin Binary files differindex a299cf2199c..fe9b49ff047 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_svsidetex.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_svsidetex.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_texture.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_texture.bin Binary files differindex 4cac33773e7..33a85bb2955 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_texture.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_texture.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_texture_lightning.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_texture_lightning.bin Binary files differindex 216041c92be..1c09e0732be 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_texture_lightning.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_texture_lightning.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_sms_mesh.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_sms_mesh.bin Binary files differindex 402646e293d..c5373130f6f 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_sms_mesh.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_sms_mesh.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_sms_mesh_pd.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_sms_mesh_pd.bin Binary files differindex fe0dadd74f8..e244ed7a481 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_sms_mesh_pd.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_sms_mesh_pd.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_sms_shadow.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_sms_shadow.bin Binary files differindex 1759b12105b..b48ca9a9d75 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_sms_shadow.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_sms_shadow.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_sms_shadow_pd.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_sms_shadow_pd.bin Binary files differindex 5c8c5a455f5..d4454c07a1f 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_sms_shadow_pd.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_sms_shadow_pd.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_stencil_color_black.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_stencil_color_black.bin Binary files differindex 1759b12105b..b48ca9a9d75 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_stencil_color_black.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_stencil_color_black.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_stencil_color_lightning.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_stencil_color_lightning.bin Binary files differindex 812a7288250..c11e9833063 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_stencil_color_lightning.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_stencil_color_lightning.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_stencil_color_texture.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_stencil_color_texture.bin Binary files differindex 3b34c1191f9..769c938165e 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_stencil_color_texture.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_stencil_color_texture.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_stencil_texture.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_stencil_texture.bin Binary files differindex 4cac33773e7..33a85bb2955 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_stencil_texture.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_stencil_texture.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_stencil_texture_lightning.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_stencil_texture_lightning.bin Binary files differindex dfa60bab5a3..c2d78611cd0 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_stencil_texture_lightning.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_stencil_texture_lightning.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_tree.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_tree.bin Binary files differindex ddc984405d1..f2e470f0574 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_tree.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_tree.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_update.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_update.bin Binary files differindex 9b583ab3ef4..c67c50a41d1 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_update.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_update.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_update_3d.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_update_3d.bin Binary files differindex abc86d23a09..d489147527a 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_update_3d.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_update_3d.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_update_cmp.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_update_cmp.bin Binary files differindex 97e41b8eee1..77ee54087de 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_update_cmp.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_update_cmp.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_vectordisplay_blit.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_vectordisplay_blit.bin Binary files differindex 8793fcf84de..2ca54ab6730 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_vectordisplay_blit.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_vectordisplay_blit.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_vectordisplay_blur.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_vectordisplay_blur.bin Binary files differindex 905e8dd5d7a..f6316a80f0e 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_vectordisplay_blur.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_vectordisplay_blur.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_vectordisplay_fb.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_vectordisplay_fb.bin Binary files differindex 8b22edabe2b..c3e8cd2f156 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_vectordisplay_fb.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_vectordisplay_fb.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_bump.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_bump.bin Binary files differindex ae10af6fa40..4c80f4cad6d 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_bump.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_bump.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_bump_instanced.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_bump_instanced.bin Binary files differindex 19f743864cb..fc28518a841 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_bump_instanced.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_bump_instanced.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_callback.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_callback.bin Binary files differindex 5b24007c6dc..91c7a717fe5 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_callback.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_callback.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_cubes.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_cubes.bin Binary files differindex 6bed4a49eb9..fcfb16e0d0d 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_cubes.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_cubes.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_deferred_combine.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_deferred_combine.bin Binary files differindex a299604962c..fe8592c138d 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_deferred_combine.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_deferred_combine.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_deferred_debug.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_deferred_debug.bin Binary files differindex a299604962c..fe8592c138d 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_deferred_debug.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_deferred_debug.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_deferred_debug_line.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_deferred_debug_line.bin Binary files differindex 6bed4a49eb9..fcfb16e0d0d 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_deferred_debug_line.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_deferred_debug_line.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_deferred_geom.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_deferred_geom.bin Binary files differindex ae10af6fa40..4c80f4cad6d 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_deferred_geom.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_deferred_geom.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_deferred_light.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_deferred_light.bin Binary files differindex a299604962c..fe8592c138d 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_deferred_light.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_deferred_light.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_hdr_blur.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_hdr_blur.bin Binary files differindex aafc58d61d7..db3143a6259 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_hdr_blur.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_hdr_blur.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_hdr_bright.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_hdr_bright.bin Binary files differindex a299604962c..fe8592c138d 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_hdr_bright.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_hdr_bright.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_hdr_lum.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_hdr_lum.bin Binary files differindex a299604962c..fe8592c138d 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_hdr_lum.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_hdr_lum.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_hdr_lumavg.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_hdr_lumavg.bin Binary files differindex a299604962c..fe8592c138d 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_hdr_lumavg.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_hdr_lumavg.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_hdr_mesh.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_hdr_mesh.bin Binary files differindex f8a154140aa..7bafd238112 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_hdr_mesh.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_hdr_mesh.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_hdr_skybox.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_hdr_skybox.bin Binary files differindex a299604962c..fe8592c138d 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_hdr_skybox.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_hdr_skybox.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_hdr_tonemap.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_hdr_tonemap.bin Binary files differindex c1734e3e3fc..56f1ecb2e44 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_hdr_tonemap.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_hdr_tonemap.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_ibl_mesh.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_ibl_mesh.bin Binary files differindex a4e8c3d11e9..4218e8ab377 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_ibl_mesh.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_ibl_mesh.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_ibl_skybox.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_ibl_skybox.bin Binary files differindex 92fb53dd59b..c0e84000a3a 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_ibl_skybox.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_ibl_skybox.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_instancing.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_instancing.bin Binary files differindex 9cc463534d9..1334941f88a 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_instancing.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_instancing.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_mesh.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_mesh.bin Binary files differindex 62f5bd31dae..242f27e7b1f 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_mesh.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_mesh.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_oit.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_oit.bin Binary files differindex 0bd10c7a53f..9f612d35860 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_oit.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_oit.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_oit_blit.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_oit_blit.bin Binary files differindex a299604962c..fe8592c138d 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_oit_blit.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_oit_blit.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_particle.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_particle.bin Binary files differindex fa1d3b9a442..d727140eef3 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_particle.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_particle.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_raymarching.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_raymarching.bin Binary files differindex 63ec02a3531..9db127f1b78 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_raymarching.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_raymarching.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_color.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_color.bin Binary files differindex 4550c08d137..63a27d6a014 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_color.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_color.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_color_lightning.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_color_lightning.bin Binary files differindex 93a692801b5..afd241b6c2e 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_color_lightning.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_color_lightning.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_color_lightning_csm.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_color_lightning_csm.bin Binary files differindex 6b819879e75..5b190835b30 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_color_lightning_csm.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_color_lightning_csm.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_color_lightning_linear.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_color_lightning_linear.bin Binary files differindex 3bc8a261ee5..4953a46cb26 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_color_lightning_linear.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_color_lightning_linear.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_color_lightning_linear_csm.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_color_lightning_linear_csm.bin Binary files differindex 9e7c86f7bb1..3fe61829886 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_color_lightning_linear_csm.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_color_lightning_linear_csm.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_color_lightning_linear_omni.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_color_lightning_linear_omni.bin Binary files differindex 2c6c09c36c8..fb516014651 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_color_lightning_linear_omni.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_color_lightning_linear_omni.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_color_lightning_omni.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_color_lightning_omni.bin Binary files differindex 7a0105a308d..37de03aa63e 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_color_lightning_omni.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_color_lightning_omni.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_color_texture.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_color_texture.bin Binary files differindex a299604962c..fe8592c138d 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_color_texture.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_color_texture.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_depth.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_depth.bin Binary files differindex 4550c08d137..63a27d6a014 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_depth.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_depth.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_hblur.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_hblur.bin Binary files differindex 17606423b6c..056267dd34d 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_hblur.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_hblur.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_packdepth.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_packdepth.bin Binary files differindex 3e5827745c0..46332ef6918 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_packdepth.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_packdepth.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_packdepth_linear.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_packdepth_linear.bin Binary files differindex 329980ae388..0d28593e06a 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_packdepth_linear.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_packdepth_linear.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_texture.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_texture.bin Binary files differindex a299604962c..fe8592c138d 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_texture.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_texture.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_texture_lightning.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_texture_lightning.bin Binary files differindex a04a6320173..96799c4e15d 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_texture_lightning.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_texture_lightning.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_unpackdepth.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_unpackdepth.bin Binary files differindex a299604962c..fe8592c138d 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_unpackdepth.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_unpackdepth.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_vblur.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_vblur.bin Binary files differindex 347b4ed021b..c2695fe4a16 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_vblur.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_vblur.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowvolume_color_lightning.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowvolume_color_lightning.bin Binary files differindex f948ab9105f..305be162e1d 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowvolume_color_lightning.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowvolume_color_lightning.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowvolume_color_texture.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowvolume_color_texture.bin Binary files differindex a299604962c..fe8592c138d 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowvolume_color_texture.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowvolume_color_texture.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowvolume_svback.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowvolume_svback.bin Binary files differindex ff9efe36483..5875aa635d7 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowvolume_svback.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowvolume_svback.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowvolume_svfront.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowvolume_svfront.bin Binary files differindex 4550c08d137..63a27d6a014 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowvolume_svfront.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowvolume_svfront.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowvolume_svside.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowvolume_svside.bin Binary files differindex 7571a1e53fa..2b3dd0ebae0 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowvolume_svside.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowvolume_svside.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowvolume_texture.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowvolume_texture.bin Binary files differindex a299604962c..fe8592c138d 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowvolume_texture.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowvolume_texture.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowvolume_texture_lightning.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowvolume_texture_lightning.bin Binary files differindex e632b911c39..c97d58d5a67 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowvolume_texture_lightning.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowvolume_texture_lightning.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_sms_mesh.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_sms_mesh.bin Binary files differindex f5b0d896104..d33c32f16d0 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_sms_mesh.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_sms_mesh.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_sms_shadow.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_sms_shadow.bin Binary files differindex 4550c08d137..63a27d6a014 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_sms_shadow.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_sms_shadow.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_sms_shadow_pd.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_sms_shadow_pd.bin Binary files differindex 3bd185477f5..94b26f0a41d 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_sms_shadow_pd.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_sms_shadow_pd.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_stencil_color.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_stencil_color.bin Binary files differindex 4550c08d137..63a27d6a014 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_stencil_color.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_stencil_color.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_stencil_color_lightning.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_stencil_color_lightning.bin Binary files differindex bedf096177e..0c0fe9fffee 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_stencil_color_lightning.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_stencil_color_lightning.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_stencil_color_texture.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_stencil_color_texture.bin Binary files differindex a299604962c..fe8592c138d 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_stencil_color_texture.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_stencil_color_texture.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_stencil_texture.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_stencil_texture.bin Binary files differindex a299604962c..fe8592c138d 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_stencil_texture.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_stencil_texture.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_stencil_texture_lightning.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_stencil_texture_lightning.bin Binary files differindex 7257af2e87f..fcdfc2e180c 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_stencil_texture_lightning.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_stencil_texture_lightning.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_tree.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_tree.bin Binary files differindex 9e69b0bb4a4..71f4167608c 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_tree.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_tree.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_update.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_update.bin Binary files differindex 1c043f0ad5c..155eea03f6c 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_update.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_update.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_vectordisplay_fb.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_vectordisplay_fb.bin Binary files differindex 63ec02a3531..9db127f1b78 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_vectordisplay_fb.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_vectordisplay_fb.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_oit_wb.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_oit_wb.bin Binary files differindex e594526cf19..df53debb5b1 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_oit_wb.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_oit_wb.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_oit_wb_blit.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_oit_wb_blit.bin Binary files differindex cd2a8d201c4..4de4a7d474c 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_oit_wb_blit.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_oit_wb_blit.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_oit_wb_separate.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_oit_wb_separate.bin Binary files differindex 51ae8f2dbaf..2ae88a47fff 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_oit_wb_separate.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_oit_wb_separate.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_oit_wb_separate_blit.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_oit_wb_separate_blit.bin Binary files differindex ca62c6e3ff5..e85ddbedf34 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_oit_wb_separate_blit.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_oit_wb_separate_blit.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_esm.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_esm.bin Binary files differindex 0a7b4118d9e..700694d399e 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_esm.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_esm.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_esm_csm.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_esm_csm.bin Binary files differindex 7316f095fa3..525a27cdd51 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_esm_csm.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_esm_csm.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_esm_linear.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_esm_linear.bin Binary files differindex 01131f3d85c..04c38666671 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_esm_linear.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_esm_linear.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_esm_linear_csm.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_esm_linear_csm.bin Binary files differindex 5f342ec396a..27d8231f863 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_esm_linear_csm.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_esm_linear_csm.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_esm_linear_omni.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_esm_linear_omni.bin Binary files differindex 0a1677885b1..4ca43066c34 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_esm_linear_omni.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_esm_linear_omni.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_esm_omni.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_esm_omni.bin Binary files differindex a9c0f3f7234..4b3fea74139 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_esm_omni.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_esm_omni.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_hard.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_hard.bin Binary files differindex 384fe08e17f..7c5095f0e29 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_hard.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_hard.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_hard_csm.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_hard_csm.bin Binary files differindex ad36fa13de6..b77c2c824c4 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_hard_csm.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_hard_csm.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_hard_linear.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_hard_linear.bin Binary files differindex 5f75eb78748..3988caee216 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_hard_linear.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_hard_linear.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_hard_linear_csm.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_hard_linear_csm.bin Binary files differindex d8b2e73926a..9a8ae99224e 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_hard_linear_csm.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_hard_linear_csm.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_hard_linear_omni.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_hard_linear_omni.bin Binary files differindex 18389d52061..1965c493afa 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_hard_linear_omni.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_hard_linear_omni.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_hard_omni.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_hard_omni.bin Binary files differindex 101c938ca7b..31b8e22ba35 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_hard_omni.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_hard_omni.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_pcf.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_pcf.bin Binary files differindex 1c77fb06cde..c867113fd8c 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_pcf.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_pcf.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_pcf_csm.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_pcf_csm.bin Binary files differindex acdaba7a85c..c78a27741db 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_pcf_csm.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_pcf_csm.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_pcf_linear.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_pcf_linear.bin Binary files differindex 2e3c8032449..85cebb56f07 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_pcf_linear.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_pcf_linear.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_pcf_linear_csm.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_pcf_linear_csm.bin Binary files differindex 555297a60d7..93c5b80ef33 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_pcf_linear_csm.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_pcf_linear_csm.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_pcf_linear_omni.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_pcf_linear_omni.bin Binary files differindex 5ec150317bb..4769169ac7f 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_pcf_linear_omni.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_pcf_linear_omni.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_pcf_omni.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_pcf_omni.bin Binary files differindex ff27f69318f..18a43e1ea27 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_pcf_omni.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_pcf_omni.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_vsm.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_vsm.bin Binary files differindex 372c9106da3..f42d12496d6 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_vsm.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_vsm.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_vsm_csm.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_vsm_csm.bin Binary files differindex b53921656e7..50e5c4f14cb 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_vsm_csm.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_vsm_csm.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_vsm_linear.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_vsm_linear.bin Binary files differindex 6d0b631bcdf..3e96ec50a4c 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_vsm_linear.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_vsm_linear.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_vsm_linear_csm.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_vsm_linear_csm.bin Binary files differindex 8b778ad84fd..df85bd9510c 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_vsm_linear_csm.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_vsm_linear_csm.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_vsm_linear_omni.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_vsm_linear_omni.bin Binary files differindex 7c496d2d736..2d63ad15e45 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_vsm_linear_omni.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_vsm_linear_omni.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_vsm_omni.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_vsm_omni.bin Binary files differindex 0496f530f14..772ec28f6ed 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_vsm_omni.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_vsm_omni.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_texture.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_texture.bin Binary files differindex 885640dda0a..d843710a8b0 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_texture.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_texture.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_hblur.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_hblur.bin Binary files differindex e635da9c9bc..d8509532b15 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_hblur.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_hblur.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_hblur_vsm.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_hblur_vsm.bin Binary files differindex 8cd91a899a9..cde87278282 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_hblur_vsm.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_hblur_vsm.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_packdepth.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_packdepth.bin Binary files differindex d6bdeb0b6c9..3997cd62a98 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_packdepth.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_packdepth.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_packdepth_linear.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_packdepth_linear.bin Binary files differindex c1c6b516290..a366ac46963 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_packdepth_linear.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_packdepth_linear.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_texture.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_texture.bin Binary files differindex f021c850793..18195420f57 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_texture.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_texture.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_unpackdepth.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_unpackdepth.bin Binary files differindex b963ccfd100..0fd472eda28 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_unpackdepth.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_unpackdepth.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_unpackdepth_vsm.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_unpackdepth_vsm.bin Binary files differindex fac7a851ad1..5044da1a692 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_unpackdepth_vsm.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_unpackdepth_vsm.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_vblur.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_vblur.bin Binary files differindex e635da9c9bc..d8509532b15 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_vblur.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_vblur.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_vblur_vsm.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_vblur_vsm.bin Binary files differindex 8cd91a899a9..cde87278282 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_vblur_vsm.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_vblur_vsm.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_sms_mesh.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_sms_mesh.bin Binary files differindex fe1fee41cb6..b9f060dbd20 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_sms_mesh.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_sms_mesh.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_sms_mesh_pd.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_sms_mesh_pd.bin Binary files differindex 7ba659fb8ff..5844d74493e 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_sms_mesh_pd.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_sms_mesh_pd.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_sms_shadow_pd.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_sms_shadow_pd.bin Binary files differindex d6bdeb0b6c9..3997cd62a98 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_sms_shadow_pd.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_sms_shadow_pd.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_stencil_texture_lightning.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_stencil_texture_lightning.bin Binary files differindex 7e823c40ea9..3ceba55ea2f 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_stencil_texture_lightning.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_stencil_texture_lightning.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_tree.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_tree.bin Binary files differindex 2bd2dbc1229..d9398b15c40 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_tree.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_tree.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_oit_wb.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_oit_wb.bin Binary files differindex 32f69e5aed2..1bfc2361d5c 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_oit_wb.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_oit_wb.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_oit_wb_blit.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_oit_wb_blit.bin Binary files differindex 998144e1b45..f7552195b08 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_oit_wb_blit.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_oit_wb_blit.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_oit_wb_separate.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_oit_wb_separate.bin Binary files differindex d77b34792fa..f8ae5bc9b81 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_oit_wb_separate.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_oit_wb_separate.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_oit_wb_separate_blit.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_oit_wb_separate_blit.bin Binary files differindex 31fe76ab83d..5386f067f20 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_oit_wb_separate_blit.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_oit_wb_separate_blit.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_esm.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_esm.bin Binary files differindex c158fab0530..f5a580f1289 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_esm.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_esm.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_esm_csm.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_esm_csm.bin Binary files differindex 4c54039dd29..1e7a4d25acd 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_esm_csm.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_esm_csm.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_esm_linear.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_esm_linear.bin Binary files differindex afec490e51c..3c41f4ed3f7 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_esm_linear.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_esm_linear.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_esm_linear_csm.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_esm_linear_csm.bin Binary files differindex c8e67a6b134..b930d047c81 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_esm_linear_csm.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_esm_linear_csm.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_esm_linear_omni.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_esm_linear_omni.bin Binary files differindex ab2002f7cc2..5b5e123eaec 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_esm_linear_omni.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_esm_linear_omni.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_esm_omni.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_esm_omni.bin Binary files differindex f7b3944e05b..9e5441e5839 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_esm_omni.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_esm_omni.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_hard.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_hard.bin Binary files differindex 911579fc0b5..62a4fab7411 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_hard.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_hard.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_hard_csm.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_hard_csm.bin Binary files differindex b9b683980c4..7ae79a1339c 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_hard_csm.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_hard_csm.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_hard_linear.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_hard_linear.bin Binary files differindex 6d5d493fbc0..52a0b821316 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_hard_linear.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_hard_linear.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_hard_linear_csm.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_hard_linear_csm.bin Binary files differindex 3b1269cf028..08808de87a7 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_hard_linear_csm.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_hard_linear_csm.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_hard_linear_omni.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_hard_linear_omni.bin Binary files differindex 770c1297acd..3218ab5f3cc 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_hard_linear_omni.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_hard_linear_omni.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_hard_omni.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_hard_omni.bin Binary files differindex 6b06a2ccf35..0f8e094c7e9 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_hard_omni.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_hard_omni.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_pcf.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_pcf.bin Binary files differindex ae8c23a6130..797ec0bcdbe 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_pcf.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_pcf.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_pcf_csm.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_pcf_csm.bin Binary files differindex d485d900014..c649bf07a24 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_pcf_csm.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_pcf_csm.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_pcf_linear.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_pcf_linear.bin Binary files differindex b635a6bf4f9..5f0c1c7c365 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_pcf_linear.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_pcf_linear.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_pcf_linear_csm.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_pcf_linear_csm.bin Binary files differindex 1f7ce109cfd..5b07162b001 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_pcf_linear_csm.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_pcf_linear_csm.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_pcf_linear_omni.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_pcf_linear_omni.bin Binary files differindex 5265cd5803c..34d5c091ce2 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_pcf_linear_omni.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_pcf_linear_omni.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_pcf_omni.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_pcf_omni.bin Binary files differindex 35f142f65ca..53f13abd5c8 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_pcf_omni.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_pcf_omni.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_vsm.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_vsm.bin Binary files differindex 4cbaeda75b1..3ba96599cd4 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_vsm.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_vsm.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_vsm_csm.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_vsm_csm.bin Binary files differindex 96d35c6b0b0..d1d4d641bdb 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_vsm_csm.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_vsm_csm.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_vsm_linear.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_vsm_linear.bin Binary files differindex 83d645a4088..5b675445db3 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_vsm_linear.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_vsm_linear.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_vsm_linear_csm.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_vsm_linear_csm.bin Binary files differindex 19971b517aa..cbcecf1feb4 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_vsm_linear_csm.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_vsm_linear_csm.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_vsm_linear_omni.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_vsm_linear_omni.bin Binary files differindex 800d24e1aa2..a2aeda4ead7 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_vsm_linear_omni.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_vsm_linear_omni.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_vsm_omni.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_vsm_omni.bin Binary files differindex eaf1d915411..fd9d3902609 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_vsm_omni.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_vsm_omni.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_texture.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_texture.bin Binary files differindex 08ec2bbf471..16e982ef81c 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_texture.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_texture.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_hblur.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_hblur.bin Binary files differindex a4b099de0de..f1180dceb51 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_hblur.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_hblur.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_hblur_vsm.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_hblur_vsm.bin Binary files differindex a7eb99190dc..5a506e22099 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_hblur_vsm.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_hblur_vsm.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_packdepth.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_packdepth.bin Binary files differindex 6148b430945..960eba1e085 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_packdepth.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_packdepth.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_packdepth_linear.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_packdepth_linear.bin Binary files differindex d59593b94a3..a592392cdd6 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_packdepth_linear.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_packdepth_linear.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_texture.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_texture.bin Binary files differindex fafb0e9002a..d9bf2d2c4a0 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_texture.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_texture.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_unpackdepth.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_unpackdepth.bin Binary files differindex af6a2d0c727..acda8d5f64f 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_unpackdepth.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_unpackdepth.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_unpackdepth_vsm.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_unpackdepth_vsm.bin Binary files differindex 98435947567..2c61fc1cc22 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_unpackdepth_vsm.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_unpackdepth_vsm.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_vblur.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_vblur.bin Binary files differindex a4b099de0de..f1180dceb51 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_vblur.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_vblur.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_vblur_vsm.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_vblur_vsm.bin Binary files differindex a7eb99190dc..5a506e22099 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_vblur_vsm.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_vblur_vsm.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_sms_mesh.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_sms_mesh.bin Binary files differindex 31f9f2f4a79..e9b3d24ad35 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_sms_mesh.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_sms_mesh.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_sms_mesh_pd.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_sms_mesh_pd.bin Binary files differindex e18e85fbbcb..a036a3a6254 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_sms_mesh_pd.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_sms_mesh_pd.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_sms_shadow_pd.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_sms_shadow_pd.bin Binary files differindex 6148b430945..960eba1e085 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_sms_shadow_pd.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_sms_shadow_pd.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_stencil_texture_lightning.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_stencil_texture_lightning.bin Binary files differindex b9d80197e47..aa333ccb02c 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_stencil_texture_lightning.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_stencil_texture_lightning.bin diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_tree.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_tree.bin Binary files differindex 48d7ea940b3..6da14d14952 100644 --- a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_tree.bin +++ b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_tree.bin diff --git a/3rdparty/bgfx/include/bgfx/bgfx.h b/3rdparty/bgfx/include/bgfx/bgfx.h index 524953228c3..64cd158c487 100644 --- a/3rdparty/bgfx/include/bgfx/bgfx.h +++ b/3rdparty/bgfx/include/bgfx/bgfx.h @@ -8,7 +8,7 @@ #include <stdarg.h> // va_list #include <stdint.h> // uint32_t -#include <stdlib.h> // size_t +#include <stdlib.h> // NULL #include <bgfx/bgfxdefines.h> @@ -471,10 +471,10 @@ namespace bgfx /// Supported texture formats. /// - `BGFX_CAPS_FORMAT_TEXTURE_NONE` - not supported - /// - `BGFX_CAPS_FORMAT_TEXTURE_COLOR` - supported - /// - `BGFX_CAPS_FORMAT_TEXTURE_EMULATED` - emulated + /// - `BGFX_CAPS_FORMAT_TEXTURE_2D` - supported + /// - `BGFX_CAPS_FORMAT_TEXTURE_2D_EMULATED` - emulated /// - `BGFX_CAPS_FORMAT_TEXTURE_VERTEX` - supported vertex texture - uint8_t formats[TextureFormat::Count]; + uint16_t formats[TextureFormat::Count]; }; /// Transient index buffer. @@ -1394,8 +1394,33 @@ namespace bgfx /// void updateTextureCube(TextureHandle _handle, uint8_t _side, uint8_t _mip, uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height, const Memory* _mem, uint16_t _pitch = UINT16_MAX); + /// Read back texture content. + /// + /// @param[in] _handle Texture handle. + /// @param[in] _data Destination buffer. + /// + /// @attention Texture must be created with `BGFX_TEXTURE_READ_BACK` flag. + /// @attention Availability depends on: `BGFX_CAPS_TEXTURE_READ_BACK`. + /// @attention C99 equivalent is `bgfx_read_texture`. + /// + void readTexture(TextureHandle _handle, void* _data); + + /// Read back texture content. + /// + /// @param[in] _handle Frame buffer handle. + /// @param[in] _attachment Frame buffer attachment index. + /// @param[in] _data Destination buffer. + /// + /// @attention Texture must be created with `BGFX_TEXTURE_READ_BACK` flag. + /// @attention Availability depends on: `BGFX_CAPS_TEXTURE_READ_BACK`. + /// @attention C99 equivalent is `bgfx_read_texture`. + /// + void readTexture(FrameBufferHandle _handle, uint8_t _attachment, void* _data); + /// Destroy texture. /// + /// @param[in] _handle Texture handle. + /// /// @attention C99 equivalent is `bgfx_destroy_texture`. /// void destroyTexture(TextureHandle _handle); @@ -1442,7 +1467,7 @@ namespace bgfx /// /// @attention C99 equivalent is `bgfx_create_frame_buffer_from_handles`. /// - FrameBufferHandle createFrameBuffer(uint8_t _num, TextureHandle* _handles, bool _destroyTextures = false); + FrameBufferHandle createFrameBuffer(uint8_t _num, const TextureHandle* _handles, bool _destroyTextures = false); /// Create frame buffer for multiple window rendering. /// @@ -1563,6 +1588,9 @@ namespace bgfx /// void setViewRect(uint8_t _id, uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height); + /// + void setViewRect(uint8_t _id, uint16_t _x, uint16_t _y, BackbufferRatio::Enum _ratio); + /// Set view scissor. Draw primitive outside view will be clipped. When /// _x, _y, _width and _height are set to 0, scissor will be disabled. /// @@ -1660,6 +1688,14 @@ namespace bgfx /// void setViewRemap(uint8_t _id = 0, uint8_t _num = UINT8_MAX, const void* _remap = NULL); + /// Reset all view settings to default. + /// + /// @param[in] _id View id. + /// + /// @attention C99 equivalent is `bgfx_reset_view`. + /// + void resetView(uint8_t _id); + /// Sets debug marker. /// /// @attention C99 equivalent is `bgfx_set_marker`. @@ -1892,7 +1928,7 @@ namespace bgfx /// @param[in] _stage Texture unit. /// @param[in] _sampler Program sampler. /// @param[in] _handle Frame buffer handle. - /// @param[in] _attachment Attachment index. + /// @param[in] _attachment Frame buffer attachment index. /// @param[in] _flags Texture sampling mode. Default value UINT32_MAX uses /// texture sampling settings from the texture. /// - `BGFX_TEXTURE_[U/V/W]_[MIRROR/CLAMP]` - Mirror or clamp to edge wrap @@ -2000,7 +2036,7 @@ namespace bgfx /// @param[in] _stage Texture unit. /// @param[in] _sampler Program sampler. /// @param[in] _handle Frame buffer handle. - /// @param[in] _attachment Attachment index. + /// @param[in] _attachment Frame buffer attachment index. /// @param[in] _access Texture access. See `Access::Enum`. /// @param[in] _format Texture format. See: `TextureFormat::Enum`. /// @@ -2046,6 +2082,100 @@ namespace bgfx /// void discard(); + /// Blit texture 2D region between two 2D textures. + /// + /// @param[in] _id View id. + /// @param[in] _dst Destination texture handle. + /// @param[in] _dstX Destination texture X position. + /// @param[in] _dstY Destination texture Y position. + /// @param[in] _src Source texture handle. + /// @param[in] _srcX Source texture X position. + /// @param[in] _srcY Source texture Y position. + /// @param[in] _width Width of region. + /// @param[in] _height Height of region. + /// + /// @attention Destination texture must be create with `BGFX_TEXTURE_BLIT_DST` flag. + /// @attention Availability depends on: `BGFX_CAPS_TEXTURE_BLIT`. + /// @attention C99 equivalent is `bgfx_blit`. + /// + void blit(uint8_t _id, TextureHandle _dst, uint16_t _dstX, uint16_t _dstY, TextureHandle _src, uint16_t _srcX = 0, uint16_t _srcY = 0, uint16_t _width = UINT16_MAX, uint16_t _height = UINT16_MAX); + + /// Blit texture 2D region between 2D frame buffer and 2D texture. + /// + /// @param[in] _id View id. + /// @param[in] _dst Destination texture handle. + /// @param[in] _dstX Destination texture X position. + /// @param[in] _dstY Destination texture Y position. + /// @param[in] _src Source frame buffer handle. + /// @param[in] _attachment Source frame buffer attachment index. + /// @param[in] _srcX Source texture X position. + /// @param[in] _srcY Source texture Y position. + /// @param[in] _width Width of region. + /// @param[in] _height Height of region. + /// + /// @attention Destination texture must be create with `BGFX_TEXTURE_BLIT_DST` flag. + /// @attention Availability depends on: `BGFX_CAPS_TEXTURE_BLIT`. + /// @attention C99 equivalent is `bgfx_blit`. + /// + void blit(uint8_t _id, TextureHandle _dst, uint16_t _dstX, uint16_t _dstY, FrameBufferHandle _src, uint8_t _attachment = 0, uint16_t _srcX = 0, uint16_t _srcY = 0, uint16_t _width = UINT16_MAX, uint16_t _height = UINT16_MAX); + + /// Blit texture region between two textures. + /// + /// @param[in] _id View id. + /// @param[in] _dst Destination texture handle. + /// @param[in] _dstMip Destination texture mip level. + /// @param[in] _dstX Destination texture X position. + /// @param[in] _dstY Destination texture Y position. + /// @param[in] _dstZ If texture is 2D this argument should be 0. If destination texture is cube + /// this argument represent destination texture cube face. For 3D texture this argument + /// represent destination texture Z position. + /// @param[in] _src Source texture handle. + /// @param[in] _srcMip Source texture mip level. + /// @param[in] _srcX Source texture X position. + /// @param[in] _srcY Source texture Y position. + /// @param[in] _srcZ If texture is 2D this argument should be 0. If source texture is cube + /// this argument represent source texture cube face. For 3D texture this argument + /// represent source texture Z position. + /// @param[in] _width Width of region. + /// @param[in] _height Height of region. + /// @param[in] _depth If texture is 3D this argument represent depth of region, otherwise is + /// unused. + /// + /// @attention Destination texture must be create with `BGFX_TEXTURE_BLIT_DST` flag. + /// @attention Availability depends on: `BGFX_CAPS_TEXTURE_BLIT`. + /// @attention C99 equivalent is `bgfx_blit`. + /// + void blit(uint8_t _id, TextureHandle _dst, uint8_t _dstMip, uint16_t _dstX, uint16_t _dstY, uint16_t _dstZ, TextureHandle _src, uint8_t _srcMip = 0, uint16_t _srcX = 0, uint16_t _srcY = 0, uint16_t _srcZ = 0, uint16_t _width = UINT16_MAX, uint16_t _height = UINT16_MAX, uint16_t _depth = UINT16_MAX); + + /// Blit texture region between frame buffer and texture. + /// + /// @param[in] _id View id. + /// @param[in] _dst Destination texture handle. + /// @param[in] _dstMip Destination texture mip level. + /// @param[in] _dstX Destination texture X position. + /// @param[in] _dstY Destination texture Y position. + /// @param[in] _dstZ If texture is 2D this argument should be 0. If destination texture is cube + /// this argument represent destination texture cube face. For 3D texture this argument + /// represent destination texture Z position. + /// @param[in] _src Source frame buffer handle. + /// @param[in] _attachment Source frame buffer attachment index. + /// @param[in] _srcMip Source texture mip level. + /// @param[in] _srcX Source texture X position. + /// @param[in] _srcY Source texture Y position. + /// @param[in] _srcZ If texture is 2D this argument should be 0. If source texture is cube + /// this argument represent source texture cube face. For 3D texture this argument + /// represent source texture Z position. + /// @param[in] _width Width of region. + /// @param[in] _height Height of region. + /// @param[in] _depth If texture is 3D this argument represent depth of region, otherwise is + /// unused. + /// + /// @attention Destination texture must be create with `BGFX_TEXTURE_BLIT_DST` flag. + /// @attention Availability depends on: `BGFX_CAPS_TEXTURE_BLIT`. + /// @attention C99 equivalent is `bgfx_blit`. + /// + void blit(uint8_t _id, TextureHandle _dst, uint8_t _dstMip, uint16_t _dstX, uint16_t _dstY, uint16_t _dstZ, FrameBufferHandle _src, uint8_t _attachment = 0, uint8_t _srcMip = 0, uint16_t _srcX = 0, uint16_t _srcY = 0, uint16_t _srcZ = 0, uint16_t _width = UINT16_MAX, uint16_t _height = UINT16_MAX, uint16_t _depth = UINT16_MAX); + /// Request screen shot. /// /// @param[in] _filePath Will be passed to `bgfx::CallbackI::screenShot` callback. diff --git a/3rdparty/bgfx/include/bgfx/bgfxdefines.h b/3rdparty/bgfx/include/bgfx/bgfxdefines.h index b239be1cf88..5ca5e7d02c1 100644 --- a/3rdparty/bgfx/include/bgfx/bgfxdefines.h +++ b/3rdparty/bgfx/include/bgfx/bgfxdefines.h @@ -310,6 +310,8 @@ #define BGFX_TEXTURE_COMPARE_MASK UINT32_C(0x000f0000) //!< #define BGFX_TEXTURE_COMPUTE_WRITE UINT32_C(0x00100000) //!< #define BGFX_TEXTURE_SRGB UINT32_C(0x00200000) //!< +#define BGFX_TEXTURE_BLIT_DST UINT32_C(0x00400000) //!< +#define BGFX_TEXTURE_READ_BACK UINT32_C(0x00800000) //!< #define BGFX_TEXTURE_BORDER_COLOR_SHIFT 24 //!< #define BGFX_TEXTURE_BORDER_COLOR_MASK UINT32_C(0x0f000000) //!< #define BGFX_TEXTURE_RESERVED_SHIFT 28 //!< @@ -366,17 +368,25 @@ #define BGFX_CAPS_INDEX32 UINT64_C(0x0000000000002000) //!< 32-bit indices are supported. #define BGFX_CAPS_DRAW_INDIRECT UINT64_C(0x0000000000004000) //!< Draw indirect is supported. #define BGFX_CAPS_HIDPI UINT64_C(0x0000000000008000) //!< HiDPI rendering is supported. +#define BGFX_CAPS_TEXTURE_BLIT UINT64_C(0x0000000000010000) //!< Texture blit is supported. +#define BGFX_CAPS_TEXTURE_READ_BACK UINT64_C(0x0000000000020000) //!< Read-back texture is supported. /// -#define BGFX_CAPS_FORMAT_TEXTURE_NONE UINT8_C(0x00) //!< Texture format is not supported. -#define BGFX_CAPS_FORMAT_TEXTURE_COLOR UINT8_C(0x01) //!< Texture format is supported. -#define BGFX_CAPS_FORMAT_TEXTURE_COLOR_SRGB UINT8_C(0x02) //!< Texture as sRGB format is supported. -#define BGFX_CAPS_FORMAT_TEXTURE_EMULATED UINT8_C(0x04) //!< Texture format is emulated. -#define BGFX_CAPS_FORMAT_TEXTURE_VERTEX UINT8_C(0x08) //!< Texture format can be used from vertex shader. -#define BGFX_CAPS_FORMAT_TEXTURE_IMAGE UINT8_C(0x10) //!< Texture format can be used as image from compute shader. -#define BGFX_CAPS_FORMAT_TEXTURE_FRAMEBUFFER UINT8_C(0x20) //!< Texture format can be used as frame buffer. -#define BGFX_CAPS_FORMAT_TEXTURE_FRAMEBUFFER_MSAA UINT8_C(0x40) //!< Texture format can be used as MSAA frame buffer. -#define BGFX_CAPS_FORMAT_TEXTURE_MSAA UINT8_C(0x80) //!< Texture can be sampled as MSAA. +#define BGFX_CAPS_FORMAT_TEXTURE_NONE UINT16_C(0x0000) //!< Texture format is not supported. +#define BGFX_CAPS_FORMAT_TEXTURE_2D UINT16_C(0x0001) //!< Texture format is supported. +#define BGFX_CAPS_FORMAT_TEXTURE_2D_SRGB UINT16_C(0x0002) //!< Texture as sRGB format is supported. +#define BGFX_CAPS_FORMAT_TEXTURE_2D_EMULATED UINT16_C(0x0004) //!< Texture format is emulated. +#define BGFX_CAPS_FORMAT_TEXTURE_3D UINT16_C(0x0008) //!< Texture format is supported. +#define BGFX_CAPS_FORMAT_TEXTURE_3D_SRGB UINT16_C(0x0010) //!< Texture as sRGB format is supported. +#define BGFX_CAPS_FORMAT_TEXTURE_3D_EMULATED UINT16_C(0x0020) //!< Texture format is emulated. +#define BGFX_CAPS_FORMAT_TEXTURE_CUBE UINT16_C(0x0040) //!< Texture format is supported. +#define BGFX_CAPS_FORMAT_TEXTURE_CUBE_SRGB UINT16_C(0x0080) //!< Texture as sRGB format is supported. +#define BGFX_CAPS_FORMAT_TEXTURE_CUBE_EMULATED UINT16_C(0x0100) //!< Texture format is emulated. +#define BGFX_CAPS_FORMAT_TEXTURE_VERTEX UINT16_C(0x0200) //!< Texture format can be used from vertex shader. +#define BGFX_CAPS_FORMAT_TEXTURE_IMAGE UINT16_C(0x0400) //!< Texture format can be used as image from compute shader. +#define BGFX_CAPS_FORMAT_TEXTURE_FRAMEBUFFER UINT16_C(0x0800) //!< Texture format can be used as frame buffer. +#define BGFX_CAPS_FORMAT_TEXTURE_FRAMEBUFFER_MSAA UINT16_C(0x1000) //!< Texture format can be used as MSAA frame buffer. +#define BGFX_CAPS_FORMAT_TEXTURE_MSAA UINT16_C(0x2000) //!< Texture can be sampled as MSAA. /// #define BGFX_VIEW_NONE UINT8_C(0x00) //!< diff --git a/3rdparty/bgfx/include/bgfx/c99/bgfx.h b/3rdparty/bgfx/include/bgfx/c99/bgfx.h index b7aeecda3e7..534c13f1f50 100644 --- a/3rdparty/bgfx/include/bgfx/c99/bgfx.h +++ b/3rdparty/bgfx/include/bgfx/c99/bgfx.h @@ -337,7 +337,7 @@ typedef struct bgfx_caps uint16_t deviceId; bgfx_caps_gpu_t gpu[4]; - uint8_t formats[BGFX_TEXTURE_FORMAT_COUNT]; + uint16_t formats[BGFX_TEXTURE_FORMAT_COUNT]; } bgfx_caps_t; @@ -624,7 +624,7 @@ BGFX_C_API bgfx_frame_buffer_handle_t bgfx_create_frame_buffer(uint16_t _width, BGFX_C_API bgfx_frame_buffer_handle_t bgfx_create_frame_buffer_scaled(bgfx_backbuffer_ratio_t _ratio, bgfx_texture_format_t _format, uint32_t _textureFlags); /**/ -BGFX_C_API bgfx_frame_buffer_handle_t bgfx_create_frame_buffer_from_handles(uint8_t _num, bgfx_texture_handle_t* _handles, bool _destroyTextures); +BGFX_C_API bgfx_frame_buffer_handle_t bgfx_create_frame_buffer_from_handles(uint8_t _num, const bgfx_texture_handle_t* _handles, bool _destroyTextures); /**/ BGFX_C_API bgfx_frame_buffer_handle_t bgfx_create_frame_buffer_from_nwh(void* _nwh, uint16_t _width, uint16_t _height, bgfx_texture_format_t _depthFormat); @@ -771,6 +771,9 @@ BGFX_C_API uint32_t bgfx_dispatch_indirect(uint8_t _id, bgfx_program_handle_t _h BGFX_C_API void bgfx_discard(); /**/ +BGFX_C_API void bgfx_blit(uint8_t _id, bgfx_texture_handle_t _dst, uint8_t _dstMip, uint16_t _dstX, uint16_t _dstY, uint16_t _dstZ, bgfx_texture_handle_t _src, uint8_t _srcMip, uint16_t _srcX, uint16_t _srcY, uint16_t _srcZ, uint16_t _width, uint16_t _height, uint16_t _depth); + +/**/ BGFX_C_API void bgfx_save_screen_shot(const char* _filePath); #endif // BGFX_C99_H_HEADER_GUARD diff --git a/3rdparty/bgfx/scripts/bgfx.lua b/3rdparty/bgfx/scripts/bgfx.lua index c9658d35f84..a946155bdc8 100644 --- a/3rdparty/bgfx/scripts/bgfx.lua +++ b/3rdparty/bgfx/scripts/bgfx.lua @@ -81,8 +81,11 @@ function bgfxProject(_name, _kind, _defines) } configuration { "osx" } - links { - "Cocoa.framework", + linkoptions { + "-framework Cocoa", + "-framework Metal", + "-framework QuartzCore", + "-framework OpenGL", } configuration { "not nacl" } @@ -129,7 +132,7 @@ function bgfxProject(_name, _kind, _defines) path.join(BGFX_DIR, "src/vertexdecl.cpp"), } - configuration { "xcode4 or osx or ios*" } + configuration { "xcode* or osx or ios*" } files { path.join(BGFX_DIR, "src/amalgamated.mm"), } @@ -144,7 +147,7 @@ function bgfxProject(_name, _kind, _defines) configuration {} else - configuration { "xcode4 or osx or ios*" } + configuration { "xcode* or osx or ios*" } files { path.join(BGFX_DIR, "src/glcontext_eagl.mm"), path.join(BGFX_DIR, "src/glcontext_nsgl.mm"), diff --git a/3rdparty/bgfx/src/bgfx.cpp b/3rdparty/bgfx/src/bgfx.cpp index 279fd7564c0..51b52b03720 100644 --- a/3rdparty/bgfx/src/bgfx.cpp +++ b/3rdparty/bgfx/src/bgfx.cpp @@ -852,6 +852,31 @@ namespace bgfx return m_num; } + void Frame::blit(uint8_t _id, TextureHandle _dst, uint8_t _dstMip, uint16_t _dstX, uint16_t _dstY, uint16_t _dstZ, TextureHandle _src, uint8_t _srcMip, uint16_t _srcX, uint16_t _srcY, uint16_t _srcZ, uint16_t _width, uint16_t _height, uint16_t _depth) + { + uint16_t item = m_numBlitItems++; + + BlitItem& bi = m_blitItem[item]; + bi.m_srcX = _srcX; + bi.m_srcY = _srcY; + bi.m_srcZ = _srcZ; + bi.m_dstX = _dstX; + bi.m_dstY = _dstY; + bi.m_dstZ = _dstZ; + bi.m_width = _width; + bi.m_height = _height; + bi.m_depth = _depth; + bi.m_srcMip = _srcMip; + bi.m_dstMip = _dstMip; + bi.m_src = _src; + bi.m_dst = _dst; + + BlitKey key; + key.m_view = _id; + key.m_item = item; + m_blitKeys[item] = key.encode(); + } + void Frame::sort() { for (uint32_t ii = 0, num = m_num; ii < num; ++ii) @@ -859,6 +884,12 @@ namespace bgfx m_sortKeys[ii] = SortKey::remapView(m_sortKeys[ii], m_viewRemap); } bx::radixSort64(m_sortKeys, s_ctx->m_tempKeys, m_sortValues, s_ctx->m_tempValues, m_num); + + for (uint32_t ii = 0, num = m_num; ii < num; ++ii) + { + m_blitKeys[ii] = BlitKey::remapView(m_blitKeys[ii], m_viewRemap); + } + bx::radixSort32(m_blitKeys, (uint32_t*)&s_ctx->m_tempKeys, m_numBlitItems); } RenderFrame::Enum renderFrame() @@ -946,6 +977,8 @@ namespace bgfx CAPS_FLAGS(BGFX_CAPS_INDEX32), CAPS_FLAGS(BGFX_CAPS_DRAW_INDIRECT), CAPS_FLAGS(BGFX_CAPS_HIDPI), + CAPS_FLAGS(BGFX_CAPS_TEXTURE_BLIT), + CAPS_FLAGS(BGFX_CAPS_TEXTURE_READ_BACK), #undef CAPS_FLAGS }; @@ -965,23 +998,31 @@ namespace bgfx } BX_TRACE("Supported texture formats:"); - BX_TRACE("\t +----------- x = supported / * = emulated"); - BX_TRACE("\t |+---------- sRGB format"); - BX_TRACE("\t ||+--------- vertex format"); - BX_TRACE("\t |||+-------- image"); - BX_TRACE("\t ||||+------- framebuffer"); - BX_TRACE("\t |||||+------ MSAA framebuffer"); - BX_TRACE("\t ||||||+----- MSAA texture"); - BX_TRACE("\t ||||||| +-- name"); + BX_TRACE("\t +--------------- 2D: x = supported / * = emulated"); + BX_TRACE("\t |+-------------- 2D: sRGB format"); + BX_TRACE("\t ||+------------- 3D: x = supported / * = emulated"); + BX_TRACE("\t |||+------------ 3D: sRGB format"); + BX_TRACE("\t ||||+----------- Cube: x = supported / * = emulated"); + BX_TRACE("\t |||||+---------- Cube: sRGB format"); + BX_TRACE("\t ||||||+--------- vertex format"); + BX_TRACE("\t |||||||+-------- image"); + BX_TRACE("\t ||||||||+------- framebuffer"); + BX_TRACE("\t |||||||||+------ MSAA framebuffer"); + BX_TRACE("\t ||||||||||+----- MSAA texture"); + BX_TRACE("\t ||||||||||| +-- name"); for (uint32_t ii = 0; ii < TextureFormat::Count; ++ii) { if (TextureFormat::Unknown != ii && TextureFormat::UnknownDepth != ii) { - uint8_t flags = g_caps.formats[ii]; - BX_TRACE("\t[%c%c%c%c%c%c%c] %s" - , flags&BGFX_CAPS_FORMAT_TEXTURE_COLOR ? 'x' : flags&BGFX_CAPS_FORMAT_TEXTURE_EMULATED ? '*' : ' ' - , flags&BGFX_CAPS_FORMAT_TEXTURE_COLOR_SRGB ? 'l' : ' ' + uint16_t flags = g_caps.formats[ii]; + BX_TRACE("\t[%c%c%c%c%c%c%c%c%c%c%c] %s" + , flags&BGFX_CAPS_FORMAT_TEXTURE_2D ? 'x' : flags&BGFX_CAPS_FORMAT_TEXTURE_2D_EMULATED ? '*' : ' ' + , flags&BGFX_CAPS_FORMAT_TEXTURE_2D_SRGB ? 'l' : ' ' + , flags&BGFX_CAPS_FORMAT_TEXTURE_3D ? 'x' : flags&BGFX_CAPS_FORMAT_TEXTURE_3D_EMULATED ? '*' : ' ' + , flags&BGFX_CAPS_FORMAT_TEXTURE_3D_SRGB ? 'l' : ' ' + , flags&BGFX_CAPS_FORMAT_TEXTURE_CUBE ? 'x' : flags&BGFX_CAPS_FORMAT_TEXTURE_CUBE_EMULATED ? '*' : ' ' + , flags&BGFX_CAPS_FORMAT_TEXTURE_CUBE_SRGB ? 'l' : ' ' , flags&BGFX_CAPS_FORMAT_TEXTURE_VERTEX ? 'v' : ' ' , flags&BGFX_CAPS_FORMAT_TEXTURE_IMAGE ? 'i' : ' ' , flags&BGFX_CAPS_FORMAT_TEXTURE_FRAMEBUFFER ? 'f' : ' ' @@ -1055,17 +1096,9 @@ namespace bgfx m_viewRemap[ii] = uint8_t(ii); } - memset(m_fb, 0xff, sizeof(m_fb) ); - memset(m_clear, 0, sizeof(m_clear) ); - memset(m_rect, 0, sizeof(m_rect) ); - memset(m_scissor, 0, sizeof(m_scissor) ); - memset(m_seq, 0, sizeof(m_seq) ); - memset(m_seqMask, 0, sizeof(m_seqMask) ); - - for (uint32_t ii = 0; ii < BX_COUNTOF(m_rect); ++ii) + for (uint32_t ii = 0; ii < BGFX_CONFIG_MAX_VIEWS; ++ii) { - m_rect[ii].m_width = 1; - m_rect[ii].m_height = 1; + resetView(uint8_t(ii) ); } for (uint32_t ii = 0; ii < BX_COUNTOF(m_clearColor); ++ii) @@ -1102,9 +1135,20 @@ namespace bgfx for (uint32_t ii = 0; ii < BX_COUNTOF(s_emulatedFormats); ++ii) { - if (0 == (g_caps.formats[s_emulatedFormats[ii] ] & BGFX_CAPS_FORMAT_TEXTURE_COLOR) ) + const uint32_t fmt = s_emulatedFormats[ii]; + if (0 == (g_caps.formats[fmt] & BGFX_CAPS_FORMAT_TEXTURE_2D) ) { - g_caps.formats[s_emulatedFormats[ii] ] |= BGFX_CAPS_FORMAT_TEXTURE_EMULATED; + g_caps.formats[fmt] |= BGFX_CAPS_FORMAT_TEXTURE_2D_EMULATED; + } + + if (0 == (g_caps.formats[fmt] & BGFX_CAPS_FORMAT_TEXTURE_3D) ) + { + g_caps.formats[fmt] |= BGFX_CAPS_FORMAT_TEXTURE_3D_EMULATED; + } + + if (0 == (g_caps.formats[fmt] & BGFX_CAPS_FORMAT_TEXTURE_CUBE) ) + { + g_caps.formats[fmt] |= BGFX_CAPS_FORMAT_TEXTURE_CUBE_EMULATED; } } @@ -1287,6 +1331,7 @@ namespace bgfx { freeDynamicBuffers(); m_submit->m_resolution = m_resolution; + m_resolution.m_flags &= ~BGFX_RESET_FORCE; m_submit->m_debug = m_debug; memcpy(m_submit->m_viewRemap, m_viewRemap, sizeof(m_viewRemap) ); @@ -1501,11 +1546,11 @@ namespace bgfx { d3d9::rendererCreate, d3d9::rendererDestroy, BGFX_RENDERER_DIRECT3D9_NAME, !!BGFX_CONFIG_RENDERER_DIRECT3D9 }, // Direct3D9 { d3d11::rendererCreate, d3d11::rendererDestroy, BGFX_RENDERER_DIRECT3D11_NAME, !!BGFX_CONFIG_RENDERER_DIRECT3D11 }, // Direct3D11 { d3d12::rendererCreate, d3d12::rendererDestroy, BGFX_RENDERER_DIRECT3D12_NAME, !!BGFX_CONFIG_RENDERER_DIRECT3D12 }, // Direct3D12 -#if BGFX_CONFIG_RENDERER_METAL +#if BX_PLATFORM_OSX || BX_PLATFORM_IOS { mtl::rendererCreate, mtl::rendererDestroy, BGFX_RENDERER_METAL_NAME, !!BGFX_CONFIG_RENDERER_METAL }, // Metal #else { noop::rendererCreate, noop::rendererDestroy, BGFX_RENDERER_NULL_NAME, !!BGFX_CONFIG_RENDERER_NULL }, // Noop -#endif // BGFX_CONFIG_RENDERER_METAL +#endif // BX_PLATFORM_OSX || BX_PLATFORM_IOS { gl::rendererCreate, gl::rendererDestroy, BGFX_RENDERER_OPENGL_NAME, !!BGFX_CONFIG_RENDERER_OPENGLES }, // OpenGLES { gl::rendererCreate, gl::rendererDestroy, BGFX_RENDERER_OPENGL_NAME, !!BGFX_CONFIG_RENDERER_OPENGL }, // OpenGL { vk::rendererCreate, vk::rendererDestroy, BGFX_RENDERER_VULKAN_NAME, !!BGFX_CONFIG_RENDERER_VULKAN }, // Vulkan @@ -1563,12 +1608,8 @@ again: if (windowsVersionIs(Condition::GreaterEqual, 0x0602) ) { -#if defined(__MINGW32__) first = RendererType::Direct3D11; -#else - first = RendererType::Direct3D12; -#endif // __MINGW32__ - second = RendererType::Direct3D11; + second = RendererType::Direct3D12; if (!s_rendererCreator[second].supported) { second = RendererType::Direct3D9; @@ -2030,6 +2071,18 @@ again: } break; + case CommandBuffer::ReadTexture: + { + TextureHandle handle; + _cmdbuf.read(handle); + + void* data; + _cmdbuf.read(data); + + m_renderCtx->readTexture(handle, data); + } + break; + case CommandBuffer::ResizeTexture: { TextureHandle handle; @@ -2744,7 +2797,9 @@ again: TextureHandle createTexture3D(uint16_t _width, uint16_t _height, uint16_t _depth, uint8_t _numMips, TextureFormat::Enum _format, uint32_t _flags, const Memory* _mem) { BGFX_CHECK_MAIN_THREAD(); - BX_CHECK(0 != (g_caps.supported & BGFX_CAPS_TEXTURE_3D), "Texture3D is not supported! Use bgfx::getCaps to check backend renderer capabilities."); + BX_CHECK(0 != (g_caps.supported & BGFX_CAPS_TEXTURE_3D) + , "Texture3D is not supported! Use bgfx::getCaps to check BGFX_CAPS_TEXTURE_3D backend renderer capabilities." + ); _numMips = uint8_t(bx::uint32_max(1, _numMips) ); @@ -2847,6 +2902,9 @@ again: { BGFX_CHECK_MAIN_THREAD(); BX_CHECK(NULL != _mem, "_mem can't be NULL"); + BX_CHECK(0 != (g_caps.supported & BGFX_CAPS_TEXTURE_3D) + , "Texture3D is not supported! Use bgfx::getCaps to check BGFX_CAPS_TEXTURE_3D backend renderer capabilities." + ); if (_width == 0 || _height == 0 || _depth == 0) @@ -2875,6 +2933,26 @@ again: } } + void readTexture(TextureHandle _handle, void* _data) + { + BGFX_CHECK_MAIN_THREAD(); + BX_CHECK(NULL != _data, "_data can't be NULL"); + BX_CHECK(0 != (g_caps.supported & BGFX_CAPS_TEXTURE_READ_BACK) + , "Texture read-back is not supported! Use bgfx::getCaps to check BGFX_CAPS_TEXTURE_READ_BACK backend renderer capabilities." + ); + s_ctx->readTexture(_handle, _data); + } + + void readTexture(FrameBufferHandle _handle, uint8_t _attachment, void* _data) + { + BGFX_CHECK_MAIN_THREAD(); + BX_CHECK(NULL != _data, "_data can't be NULL"); + BX_CHECK(0 != (g_caps.supported & BGFX_CAPS_TEXTURE_READ_BACK) + , "Texture read-back is not supported! Use bgfx::getCaps to check BGFX_CAPS_TEXTURE_READ_BACK backend renderer capabilities." + ); + s_ctx->readTexture(_handle, _attachment, _data); + } + FrameBufferHandle createFrameBuffer(uint16_t _width, uint16_t _height, TextureFormat::Enum _format, uint32_t _textureFlags) { _textureFlags |= _textureFlags&BGFX_TEXTURE_RT_MSAA_MASK ? 0 : BGFX_TEXTURE_RT; @@ -2890,7 +2968,7 @@ again: return createFrameBuffer(1, &th, true); } - FrameBufferHandle createFrameBuffer(uint8_t _num, TextureHandle* _handles, bool _destroyTextures) + FrameBufferHandle createFrameBuffer(uint8_t _num, const TextureHandle* _handles, bool _destroyTextures) { BGFX_CHECK_MAIN_THREAD(); BX_CHECK(_num != 0, "Number of frame buffer attachments can't be 0."); @@ -2979,6 +3057,17 @@ again: s_ctx->setViewRect(_id, _x, _y, _width, _height); } + void setViewRect(uint8_t _id, uint16_t _x, uint16_t _y, BackbufferRatio::Enum _ratio) + { + BGFX_CHECK_MAIN_THREAD(); + BX_CHECK(checkView(_id), "Invalid view id: %d", _id); + + uint16_t width = uint16_t(s_ctx->m_resolution.m_width); + uint16_t height = uint16_t(s_ctx->m_resolution.m_height); + getTextureSizeFromRatio(_ratio, width, height); + setViewRect(_id, _x, _y, width, height); + } + void setViewScissor(uint8_t _id, uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height) { BGFX_CHECK_MAIN_THREAD(); @@ -3028,6 +3117,13 @@ again: s_ctx->setViewRemap(_id, _num, _remap); } + void resetView(uint8_t _id) + { + BGFX_CHECK_MAIN_THREAD(); + BX_CHECK(checkView(_id), "Invalid view id: %d", _id); + s_ctx->resetView(_id); + } + void setMarker(const char* _marker) { BGFX_CHECK_MAIN_THREAD(); @@ -3245,6 +3341,34 @@ again: s_ctx->discard(); } + void blit(uint8_t _id, TextureHandle _dst, uint16_t _dstX, uint16_t _dstY, TextureHandle _src, uint16_t _srcX, uint16_t _srcY, uint16_t _width, uint16_t _height) + { + blit(_id, _dst, 0, _dstX, _dstY, 0, _src, 0, _srcX, _srcY, 0, _width, _height, 0); + } + + void blit(uint8_t _id, TextureHandle _dst, uint16_t _dstX, uint16_t _dstY, FrameBufferHandle _src, uint8_t _attachment, uint16_t _srcX, uint16_t _srcY, uint16_t _width, uint16_t _height) + { + blit(_id, _dst, 0, _dstX, _dstY, 0, _src, _attachment, 0, _srcX, _srcY, 0, _width, _height, 0); + } + + void blit(uint8_t _id, TextureHandle _dst, uint8_t _dstMip, uint16_t _dstX, uint16_t _dstY, uint16_t _dstZ, TextureHandle _src, uint8_t _srcMip, uint16_t _srcX, uint16_t _srcY, uint16_t _srcZ, uint16_t _width, uint16_t _height, uint16_t _depth) + { + BGFX_CHECK_MAIN_THREAD(); + BX_CHECK(0 != (g_caps.supported & BGFX_CAPS_TEXTURE_BLIT) + , "Texture blit is not supported, use bgfx::getCaps to test BGFX_CAPS_TEXTURE_BLIT feature availability" + ); + s_ctx->blit(_id, _dst, _dstMip, _dstX, _dstY, _dstZ, _src, _srcMip, _srcX, _srcY, _srcZ, _width, _height, _depth); + } + + void blit(uint8_t _id, TextureHandle _dst, uint8_t _dstMip, uint16_t _dstX, uint16_t _dstY, uint16_t _dstZ, FrameBufferHandle _src, uint8_t _attachment, uint8_t _srcMip, uint16_t _srcX, uint16_t _srcY, uint16_t _srcZ, uint16_t _width, uint16_t _height, uint16_t _depth) + { + BGFX_CHECK_MAIN_THREAD(); + BX_CHECK(0 != (g_caps.supported & BGFX_CAPS_TEXTURE_BLIT) + , "Texture blit is not supported! Use bgfx::getCaps to check BGFX_CAPS_TEXTURE_BLIT backend renderer capabilities." + ); + s_ctx->blit(_id, _dst, _dstMip, _dstX, _dstY, _dstZ, _src, _attachment, _srcMip, _srcX, _srcY, _srcZ, _width, _height, _depth); + } + void saveScreenShot(const char* _filePath) { BGFX_CHECK_MAIN_THREAD(); @@ -3783,10 +3907,10 @@ BGFX_C_API bgfx_frame_buffer_handle_t bgfx_create_frame_buffer_scaled(bgfx_backb return handle.c; } -BGFX_C_API bgfx_frame_buffer_handle_t bgfx_create_frame_buffer_from_handles(uint8_t _num, bgfx_texture_handle_t* _handles, bool _destroyTextures) +BGFX_C_API bgfx_frame_buffer_handle_t bgfx_create_frame_buffer_from_handles(uint8_t _num, const bgfx_texture_handle_t* _handles, bool _destroyTextures) { union { bgfx_frame_buffer_handle_t c; bgfx::FrameBufferHandle cpp; } handle; - handle.cpp = bgfx::createFrameBuffer(_num, (bgfx::TextureHandle*)_handles, _destroyTextures); + handle.cpp = bgfx::createFrameBuffer(_num, (const bgfx::TextureHandle*)_handles, _destroyTextures); return handle.c; } @@ -3872,6 +3996,11 @@ BGFX_C_API void bgfx_set_view_remap(uint8_t _id, uint8_t _num, const void* _rema bgfx::setViewRemap(_id, _num, _remap); } +BGFX_C_API void bgfx_reset_view(uint8_t _id) +{ + bgfx::resetView(_id); +} + BGFX_C_API void bgfx_set_marker(const char* _marker) { bgfx::setMarker(_marker); @@ -4063,6 +4192,13 @@ BGFX_C_API void bgfx_discard() bgfx::discard(); } +BGFX_C_API void bgfx_blit(uint8_t _id, bgfx_texture_handle_t _dst, uint8_t _dstMip, uint16_t _dstX, uint16_t _dstY, uint16_t _dstZ, bgfx_texture_handle_t _src, uint8_t _srcMip, uint16_t _srcX, uint16_t _srcY, uint16_t _srcZ, uint16_t _width, uint16_t _height, uint16_t _depth) +{ + union { bgfx_texture_handle_t c; bgfx::TextureHandle cpp; } dst = { _dst }; + union { bgfx_texture_handle_t c; bgfx::TextureHandle cpp; } src = { _src }; + bgfx::blit(_id, dst.cpp, _dstMip, _dstX, _dstY, _dstZ, src.cpp, _srcMip, _srcX, _srcY, _srcZ, _width, _height, _depth); +} + BGFX_C_API void bgfx_save_screen_shot(const char* _filePath) { bgfx::saveScreenShot(_filePath); diff --git a/3rdparty/bgfx/src/bgfx_p.h b/3rdparty/bgfx/src/bgfx_p.h index b7bbcf676b5..fe9f89d916d 100644 --- a/3rdparty/bgfx/src/bgfx_p.h +++ b/3rdparty/bgfx/src/bgfx_p.h @@ -174,6 +174,7 @@ namespace stl #define BGFX_MAX_COMPUTE_BINDINGS 8 #define BGFX_SAMPLER_DEFAULT_FLAGS UINT32_C(0x10000000) +#define BGFX_RESET_FORCE UINT32_C(0x80000000) #define BGFX_RENDERER_DIRECT3D9_NAME "Direct3D 9" #define BGFX_RENDERER_DIRECT3D11_NAME "Direct3D 11" @@ -583,6 +584,7 @@ namespace bgfx DestroyTexture, DestroyFrameBuffer, DestroyUniform, + ReadTexture, SaveScreenShot, }; @@ -759,6 +761,34 @@ namespace bgfx }; #undef SORT_KEY_RENDER_DRAW + struct BlitKey + { + uint32_t encode() + { + return 0 + | (uint32_t(m_view) << 24) + | uint32_t(m_item) + ; + } + + void decode(uint32_t _key) + { + m_item = uint16_t(_key & UINT16_MAX); + m_view = uint8_t(_key >> 24); + } + + static uint32_t remapView(uint32_t _key, uint8_t _viewRemap[BGFX_CONFIG_MAX_VIEWS]) + { + const uint8_t oldView = uint8_t(_key >> 24); + const uint32_t view = uint32_t(_viewRemap[oldView]) << 24; + const uint32_t key = (_key & ~UINT32_C(0xff000000) ) | view; + return key; + } + + uint16_t m_item; + uint8_t m_view; + }; + BX_ALIGN_DECL_16(struct) Matrix4 { union @@ -1184,6 +1214,23 @@ namespace bgfx RenderCompute compute; }; + struct BlitItem + { + uint16_t m_srcX; + uint16_t m_srcY; + uint16_t m_srcZ; + uint16_t m_dstX; + uint16_t m_dstY; + uint16_t m_dstZ; + uint16_t m_width; + uint16_t m_height; + uint16_t m_depth; + uint8_t m_srcMip; + uint8_t m_dstMip; + TextureHandle m_src; + TextureHandle m_dst; + }; + struct Resolution { Resolution() @@ -1274,9 +1321,10 @@ namespace bgfx m_matrixCache.reset(); m_rectCache.reset(); m_key.reset(); - m_num = 0; + m_num = 0; m_numRenderItems = 0; - m_numDropped = 0; + m_numDropped = 0; + m_numBlitItems = 0; m_iboffset = 0; m_vboffset = 0; m_cmdPre.start(); @@ -1501,6 +1549,8 @@ namespace bgfx return dispatch(_id, _handle, 0, 0, 0, _flags); } + void blit(uint8_t _id, TextureHandle _dst, uint8_t _dstMip, uint16_t _dstX, uint16_t _dstY, uint16_t _dstZ, TextureHandle _src, uint8_t _srcMip, uint16_t _srcX, uint16_t _srcY, uint16_t _srcZ, uint16_t _width, uint16_t _height, uint16_t _depth); + void sort(); bool checkAvailTransientIndexBuffer(uint32_t _num) @@ -1622,6 +1672,8 @@ namespace bgfx RenderItem m_renderItem[BGFX_CONFIG_MAX_DRAW_CALLS+1]; RenderDraw m_draw; RenderCompute m_compute; + uint32_t m_blitKeys[BGFX_CONFIG_MAX_BLIT_ITEMS+1]; + BlitItem m_blitItem[BGFX_CONFIG_MAX_BLIT_ITEMS+1]; uint64_t m_flags; uint32_t m_uniformBegin; uint32_t m_uniformEnd; @@ -1632,6 +1684,7 @@ namespace bgfx RenderItemCount m_num; RenderItemCount m_numRenderItems; RenderItemCount m_numDropped; + uint16_t m_numBlitItems; MatrixCache m_matrixCache; RectCache m_rectCache; @@ -1890,6 +1943,7 @@ namespace bgfx virtual void updateTextureBegin(TextureHandle _handle, uint8_t _side, uint8_t _mip) = 0; virtual void updateTexture(TextureHandle _handle, uint8_t _side, uint8_t _mip, const Rect& _rect, uint16_t _z, uint16_t _depth, uint16_t _pitch, const Memory* _mem) = 0; virtual void updateTextureEnd() = 0; + virtual void readTexture(TextureHandle _handle, void* _data) = 0; virtual void resizeTexture(TextureHandle _handle, uint16_t _width, uint16_t _height) = 0; virtual void destroyTexture(TextureHandle _handle) = 0; virtual void createFrameBuffer(FrameBufferHandle _handle, uint8_t _num, const TextureHandle* _textureHandles) = 0; @@ -1983,6 +2037,7 @@ namespace bgfx , uint16_t(m_resolution.m_width) , uint16_t(m_resolution.m_height) ); + m_resolution.m_flags |= BGFX_RESET_FORCE; } } } @@ -2939,6 +2994,22 @@ namespace bgfx textureDecRef(_handle); } + BGFX_API_FUNC(void readTexture(TextureHandle _handle, void* _data) ) + { + CommandBuffer& cmdbuf = getCommandBuffer(CommandBuffer::ReadTexture); + cmdbuf.write(_handle); + cmdbuf.write(_data); + } + + BGFX_API_FUNC(void readTexture(FrameBufferHandle _handle, uint8_t _attachment, void* _data) ) + { + const FrameBufferRef& ref = m_frameBufferRef[_handle.idx]; + BX_CHECK(!ref.m_window, "Can't sample window frame buffer."); + TextureHandle textureHandle = ref.un.m_th[_attachment]; + BX_CHECK(isValid(textureHandle), "Frame buffer texture %d is invalid.", _attachment); + readTexture(textureHandle, _data); + } + void resizeTexture(TextureHandle _handle, uint16_t _width, uint16_t _height) { const TextureRef& textureRef = m_textureRef[_handle.idx]; @@ -3005,8 +3076,37 @@ namespace bgfx cmdbuf.write(_mem); } - BGFX_API_FUNC(FrameBufferHandle createFrameBuffer(uint8_t _num, TextureHandle* _handles, bool _destroyTextures) ) + bool checkFrameBuffer(uint8_t _num, const TextureHandle* _handles) const + { + uint8_t color = 0; + uint8_t depth = 0; + + for (uint32_t ii = 0; ii < _num; ++ii) + { + TextureHandle texHandle = _handles[ii]; + if (isDepth(TextureFormat::Enum(m_textureRef[texHandle.idx].m_format))) + { + ++depth; + } + else + { + ++color; + } + } + + return color <= g_caps.maxFBAttachments + && depth <= 1 + ; + } + + BGFX_API_FUNC(FrameBufferHandle createFrameBuffer(uint8_t _num, const TextureHandle* _handles, bool _destroyTextures) ) { + BX_CHECK(checkFrameBuffer(_num, _handles) + , "Too many frame buffer attachments (num attachments: %d, max color attachments %d)!" + , _num + , g_caps.maxFBAttachments + ); + FrameBufferHandle handle = { m_frameBufferHandle.alloc() }; BX_WARN(isValid(handle), "Failed to allocate frame buffer handle."); @@ -3297,6 +3397,17 @@ namespace bgfx } } + BGFX_API_FUNC(void resetView(uint8_t _id) ) + { + setViewRect(_id, 0, 0, 1, 1); + setViewScissor(_id, 0, 0, 0, 0); + setViewClear(_id, BGFX_CLEAR_NONE, 0, 0.0f, 0); + setViewSeq(_id, false); + bgfx::FrameBufferHandle invalid = BGFX_INVALID_HANDLE; + setViewFrameBuffer(_id, invalid); + setViewTransform(_id, NULL, NULL, BGFX_VIEW_NONE, NULL); + } + BGFX_API_FUNC(void setViewRemap(uint8_t _id, uint8_t _num, const void* _remap) ) { const uint32_t num = bx::uint32_min(_id + _num, BGFX_CONFIG_MAX_VIEWS) - _id; @@ -3559,6 +3670,28 @@ namespace bgfx m_submit->discard(); } + BGFX_API_FUNC(void blit(uint8_t _id, TextureHandle _dst, uint8_t _dstMip, uint16_t _dstX, uint16_t _dstY, uint16_t _dstZ, TextureHandle _src, uint8_t _srcMip, uint16_t _srcX, uint16_t _srcY, uint16_t _srcZ, uint16_t _width, uint16_t _height, uint16_t _depth) ) + { + const TextureRef& src = m_textureRef[_src.idx]; + const TextureRef& dst = m_textureRef[_dst.idx]; + BX_CHECK(src.m_format == dst.m_format + , "Texture format must match (src %s, dst %s)." + , bgfx::getName(TextureFormat::Enum(src.m_format) ) + , bgfx::getName(TextureFormat::Enum(dst.m_format) ) + ); + BX_UNUSED(src, dst); + m_submit->blit(_id, _dst, _dstMip, _dstX, _dstY, _dstZ, _src, _srcMip, _srcX, _srcY, _srcZ, _width, _height, _depth); + } + + BGFX_API_FUNC(void blit(uint8_t _id, TextureHandle _dst, uint8_t _dstMip, uint16_t _dstX, uint16_t _dstY, uint16_t _dstZ, FrameBufferHandle _src, uint8_t _attachment, uint8_t _srcMip, uint16_t _srcX, uint16_t _srcY, uint16_t _srcZ, uint16_t _width, uint16_t _height, uint16_t _depth) ) + { + const FrameBufferRef& ref = m_frameBufferRef[_src.idx]; + BX_CHECK(!ref.m_window, "Can't sample window frame buffer."); + TextureHandle textureHandle = ref.un.m_th[_attachment]; + BX_CHECK(isValid(textureHandle), "Frame buffer texture %d is invalid.", _attachment); + blit(_id, _dst, _dstMip, _dstX, _dstY, _dstZ, textureHandle, _srcMip, _srcX, _srcY, _srcZ, _width, _height, _depth); + } + BGFX_API_FUNC(uint32_t frame() ); void dumpViewStats(); diff --git a/3rdparty/bgfx/src/config.h b/3rdparty/bgfx/src/config.h index 7ed64c04325..cd055498096 100644 --- a/3rdparty/bgfx/src/config.h +++ b/3rdparty/bgfx/src/config.h @@ -188,6 +188,10 @@ # define BGFX_CONFIG_MAX_DRAW_CALLS ( (64<<10)-1) #endif // BGFX_CONFIG_MAX_DRAW_CALLS +#ifndef BGFX_CONFIG_MAX_BLIT_ITEMS +# define BGFX_CONFIG_MAX_BLIT_ITEMS 256 +#endif // BGFX_CONFIG_MAX_BLIT_ITEMS + #ifndef BGFX_CONFIG_MAX_MATRIX_CACHE # define BGFX_CONFIG_MAX_MATRIX_CACHE (BGFX_CONFIG_MAX_DRAW_CALLS+1) #endif // BGFX_CONFIG_MAX_MATRIX_CACHE diff --git a/3rdparty/bgfx/src/glcontext_nsgl.mm b/3rdparty/bgfx/src/glcontext_nsgl.mm index 68f6d92f8ca..e8ff5164d80 100644 --- a/3rdparty/bgfx/src/glcontext_nsgl.mm +++ b/3rdparty/bgfx/src/glcontext_nsgl.mm @@ -134,9 +134,12 @@ namespace bgfx { namespace gl { BX_UNUSED(_width, _height); +#if defined(MAC_OS_X_VERSION_MAX_ALLOWED) && (MAC_OS_X_VERSION_MAX_ALLOWED >= 1070) bool hidpi = !!(_flags&BGFX_RESET_HIDPI); NSOpenGLView* glView = (NSOpenGLView*)m_view; - [glView setWantsBestResolutionOpenGLSurface:hidpi]; + if ([glView respondsToSelector:@selector(setWantsBestResolutionOpenGLSurface:)]) + [glView setWantsBestResolutionOpenGLSurface:hidpi]; +#endif // defined(MAC_OS_X_VERSION_MAX_ALLOWED) && (MAC_OS_X_VERSION_MAX_ALLOWED >= 1070) bool vsync = !!(_flags&BGFX_RESET_VSYNC); GLint interval = vsync ? 1 : 0; @@ -147,11 +150,12 @@ namespace bgfx { namespace gl uint64_t GlContext::getCaps() const { + uint64_t caps = 0; +#if defined(MAC_OS_X_VERSION_MAX_ALLOWED) && (MAC_OS_X_VERSION_MAX_ALLOWED >= 1070) NSWindow* nsWindow = (NSWindow*)g_platformData.nwh; - uint64_t caps = 1.0f < [nsWindow backingScaleFactor] - ? BGFX_CAPS_HIDPI - : 0 - ; + if ([nsWindow respondsToSelector:@selector(backingScaleFactor)] && (1.0f < [nsWindow backingScaleFactor])) + caps |= BGFX_CAPS_HIDPI; +#endif // defined(MAC_OS_X_VERSION_MAX_ALLOWED) && (MAC_OS_X_VERSION_MAX_ALLOWED >= 1070) return caps; } diff --git a/3rdparty/bgfx/src/glimports.h b/3rdparty/bgfx/src/glimports.h index 42f966ece35..0209f0b5f7d 100644 --- a/3rdparty/bgfx/src/glimports.h +++ b/3rdparty/bgfx/src/glimports.h @@ -71,6 +71,7 @@ typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DPROC) (GLenum targ typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data); typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data); typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data); +typedef void (GL_APIENTRYP PFNGLCOPYIMAGESUBDATAPROC) (GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth); typedef GLuint (GL_APIENTRYP PFNGLCREATEPROGRAMPROC) (void); typedef GLuint (GL_APIENTRYP PFNGLCREATESHADERPROC) (GLenum type); typedef void (GL_APIENTRYP PFNGLCULLFACEPROC) (GLenum mode); @@ -120,6 +121,7 @@ typedef void (GL_APIENTRYP PFNGLGENVERTEXARRAYSPROC) (GLsizei n, GLuin typedef void (GL_APIENTRYP PFNGLGETACTIVEATTRIBPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); typedef void (GL_APIENTRYP PFNGLGETACTIVEUNIFORMPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); typedef GLint (GL_APIENTRYP PFNGLGETATTRIBLOCATIONPROC) (GLuint program, const GLchar *name); +typedef void (GL_APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEPROC) (GLenum target, GLint level, GLvoid *img); typedef GLuint (GL_APIENTRYP PFNGLGETDEBUGMESSAGELOGPROC) (GLuint count, GLsizei bufsize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog); typedef GLenum (GL_APIENTRYP PFNGLGETERRORPROC) (void); typedef void (GL_APIENTRYP PFNGLGETFLOATVPROC) (GLenum pname, GLfloat *data); @@ -138,6 +140,7 @@ typedef void (GL_APIENTRYP PFNGLGETPROGRAMRESOURCEIVPROC) (GLuint prog typedef void (GL_APIENTRYP PFNGLGETPROGRAMRESOURCENAMEPROC) (GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name); typedef GLint (GL_APIENTRYP PFNGLGETPROGRAMRESOURCELOCATIONPROC) (GLuint program, GLenum programInterface, const GLchar *name); typedef GLint (GL_APIENTRYP PFNGLGETPROGRAMRESOURCELOCATIONINDEXPROC) (GLuint program, GLenum programInterface, const GLchar *name); +typedef void (GL_APIENTRYP PFNGLGETTEXIMAGEPROC) (GLenum target, GLint level, GLenum format, GLenum type, void *pixels); typedef void (GL_APIENTRYP PFNGLGETQUERYIVPROC) (GLenum target, GLenum pname, GLint *params); typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTIVPROC) (GLuint id, GLenum pname, GLint *params); typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTI64VPROC) (GLuint id, GLenum pname, GLint64 *params); @@ -251,6 +254,7 @@ GL_IMPORT______(false, PFNGLCOMPRESSEDTEXIMAGE2DPROC, glCompressedT GL_IMPORT______(false, PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC, glCompressedTexSubImage2D); GL_IMPORT______(true , PFNGLCOMPRESSEDTEXIMAGE3DPROC, glCompressedTexImage3D); GL_IMPORT______(true , PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC, glCompressedTexSubImage3D); +GL_IMPORT______(true , PFNGLCOPYIMAGESUBDATAPROC, glCopyImageSubData); GL_IMPORT______(false, PFNGLCREATEPROGRAMPROC, glCreateProgram); GL_IMPORT______(false, PFNGLCREATESHADERPROC, glCreateShader); GL_IMPORT______(false, PFNGLCULLFACEPROC, glCullFace); @@ -300,6 +304,7 @@ GL_IMPORT______(true, PFNGLGENVERTEXARRAYSPROC, glGenVertexAr GL_IMPORT______(false, PFNGLGETACTIVEATTRIBPROC, glGetActiveAttrib); GL_IMPORT______(false, PFNGLGETATTRIBLOCATIONPROC, glGetAttribLocation); GL_IMPORT______(false, PFNGLGETACTIVEUNIFORMPROC, glGetActiveUniform); +GL_IMPORT______(true, PFNGLGETCOMPRESSEDTEXIMAGEPROC, glGetCompressedTexImage); GL_IMPORT______(true, PFNGLGETDEBUGMESSAGELOGPROC, glGetDebugMessageLog); GL_IMPORT______(false, PFNGLGETERRORPROC, glGetError); GL_IMPORT______(false, PFNGLGETFLOATVPROC, glGetFloatv); @@ -318,6 +323,7 @@ GL_IMPORT______(true, PFNGLGETPROGRAMRESOURCEIVPROC, glGetProgramR GL_IMPORT______(true, PFNGLGETPROGRAMRESOURCENAMEPROC, glGetProgramResourceName); GL_IMPORT______(true, PFNGLGETPROGRAMRESOURCELOCATIONPROC, glGetProgramResourceLocation); GL_IMPORT______(true, PFNGLGETPROGRAMRESOURCELOCATIONINDEXPROC, glGetProgramResourceLocationIndex); +GL_IMPORT______(true, PFNGLGETTEXIMAGEPROC, glGetTexImage); GL_IMPORT______(true, PFNGLGETQUERYIVPROC, glGetQueryiv); GL_IMPORT______(true, PFNGLGETQUERYOBJECTIVPROC, glGetQueryObjectiv); GL_IMPORT______(true, PFNGLGETQUERYOBJECTI64VPROC, glGetQueryObjecti64v); @@ -451,11 +457,16 @@ GL_IMPORT______(true, PFNGLGETTRANSLATEDSHADERSOURCEANGLEPROC, glGetTranslat GL_IMPORT_ANGLE(true, PFNGLBLITFRAMEBUFFERPROC, glBlitFramebuffer); GL_IMPORT_ANGLE(true, PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC, glRenderbufferStorageMultisample); +GL_IMPORT_EXT__(true , PFNGLCOPYIMAGESUBDATAPROC, glCopyImageSubData); + GL_IMPORT_KHR__(true, PFNGLDEBUGMESSAGECONTROLPROC, glDebugMessageControl); GL_IMPORT_KHR__(true, PFNGLDEBUGMESSAGEINSERTPROC, glDebugMessageInsert); GL_IMPORT_KHR__(true, PFNGLDEBUGMESSAGECALLBACKPROC, glDebugMessageCallback); GL_IMPORT_KHR__(true, PFNGLGETDEBUGMESSAGELOGPROC, glGetDebugMessageLog); +GL_IMPORT_____x(true, PFNGLGETCOMPRESSEDTEXIMAGEPROC, glGetCompressedTexImage); +GL_IMPORT_____x(true, PFNGLGETTEXIMAGEPROC, glGetTexImage); + # if BGFX_CONFIG_RENDERER_OPENGLES < 30 GL_IMPORT_OES__(true, PFNGLTEXIMAGE3DPROC, glTexImage3D); GL_IMPORT_OES__(true, PFNGLTEXSUBIMAGE3DPROC, glTexSubImage3D); diff --git a/3rdparty/bgfx/src/renderer_d3d11.cpp b/3rdparty/bgfx/src/renderer_d3d11.cpp index a7a383d3b7d..e2ec495a34f 100644 --- a/3rdparty/bgfx/src/renderer_d3d11.cpp +++ b/3rdparty/bgfx/src/renderer_d3d11.cpp @@ -56,6 +56,7 @@ namespace bgfx { namespace d3d11 ID3D11UnorderedAccessView* m_uav[D3D11_PS_CS_UAV_REGISTER_COUNT]; ID3D11ShaderResourceView* m_srv[D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT]; ID3D11SamplerState* m_sampler[D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT]; + ID3D11RenderTargetView* m_rtv[BGFX_CONFIG_MAX_FRAME_BUFFERS]; uint32_t m_zero[D3D11_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT]; float m_zerof[D3D11_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT]; }; @@ -569,7 +570,6 @@ namespace bgfx { namespace d3d11 , m_captureTexture(NULL) , m_captureResolve(NULL) , m_wireframe(false) - , m_flags(BGFX_RESET_NONE) , m_maxAnisotropy(1) , m_currentProgram(NULL) , m_vsChanges(0) @@ -1156,6 +1156,8 @@ BX_PRAGMA_DIAGNOSTIC_POP(); | BGFX_CAPS_SWAP_CHAIN | (m_ovr.isInitialized() ? BGFX_CAPS_HMD : 0) | BGFX_CAPS_DRAW_INDIRECT + | BGFX_CAPS_TEXTURE_BLIT + | BGFX_CAPS_TEXTURE_READ_BACK ); if (m_featureLevel <= D3D_FEATURE_LEVEL_9_2) @@ -1275,7 +1277,21 @@ BX_PRAGMA_DIAGNOSTIC_POP(); | D3D11_FORMAT_SUPPORT_TEXTURE3D | D3D11_FORMAT_SUPPORT_TEXTURECUBE ) ) - ? BGFX_CAPS_FORMAT_TEXTURE_COLOR + ? BGFX_CAPS_FORMAT_TEXTURE_2D + : BGFX_CAPS_FORMAT_TEXTURE_NONE + ; + + support |= 0 != (data.OutFormatSupport & (0 + | D3D11_FORMAT_SUPPORT_TEXTURE3D + ) ) + ? BGFX_CAPS_FORMAT_TEXTURE_3D + : BGFX_CAPS_FORMAT_TEXTURE_NONE + ; + + support |= 0 != (data.OutFormatSupport & (0 + | D3D11_FORMAT_SUPPORT_TEXTURECUBE + ) ) + ? BGFX_CAPS_FORMAT_TEXTURE_CUBE : BGFX_CAPS_FORMAT_TEXTURE_NONE ; @@ -1357,10 +1373,22 @@ BX_PRAGMA_DIAGNOSTIC_POP(); { support |= 0 != (data.OutFormatSupport & (0 | D3D11_FORMAT_SUPPORT_TEXTURE2D + ) ) + ? BGFX_CAPS_FORMAT_TEXTURE_2D_SRGB + : BGFX_CAPS_FORMAT_TEXTURE_NONE + ; + + support |= 0 != (data.OutFormatSupport & (0 | D3D11_FORMAT_SUPPORT_TEXTURE3D + ) ) + ? BGFX_CAPS_FORMAT_TEXTURE_3D_SRGB + : BGFX_CAPS_FORMAT_TEXTURE_NONE + ; + + support |= 0 != (data.OutFormatSupport & (0 | D3D11_FORMAT_SUPPORT_TEXTURECUBE ) ) - ? BGFX_CAPS_FORMAT_TEXTURE_COLOR_SRGB + ? BGFX_CAPS_FORMAT_TEXTURE_CUBE_SRGB : BGFX_CAPS_FORMAT_TEXTURE_NONE ; } @@ -1651,6 +1679,32 @@ BX_PRAGMA_DIAGNOSTIC_POP(); { } + void readTexture(TextureHandle _handle, void* _data) BX_OVERRIDE + { + const TextureD3D11& texture = m_textures[_handle.idx]; + D3D11_MAPPED_SUBRESOURCE mapped; + DX_CHECK(m_deviceCtx->Map(texture.m_ptr, 0, D3D11_MAP_READ, 0, &mapped) ); + + uint8_t* src = (uint8_t*)mapped.pData; + uint32_t srcPitch = mapped.RowPitch; + + const uint8_t bpp = getBitsPerPixel(TextureFormat::Enum(texture.m_textureFormat) ); + uint8_t* dst = (uint8_t*)_data; + uint32_t dstPitch = texture.m_width*bpp/8; + + uint32_t pitch = bx::uint32_min(srcPitch, dstPitch); + + for (uint32_t yy = 0, height = texture.m_height; yy < height; ++yy) + { + memcpy(dst, src, pitch); + + src += srcPitch; + dst += dstPitch; + } + + m_deviceCtx->Unmap(texture.m_ptr, 0); + } + void resizeTexture(TextureHandle _handle, uint16_t _width, uint16_t _height) BX_OVERRIDE { TextureD3D11& texture = m_textures[_handle.idx]; @@ -1939,12 +1993,12 @@ BX_PRAGMA_DIAGNOSTIC_POP(); DX_CHECK(m_swapChain->GetBuffer(0, IID_ID3D11Texture2D, (void**)&color) ); D3D11_RENDER_TARGET_VIEW_DESC desc; - desc.ViewDimension = (m_flags & BGFX_RESET_MSAA_MASK) + desc.ViewDimension = (m_resolution.m_flags & BGFX_RESET_MSAA_MASK) ? D3D11_RTV_DIMENSION_TEXTURE2DMS : D3D11_RTV_DIMENSION_TEXTURE2D ; desc.Texture2D.MipSlice = 0; - desc.Format = (m_flags & BGFX_RESET_SRGB_BACKBUFFER) + desc.Format = (m_resolution.m_flags & BGFX_RESET_SRGB_BACKBUFFER) ? DXGI_FORMAT_R8G8B8A8_UNORM_SRGB : DXGI_FORMAT_R8G8B8A8_UNORM ; @@ -2008,7 +2062,7 @@ BX_PRAGMA_DIAGNOSTIC_POP(); HRESULT hr = S_OK; uint32_t syncInterval = BX_ENABLED(BX_PLATFORM_WINRT) ? 1 // sync interval of 0 is not supported on WinRT - : !!(m_flags & BGFX_RESET_VSYNC) + : !!(m_resolution.m_flags & BGFX_RESET_VSYNC) ; for (uint32_t ii = 1, num = m_numWindows; ii < num && SUCCEEDED(hr); ++ii) @@ -2101,22 +2155,23 @@ BX_PRAGMA_DIAGNOSTIC_POP(); uint32_t flags = _resolution.m_flags & ~(BGFX_RESET_HMD_RECENTER | BGFX_RESET_MAXANISOTROPY); - if ( getBufferWidth() != _resolution.m_width - || getBufferHeight() != _resolution.m_height - || m_flags != flags) + if (m_resolution.m_width != _resolution.m_width + || m_resolution.m_height != _resolution.m_height + || m_resolution.m_flags != flags) { + flags &= ~BGFX_RESET_FORCE; + bool resize = true && !BX_ENABLED(BX_PLATFORM_WINRT) // can't use ResizeBuffers on Windows Phone - && (m_flags&BGFX_RESET_MSAA_MASK) == (flags&BGFX_RESET_MSAA_MASK) + && (m_resolution.m_flags&BGFX_RESET_MSAA_MASK) == (flags&BGFX_RESET_MSAA_MASK) ; - m_flags = flags; - - m_textVideoMem.resize(false, _resolution.m_width, _resolution.m_height); - m_textVideoMem.clear(); m_resolution = _resolution; m_resolution.m_flags = flags; + m_textVideoMem.resize(false, _resolution.m_width, _resolution.m_height); + m_textVideoMem.clear(); + setBufferSize(_resolution.m_width, _resolution.m_height); preReset(); @@ -2131,6 +2186,7 @@ BX_PRAGMA_DIAGNOSTIC_POP(); { if (resize) { + m_deviceCtx->OMSetRenderTargets(1, s_zero.m_rtv, NULL); DX_CHECK(m_swapChain->ResizeBuffers(2 , getBufferWidth() , getBufferHeight() @@ -2141,13 +2197,13 @@ BX_PRAGMA_DIAGNOSTIC_POP(); else { updateMsaa(); - m_scd.SampleDesc = s_msaa[(m_flags&BGFX_RESET_MSAA_MASK)>>BGFX_RESET_MSAA_SHIFT]; + m_scd.SampleDesc = s_msaa[(m_resolution.m_flags&BGFX_RESET_MSAA_MASK)>>BGFX_RESET_MSAA_SHIFT]; DX_RELEASE(m_swapChain, 0); SwapChainDesc* scd = &m_scd; SwapChainDesc swapChainScd; - if (0 != (m_flags & BGFX_RESET_HMD) + if (0 != (m_resolution.m_flags & BGFX_RESET_HMD) && m_ovr.isInitialized() ) { swapChainScd = m_scd; @@ -2920,7 +2976,7 @@ BX_PRAGMA_DIAGNOSTIC_POP(); void capturePostReset() { - if (m_flags&BGFX_RESET_CAPTURE) + if (m_resolution.m_flags&BGFX_RESET_CAPTURE) { ID3D11Texture2D* backBuffer; DX_CHECK(m_swapChain->GetBuffer(0, IID_ID3D11Texture2D, (void**)&backBuffer) ); @@ -3259,7 +3315,6 @@ BX_PRAGMA_DIAGNOSTIC_POP(); #endif // BX_PLATFORM_WINRT SwapChainDesc m_scd; - uint32_t m_flags; uint32_t m_maxAnisotropy; IndexBufferD3D11 m_indexBuffers[BGFX_CONFIG_MAX_INDEX_BUFFERS]; @@ -3800,7 +3855,10 @@ BX_PRAGMA_DIAGNOSTIC_POP(); const uint32_t textureWidth = bx::uint32_max(blockInfo.blockWidth, imageContainer.m_width >>startLod); const uint32_t textureHeight = bx::uint32_max(blockInfo.blockHeight, imageContainer.m_height>>startLod); - m_flags = _flags; + m_flags = _flags; + m_width = textureWidth; + m_height = textureHeight; + m_depth = imageContainer.m_depth; m_requestedFormat = (uint8_t)imageContainer.m_format; m_textureFormat = (uint8_t)imageContainer.m_format; @@ -3899,10 +3957,12 @@ BX_PRAGMA_DIAGNOSTIC_POP(); } } - const bool bufferOnly = 0 != (m_flags&BGFX_TEXTURE_RT_BUFFER_ONLY); + const bool bufferOnly = 0 != (m_flags&(BGFX_TEXTURE_RT_BUFFER_ONLY|BGFX_TEXTURE_READ_BACK) ); const bool computeWrite = 0 != (m_flags&BGFX_TEXTURE_COMPUTE_WRITE); const bool renderTarget = 0 != (m_flags&BGFX_TEXTURE_RT_MASK); - const bool srgb = 0 != (m_flags&BGFX_TEXTURE_SRGB) || imageContainer.m_srgb; + const bool srgb = 0 != (m_flags&BGFX_TEXTURE_SRGB) || imageContainer.m_srgb; + const bool blit = 0 != (m_flags&BGFX_TEXTURE_BLIT_DST); + const bool readBack = 0 != (m_flags&BGFX_TEXTURE_READ_BACK); const uint32_t msaaQuality = bx::uint32_satsub( (m_flags&BGFX_TEXTURE_RT_MSAA_MASK)>>BGFX_TEXTURE_RT_MSAA_SHIFT, 1); const DXGI_SAMPLE_DESC& msaa = s_msaa[msaaQuality]; @@ -3940,7 +4000,7 @@ BX_PRAGMA_DIAGNOSTIC_POP(); desc.MipLevels = numMips; desc.Format = format; desc.SampleDesc = msaa; - desc.Usage = kk == 0 ? D3D11_USAGE_DEFAULT : D3D11_USAGE_IMMUTABLE; + desc.Usage = kk == 0 || blit ? D3D11_USAGE_DEFAULT : D3D11_USAGE_IMMUTABLE; desc.BindFlags = bufferOnly ? 0 : D3D11_BIND_SHADER_RESOURCE; desc.CPUAccessFlags = 0; @@ -3961,6 +4021,13 @@ BX_PRAGMA_DIAGNOSTIC_POP(); desc.Usage = D3D11_USAGE_DEFAULT; } + if (readBack) + { + desc.BindFlags = 0; + desc.Usage = D3D11_USAGE_STAGING; + desc.CPUAccessFlags = D3D11_CPU_ACCESS_READ; + } + if (imageContainer.m_cubeMap) { desc.ArraySize = 6; @@ -3988,7 +4055,7 @@ BX_PRAGMA_DIAGNOSTIC_POP(); desc.Depth = imageContainer.m_depth; desc.MipLevels = imageContainer.m_numMips; desc.Format = format; - desc.Usage = kk == 0 ? D3D11_USAGE_DEFAULT : D3D11_USAGE_IMMUTABLE; + desc.Usage = kk == 0 || blit ? D3D11_USAGE_DEFAULT : D3D11_USAGE_IMMUTABLE; desc.BindFlags = D3D11_BIND_SHADER_RESOURCE; desc.CPUAccessFlags = 0; desc.MiscFlags = 0; @@ -4235,23 +4302,96 @@ BX_PRAGMA_DIAGNOSTIC_POP(); } } + const uint32_t msaaQuality = bx::uint32_satsub( (texture.m_flags&BGFX_TEXTURE_RT_MSAA_MASK)>>BGFX_TEXTURE_RT_MSAA_SHIFT, 1); + const DXGI_SAMPLE_DESC& msaa = s_msaa[msaaQuality]; + if (isDepth( (TextureFormat::Enum)texture.m_textureFormat) ) { BX_CHECK(NULL == m_dsv, "Frame buffer already has depth-stencil attached."); - const uint32_t msaaQuality = bx::uint32_satsub( (texture.m_flags&BGFX_TEXTURE_RT_MSAA_MASK)>>BGFX_TEXTURE_RT_MSAA_SHIFT, 1); - const DXGI_SAMPLE_DESC& msaa = s_msaa[msaaQuality]; + switch (texture.m_type) + { + default: + case TextureD3D11::Texture2D: + { + D3D11_DEPTH_STENCIL_VIEW_DESC dsvDesc; + dsvDesc.Format = s_textureFormat[texture.m_textureFormat].m_fmtDsv; + dsvDesc.ViewDimension = 1 < msaa.Count + ? D3D11_DSV_DIMENSION_TEXTURE2DMS + : D3D11_DSV_DIMENSION_TEXTURE2D + ; + dsvDesc.Flags = 0; + dsvDesc.Texture2D.MipSlice = 0; + DX_CHECK(s_renderD3D11->m_device->CreateDepthStencilView(texture.m_ptr, &dsvDesc, &m_dsv) ); + } + break; - D3D11_DEPTH_STENCIL_VIEW_DESC dsvDesc; - dsvDesc.Format = s_textureFormat[texture.m_textureFormat].m_fmtDsv; - dsvDesc.ViewDimension = 1 < msaa.Count ? D3D11_DSV_DIMENSION_TEXTURE2DMS : D3D11_DSV_DIMENSION_TEXTURE2D; - dsvDesc.Flags = 0; - dsvDesc.Texture2D.MipSlice = 0; - DX_CHECK(s_renderD3D11->m_device->CreateDepthStencilView(texture.m_ptr, &dsvDesc, &m_dsv) ); + case TextureD3D11::TextureCube: + { + D3D11_DEPTH_STENCIL_VIEW_DESC dsvDesc; + dsvDesc.Format = s_textureFormat[texture.m_textureFormat].m_fmtDsv; + if (1 < msaa.Count) + { + dsvDesc.ViewDimension = D3D11_DSV_DIMENSION_TEXTURE2DMSARRAY; + dsvDesc.Texture2DMSArray.ArraySize = 1; + dsvDesc.Texture2DMSArray.FirstArraySlice = 0; + } + else + { + dsvDesc.ViewDimension = D3D11_DSV_DIMENSION_TEXTURE2DARRAY; + dsvDesc.Texture2DArray.ArraySize = 1; + dsvDesc.Texture2DArray.FirstArraySlice = 0; + dsvDesc.Texture2DArray.MipSlice = 0; + } + dsvDesc.Flags = 0; + DX_CHECK(s_renderD3D11->m_device->CreateDepthStencilView(texture.m_ptr, &dsvDesc, &m_dsv) ); + } + break; + } } else { - DX_CHECK(s_renderD3D11->m_device->CreateRenderTargetView(texture.m_ptr, NULL, &m_rtv[m_num]) ); + switch (texture.m_type) + { + default: + case TextureD3D11::Texture2D: + DX_CHECK(s_renderD3D11->m_device->CreateRenderTargetView(texture.m_ptr, NULL, &m_rtv[m_num]) ); + break; + + case TextureD3D11::TextureCube: + { + D3D11_RENDER_TARGET_VIEW_DESC desc; + desc.Format = s_textureFormat[texture.m_textureFormat].m_fmt; + if (1 < msaa.Count) + { + desc.ViewDimension = D3D11_RTV_DIMENSION_TEXTURE2DMSARRAY; + desc.Texture2DMSArray.ArraySize = 1; + desc.Texture2DMSArray.FirstArraySlice = 0; + } + else + { + desc.ViewDimension = D3D11_RTV_DIMENSION_TEXTURE2DARRAY; + desc.Texture2DArray.ArraySize = 1; + desc.Texture2DArray.FirstArraySlice = 0; + desc.Texture2DArray.MipSlice = 0; + } + DX_CHECK(s_renderD3D11->m_device->CreateRenderTargetView(texture.m_ptr, &desc, &m_rtv[m_num]) ); + } + break; + + case TextureD3D11::Texture3D: + { + D3D11_RENDER_TARGET_VIEW_DESC desc; + desc.Format = s_textureFormat[texture.m_textureFormat].m_fmt; + desc.ViewDimension = D3D11_RTV_DIMENSION_TEXTURE3D; + desc.Texture3D.MipSlice = 0; + desc.Texture3D.WSize = 1; + desc.Texture3D.FirstWSlice = 0; + DX_CHECK(s_renderD3D11->m_device->CreateRenderTargetView(texture.m_ptr, &desc, &m_rtv[m_num]) ); + } + break; + } + DX_CHECK(s_renderD3D11->m_device->CreateShaderResourceView(texture.m_ptr, NULL, &m_srv[m_num]) ); m_num++; } @@ -4450,6 +4590,11 @@ BX_PRAGMA_DIAGNOSTIC_POP(); uint16_t view = UINT16_MAX; FrameBufferHandle fbh = BGFX_INVALID_HANDLE; + BlitKey blitKey; + blitKey.decode(_render->m_blitKeys[0]); + uint16_t numBlitItems = _render->m_numBlitItems; + uint16_t blitItem = 0; + const uint64_t primType = _render->m_debug&BGFX_DEBUG_WIREFRAME ? BGFX_STATE_PT_LINES : 0; uint8_t primIndex = uint8_t(primType >> BGFX_STATE_PT_SHIFT); PrimInfo prim = s_primInfo[primIndex]; @@ -4583,6 +4728,75 @@ BX_PRAGMA_DIAGNOSTIC_POP(); clearQuad(_clearQuad, viewState.m_rect, clr, _render->m_colorPalette); prim = s_primInfo[BX_COUNTOF(s_primName)]; // Force primitive type update after clear quad. } + + for (; blitItem < numBlitItems && blitKey.m_view <= view; blitItem++) + { + const BlitItem& blit = _render->m_blitItem[blitItem]; + blitKey.decode(_render->m_blitKeys[blitItem+1]); + + const TextureD3D11& src = m_textures[blit.m_src.idx]; + const TextureD3D11& dst = m_textures[blit.m_dst.idx]; + + uint32_t srcWidth = bx::uint32_min(src.m_width, blit.m_srcX + blit.m_width) - blit.m_srcX; + uint32_t srcHeight = bx::uint32_min(src.m_height, blit.m_srcY + blit.m_height) - blit.m_srcY; + uint32_t srcDepth = bx::uint32_min(src.m_depth, blit.m_srcZ + blit.m_depth) - blit.m_srcZ; + uint32_t dstWidth = bx::uint32_min(dst.m_width, blit.m_dstX + blit.m_width) - blit.m_dstX; + uint32_t dstHeight = bx::uint32_min(dst.m_height, blit.m_dstY + blit.m_height) - blit.m_dstY; + uint32_t dstDepth = bx::uint32_min(dst.m_depth, blit.m_dstZ + blit.m_depth) - blit.m_dstZ; + uint32_t width = bx::uint32_min(srcWidth, dstWidth); + uint32_t height = bx::uint32_min(srcHeight, dstHeight); + uint32_t depth = bx::uint32_min(srcDepth, dstDepth); + + if (TextureD3D11::Texture3D == src.m_type) + { + D3D11_BOX box; + box.left = blit.m_srcX; + box.top = blit.m_srcY; + box.front = blit.m_srcZ; + box.right = blit.m_srcX + width; + box.bottom = blit.m_srcY + height;; + box.back = blit.m_srcZ + bx::uint32_imax(1, depth); + + deviceCtx->CopySubresourceRegion(dst.m_ptr + , blit.m_dstMip + , blit.m_dstX + , blit.m_dstY + , blit.m_dstZ + , src.m_ptr + , blit.m_srcMip + , &box + ); + } + else + { + D3D11_BOX box; + box.left = blit.m_srcX; + box.top = blit.m_srcY; + box.front = 0; + box.right = blit.m_srcX + width; + box.bottom = blit.m_srcY + height;; + box.back = 1; + + const uint32_t srcZ = TextureD3D11::TextureCube == src.m_type + ? blit.m_srcZ + : 0 + ; + const uint32_t dstZ = TextureD3D11::TextureCube == dst.m_type + ? blit.m_dstZ + : 0 + ; + + deviceCtx->CopySubresourceRegion(dst.m_ptr + , dstZ*dst.m_numMips+blit.m_dstMip + , blit.m_dstX + , blit.m_dstY + , 0 + , src.m_ptr + , srcZ*src.m_numMips+blit.m_srcMip + , &box + ); + } + } } if (isCompute) diff --git a/3rdparty/bgfx/src/renderer_d3d11.h b/3rdparty/bgfx/src/renderer_d3d11.h index d0560957f72..958e3d8c8b8 100644 --- a/3rdparty/bgfx/src/renderer_d3d11.h +++ b/3rdparty/bgfx/src/renderer_d3d11.h @@ -238,6 +238,9 @@ namespace bgfx { namespace d3d11 ID3D11ShaderResourceView* m_srv; ID3D11UnorderedAccessView* m_uav; uint32_t m_flags; + uint32_t m_width; + uint32_t m_height; + uint32_t m_depth; uint8_t m_type; uint8_t m_requestedFormat; uint8_t m_textureFormat; diff --git a/3rdparty/bgfx/src/renderer_d3d12.cpp b/3rdparty/bgfx/src/renderer_d3d12.cpp index 902eb8b4610..ce3d71bacde 100644 --- a/3rdparty/bgfx/src/renderer_d3d12.cpp +++ b/3rdparty/bgfx/src/renderer_d3d12.cpp @@ -457,7 +457,6 @@ namespace bgfx { namespace d3d12 { RendererContextD3D12() : m_wireframe(false) - , m_flags(BGFX_RESET_NONE) , m_maxAnisotropy(1) , m_fsChanges(0) , m_vsChanges(0) @@ -884,6 +883,8 @@ namespace bgfx { namespace d3d12 | BGFX_CAPS_COMPUTE | (m_options.ROVsSupported ? BGFX_CAPS_FRAGMENT_ORDERING : 0) // | BGFX_CAPS_SWAP_CHAIN + | BGFX_CAPS_TEXTURE_BLIT + | BGFX_CAPS_TEXTURE_READ_BACK ); g_caps.maxTextureSize = 16384; g_caps.maxFBAttachments = uint8_t(bx::uint32_min(16, BGFX_CONFIG_MAX_FRAME_BUFFER_ATTACHMENTS) ); @@ -907,10 +908,22 @@ namespace bgfx { namespace d3d12 { support |= 0 != (data.Support1 & (0 | D3D12_FORMAT_SUPPORT1_TEXTURE2D + ) ) + ? BGFX_CAPS_FORMAT_TEXTURE_2D + : BGFX_CAPS_FORMAT_TEXTURE_NONE + ; + + support |= 0 != (data.Support1 & (0 | D3D12_FORMAT_SUPPORT1_TEXTURE3D + ) ) + ? BGFX_CAPS_FORMAT_TEXTURE_3D + : BGFX_CAPS_FORMAT_TEXTURE_NONE + ; + + support |= 0 != (data.Support1 & (0 | D3D12_FORMAT_SUPPORT1_TEXTURECUBE ) ) - ? BGFX_CAPS_FORMAT_TEXTURE_COLOR + ? BGFX_CAPS_FORMAT_TEXTURE_CUBE : BGFX_CAPS_FORMAT_TEXTURE_NONE ; @@ -992,10 +1005,22 @@ namespace bgfx { namespace d3d12 { support |= 0 != (data.Support1 & (0 | D3D12_FORMAT_SUPPORT1_TEXTURE2D + ) ) + ? BGFX_CAPS_FORMAT_TEXTURE_2D_SRGB + : BGFX_CAPS_FORMAT_TEXTURE_NONE + ; + + support |= 0 != (data.Support1 & (0 | D3D12_FORMAT_SUPPORT1_TEXTURE3D + ) ) + ? BGFX_CAPS_FORMAT_TEXTURE_3D_SRGB + : BGFX_CAPS_FORMAT_TEXTURE_NONE + ; + + support |= 0 != (data.Support1 & (0 | D3D12_FORMAT_SUPPORT1_TEXTURECUBE ) ) - ? BGFX_CAPS_FORMAT_TEXTURE_COLOR_SRGB + ? BGFX_CAPS_FORMAT_TEXTURE_CUBE_SRGB : BGFX_CAPS_FORMAT_TEXTURE_NONE ; } @@ -1120,7 +1145,7 @@ namespace bgfx { namespace d3d12 int64_t start = bx::getHPCounter(); HRESULT hr = 0; - uint32_t syncInterval = !!(m_flags & BGFX_RESET_VSYNC); + uint32_t syncInterval = !!(m_resolution.m_flags & BGFX_RESET_VSYNC); uint32_t flags = 0 == syncInterval ? DXGI_PRESENT_RESTART : 0; for (uint32_t ii = 1, num = m_numWindows; ii < num && SUCCEEDED(hr); ++ii) { @@ -1249,6 +1274,65 @@ namespace bgfx { namespace d3d12 { } + void readTexture(TextureHandle _handle, void* _data) BX_OVERRIDE + { + const TextureD3D12& texture = m_textures[_handle.idx]; + + D3D12_RESOURCE_DESC desc = texture.m_ptr->GetDesc(); + + D3D12_PLACED_SUBRESOURCE_FOOTPRINT layout; + uint32_t numRows; + uint64_t total; + uint64_t srcPitch; + m_device->GetCopyableFootprints(&desc + , 0 + , 1 + , 0 + , &layout + , &numRows + , &srcPitch + , &total + ); + + ID3D12Resource* readback = createCommittedResource(m_device, HeapProperty::ReadBack, total); + + D3D12_BOX box; + box.left = 0; + box.top = 0; + box.right = texture.m_width; + box.bottom = texture.m_height; + box.front = 0; + box.back = 1; + + D3D12_TEXTURE_COPY_LOCATION dstLocation = { readback, D3D12_TEXTURE_COPY_TYPE_PLACED_FOOTPRINT, { layout } }; + D3D12_TEXTURE_COPY_LOCATION srcLocation = { texture.m_ptr, D3D12_TEXTURE_COPY_TYPE_SUBRESOURCE_INDEX, {} }; + m_commandList->CopyTextureRegion(&dstLocation, 0, 0, 0, &srcLocation, &box); + + finish(); + m_commandList = m_cmd.alloc(); + + uint8_t* src; + readback->Map(0, NULL, (void**)&src); + + const uint8_t bpp = getBitsPerPixel(TextureFormat::Enum(texture.m_textureFormat) ); + uint8_t* dst = (uint8_t*)_data; + uint32_t dstPitch = texture.m_width*bpp/8; + + uint32_t pitch = bx::uint32_min(uint32_t(srcPitch), dstPitch); + + for (uint32_t yy = 0, height = texture.m_height; yy < height; ++yy) + { + memcpy(dst, src, pitch); + + src += srcPitch; + dst += dstPitch; + } + + readback->Unmap(0, NULL); + + DX_RELEASE(readback, 0); + } + void resizeTexture(TextureHandle _handle, uint16_t _width, uint16_t _height) BX_OVERRIDE { TextureD3D12& texture = m_textures[_handle.idx]; @@ -1638,17 +1722,22 @@ data.NumQualityLevels = 0; m_maxAnisotropy = 1; } - if ( (uint32_t)m_scd.BufferDesc.Width != _resolution.m_width - || (uint32_t)m_scd.BufferDesc.Height != _resolution.m_height - || m_flags != _resolution.m_flags) + uint32_t flags = _resolution.m_flags & ~(BGFX_RESET_HMD_RECENTER | BGFX_RESET_MAXANISOTROPY); + + if (m_resolution.m_width != _resolution.m_width + || m_resolution.m_height != _resolution.m_height + || m_resolution.m_flags != flags) { - bool resize = (m_flags&BGFX_RESET_MSAA_MASK) == (_resolution.m_flags&BGFX_RESET_MSAA_MASK); - m_flags = _resolution.m_flags; + flags &= ~BGFX_RESET_FORCE; + + bool resize = (m_resolution.m_flags&BGFX_RESET_MSAA_MASK) == (_resolution.m_flags&BGFX_RESET_MSAA_MASK); + + m_resolution = _resolution; + m_resolution.m_flags = flags; m_textVideoMem.resize(false, _resolution.m_width, _resolution.m_height); m_textVideoMem.clear(); - m_resolution = _resolution; m_scd.BufferDesc.Width = _resolution.m_width; m_scd.BufferDesc.Height = _resolution.m_height; @@ -1673,7 +1762,7 @@ data.NumQualityLevels = 0; else { updateMsaa(); - m_scd.SampleDesc = s_msaa[(m_flags&BGFX_RESET_MSAA_MASK)>>BGFX_RESET_MSAA_SHIFT]; + m_scd.SampleDesc = s_msaa[(m_resolution.m_flags&BGFX_RESET_MSAA_MASK)>>BGFX_RESET_MSAA_SHIFT]; DX_RELEASE(m_swapChain, 0); @@ -2532,7 +2621,6 @@ data.NumQualityLevels = 0; bool m_wireframe; DXGI_SWAP_CHAIN_DESC m_scd; - uint32_t m_flags; uint32_t m_maxAnisotropy; BufferD3D12 m_indexBuffers[BGFX_CONFIG_MAX_INDEX_BUFFERS]; @@ -2625,20 +2713,19 @@ data.NumQualityLevels = 0; void* ScratchBufferD3D12::allocCbv(D3D12_GPU_VIRTUAL_ADDRESS& _gpuAddress, uint32_t _size) { _gpuAddress = m_gpuVA + m_pos; - D3D12_CONSTANT_BUFFER_VIEW_DESC desc; - desc.BufferLocation = _gpuAddress; - desc.SizeInBytes = _size; - void* data = &m_data[m_pos]; m_pos += BX_ALIGN_256(_size); - ID3D12Device* device = s_renderD3D12->m_device; - device->CreateConstantBufferView(&desc - , m_cpuHandle - ); - m_cpuHandle.ptr += m_incrementSize; - m_gpuHandle.ptr += m_incrementSize; +// D3D12_CONSTANT_BUFFER_VIEW_DESC desc; +// desc.BufferLocation = _gpuAddress; +// desc.SizeInBytes = _size; +// ID3D12Device* device = s_renderD3D12->m_device; +// device->CreateConstantBufferView(&desc +// , m_cpuHandle +// ); +// m_cpuHandle.ptr += m_incrementSize; +// m_gpuHandle.ptr += m_incrementSize; return data; } @@ -3641,7 +3728,10 @@ data.NumQualityLevels = 0; const uint32_t textureWidth = bx::uint32_max(blockInfo.blockWidth, imageContainer.m_width >>startLod); const uint32_t textureHeight = bx::uint32_max(blockInfo.blockHeight, imageContainer.m_height>>startLod); - m_flags = _flags; + m_flags = _flags; + m_width = textureWidth; + m_height = textureHeight; + m_depth = imageContainer.m_depth; m_requestedFormat = (uint8_t)imageContainer.m_format; m_textureFormat = (uint8_t)imageContainer.m_format; @@ -4273,12 +4363,19 @@ data.NumQualityLevels = 0; uint16_t currentSamplerStateIdx = invalidHandle; uint16_t currentProgramIdx = invalidHandle; + uint32_t currentBindHash = 0; bool hasPredefined = false; - uint32_t currentBindHash = 0; + bool commandListChanged = false; ID3D12PipelineState* currentPso = NULL; SortKey key; uint16_t view = UINT16_MAX; FrameBufferHandle fbh = BGFX_INVALID_HANDLE; + + BlitKey blitKey; + blitKey.decode(_render->m_blitKeys[0]); + uint16_t numBlitItems = _render->m_numBlitItems; + uint16_t blitItem = 0; + uint32_t blendFactor = 0; const uint64_t primType = _render->m_debug&BGFX_DEBUG_WIREFRAME ? BGFX_STATE_PT_LINES : 0; @@ -4384,6 +4481,75 @@ data.NumQualityLevels = 0; } prim = s_primInfo[BX_COUNTOF(s_primName)]; // Force primitive type update. + + for (; blitItem < numBlitItems && blitKey.m_view <= view; blitItem++) + { + const BlitItem& blit = _render->m_blitItem[blitItem]; + blitKey.decode(_render->m_blitKeys[blitItem+1]); + + const TextureD3D12& src = m_textures[blit.m_src.idx]; + const TextureD3D12& dst = m_textures[blit.m_dst.idx]; + + uint32_t srcWidth = bx::uint32_min(src.m_width, blit.m_srcX + blit.m_width) - blit.m_srcX; + uint32_t srcHeight = bx::uint32_min(src.m_height, blit.m_srcY + blit.m_height) - blit.m_srcY; + uint32_t srcDepth = bx::uint32_min(src.m_depth, blit.m_srcZ + blit.m_depth) - blit.m_srcZ; + uint32_t dstWidth = bx::uint32_min(dst.m_width, blit.m_dstX + blit.m_width) - blit.m_dstX; + uint32_t dstHeight = bx::uint32_min(dst.m_height, blit.m_dstY + blit.m_height) - blit.m_dstY; + uint32_t dstDepth = bx::uint32_min(dst.m_depth, blit.m_dstZ + blit.m_depth) - blit.m_dstZ; + uint32_t width = bx::uint32_min(srcWidth, dstWidth); + uint32_t height = bx::uint32_min(srcHeight, dstHeight); + uint32_t depth = bx::uint32_min(srcDepth, dstDepth); + + if (TextureD3D12::Texture3D == src.m_type) + { + D3D12_BOX box; + box.left = blit.m_srcX; + box.top = blit.m_srcY; + box.front = blit.m_srcZ; + box.right = blit.m_srcX + width; + box.bottom = blit.m_srcY + height;; + box.back = blit.m_srcZ + bx::uint32_imax(1, depth); + + D3D12_TEXTURE_COPY_LOCATION dstLocation = { dst.m_ptr, D3D12_TEXTURE_COPY_TYPE_SUBRESOURCE_INDEX, { 0 } }; + D3D12_TEXTURE_COPY_LOCATION srcLocation = { src.m_ptr, D3D12_TEXTURE_COPY_TYPE_SUBRESOURCE_INDEX, { 0 } }; + m_commandList->CopyTextureRegion(&dstLocation + , blit.m_dstX + , blit.m_dstY + , blit.m_dstZ + , &srcLocation + , &box + ); + } + else + { + D3D12_BOX box; + box.left = blit.m_srcX; + box.top = blit.m_srcY; + box.front = 0; + box.right = blit.m_srcX + width; + box.bottom = blit.m_srcY + height;; + box.back = 1; + + const uint32_t srcZ = TextureD3D12::TextureCube == src.m_type + ? blit.m_srcZ + : 0 + ; + const uint32_t dstZ = TextureD3D12::TextureCube == dst.m_type + ? blit.m_dstZ + : 0 + ; + + D3D12_TEXTURE_COPY_LOCATION dstLocation = { dst.m_ptr, D3D12_TEXTURE_COPY_TYPE_SUBRESOURCE_INDEX, { dstZ*dst.m_numMips+blit.m_dstMip } }; + D3D12_TEXTURE_COPY_LOCATION srcLocation = { src.m_ptr, D3D12_TEXTURE_COPY_TYPE_SUBRESOURCE_INDEX, { srcZ*src.m_numMips+blit.m_srcMip } }; + m_commandList->CopyTextureRegion(&dstLocation + , blit.m_dstX + , blit.m_dstY + , 0 + , &srcLocation + , &box + ); + } + } } if (isCompute) @@ -4577,8 +4743,12 @@ data.NumQualityLevels = 0; // PIX_BEGINEVENT(D3DCOLOR_RGBA(0xff, 0x00, 0x00, 0xff), viewNameW); } - currentSamplerStateIdx = invalidHandle; - currentProgramIdx = invalidHandle; + commandListChanged = true; + } + + if (commandListChanged) + { + commandListChanged = false; m_commandList->SetGraphicsRootSignature(m_rootSignature); ID3D12DescriptorHeap* heaps[] = { @@ -4587,6 +4757,10 @@ data.NumQualityLevels = 0; }; m_commandList->SetDescriptorHeaps(BX_COUNTOF(heaps), heaps); + currentPso = NULL; + currentBindHash = 0; + currentSamplerStateIdx = invalidHandle; + currentProgramIdx = invalidHandle; currentState.clear(); currentState.m_scissor = !draw.m_scissor; changedFlags = BGFX_STATE_MASK; diff --git a/3rdparty/bgfx/src/renderer_d3d12.h b/3rdparty/bgfx/src/renderer_d3d12.h index 00f9a17f89a..bf03858375a 100644 --- a/3rdparty/bgfx/src/renderer_d3d12.h +++ b/3rdparty/bgfx/src/renderer_d3d12.h @@ -272,6 +272,9 @@ namespace bgfx { namespace d3d12 ID3D12Resource* m_ptr; D3D12_RESOURCE_STATES m_state; uint32_t m_flags; + uint32_t m_width; + uint32_t m_height; + uint32_t m_depth; uint16_t m_samplerIdx; uint8_t m_type; uint8_t m_requestedFormat; @@ -341,9 +344,9 @@ namespace bgfx { namespace d3d12 uint64_t m_currentFence; uint64_t m_completedFence; ID3D12Fence* m_fence; - CommandList m_commandList[32]; + CommandList m_commandList[256]; typedef stl::vector<ID3D12Resource*> ResourceArray; - ResourceArray m_release[32]; + ResourceArray m_release[256]; bx::RingBufferControl m_control; }; diff --git a/3rdparty/bgfx/src/renderer_d3d9.cpp b/3rdparty/bgfx/src/renderer_d3d9.cpp index d14956ab49d..63423aa6a2b 100644 --- a/3rdparty/bgfx/src/renderer_d3d9.cpp +++ b/3rdparty/bgfx/src/renderer_d3d9.cpp @@ -258,13 +258,11 @@ namespace bgfx { namespace d3d9 { D3DFMT_RAWZ, D3DUSAGE_DEPTHSTENCIL, D3DRTYPE_SURFACE, false }, }; -#if BGFX_CONFIG_RENDERER_DIRECT3D9EX static const GUID IID_IDirect3D9 = { 0x81bdcbca, 0x64d4, 0x426d, { 0xae, 0x8d, 0xad, 0x1, 0x47, 0xf4, 0x27, 0x5c } }; static const GUID IID_IDirect3DDevice9Ex = { 0xb18b10ce, 0x2649, 0x405a, { 0x87, 0xf, 0x95, 0xf7, 0x77, 0xd4, 0x31, 0x3a } }; typedef HRESULT (WINAPI *Direct3DCreate9ExFn)(UINT SDKVersion, IDirect3D9Ex**); static Direct3DCreate9ExFn Direct3DCreate9Ex; -#endif // BGFX_CONFIG_RENDERER_DIRECT3D9EX typedef IDirect3D9* (WINAPI *Direct3DCreate9Fn)(UINT SDKVersion); static Direct3DCreate9Fn Direct3DCreate9; static PFN_D3DPERF_SET_MARKER D3DPERF_SetMarker; @@ -281,7 +279,6 @@ namespace bgfx { namespace d3d9 , m_captureTexture(NULL) , m_captureSurface(NULL) , m_captureResolve(NULL) - , m_flags(BGFX_RESET_NONE) , m_maxAnisotropy(1) , m_initialized(false) , m_amd(false) @@ -362,18 +359,19 @@ namespace bgfx { namespace d3d9 , "Failed to initialize PIX events." ); } -#if BGFX_CONFIG_RENDERER_DIRECT3D9EX - m_d3d9ex = NULL; + + m_d3d9ex = NULL; + m_deviceEx = NULL; Direct3DCreate9Ex = (Direct3DCreate9ExFn)bx::dlsym(m_d3d9dll, "Direct3DCreate9Ex"); - if (NULL != Direct3DCreate9Ex) + if (BX_ENABLED(BGFX_CONFIG_RENDERER_DIRECT3D9EX) + && NULL != Direct3DCreate9Ex) { Direct3DCreate9Ex(D3D_SDK_VERSION, &m_d3d9ex); DX_CHECK(m_d3d9ex->QueryInterface(IID_IDirect3D9, (void**)&m_d3d9) ); m_pool = D3DPOOL_DEFAULT; } else -#endif // BGFX_CONFIG_RENDERER_DIRECT3D9EX { Direct3DCreate9 = (Direct3DCreate9Fn)bx::dlsym(m_d3d9dll, "Direct3DCreate9"); BX_WARN(NULL != Direct3DCreate9, "Function Direct3DCreate9 not found."); @@ -461,24 +459,29 @@ namespace bgfx { namespace d3d9 for (uint32_t ii = 0; ii < BX_COUNTOF(behaviorFlags) && NULL == m_device; ++ii) { -#if 0 // BGFX_CONFIG_RENDERER_DIRECT3D9EX - DX_CHECK(m_d3d9->CreateDeviceEx(m_adapter - , m_deviceType - , g_platformHooks.nwh - , behaviorFlags[ii] - , &m_params - , NULL - , &m_device - ) ); -#else - DX_CHECK(m_d3d9->CreateDevice(m_adapter - , m_deviceType - , (HWND)g_platformData.nwh - , behaviorFlags[ii] - , &m_params - , &m_device - )); -#endif // BGFX_CONFIG_RENDERER_DIRECT3D9EX + if (NULL != m_d3d9ex) + { + DX_CHECK(m_d3d9ex->CreateDeviceEx(m_adapter + , m_deviceType + , (HWND)g_platformData.nwh + , behaviorFlags[ii] + , &m_params + , NULL + , &m_deviceEx + ) ); + + m_device = m_deviceEx; + } + else + { + DX_CHECK(m_d3d9->CreateDevice(m_adapter + , m_deviceType + , (HWND)g_platformData.nwh + , behaviorFlags[ii] + , &m_params + , &m_device + ) ); + } } } @@ -493,12 +496,10 @@ namespace bgfx { namespace d3d9 m_numWindows = 1; -#if BGFX_CONFIG_RENDERER_DIRECT3D9EX if (NULL != m_d3d9ex) { DX_CHECK(m_device->QueryInterface(IID_IDirect3DDevice9Ex, (void**)&m_deviceEx) ); } -#endif // BGFX_CONFIG_RENDERER_DIRECT3D9EX DX_CHECK(m_device->GetDeviceCaps(&m_caps) ); @@ -528,14 +529,16 @@ namespace bgfx { namespace d3d9 BX_TRACE("Max vertex index: %d", m_caps.MaxVertexIndex); g_caps.supported |= ( 0 - | BGFX_CAPS_TEXTURE_3D - | BGFX_CAPS_TEXTURE_COMPARE_LEQUAL - | BGFX_CAPS_VERTEX_ATTRIB_HALF - | BGFX_CAPS_VERTEX_ATTRIB_UINT10 - | BGFX_CAPS_FRAGMENT_DEPTH - | BGFX_CAPS_SWAP_CHAIN - | ( (UINT16_MAX < m_caps.MaxVertexIndex) ? BGFX_CAPS_INDEX32 : 0) - ); + | BGFX_CAPS_TEXTURE_3D + | BGFX_CAPS_TEXTURE_COMPARE_LEQUAL + | BGFX_CAPS_VERTEX_ATTRIB_HALF + | BGFX_CAPS_VERTEX_ATTRIB_UINT10 + | BGFX_CAPS_FRAGMENT_DEPTH + | BGFX_CAPS_SWAP_CHAIN + | ( (UINT16_MAX < m_caps.MaxVertexIndex) ? BGFX_CAPS_INDEX32 : 0) + | ( (m_caps.DevCaps2 & D3DDEVCAPS2_CAN_STRETCHRECT_FROM_TEXTURES) ? BGFX_CAPS_TEXTURE_BLIT : 0) + | BGFX_CAPS_TEXTURE_READ_BACK + ); g_caps.maxTextureSize = uint16_t(bx::uint32_min(m_caps.MaxTextureWidth, m_caps.MaxTextureHeight) ); // g_caps.maxVertexIndex = m_caps.MaxVertexIndex; @@ -580,13 +583,15 @@ namespace bgfx { namespace d3d9 for (uint32_t ii = 0; ii < TextureFormat::Count; ++ii) { - uint8_t support = SUCCEEDED(m_d3d9->CheckDeviceFormat(m_adapter + uint8_t support = 0; + + support |= SUCCEEDED(m_d3d9->CheckDeviceFormat(m_adapter , m_deviceType , adapterFormat , 0 , D3DRTYPE_TEXTURE , s_textureFormat[ii].m_fmt - ) ) ? BGFX_CAPS_FORMAT_TEXTURE_COLOR : BGFX_CAPS_FORMAT_TEXTURE_NONE; + ) ) ? BGFX_CAPS_FORMAT_TEXTURE_2D : BGFX_CAPS_FORMAT_TEXTURE_NONE; support |= SUCCEEDED(m_d3d9->CheckDeviceFormat(m_adapter , m_deviceType @@ -594,7 +599,39 @@ namespace bgfx { namespace d3d9 , D3DUSAGE_QUERY_SRGBREAD , D3DRTYPE_TEXTURE , s_textureFormat[ii].m_fmt - ) ) ? BGFX_CAPS_FORMAT_TEXTURE_COLOR_SRGB : BGFX_CAPS_FORMAT_TEXTURE_NONE; + ) ) ? BGFX_CAPS_FORMAT_TEXTURE_2D_SRGB : BGFX_CAPS_FORMAT_TEXTURE_NONE; + + support |= SUCCEEDED(m_d3d9->CheckDeviceFormat(m_adapter + , m_deviceType + , adapterFormat + , 0 + , D3DRTYPE_VOLUMETEXTURE + , s_textureFormat[ii].m_fmt + ) ) ? BGFX_CAPS_FORMAT_TEXTURE_3D : BGFX_CAPS_FORMAT_TEXTURE_NONE; + + support |= SUCCEEDED(m_d3d9->CheckDeviceFormat(m_adapter + , m_deviceType + , adapterFormat + , D3DUSAGE_QUERY_SRGBREAD + , D3DRTYPE_VOLUMETEXTURE + , s_textureFormat[ii].m_fmt + ) ) ? BGFX_CAPS_FORMAT_TEXTURE_3D_SRGB : BGFX_CAPS_FORMAT_TEXTURE_NONE; + + support |= SUCCEEDED(m_d3d9->CheckDeviceFormat(m_adapter + , m_deviceType + , adapterFormat + , 0 + , D3DRTYPE_CUBETEXTURE + , s_textureFormat[ii].m_fmt + ) ) ? BGFX_CAPS_FORMAT_TEXTURE_CUBE : BGFX_CAPS_FORMAT_TEXTURE_NONE; + + support |= SUCCEEDED(m_d3d9->CheckDeviceFormat(m_adapter + , m_deviceType + , adapterFormat + , D3DUSAGE_QUERY_SRGBREAD + , D3DRTYPE_CUBETEXTURE + , s_textureFormat[ii].m_fmt + ) ) ? BGFX_CAPS_FORMAT_TEXTURE_CUBE_SRGB : BGFX_CAPS_FORMAT_TEXTURE_NONE; support |= SUCCEEDED(m_d3d9->CheckDeviceFormat(m_adapter , m_deviceType @@ -690,6 +727,17 @@ namespace bgfx { namespace d3d9 mbstowcs(s_viewNameW[ii], name, BGFX_CONFIG_MAX_VIEW_NAME_RESERVED); } + if (NULL != m_deviceEx) + { + int32_t gpuPriority; + DX_CHECK(m_deviceEx->GetGPUThreadPriority(&gpuPriority) ); + BX_TRACE("GPU thread priority: %d", gpuPriority); + + uint32_t maxLatency; + DX_CHECK(m_deviceEx->GetMaximumFrameLatency(&maxLatency) ); + BX_TRACE("GPU max frame latency: %d", maxLatency); + } + postReset(); m_initialized = true; @@ -700,27 +748,23 @@ namespace bgfx { namespace d3d9 switch (errorState) { case ErrorState::CreatedDevice: -#if BGFX_CONFIG_RENDERER_DIRECT3D9EX if (NULL != m_d3d9ex) { DX_RELEASE(m_deviceEx, 1); DX_RELEASE(m_device, 0); } else -#endif // BGFX_CONFIG_RENDERER_DIRECT3D9EX { DX_RELEASE(m_device, 0); } case ErrorState::CreatedD3D9: -#if BGFX_CONFIG_RENDERER_DIRECT3D9EX if (NULL != m_d3d9ex) { DX_RELEASE(m_d3d9, 1); DX_RELEASE(m_d3d9ex, 0); } else -#endif // BGFX_CONFIG_RENDERER_DIRECT3D9EX { DX_RELEASE(m_d3d9, 0); } @@ -766,7 +810,6 @@ namespace bgfx { namespace d3d9 m_vertexDecls[ii].destroy(); } -#if BGFX_CONFIG_RENDERER_DIRECT3D9EX if (NULL != m_d3d9ex) { DX_RELEASE(m_deviceEx, 1); @@ -775,7 +818,6 @@ namespace bgfx { namespace d3d9 DX_RELEASE(m_d3d9ex, 0); } else -#endif // BGFX_CONFIG_RENDERER_DIRECT3D9EX { DX_RELEASE(m_device, 0); DX_RELEASE(m_d3d9, 0); @@ -795,6 +837,11 @@ namespace bgfx { namespace d3d9 const char* getRendererName() const BX_OVERRIDE { + if (NULL != m_d3d9ex) + { + return BGFX_RENDERER_DIRECT3D9_NAME " Ex"; + } + return BGFX_RENDERER_DIRECT3D9_NAME; } @@ -901,6 +948,37 @@ namespace bgfx { namespace d3d9 m_updateTexture = NULL; } + void readTexture(TextureHandle _handle, void* _data) BX_OVERRIDE + { + TextureD3D9& texture = m_textures[_handle.idx]; + + D3DLOCKED_RECT lockedRect; + DX_CHECK(texture.m_texture2d->LockRect(0 + , &lockedRect + , NULL + , D3DLOCK_NO_DIRTY_UPDATE|D3DLOCK_NOSYSLOCK|D3DLOCK_READONLY + ) ); + + uint32_t srcPitch = lockedRect.Pitch; + uint8_t* src = (uint8_t*)lockedRect.pBits; + + const uint8_t bpp = getBitsPerPixel(TextureFormat::Enum(texture.m_textureFormat) ); + uint8_t* dst = (uint8_t*)_data; + uint32_t dstPitch = texture.m_width*bpp/8; + + uint32_t pitch = bx::uint32_min(srcPitch, dstPitch); + + for (uint32_t yy = 0, height = texture.m_height; yy < height; ++yy) + { + memcpy(dst, src, pitch); + + src += srcPitch; + dst += dstPitch; + } + + DX_CHECK(texture.m_texture2d->UnlockRect(0) ); + } + void resizeTexture(TextureHandle _handle, uint16_t _width, uint16_t _height) BX_OVERRIDE { TextureD3D9& texture = m_textures[_handle.idx]; @@ -1141,11 +1219,14 @@ namespace bgfx { namespace d3d9 ; uint32_t flags = _resolution.m_flags & ~(BGFX_RESET_HMD_RECENTER | BGFX_RESET_MAXANISOTROPY); - if (m_params.BackBufferWidth != _resolution.m_width - || m_params.BackBufferHeight != _resolution.m_height - || m_flags != flags) + if (m_resolution.m_width != _resolution.m_width + || m_resolution.m_height != _resolution.m_height + || m_resolution.m_flags != flags) { - m_flags = flags; + flags &= ~BGFX_RESET_FORCE; + + m_resolution = _resolution; + m_resolution.m_flags = flags; m_textVideoMem.resize(false, _resolution.m_width, _resolution.m_height); m_textVideoMem.clear(); @@ -1162,17 +1243,15 @@ namespace bgfx { namespace d3d9 m_params.BackBufferWidth = _resolution.m_width; m_params.BackBufferHeight = _resolution.m_height; - m_params.FullScreen_RefreshRateInHz = BGFX_RESET_FULLSCREEN == (m_flags&BGFX_RESET_FULLSCREEN_MASK) ? 60 : 0; - m_params.PresentationInterval = !!(m_flags&BGFX_RESET_VSYNC) ? D3DPRESENT_INTERVAL_ONE : D3DPRESENT_INTERVAL_IMMEDIATE; + m_params.FullScreen_RefreshRateInHz = BGFX_RESET_FULLSCREEN == (m_resolution.m_flags&BGFX_RESET_FULLSCREEN_MASK) ? 60 : 0; + m_params.PresentationInterval = !!(m_resolution.m_flags&BGFX_RESET_VSYNC) ? D3DPRESENT_INTERVAL_ONE : D3DPRESENT_INTERVAL_IMMEDIATE; updateMsaa(); - Msaa& msaa = s_msaa[(m_flags&BGFX_RESET_MSAA_MASK)>>BGFX_RESET_MSAA_SHIFT]; + Msaa& msaa = s_msaa[(m_resolution.m_flags&BGFX_RESET_MSAA_MASK)>>BGFX_RESET_MSAA_SHIFT]; m_params.MultiSampleType = msaa.m_type; m_params.MultiSampleQuality = msaa.m_quality; - m_resolution = _resolution; - preReset(); DX_CHECK(m_device->Reset(&m_params) ); postReset(); @@ -1198,7 +1277,7 @@ namespace bgfx { namespace d3d9 } DX_CHECK(m_device->SetDepthStencilSurface(m_backBufferDepthStencil) ); - DX_CHECK(m_device->SetRenderState(D3DRS_SRGBWRITEENABLE, 0 != (m_flags & BGFX_RESET_SRGB_BACKBUFFER) ) ); + DX_CHECK(m_device->SetRenderState(D3DRS_SRGBWRITEENABLE, 0 != (m_resolution.m_flags & BGFX_RESET_SRGB_BACKBUFFER) ) ); } else { @@ -1279,12 +1358,10 @@ namespace bgfx { namespace d3d9 { if (NULL != m_swapChain) { -#if BGFX_CONFIG_RENDERER_DIRECT3D9EX if (NULL != m_deviceEx) { DX_CHECK(m_deviceEx->WaitForVBlank(0) ); } -#endif // BGFX_CONFIG_RENDERER_DIRECT3D9EX for (uint32_t ii = 0, num = m_numWindows; ii < num; ++ii) { @@ -1481,7 +1558,7 @@ namespace bgfx { namespace d3d9 void capturePostReset() { - if (m_flags&BGFX_RESET_CAPTURE) + if (m_resolution.m_flags&BGFX_RESET_CAPTURE) { uint32_t width = m_params.BackBufferWidth; uint32_t height = m_params.BackBufferHeight; @@ -1857,10 +1934,8 @@ namespace bgfx { namespace d3d9 D3DCAPS9 m_caps; #endif // BX_PLATFORM_WINDOWS -#if BGFX_CONFIG_RENDERER_DIRECT3D9EX IDirect3D9Ex* m_d3d9ex; IDirect3DDevice9Ex* m_deviceEx; -#endif // BGFX_CONFIG_RENDERER_DIRECT3D9EX IDirect3D9* m_d3d9; IDirect3DDevice9* m_device; @@ -1885,7 +1960,6 @@ namespace bgfx { namespace d3d9 uint32_t m_adapter; D3DDEVTYPE m_deviceType; D3DPRESENT_PARAMETERS m_params; - uint32_t m_flags; uint32_t m_maxAnisotropy; D3DADAPTER_IDENTIFIER9 m_identifier; Resolution m_resolution; @@ -2290,27 +2364,31 @@ namespace bgfx { namespace d3d9 void TextureD3D9::createTexture(uint32_t _width, uint32_t _height, uint8_t _numMips) { - m_width = (uint16_t)_width; - m_height = (uint16_t)_height; - m_numMips = _numMips; m_type = Texture2D; const TextureFormat::Enum fmt = (TextureFormat::Enum)m_textureFormat; DWORD usage = 0; - D3DPOOL pool = s_renderD3D9->m_pool; + D3DPOOL pool = D3DPOOL_DEFAULT; const bool renderTarget = 0 != (m_flags&BGFX_TEXTURE_RT_MASK); + const bool blit = 0 != (m_flags&BGFX_TEXTURE_BLIT_DST); + const bool readBack = 0 != (m_flags&BGFX_TEXTURE_READ_BACK); if (isDepth(fmt) ) { usage = D3DUSAGE_DEPTHSTENCIL; - pool = D3DPOOL_DEFAULT; } - else if (renderTarget) + else if (readBack) + { + usage = 0; + pool = D3DPOOL_SYSTEMMEM; + } + else if (renderTarget || blit) { usage = D3DUSAGE_RENDERTARGET; - pool = D3DPOOL_DEFAULT; } + IDirect3DDevice9* device = s_renderD3D9->m_device; + if (renderTarget) { uint32_t msaaQuality = ( (m_flags&BGFX_TEXTURE_RT_MSAA_MASK)>>BGFX_TEXTURE_RT_MSAA_SHIFT); @@ -2325,7 +2403,7 @@ namespace bgfx { namespace d3d9 if (isDepth(fmt) ) { - DX_CHECK(s_renderD3D9->m_device->CreateDepthStencilSurface( + DX_CHECK(device->CreateDepthStencilSurface( m_width , m_height , s_textureFormat[m_textureFormat].m_fmt @@ -2338,7 +2416,7 @@ namespace bgfx { namespace d3d9 } else { - DX_CHECK(s_renderD3D9->m_device->CreateRenderTarget( + DX_CHECK(device->CreateRenderTarget( m_width , m_height , s_textureFormat[m_textureFormat].m_fmt @@ -2359,7 +2437,7 @@ namespace bgfx { namespace d3d9 } } - DX_CHECK(s_renderD3D9->m_device->CreateTexture(_width + DX_CHECK(device->CreateTexture(_width , _height , _numMips , usage @@ -2369,6 +2447,28 @@ namespace bgfx { namespace d3d9 , NULL ) ); + if (!renderTarget + && !readBack) + { + if (NULL == m_staging) + { + DX_CHECK(device->CreateTexture(_width + , _height + , _numMips + , 0 + , s_textureFormat[fmt].m_fmt + , D3DPOOL_SYSTEMMEM + , &m_staging2d + , NULL + ) ); + } + else + { + DX_CHECK(m_staging2d->AddDirtyRect(NULL)); + DX_CHECK(device->UpdateTexture(m_staging2d, m_texture2d)); + } + } + BGFX_FATAL(NULL != m_texture2d, Fatal::UnableToCreateTexture, "Failed to create texture (size: %dx%d, mips: %d, fmt: %d)." , _width , _height @@ -2377,22 +2477,42 @@ namespace bgfx { namespace d3d9 ); } - void TextureD3D9::createVolumeTexture(uint32_t _width, uint32_t _height, uint32_t _depth, uint32_t _numMips) + void TextureD3D9::createVolumeTexture(uint32_t _width, uint32_t _height, uint32_t _depth, uint8_t _numMips) { m_type = Texture3D; const TextureFormat::Enum fmt = (TextureFormat::Enum)m_textureFormat; - DX_CHECK(s_renderD3D9->m_device->CreateVolumeTexture(_width + IDirect3DDevice9* device = s_renderD3D9->m_device; + DX_CHECK(device->CreateVolumeTexture(_width , _height , _depth , _numMips , 0 , s_textureFormat[fmt].m_fmt - , s_renderD3D9->m_pool + , D3DPOOL_DEFAULT , &m_texture3d , NULL ) ); + if (NULL == m_staging) + { + DX_CHECK(device->CreateVolumeTexture(_width + , _height + , _depth + , _numMips + , 0 + , s_textureFormat[fmt].m_fmt + , D3DPOOL_SYSTEMMEM + , &m_staging3d + , NULL + ) ); + } + else + { + DX_CHECK(m_staging3d->AddDirtyBox(NULL) ); + DX_CHECK(device->UpdateTexture(m_staging3d, m_texture3d) ); + } + BGFX_FATAL(NULL != m_texture3d, Fatal::UnableToCreateTexture, "Failed to create volume texture (size: %dx%dx%d, mips: %d, fmt: %s)." , _width , _height @@ -2402,22 +2522,59 @@ namespace bgfx { namespace d3d9 ); } - void TextureD3D9::createCubeTexture(uint32_t _edge, uint32_t _numMips) + void TextureD3D9::createCubeTexture(uint32_t _width, uint8_t _numMips) { m_type = TextureCube; const TextureFormat::Enum fmt = (TextureFormat::Enum)m_textureFormat; - DX_CHECK(s_renderD3D9->m_device->CreateCubeTexture(_edge + DWORD usage = 0; + + const bool renderTarget = 0 != (m_flags&BGFX_TEXTURE_RT_MASK); + const bool blit = 0 != (m_flags&BGFX_TEXTURE_BLIT_DST); + if (isDepth(fmt) ) + { + usage = D3DUSAGE_DEPTHSTENCIL; + } + else if (renderTarget || blit) + { + usage = D3DUSAGE_RENDERTARGET; + } + + IDirect3DDevice9* device = s_renderD3D9->m_device; + DX_CHECK(device->CreateCubeTexture(_width , _numMips - , 0 + , usage , s_textureFormat[fmt].m_fmt - , s_renderD3D9->m_pool + , D3DPOOL_DEFAULT , &m_textureCube , NULL ) ); + if (!renderTarget) + { + if (NULL == m_staging) + { + DX_CHECK(device->CreateCubeTexture(_width + , _numMips + , 0 + , s_textureFormat[fmt].m_fmt + , D3DPOOL_SYSTEMMEM + , &m_stagingCube + , NULL + ) ); + } + else + { + for (uint8_t ii = 0; ii < 6; ++ii) + { + DX_CHECK(m_stagingCube->AddDirtyRect(D3DCUBEMAP_FACES(ii), NULL) ); + } + DX_CHECK(device->UpdateTexture(m_stagingCube, m_textureCube) ); + } + } + BGFX_FATAL(NULL != m_textureCube, Fatal::UnableToCreateTexture, "Failed to create cube texture (edge: %d, mips: %d, fmt: %s)." - , _edge + , _width , _numMips , getName(fmt) ); @@ -2438,11 +2595,13 @@ namespace bgfx { namespace d3d9 rect.top = _rect->m_y; rect.right = rect.left + _rect->m_width; rect.bottom = rect.top + _rect->m_height; - DX_CHECK(m_texture2d->LockRect(_lod, &lockedRect, &rect, 0) ); + DX_CHECK(m_staging2d->LockRect(_lod, &lockedRect, &rect, 0) ); + DX_CHECK(m_staging2d->AddDirtyRect(&rect) ); } else { - DX_CHECK(m_texture2d->LockRect(_lod, &lockedRect, NULL, 0) ); + DX_CHECK(m_staging2d->LockRect(_lod, &lockedRect, NULL, 0) ); + DX_CHECK(m_staging2d->AddDirtyRect(NULL) ); } _pitch = lockedRect.Pitch; @@ -2453,8 +2612,9 @@ namespace bgfx { namespace d3d9 case Texture3D: { D3DLOCKED_BOX box; - DX_CHECK(m_texture3d->LockBox(_lod, &box, NULL, 0) ); - _pitch = box.RowPitch; + DX_CHECK(m_staging3d->LockBox(_lod, &box, NULL, 0) ); + DX_CHECK(m_staging3d->AddDirtyBox(NULL) ); + _pitch = box.RowPitch; _slicePitch = box.SlicePitch; return (uint8_t*)box.pBits; } @@ -2466,15 +2626,17 @@ namespace bgfx { namespace d3d9 if (NULL != _rect) { RECT rect; - rect.left = _rect->m_x; - rect.top = _rect->m_y; - rect.right = rect.left + _rect->m_width; + rect.left = _rect->m_x; + rect.top = _rect->m_y; + rect.right = rect.left + _rect->m_width; rect.bottom = rect.top + _rect->m_height; - DX_CHECK(m_textureCube->LockRect(D3DCUBEMAP_FACES(_side), _lod, &lockedRect, &rect, 0) ); + DX_CHECK(m_stagingCube->LockRect(D3DCUBEMAP_FACES(_side), _lod, &lockedRect, &rect, 0) ); + DX_CHECK(m_textureCube->AddDirtyRect(D3DCUBEMAP_FACES(_side), &rect) ); } else { - DX_CHECK(m_textureCube->LockRect(D3DCUBEMAP_FACES(_side), _lod, &lockedRect, NULL, 0) ); + DX_CHECK(m_stagingCube->LockRect(D3DCUBEMAP_FACES(_side), _lod, &lockedRect, NULL, 0) ); + DX_CHECK(m_textureCube->AddDirtyRect(D3DCUBEMAP_FACES(_side), NULL) ); } _pitch = lockedRect.Pitch; @@ -2484,30 +2646,35 @@ namespace bgfx { namespace d3d9 } BX_CHECK(false, "You should not be here."); - _pitch = 0; + _pitch = 0; _slicePitch = 0; return NULL; } void TextureD3D9::unlock(uint8_t _side, uint8_t _lod) { + IDirect3DDevice9* device = s_renderD3D9->m_device; + switch (m_type) { case Texture2D: { - DX_CHECK(m_texture2d->UnlockRect(_lod) ); + DX_CHECK(m_staging2d->UnlockRect(_lod) ); + DX_CHECK(device->UpdateTexture(m_staging2d, m_texture2d) ); } return; case Texture3D: { - DX_CHECK(m_texture3d->UnlockBox(_lod) ); + DX_CHECK(m_staging3d->UnlockBox(_lod) ); + DX_CHECK(device->UpdateTexture(m_staging3d, m_texture3d) ); } return; case TextureCube: { - DX_CHECK(m_textureCube->UnlockRect(D3DCUBEMAP_FACES(_side), _lod) ); + DX_CHECK(m_stagingCube->UnlockRect(D3DCUBEMAP_FACES(_side), _lod) ); + DX_CHECK(device->UpdateTexture(m_stagingCube, m_textureCube) ); } return; } @@ -2522,9 +2689,9 @@ namespace bgfx { namespace d3d9 case Texture2D: { RECT rect; - rect.left = _rect.m_x; - rect.top = _rect.m_y; - rect.right = rect.left + _rect.m_width; + rect.left = _rect.m_x; + rect.top = _rect.m_y; + rect.right = rect.left + _rect.m_width; rect.bottom = rect.top + _rect.m_height; DX_CHECK(m_texture2d->AddDirtyRect(&rect) ); } @@ -2533,12 +2700,12 @@ namespace bgfx { namespace d3d9 case Texture3D: { D3DBOX box; - box.Left = _rect.m_x; - box.Top = _rect.m_y; - box.Right = box.Left + _rect.m_width; + box.Left = _rect.m_x; + box.Top = _rect.m_y; + box.Right = box.Left + _rect.m_width; box.Bottom = box.Top + _rect.m_height; - box.Front = _z; - box.Back = box.Front + _depth; + box.Front = _z; + box.Back = box.Front + _depth; DX_CHECK(m_texture3d->AddDirtyBox(&box) ); } return; @@ -2546,9 +2713,9 @@ namespace bgfx { namespace d3d9 case TextureCube: { RECT rect; - rect.left = _rect.m_x; - rect.top = _rect.m_y; - rect.right = rect.left + _rect.m_width; + rect.left = _rect.m_x; + rect.top = _rect.m_y; + rect.right = rect.left + _rect.m_width; rect.bottom = rect.top + _rect.m_height; DX_CHECK(m_textureCube->AddDirtyRect(D3DCUBEMAP_FACES(_side), &rect) ); } @@ -2558,6 +2725,28 @@ namespace bgfx { namespace d3d9 BX_CHECK(false, "You should not be here."); } + IDirect3DSurface9* TextureD3D9::getSurface(uint8_t _side, uint8_t _mip) const + { + IDirect3DSurface9* surface = NULL; + + switch (m_type) + { + case Texture2D: + DX_CHECK(m_texture2d->GetSurfaceLevel(_mip, &surface) ); + break; + + case Texture3D: + BX_CHECK(false, ""); + break; + + case TextureCube: + DX_CHECK(m_textureCube->GetCubeMapSurface(D3DCUBEMAP_FACES(_side), _mip, &surface) ); + break; + } + + return surface; + } + void TextureD3D9::create(const Memory* _mem, uint32_t _flags, uint8_t _skip) { ImageContainer imageContainer; @@ -2571,7 +2760,11 @@ namespace bgfx { namespace d3d9 const uint32_t textureWidth = bx::uint32_max(blockInfo.blockWidth, imageContainer.m_width >>startLod); const uint32_t textureHeight = bx::uint32_max(blockInfo.blockHeight, imageContainer.m_height>>startLod); - m_flags = _flags; + m_flags = _flags; + m_width = textureWidth; + m_height = textureHeight; + m_depth = imageContainer.m_depth; + m_numMips = numMips; m_requestedFormat = imageContainer.m_format; m_textureFormat = imageContainer.m_format; @@ -2777,8 +2970,7 @@ namespace bgfx { namespace d3d9 if (NULL != m_surface && NULL != m_texture2d) { - IDirect3DSurface9* surface; - DX_CHECK(m_texture2d->GetSurfaceLevel(0, &surface) ); + IDirect3DSurface9* surface = getSurface(); DX_CHECK(s_renderD3D9->m_device->StretchRect(m_surface , NULL , surface @@ -2792,8 +2984,7 @@ namespace bgfx { namespace d3d9 void TextureD3D9::preReset() { TextureFormat::Enum fmt = (TextureFormat::Enum)m_textureFormat; - if (TextureFormat::Unknown != fmt - && (isDepth(fmt) || !!(m_flags&BGFX_TEXTURE_RT_MASK) ) ) + if (TextureFormat::Unknown != fmt) { DX_RELEASE(m_ptr, 0); DX_RELEASE(m_surface, 0); @@ -2803,10 +2994,23 @@ namespace bgfx { namespace d3d9 void TextureD3D9::postReset() { TextureFormat::Enum fmt = (TextureFormat::Enum)m_textureFormat; - if (TextureFormat::Unknown != fmt - && (isDepth(fmt) || !!(m_flags&BGFX_TEXTURE_RT_MASK) ) ) + if (TextureFormat::Unknown != fmt) { - createTexture(m_width, m_height, m_numMips); + switch (m_type) + { + default: + case Texture2D: + createTexture(m_width, m_height, m_numMips); + break; + + case Texture3D: + createVolumeTexture(m_width, m_height, m_depth, m_numMips); + break; + + case TextureCube: + createCubeTexture(m_width, m_numMips); + break; + } } } @@ -2837,7 +3041,7 @@ namespace bgfx { namespace d3d9 } else { - DX_CHECK(texture.m_texture2d->GetSurfaceLevel(0, &m_depthStencil) ); + m_depthStencil = texture.getSurface(); } } else @@ -2850,7 +3054,7 @@ namespace bgfx { namespace d3d9 } else { - DX_CHECK(texture.m_texture2d->GetSurfaceLevel(0, &m_color[m_num]) ); + m_color[m_num] = texture.getSurface(); } m_num++; } @@ -3038,7 +3242,7 @@ namespace bgfx { namespace d3d9 } else { - DX_CHECK(texture.m_texture2d->GetSurfaceLevel(0, &m_color[ii]) ); + m_color[ii] = texture.getSurface(); } } } @@ -3053,7 +3257,7 @@ namespace bgfx { namespace d3d9 } else { - DX_CHECK(texture.m_texture2d->GetSurfaceLevel(0, &m_depthStencil) ); + m_depthStencil = texture.getSurface(); } if (0 == m_num) @@ -3124,8 +3328,8 @@ namespace bgfx { namespace d3d9 { Frame& frame = m_frame[m_control.m_current]; frame.m_disjoint->Issue(D3DISSUE_END); - frame.m_end->Issue(D3DISSUE_END); frame.m_freq->Issue(D3DISSUE_END); + frame.m_end->Issue(D3DISSUE_END); m_control.commit(1); } @@ -3135,8 +3339,8 @@ namespace bgfx { namespace d3d9 { Frame& frame = m_frame[m_control.m_read]; - uint64_t freq; - HRESULT hr = frame.m_freq->GetData(&freq, sizeof(freq), 0); + uint64_t timeEnd; + HRESULT hr = frame.m_end->GetData(&timeEnd, sizeof(timeEnd), 0); if (S_OK == hr) { m_control.consume(1); @@ -3144,8 +3348,8 @@ namespace bgfx { namespace d3d9 uint64_t timeStart; DX_CHECK(frame.m_start->GetData(&timeStart, sizeof(timeStart), 0) ); - uint64_t timeEnd; - DX_CHECK(frame.m_end->GetData(&timeEnd, sizeof(timeEnd), 0) ); + uint64_t freq; + DX_CHECK(frame.m_freq->GetData(&freq, sizeof(freq), 0) ); m_frequency = freq; m_elapsed = timeEnd - timeStart; @@ -3202,6 +3406,11 @@ namespace bgfx { namespace d3d9 FrameBufferHandle fbh = BGFX_INVALID_HANDLE; uint32_t blendFactor = 0; + BlitKey blitKey; + blitKey.decode(_render->m_blitKeys[0]); + uint16_t numBlitItems = _render->m_numBlitItems; + uint16_t blitItem = 0; + uint8_t primIndex; { const uint64_t pt = _render->m_debug&BGFX_DEBUG_WIREFRAME ? BGFX_STATE_PT_LINES : 0; @@ -3293,6 +3502,57 @@ namespace bgfx { namespace d3d9 DX_CHECK(device->SetRenderState(D3DRS_CULLMODE, D3DCULL_NONE) ); DX_CHECK(device->SetRenderState(D3DRS_ALPHABLENDENABLE, FALSE) ); DX_CHECK(device->SetRenderState(D3DRS_ALPHAFUNC, D3DCMP_GREATER) ); + + for (; blitItem < numBlitItems && blitKey.m_view <= view; blitItem++) + { + const BlitItem& blit = _render->m_blitItem[blitItem]; + blitKey.decode(_render->m_blitKeys[blitItem+1]); + + const TextureD3D9& src = m_textures[blit.m_src.idx]; + const TextureD3D9& dst = m_textures[blit.m_dst.idx]; + + uint32_t srcWidth = bx::uint32_min(src.m_width, blit.m_srcX + blit.m_width) - blit.m_srcX; + uint32_t srcHeight = bx::uint32_min(src.m_height, blit.m_srcY + blit.m_height) - blit.m_srcY; + uint32_t dstWidth = bx::uint32_min(dst.m_width, blit.m_dstX + blit.m_width) - blit.m_dstX; + uint32_t dstHeight = bx::uint32_min(dst.m_height, blit.m_dstY + blit.m_height) - blit.m_dstY; + uint32_t width = bx::uint32_min(srcWidth, dstWidth); + uint32_t height = bx::uint32_min(srcHeight, dstHeight); + + RECT srcRect = { LONG(blit.m_srcX), LONG(blit.m_srcY), LONG(blit.m_srcX + width), LONG(blit.m_srcY + height) }; + RECT dstRect = { LONG(blit.m_dstX), LONG(blit.m_dstY), LONG(blit.m_dstX + width), LONG(blit.m_dstY + height) }; + + IDirect3DSurface9* srcSurface = src.getSurface(uint8_t(blit.m_srcZ), blit.m_srcMip); + IDirect3DSurface9* dstSurface = dst.getSurface(uint8_t(blit.m_dstZ), blit.m_dstMip); + + // UpdateSurface (pool src: SYSTEMMEM, dst: DEFAULT) + // s/d T RTT RT + // T y y y + // RTT - - - + // RT - - - + // + // StretchRect (pool src and dst must be DEFAULT) + // s/d T RTT RT + // T - y y + // RTT - y y + // RT - y y + // + // GetRenderTargetData (dst must be SYSTEMMEM) + + HRESULT hr = m_device->StretchRect(srcSurface + , &srcRect + , dstSurface + , &dstRect + , D3DTEXF_NONE + ); + if (FAILED(hr) ) + { + hr = m_device->GetRenderTargetData(srcSurface, dstSurface); + BX_WARN(SUCCEEDED(hr), "StretchRect and GetRenderTargetData failed %x.", hr); + } + + srcSurface->Release(); + dstSurface->Release(); + } } uint16_t scissor = draw.m_scissor; diff --git a/3rdparty/bgfx/src/renderer_d3d9.h b/3rdparty/bgfx/src/renderer_d3d9.h index 58676cec900..ea649dd8f15 100644 --- a/3rdparty/bgfx/src/renderer_d3d9.h +++ b/3rdparty/bgfx/src/renderer_d3d9.h @@ -6,13 +6,10 @@ #ifndef BGFX_RENDERER_D3D9_H_HEADER_GUARD #define BGFX_RENDERER_D3D9_H_HEADER_GUARD -#define BGFX_CONFIG_RENDERER_DIRECT3D9EX (BX_PLATFORM_WINDOWS && 0) +#define BGFX_CONFIG_RENDERER_DIRECT3D9EX BX_PLATFORM_WINDOWS #if BX_PLATFORM_WINDOWS # include <sal.h> -# if !BGFX_CONFIG_RENDERER_DIRECT3D9EX -//# define D3D_DISABLE_9EX -# endif // !BGFX_CONFIG_RENDERER_DIRECT3D9EX # include <d3d9.h> #elif BX_PLATFORM_XBOX360 @@ -310,17 +307,19 @@ namespace bgfx { namespace d3d9 TextureD3D9() : m_ptr(NULL) , m_surface(NULL) + , m_staging(NULL) , m_textureFormat(TextureFormat::Unknown) { } void createTexture(uint32_t _width, uint32_t _height, uint8_t _numMips); - void createVolumeTexture(uint32_t _width, uint32_t _height, uint32_t _depth, uint32_t _numMips); - void createCubeTexture(uint32_t _edge, uint32_t _numMips); + void createVolumeTexture(uint32_t _width, uint32_t _height, uint32_t _depth, uint8_t _numMips); + void createCubeTexture(uint32_t _width, uint8_t _numMips); uint8_t* lock(uint8_t _side, uint8_t _lod, uint32_t& _pitch, uint32_t& _slicePitch, const Rect* _rect = NULL); void unlock(uint8_t _side, uint8_t _lod); void dirty(uint8_t _side, const Rect& _rect, uint16_t _z, uint16_t _depth); + IDirect3DSurface9* getSurface(uint8_t _side = 0, uint8_t _mip = 0) const; void create(const Memory* _mem, uint32_t _flags, uint8_t _skip); @@ -328,6 +327,7 @@ namespace bgfx { namespace d3d9 { DX_RELEASE(m_ptr, 0); DX_RELEASE(m_surface, 0); + DX_RELEASE(m_staging, 0); m_textureFormat = TextureFormat::Unknown; } @@ -349,9 +349,18 @@ namespace bgfx { namespace d3d9 }; IDirect3DSurface9* m_surface; + + union + { + IDirect3DBaseTexture9* m_staging; + IDirect3DTexture9* m_staging2d; + IDirect3DVolumeTexture9* m_staging3d; + IDirect3DCubeTexture9* m_stagingCube; + }; uint32_t m_flags; - uint16_t m_width; - uint16_t m_height; + uint32_t m_width; + uint32_t m_height; + uint32_t m_depth; uint8_t m_numMips; uint8_t m_type; uint8_t m_requestedFormat; diff --git a/3rdparty/bgfx/src/renderer_gl.cpp b/3rdparty/bgfx/src/renderer_gl.cpp index 557614ef960..0a684f57c22 100644 --- a/3rdparty/bgfx/src/renderer_gl.cpp +++ b/3rdparty/bgfx/src/renderer_gl.cpp @@ -441,6 +441,7 @@ namespace bgfx { namespace gl ARB_compute_shader, ARB_conservative_depth, + ARB_copy_image, ARB_debug_label, ARB_debug_output, ARB_depth_buffer_float, @@ -499,6 +500,7 @@ namespace bgfx { namespace gl EXT_blend_subtract, EXT_color_buffer_half_float, EXT_color_buffer_float, + EXT_copy_image, EXT_compressed_ETC1_RGB8_sub_texture, EXT_debug_label, EXT_debug_marker, @@ -554,10 +556,12 @@ namespace bgfx { namespace gl MOZ_WEBGL_compressed_texture_s3tc, MOZ_WEBGL_depth_texture, - NV_texture_border_clamp, + NV_copy_image, NV_draw_buffers, + NV_texture_border_clamp, NVX_gpu_memory_info, + OES_copy_image, OES_compressed_ETC1_RGB8_texture, OES_depth24, OES_depth32, @@ -640,6 +644,7 @@ namespace bgfx { namespace gl { "ARB_compute_shader", BGFX_CONFIG_RENDERER_OPENGL >= 43, true }, { "ARB_conservative_depth", BGFX_CONFIG_RENDERER_OPENGL >= 42, true }, + { "ARB_copy_image", BGFX_CONFIG_RENDERER_OPENGL >= 42, true }, { "ARB_debug_label", false, true }, { "ARB_debug_output", BGFX_CONFIG_RENDERER_OPENGL >= 43, true }, { "ARB_depth_buffer_float", BGFX_CONFIG_RENDERER_OPENGL >= 33, true }, @@ -698,6 +703,7 @@ namespace bgfx { namespace gl { "EXT_blend_subtract", BGFX_CONFIG_RENDERER_OPENGL >= 14, true }, { "EXT_color_buffer_half_float", false, true }, // GLES2 extension. { "EXT_color_buffer_float", false, true }, // GLES2 extension. + { "EXT_copy_image", false, true }, // GLES2 extension. { "EXT_compressed_ETC1_RGB8_sub_texture", false, true }, // GLES2 extension. { "EXT_debug_label", false, true }, { "EXT_debug_marker", false, true }, @@ -753,10 +759,12 @@ namespace bgfx { namespace gl { "MOZ_WEBGL_compressed_texture_s3tc", false, true }, { "MOZ_WEBGL_depth_texture", false, true }, - { "NV_texture_border_clamp", false, true }, // GLES2 extension. + { "NV_copy_image", false, true }, { "NV_draw_buffers", false, true }, // GLES2 extension. + { "NV_texture_border_clamp", false, true }, // GLES2 extension. { "NVX_gpu_memory_info", false, true }, + { "OES_copy_image", false, true }, { "OES_compressed_ETC1_RGB8_texture", false, true }, { "OES_depth24", false, true }, { "OES_depth32", false, true }, @@ -1195,6 +1203,8 @@ namespace bgfx { namespace gl , m_maxAnisotropyDefault(0.0f) , m_maxMsaa(0) , m_vao(0) + , m_blitSupported(false) + , m_readBackSupported(BX_ENABLED(BGFX_CONFIG_RENDERER_OPENGL) ) , m_vaoSupport(false) , m_samplerObjectSupport(false) , m_shadowSamplersSupport(false) @@ -1584,12 +1594,16 @@ namespace bgfx { namespace gl { uint8_t supported = 0; supported |= s_textureFormat[ii].m_supported - ? BGFX_CAPS_FORMAT_TEXTURE_COLOR + ? BGFX_CAPS_FORMAT_TEXTURE_2D + | BGFX_CAPS_FORMAT_TEXTURE_3D + | BGFX_CAPS_FORMAT_TEXTURE_CUBE : BGFX_CAPS_FORMAT_TEXTURE_NONE ; supported |= isTextureFormatValid(TextureFormat::Enum(ii), true) - ? BGFX_CAPS_FORMAT_TEXTURE_COLOR_SRGB + ? BGFX_CAPS_FORMAT_TEXTURE_2D_SRGB + | BGFX_CAPS_FORMAT_TEXTURE_3D_SRGB + | BGFX_CAPS_FORMAT_TEXTURE_CUBE_SRGB : BGFX_CAPS_FORMAT_TEXTURE_NONE ; @@ -1697,6 +1711,23 @@ namespace bgfx { namespace gl : 0 ; + if (s_extension[Extension::ARB_copy_image].m_supported + || s_extension[Extension::EXT_copy_image].m_supported + || s_extension[Extension:: NV_copy_image].m_supported + || s_extension[Extension::OES_copy_image].m_supported) + { + m_blitSupported = NULL != glCopyImageSubData; + g_caps.supported |= m_blitSupported + ? BGFX_CAPS_TEXTURE_BLIT + : 0 + ; + } + + g_caps.supported |= m_readBackSupported + ? BGFX_CAPS_TEXTURE_READ_BACK + : 0 + ; + g_caps.maxTextureSize = uint16_t(glGet(GL_MAX_TEXTURE_SIZE) ); if (BX_ENABLED(BGFX_CONFIG_RENDERER_OPENGL) @@ -2072,6 +2103,36 @@ namespace bgfx { namespace gl { } + void readTexture(TextureHandle _handle, void* _data) BX_OVERRIDE + { + if (m_readBackSupported) + { + const TextureGL& texture = m_textures[_handle.idx]; + const bool compressed = isCompressed(TextureFormat::Enum(texture.m_textureFormat) ); + + GL_CHECK(glBindTexture(texture.m_target, texture.m_id) ); + + if (compressed) + { + GL_CHECK(glGetCompressedTexImage(texture.m_target + , 0 + , _data + ) ); + } + else + { + GL_CHECK(glGetTexImage(texture.m_target + , 0 + , texture.m_fmt + , texture.m_type + , _data + ) ); + } + + GL_CHECK(glBindTexture(texture.m_target, 0) ); + } + } + void resizeTexture(TextureHandle _handle, uint16_t _width, uint16_t _height) BX_OVERRIDE { TextureGL& texture = m_textures[_handle.idx]; @@ -2289,12 +2350,14 @@ namespace bgfx { namespace gl || m_resolution.m_height != _resolution.m_height || m_resolution.m_flags != flags) { - m_textVideoMem.resize(false, _resolution.m_width, _resolution.m_height); - m_textVideoMem.clear(); + flags &= ~BGFX_RESET_FORCE; m_resolution = _resolution; m_resolution.m_flags = flags; + m_textVideoMem.resize(false, _resolution.m_width, _resolution.m_height); + m_textVideoMem.clear(); + if ( (flags & BGFX_RESET_HMD) && m_ovr.isInitialized() ) { @@ -3084,6 +3147,8 @@ namespace bgfx { namespace gl float m_maxAnisotropyDefault; int32_t m_maxMsaa; GLuint m_vao; + bool m_blitSupported; + bool m_readBackSupported; bool m_vaoSupport; bool m_samplerObjectSupport; bool m_shadowSamplersSupport; @@ -4882,9 +4947,14 @@ namespace bgfx { namespace gl } else { + GLenum target = GL_TEXTURE_CUBE_MAP == texture.m_target + ? GL_TEXTURE_CUBE_MAP_POSITIVE_X + : texture.m_target + ; + GL_CHECK(glFramebufferTexture2D(GL_FRAMEBUFFER , attachment - , texture.m_target + , target , texture.m_id , 0 ) ); @@ -5105,7 +5175,13 @@ namespace bgfx { namespace gl SortKey key; uint16_t view = UINT16_MAX; FrameBufferHandle fbh = BGFX_INVALID_HANDLE; - int32_t height = hmdEnabled + + BlitKey blitKey; + blitKey.decode(_render->m_blitKeys[0]); + uint16_t numBlitItems = _render->m_numBlitItems; + uint16_t blitItem = 0; + + int32_t resolutionHeight = hmdEnabled ? _render->m_hmd.height : _render->m_resolution.m_height ; @@ -5177,11 +5253,11 @@ namespace bgfx { namespace gl if (_render->m_fb[view].idx != fbh.idx) { fbh = _render->m_fb[view]; - height = hmdEnabled + resolutionHeight = hmdEnabled ? _render->m_hmd.height : _render->m_resolution.m_height ; - height = setFrameBuffer(fbh, height, discardFlags); + resolutionHeight = setFrameBuffer(fbh, resolutionHeight, discardFlags); } viewRestart = ( (BGFX_VIEW_STEREO == (_render->m_viewFlags[view] & BGFX_VIEW_STEREO) ) ); @@ -5239,7 +5315,7 @@ namespace bgfx { namespace gl viewScissorRect = viewHasScissor ? scissorRect : viewState.m_rect; GL_CHECK(glViewport(viewState.m_rect.m_x - , height-viewState.m_rect.m_height-viewState.m_rect.m_y + , resolutionHeight-viewState.m_rect.m_height-viewState.m_rect.m_y , viewState.m_rect.m_width , viewState.m_rect.m_height ) ); @@ -5249,7 +5325,7 @@ namespace bgfx { namespace gl if (BGFX_CLEAR_NONE != (clear.m_flags & BGFX_CLEAR_MASK) ) { - clearQuad(_clearQuad, viewState.m_rect, clear, height, _render->m_colorPalette); + clearQuad(_clearQuad, viewState.m_rect, clear, resolutionHeight, _render->m_colorPalette); } GL_CHECK(glDisable(GL_STENCIL_TEST) ); @@ -5257,6 +5333,45 @@ namespace bgfx { namespace gl GL_CHECK(glDepthFunc(GL_LESS) ); GL_CHECK(glEnable(GL_CULL_FACE) ); GL_CHECK(glDisable(GL_BLEND) ); + + if (m_blitSupported) + { + for (; blitItem < numBlitItems && blitKey.m_view <= view; blitItem++) + { + const BlitItem& bi = _render->m_blitItem[blitItem]; + blitKey.decode(_render->m_blitKeys[blitItem + 1]); + + const TextureGL& src = m_textures[bi.m_src.idx]; + const TextureGL& dst = m_textures[bi.m_dst.idx]; + + uint32_t srcWidth = bx::uint32_min(src.m_width, bi.m_srcX + bi.m_width) - bi.m_srcX; + uint32_t srcHeight = bx::uint32_min(src.m_height, bi.m_srcY + bi.m_height) - bi.m_srcY; + uint32_t srcDepth = bx::uint32_min(src.m_depth, bi.m_srcZ + bi.m_depth) - bi.m_srcZ; + uint32_t dstWidth = bx::uint32_min(dst.m_width, bi.m_dstX + bi.m_width) - bi.m_dstX; + uint32_t dstHeight = bx::uint32_min(dst.m_height, bi.m_dstY + bi.m_height) - bi.m_dstY; + uint32_t dstDepth = bx::uint32_min(dst.m_depth, bi.m_dstZ + bi.m_depth) - bi.m_dstZ; + uint32_t width = bx::uint32_min(srcWidth, dstWidth); + uint32_t height = bx::uint32_min(srcHeight, dstHeight); + uint32_t depth = bx::uint32_min(srcDepth, dstDepth); + + GL_CHECK(glCopyImageSubData(src.m_id + , src.m_target + , bi.m_srcMip + , bi.m_srcX + , bi.m_srcY + , bi.m_srcZ + , dst.m_id + , dst.m_target + , bi.m_dstMip + , bi.m_dstX + , bi.m_dstY + , bi.m_dstZ + , width + , height + , bx::uint32_imax(depth, 1) + ) ); + } + } } if (isCompute) @@ -5419,7 +5534,7 @@ namespace bgfx { namespace gl { GL_CHECK(glEnable(GL_SCISSOR_TEST) ); GL_CHECK(glScissor(viewScissorRect.m_x - , height-viewScissorRect.m_height-viewScissorRect.m_y + , resolutionHeight-viewScissorRect.m_height-viewScissorRect.m_y , viewScissorRect.m_width , viewScissorRect.m_height ) ); @@ -5435,7 +5550,7 @@ namespace bgfx { namespace gl scissorRect.intersect(viewScissorRect, _render->m_rectCache.m_cache[scissor]); GL_CHECK(glEnable(GL_SCISSOR_TEST) ); GL_CHECK(glScissor(scissorRect.m_x - , height-scissorRect.m_height-scissorRect.m_y + , resolutionHeight-scissorRect.m_height-scissorRect.m_y , scissorRect.m_width , scissorRect.m_height ) ); diff --git a/3rdparty/bgfx/src/renderer_mtl.h b/3rdparty/bgfx/src/renderer_mtl.h index 495f7abf499..052c7859177 100644 --- a/3rdparty/bgfx/src/renderer_mtl.h +++ b/3rdparty/bgfx/src/renderer_mtl.h @@ -58,6 +58,11 @@ namespace bgfx { namespace mtl return [m_obj computeCommandEncoder]; } + id<MTLBlitCommandEncoder> blitCommandEncoder() + { + return [m_obj blitCommandEncoder]; + } + // Scheduling and Executing Commands void enqueue() { diff --git a/3rdparty/bgfx/src/renderer_mtl.mm b/3rdparty/bgfx/src/renderer_mtl.mm index 007c2bcb786..f855c5a4ee3 100644 --- a/3rdparty/bgfx/src/renderer_mtl.mm +++ b/3rdparty/bgfx/src/renderer_mtl.mm @@ -332,7 +332,6 @@ namespace bgfx { namespace mtl , m_rtMsaa(false) , m_drawable(NULL) { - m_fbh.idx = invalidHandle; } ~RendererContextMtl() @@ -343,6 +342,10 @@ namespace bgfx { namespace mtl { BX_TRACE("Init."); + m_fbh.idx = invalidHandle; + memset(m_uniforms, 0, sizeof(m_uniforms) ); + memset(&m_resolution, 0, sizeof(m_resolution) ); + if (NULL != NSClassFromString(@"CAMetalLayer") ) { //on iOS we need the layer as CAmetalLayer @@ -397,8 +400,6 @@ namespace bgfx { namespace mtl m_uniformBufferVertexOffset = 0; m_uniformBufferFragmentOffset = 0; - memset(m_uniforms, 0, sizeof(m_uniforms) ); - g_caps.supported |= (0 | BGFX_CAPS_TEXTURE_COMPARE_LEQUAL | BGFX_CAPS_TEXTURE_3D @@ -429,9 +430,21 @@ namespace bgfx { namespace mtl for (uint32_t ii = 0; ii < TextureFormat::Count; ++ii) { - uint8_t support = (s_textureFormat[ii].m_fmt != MTLPixelFormatInvalid) ? BGFX_CAPS_FORMAT_TEXTURE_COLOR : BGFX_CAPS_FORMAT_TEXTURE_NONE; - - support |= (s_textureFormat[ii].m_fmtSrgb != MTLPixelFormatInvalid) ? BGFX_CAPS_FORMAT_TEXTURE_COLOR_SRGB : BGFX_CAPS_FORMAT_TEXTURE_NONE; + uint8_t support = 0; + + support |= MTLPixelFormatInvalid != s_textureFormat[ii].m_fmt + ? BGFX_CAPS_FORMAT_TEXTURE_2D + | BGFX_CAPS_FORMAT_TEXTURE_3D + | BGFX_CAPS_FORMAT_TEXTURE_CUBE + : BGFX_CAPS_FORMAT_TEXTURE_NONE + ; + + support |= MTLPixelFormatInvalid != s_textureFormat[ii].m_fmtSrgb + ? BGFX_CAPS_FORMAT_TEXTURE_2D_SRGB + | BGFX_CAPS_FORMAT_TEXTURE_3D_SRGB + | BGFX_CAPS_FORMAT_TEXTURE_CUBE_SRGB + : BGFX_CAPS_FORMAT_TEXTURE_NONE + ; //TODO: additional caps flags // support |= BGFX_CAPS_FORMAT_TEXTURE_VERTEX : BGFX_CAPS_FORMAT_TEXTURE_NONE; @@ -441,6 +454,29 @@ namespace bgfx { namespace mtl g_caps.formats[ii] = support; } + if (BX_ENABLED(BX_PLATFORM_OSX) ) + { + g_caps.formats[TextureFormat::ETC1 ] = + g_caps.formats[TextureFormat::ETC2 ] = + g_caps.formats[TextureFormat::ETC2A ] = + g_caps.formats[TextureFormat::ETC2A1] = + g_caps.formats[TextureFormat::PTC12 ] = + g_caps.formats[TextureFormat::PTC14 ] = + g_caps.formats[TextureFormat::PTC12A] = + g_caps.formats[TextureFormat::PTC14A] = + g_caps.formats[TextureFormat::PTC22 ] = + g_caps.formats[TextureFormat::PTC24 ] = BGFX_CAPS_FORMAT_TEXTURE_NONE; + } + + for (uint32_t ii = 0; ii < TextureFormat::Count; ++ii) + { + if (BGFX_CAPS_FORMAT_TEXTURE_NONE == g_caps.formats[ii]) + { + s_textureFormat[ii].m_fmt = MTLPixelFormatInvalid; + s_textureFormat[ii].m_fmtSrgb = MTLPixelFormatInvalid; + } + } + // Init reserved part of view name. for (uint32_t ii = 0; ii < BGFX_CONFIG_MAX_VIEWS; ++ii) { @@ -590,6 +626,10 @@ namespace bgfx { namespace mtl { } + void readTexture(TextureHandle /*_handle*/, void* /*_data*/) BX_OVERRIDE + { + } + void resizeTexture(TextureHandle _handle, uint16_t _width, uint16_t _height) BX_OVERRIDE { TextureMtl& texture = m_textures[_handle.idx]; @@ -752,9 +792,11 @@ namespace bgfx { namespace mtl rce.setScissorRect(rc); rce.setCullMode(MTLCullModeNone); - uint64_t state = BGFX_STATE_RGB_WRITE - | BGFX_STATE_ALPHA_WRITE - | BGFX_STATE_DEPTH_TEST_ALWAYS; + uint64_t state = 0 + | BGFX_STATE_RGB_WRITE + | BGFX_STATE_ALPHA_WRITE + | BGFX_STATE_DEPTH_TEST_ALWAYS + ; setDepthStencilState(state); @@ -858,10 +900,16 @@ namespace bgfx { namespace mtl //TODO: there should be a way to specify if backbuffer needs stencil/depth. //TODO: support msaa - if (NULL == m_backBufferDepth + if (NULL == m_backBufferDepth || width != m_backBufferDepth.width() - || height != m_backBufferDepth.height() ) + || height != m_backBufferDepth.height() + || m_resolution.m_width != _resolution.m_width + || m_resolution.m_height != _resolution.m_height + || m_resolution.m_flags != _resolution.m_flags) { + m_resolution = _resolution; + m_resolution.m_flags &= ~BGFX_RESET_FORCE; + m_textureDescriptor.textureType = MTLTextureType2D; m_textureDescriptor.pixelFormat = MTLPixelFormatDepth32Float_Stencil8; @@ -1192,6 +1240,8 @@ namespace bgfx { namespace mtl FrameBufferHandle m_fbh; bool m_rtMsaa; + Resolution m_resolution; + // descriptors RenderPipelineDescriptor m_renderPipelineDescriptor; DepthStencilDescriptor m_depthStencilDescriptor; @@ -1697,13 +1747,11 @@ namespace bgfx { namespace mtl } else if (arg.type == MTLArgumentTypeTexture) { - const char* name = utf8String(arg.name); - BX_TRACE("texture: %s index:%d", name, arg.index); + BX_TRACE("texture: %s index:%d", utf8String(arg.name), arg.index); } else if (arg.type == MTLArgumentTypeSampler) { - const char* name = utf8String(arg.name); - BX_TRACE("sampler: %s index:%d", name, arg.index); + BX_TRACE("sampler: %s index:%d", utf8String(arg.name), arg.index); } } } @@ -1774,10 +1822,12 @@ namespace bgfx { namespace mtl m_flags = _flags; m_requestedFormat = (uint8_t)imageContainer.m_format; - m_textureFormat = (uint8_t)imageContainer.m_format; + m_textureFormat = MTLPixelFormatInvalid == s_textureFormat[m_requestedFormat].m_fmt + ? uint8_t(TextureFormat::BGRA8) + : m_requestedFormat + ; - const TextureFormatInfo& tfi = s_textureFormat[m_requestedFormat]; - const bool convert = MTLPixelFormatInvalid == tfi.m_fmt; + const bool convert = m_requestedFormat != m_textureFormat; uint8_t bpp = getBitsPerPixel(TextureFormat::Enum(m_textureFormat) ); if (convert) @@ -1815,9 +1865,8 @@ namespace bgfx { namespace mtl , 0 != (_flags&BGFX_TEXTURE_RT_MASK) ? " (render target)" : "" ); - const bool bufferOnly = 0 != (_flags&BGFX_TEXTURE_RT_BUFFER_ONLY); - const bool computeWrite = 0 != (_flags&BGFX_TEXTURE_COMPUTE_WRITE); +// const bool computeWrite = 0 != (_flags&BGFX_TEXTURE_COMPUTE_WRITE); // const bool renderTarget = 0 != (_flags&BGFX_TEXTURE_RT_MASK); const bool srgb = 0 != (_flags&BGFX_TEXTURE_SRGB) || imageContainer.m_srgb; // const uint32_t msaaQuality = bx::uint32_satsub( (_flags&BGFX_TEXTURE_RT_MSAA_MASK)>>BGFX_TEXTURE_RT_MSAA_SHIFT, 1); @@ -1826,14 +1875,17 @@ namespace bgfx { namespace mtl MTLPixelFormat format = MTLPixelFormatInvalid; if (srgb) { - format = s_textureFormat[m_textureFormat].m_fmtSrgb; - BX_WARN(format != MTLPixelFormatInvalid, "sRGB not supported for texture format %d", m_textureFormat); + format = s_textureFormat[m_textureFormat].m_fmtSrgb; + BX_WARN(format != MTLPixelFormatInvalid + , "sRGB not supported for texture format %d" + , m_textureFormat + ); } if (format == MTLPixelFormatInvalid) { // not swizzled and not sRGB, or sRGB unsupported - format = s_textureFormat[m_textureFormat].m_fmt; + format = s_textureFormat[m_textureFormat].m_fmt; } desc.pixelFormat = format; @@ -1844,8 +1896,15 @@ namespace bgfx { namespace mtl desc.sampleCount = 1; //TODO: set samplecount - If textureType is not MTLTextureType2DMultisample, the value must be 1. desc.resourceOptions = MTLResourceStorageModePrivate; desc.cpuCacheMode = MTLCPUCacheModeDefaultCache; - desc.storageMode = bufferOnly ? 1 /*MTLStorageModeManaged*/ : 2 /*MTLStorageModePrivate*/; - desc.usage = MTLTextureUsageShaderRead; + + desc.storageMode = bufferOnly + ? 2 /*MTLStorageModePrivate*/ + : 1 /*MTLStorageModeManaged*/ + ; + desc.usage = bufferOnly + ? MTLTextureUsageShaderWrite + : MTLTextureUsageShaderRead + ; //TODO: set resource flags depending on usage(renderTarget/computeWrite/etc) on iOS9/OSX @@ -1883,46 +1942,48 @@ namespace bgfx { namespace mtl if (convert) { imageDecodeToRgba8(temp - , mip.m_data - , mip.m_width - , mip.m_height - , mip.m_width*4 - , mip.m_format - ); + , mip.m_data + , mip.m_width + , mip.m_height + , mip.m_width*4 + , mip.m_format + ); data = temp; } MTLRegion region = { { 0, 0, 0 }, { width, height, depth } }; - uint32_t bytesPerRow; - uint32_t bytesPerImage; + uint32_t bytesPerRow = 0; + uint32_t bytesPerImage = 0; if (compressed && !convert) { if (format >= 160 /*MTLPixelFormatPVRTC_RGB_2BPP*/ && format <= 167 /*MTLPixelFormatPVRTC_RGBA_4BPP_sRGB*/) { - bytesPerRow = 0; + bytesPerRow = 0; bytesPerImage = 0; } else { - bytesPerRow = (mip.m_width / blockInfo.blockWidth )*mip.m_blockSize; - bytesPerImage = (desc.textureType == MTLTextureType3D) ? (mip.m_height/blockInfo.blockHeight)*bytesPerRow : 0; + bytesPerRow = (mip.m_width / blockInfo.blockWidth)*mip.m_blockSize; + bytesPerImage = desc.textureType == MTLTextureType3D + ? (mip.m_height/blockInfo.blockHeight)*bytesPerRow + : 0 + ; } } else { - bytesPerRow = width * bpp / 8; - bytesPerImage = (desc.textureType == MTLTextureType3D) ? width * height * bpp / 8 : 0; + bytesPerRow = width * bpp / 8; + bytesPerImage = desc.textureType == MTLTextureType3D + ? bytesPerRow * height + : 0 + ; } m_ptr.replaceRegion(region, lod, side, data, bytesPerRow, bytesPerImage); } - else if (!computeWrite) - { - //TODO: do we need to clear to zero?? - } width >>= 1; height >>= 1; @@ -1939,9 +2000,13 @@ namespace bgfx { namespace mtl void TextureMtl::update(uint8_t _side, uint8_t _mip, const Rect& _rect, uint16_t _z, uint16_t _depth, uint16_t _pitch, const Memory* _mem) { - MTLRegion region = { { _rect.m_x, _rect.m_y, _z }, { _rect.m_width, _rect.m_height, _depth } }; + MTLRegion region = + { + { _rect.m_x, _rect.m_y, _z }, + { _rect.m_width, _rect.m_height, _depth }, + }; - const uint32_t bpp = getBitsPerPixel(TextureFormat::Enum(m_textureFormat) ); + const uint32_t bpp = getBitsPerPixel(TextureFormat::Enum(m_textureFormat) ); const uint32_t rectpitch = _rect.m_width*bpp/8; const uint32_t srcpitch = UINT16_MAX == _pitch ? rectpitch : _pitch; diff --git a/3rdparty/bgfx/src/renderer_null.cpp b/3rdparty/bgfx/src/renderer_null.cpp index 5a86523fc57..db6777bdab0 100644 --- a/3rdparty/bgfx/src/renderer_null.cpp +++ b/3rdparty/bgfx/src/renderer_null.cpp @@ -113,6 +113,10 @@ namespace bgfx { namespace noop { } + void readTexture(TextureHandle /*_handle*/, void* /*_data*/) BX_OVERRIDE + { + } + void resizeTexture(TextureHandle /*_handle*/, uint16_t /*_width*/, uint16_t /*_height*/) BX_OVERRIDE { } diff --git a/3rdparty/bgfx/src/shader_dxbc.cpp b/3rdparty/bgfx/src/shader_dxbc.cpp index 34e50c14424..e0f8f6ef504 100644 --- a/3rdparty/bgfx/src/shader_dxbc.cpp +++ b/3rdparty/bgfx/src/shader_dxbc.cpp @@ -1785,13 +1785,18 @@ namespace bgfx size += read(_reader, _dxbc.outputSignature); break; - case BX_MAKEFOURCC('R', 'D', 'E', 'F'): - case BX_MAKEFOURCC('I', 'F', 'C', 'E'): - case BX_MAKEFOURCC('P', 'C', 'S', 'G'): - case BX_MAKEFOURCC('S', 'T', 'A', 'T'): - case BX_MAKEFOURCC('S', 'F', 'I', '0'): - case BX_MAKEFOURCC('P', 'S', 'O', '1'): - case BX_MAKEFOURCC('P', 'S', 'O', '2'): + case BX_MAKEFOURCC('A', 'o', 'n', '9'): // Contains DX9BC for feature level 9.x (*s_4_0_level_9_*) shaders. + case BX_MAKEFOURCC('I', 'F', 'C', 'E'): // Interface. + case BX_MAKEFOURCC('R', 'D', 'E', 'F'): // Resource definition. + case BX_MAKEFOURCC('S', 'D', 'G', 'B'): // Shader debugging info (old). + case BX_MAKEFOURCC('S', 'P', 'D', 'B'): // Shader debugging info (new). + case BX_MAKEFOURCC('S', 'F', 'I', '0'): // ? + case BX_MAKEFOURCC('S', 'T', 'A', 'T'): // Statistics. + case BX_MAKEFOURCC('P', 'C', 'S', 'G'): // Patch constant signature. + case BX_MAKEFOURCC('P', 'S', 'O', '1'): // Pipeline State Object 1 + case BX_MAKEFOURCC('P', 'S', 'O', '2'): // Pipeline State Object 2 + case BX_MAKEFOURCC('X', 'N', 'A', 'P'): // ? + case BX_MAKEFOURCC('X', 'N', 'A', 'S'): // ? size += chunkSize; break; diff --git a/3rdparty/bgfx/tools/shaderc/shaderc.cpp b/3rdparty/bgfx/tools/shaderc/shaderc.cpp index a8c854d2c4e..50c2c0f5efd 100644 --- a/3rdparty/bgfx/tools/shaderc/shaderc.cpp +++ b/3rdparty/bgfx/tools/shaderc/shaderc.cpp @@ -67,6 +67,17 @@ static const char* s_OES_texture_3D[] = NULL }; +static const char* s_130[] = +{ + "uint", + "uint2", + "uint3", + "uint4", + "isampler3D", + "usampler3D", + NULL +}; + const char* s_uniformTypeName[UniformType::Count] = { "int", @@ -1666,13 +1677,17 @@ int main(int _argc, const char* _argv[]) if (0 == essl) { + const bool need130 = 120 == glsl + && bx::findIdentifierMatch(input, s_130) + ; + if (0 != metal) { bx::stringPrintf(code, "#version 120\n"); } else { - bx::stringPrintf(code, "#version %s\n", profile); + bx::stringPrintf(code, "#version %s\n", need130 ? "130" : profile); } bx::stringPrintf(code diff --git a/3rdparty/bx/include/bx/macros.h b/3rdparty/bx/include/bx/macros.h index 4ee97a8ad8c..d94c29f028f 100644 --- a/3rdparty/bx/include/bx/macros.h +++ b/3rdparty/bx/include/bx/macros.h @@ -75,7 +75,7 @@ # if BX_CLANG_HAS_FEATURE(cxx_thread_local) # define BX_THREAD_LOCAL __thread # endif // BX_COMPILER_CLANG -# if BX_COMPILER_GCC >= 40200 +# if (!BX_PLATFORM_OSX && (BX_COMPILER_GCC >= 40200)) || (BX_COMPILER_GCC >= 40500) # define BX_THREAD_LOCAL __thread # endif // BX_COMPILER_GCC # define BX_ATTRIBUTE(_x) __attribute__( (_x) ) diff --git a/3rdparty/bx/include/bx/os.h b/3rdparty/bx/include/bx/os.h index e188d57e26e..0adf87b55ce 100644 --- a/3rdparty/bx/include/bx/os.h +++ b/3rdparty/bx/include/bx/os.h @@ -133,14 +133,25 @@ namespace bx : 0 ; #elif BX_PLATFORM_OSX +#ifdef MACH_TASK_BASIC_INFO mach_task_basic_info info; mach_msg_type_number_t infoCount = MACH_TASK_BASIC_INFO_COUNT; - int result = task_info(mach_task_self() + int const result = task_info(mach_task_self() , MACH_TASK_BASIC_INFO , (task_info_t)&info , &infoCount ); +#else // MACH_TASK_BASIC_INFO + task_basic_info info; + mach_msg_type_number_t infoCount = TASK_BASIC_INFO_COUNT; + + int const result = task_info(mach_task_self() + , TASK_BASIC_INFO + , (task_info_t)&info + , &infoCount + ); +#endif // MACH_TASK_BASIC_INFO if (KERN_SUCCESS != result) { return 0; diff --git a/3rdparty/bx/include/bx/radixsort.h b/3rdparty/bx/include/bx/radixsort.h index 9ed4011fbf0..d28f65102fd 100644 --- a/3rdparty/bx/include/bx/radixsort.h +++ b/3rdparty/bx/include/bx/radixsort.h @@ -14,8 +14,69 @@ namespace bx #define BX_RADIXSORT_HISTOGRAM_SIZE (1<<BX_RADIXSORT_BITS) #define BX_RADIXSORT_BIT_MASK (BX_RADIXSORT_HISTOGRAM_SIZE-1) + inline void radixSort32(uint32_t* __restrict _keys, uint32_t* __restrict _tempKeys, uint32_t _size) + { + uint32_t* __restrict keys = _keys; + uint32_t* __restrict tempKeys = _tempKeys; + + uint32_t histogram[BX_RADIXSORT_HISTOGRAM_SIZE]; + uint16_t shift = 0; + uint32_t pass = 0; + for (; pass < 3; ++pass) + { + memset(histogram, 0, sizeof(uint32_t)*BX_RADIXSORT_HISTOGRAM_SIZE); + + bool sorted = true; + { + uint32_t key = keys[0]; + uint32_t prevKey = key; + for (uint32_t ii = 0; ii < _size; ++ii, prevKey = key) + { + key = keys[ii]; + uint16_t index = (key>>shift)&BX_RADIXSORT_BIT_MASK; + ++histogram[index]; + sorted &= prevKey <= key; + } + } + + if (sorted) + { + goto done; + } + + uint32_t offset = 0; + for (uint32_t ii = 0; ii < BX_RADIXSORT_HISTOGRAM_SIZE; ++ii) + { + uint32_t count = histogram[ii]; + histogram[ii] = offset; + offset += count; + } + + for (uint32_t ii = 0; ii < _size; ++ii) + { + uint32_t key = keys[ii]; + uint16_t index = (key>>shift)&BX_RADIXSORT_BIT_MASK; + uint32_t dest = histogram[index]++; + tempKeys[dest] = key; + } + + uint32_t* swapKeys = tempKeys; + tempKeys = keys; + keys = swapKeys; + + shift += BX_RADIXSORT_BITS; + } + +done: + if (0 != (pass&1) ) + { + // Odd number of passes needs to do copy to the destination. + memcpy(_keys, _tempKeys, _size*sizeof(uint32_t) ); + } + } + template <typename Ty> - void radixSort32(uint32_t* __restrict _keys, uint32_t* __restrict _tempKeys, Ty* __restrict _values, Ty* __restrict _tempValues, uint32_t _size) + inline void radixSort32(uint32_t* __restrict _keys, uint32_t* __restrict _tempKeys, Ty* __restrict _values, Ty* __restrict _tempValues, uint32_t _size) { uint32_t* __restrict keys = _keys; uint32_t* __restrict tempKeys = _tempKeys; @@ -87,8 +148,69 @@ done: } } + inline void radixSort64(uint64_t* __restrict _keys, uint64_t* __restrict _tempKeys, uint32_t _size) + { + uint64_t* __restrict keys = _keys; + uint64_t* __restrict tempKeys = _tempKeys; + + uint32_t histogram[BX_RADIXSORT_HISTOGRAM_SIZE]; + uint16_t shift = 0; + uint32_t pass = 0; + for (; pass < 6; ++pass) + { + memset(histogram, 0, sizeof(uint32_t)*BX_RADIXSORT_HISTOGRAM_SIZE); + + bool sorted = true; + { + uint64_t key = keys[0]; + uint64_t prevKey = key; + for (uint32_t ii = 0; ii < _size; ++ii, prevKey = key) + { + key = keys[ii]; + uint16_t index = (key>>shift)&BX_RADIXSORT_BIT_MASK; + ++histogram[index]; + sorted &= prevKey <= key; + } + } + + if (sorted) + { + goto done; + } + + uint32_t offset = 0; + for (uint32_t ii = 0; ii < BX_RADIXSORT_HISTOGRAM_SIZE; ++ii) + { + uint32_t count = histogram[ii]; + histogram[ii] = offset; + offset += count; + } + + for (uint32_t ii = 0; ii < _size; ++ii) + { + uint64_t key = keys[ii]; + uint16_t index = (key>>shift)&BX_RADIXSORT_BIT_MASK; + uint32_t dest = histogram[index]++; + tempKeys[dest] = key; + } + + uint64_t* swapKeys = tempKeys; + tempKeys = keys; + keys = swapKeys; + + shift += BX_RADIXSORT_BITS; + } + +done: + if (0 != (pass&1) ) + { + // Odd number of passes needs to do copy to the destination. + memcpy(_keys, _tempKeys, _size*sizeof(uint64_t) ); + } + } + template <typename Ty> - void radixSort64(uint64_t* __restrict _keys, uint64_t* __restrict _tempKeys, Ty* __restrict _values, Ty* __restrict _tempValues, uint32_t _size) + inline void radixSort64(uint64_t* __restrict _keys, uint64_t* __restrict _tempKeys, Ty* __restrict _values, Ty* __restrict _tempValues, uint32_t _size) { uint64_t* __restrict keys = _keys; uint64_t* __restrict tempKeys = _tempKeys; diff --git a/3rdparty/bx/include/compat/msvc/pre1600/stdint.h b/3rdparty/bx/include/compat/msvc/pre1600/stdint.h index 4fe0ef9a9b2..3a5535cb0bd 100644 --- a/3rdparty/bx/include/compat/msvc/pre1600/stdint.h +++ b/3rdparty/bx/include/compat/msvc/pre1600/stdint.h @@ -37,6 +37,23 @@ #ifndef _MSC_STDINT_H_ // [ #define _MSC_STDINT_H_ +#define _In_reads_(size) +#define _In_reads_opt_(size) +#define _In_reads_bytes_(size) +#define _In_reads_bytes_opt_(size) +#define _Out_writes_(size) +#define _Out_writes_opt_(size) +#define _Out_writes_to_opt_(size,count) +#define _Out_writes_bytes_(size) +#define _Out_writes_bytes_opt_(size) +#define _Outptr_ +#define _Outptr_result_maybenull_ +#define _Outptr_opt_result_maybenull_ +#define _COM_Outptr_ +#define _COM_Outptr_opt_ +#define _COM_Outptr_opt_result_maybenull_ +#define _Field_size_bytes_full_(size) + #if _MSC_VER > 1000 #pragma once #endif diff --git a/3rdparty/bx/include/tinystl/buffer.h b/3rdparty/bx/include/tinystl/buffer.h index 5fac2291486..4351ec202a9 100644 --- a/3rdparty/bx/include/tinystl/buffer.h +++ b/3rdparty/bx/include/tinystl/buffer.h @@ -179,9 +179,11 @@ namespace tinystl { Alloc::static_deallocate(b->first, sizeof(T)*capacity); b->capacity = b->first; } else if (b->capacity != b->last) { + const size_t capacity = (size_t)(b->capacity - b->first); const size_t size = (size_t)(b->last - b->first); T* newfirst = (T*)Alloc::static_allocate(sizeof(T) * size); buffer_move_urange(newfirst, b->first, b->last); + Alloc::static_deallocate(b->first, sizeof(T) * capacity); b->first = newfirst; b->last = newfirst + size; b->capacity = b->last; @@ -225,6 +227,26 @@ namespace tinystl { new(placeholder(), where) T(); } + template<typename T, typename Alloc, typename Param> + static inline void buffer_append(buffer<T, Alloc>* b, const Param* param) { + if (b->capacity != b->last) { + new(placeholder(), b->last) T(*param); + ++b->last; + } else { + buffer_insert(b, b->last, param, param + 1); + } + } + + template<typename T, typename Alloc> + static inline void buffer_append(buffer<T, Alloc>* b) { + if (b->capacity != b->last) { + new(placeholder(), b->last) T(); + ++b->last; + } else { + buffer_insert(b, b->last, 1); + } + } + template<typename T, typename Alloc> static inline T* buffer_erase(buffer<T, Alloc>* b, T* first, T* last) { typedef T* pointer; diff --git a/3rdparty/bx/include/tinystl/vector.h b/3rdparty/bx/include/tinystl/vector.h index 96fe1b4ef62..6885feb4f89 100644 --- a/3rdparty/bx/include/tinystl/vector.h +++ b/3rdparty/bx/include/tinystl/vector.h @@ -228,20 +228,18 @@ namespace tinystl { template<typename T, typename Alloc> inline void vector<T, Alloc>::push_back(const T& t) { - buffer_insert(&m_buffer, m_buffer.last, &t, &t + 1); + buffer_append(&m_buffer, &t); } template<typename T, typename Alloc> - inline void vector<T, Alloc>::emplace_back() - { - buffer_insert(&m_buffer, m_buffer.last, 1); + inline void vector<T, Alloc>::emplace_back() { + buffer_append(&m_buffer); } template<typename T, typename Alloc> template<typename Param> - inline void vector<T, Alloc>::emplace_back(const Param& param) - { - buffer_insert(&m_buffer, m_buffer.last, ¶m, ¶m + 1); + inline void vector<T, Alloc>::emplace_back(const Param& param) { + buffer_append(&m_buffer, ¶m); } template<typename T, typename Alloc> diff --git a/3rdparty/bx/scripts/toolchain.lua b/3rdparty/bx/scripts/toolchain.lua index 3f62914a71f..a6a201709aa 100644 --- a/3rdparty/bx/scripts/toolchain.lua +++ b/3rdparty/bx/scripts/toolchain.lua @@ -170,26 +170,26 @@ function toolchain(_buildDir, _libDir) location (path.join(_buildDir, "projects", _ACTION .. "-freebsd")) elseif "ios-arm" == _OPTIONS["gcc"] then - premake.gcc.cc = "clang" - premake.gcc.cxx = "clang++" + premake.gcc.cc = "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" + premake.gcc.cxx = "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++" premake.gcc.ar = "ar" location (path.join(_buildDir, "projects", _ACTION .. "-ios-arm")) elseif "ios-simulator" == _OPTIONS["gcc"] then - premake.gcc.cc = "clang" - premake.gcc.cxx = "clang++" + premake.gcc.cc = "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" + premake.gcc.cxx = "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++" premake.gcc.ar = "ar" location (path.join(_buildDir, "projects", _ACTION .. "-ios-simulator")) elseif "tvos-arm64" == _OPTIONS["gcc"] then - premake.gcc.cc = "clang" - premake.gcc.cxx = "clang++" + premake.gcc.cc = "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" + premake.gcc.cxx = "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++" premake.gcc.ar = "ar" location (path.join(_buildDir, "projects", _ACTION .. "-tvos-arm64")) elseif "tvos-simulator" == _OPTIONS["gcc"] then - premake.gcc.cc = "clang" - premake.gcc.cxx = "clang++" + premake.gcc.cc = "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" + premake.gcc.cxx = "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++" premake.gcc.ar = "ar" location (path.join(_buildDir, "projects", _ACTION .. "-tvos-simulator")) @@ -489,6 +489,7 @@ function toolchain(_buildDir, _libDir) } linkoptions { "-Wl,--gc-sections", + "-static", "-static-libgcc", "-static-libstdc++", } diff --git a/3rdparty/portmidi/porttime/ptmacosx_mach.c b/3rdparty/portmidi/porttime/ptmacosx_mach.c index 73766d194e8..f4fec09d4c4 100644 --- a/3rdparty/portmidi/porttime/ptmacosx_mach.c +++ b/3rdparty/portmidi/porttime/ptmacosx_mach.c @@ -4,10 +4,10 @@ #include <stdio.h> #include <CoreAudio/HostTime.h> -#import <mach/mach.h> -#import <mach/mach_error.h> -#import <mach/mach_time.h> -#import <mach/clock.h> +#include <mach/mach.h> +#include <mach/mach_error.h> +#include <mach/mach_time.h> +#include <mach/clock.h> #include <unistd.h> #include "porttime.h" diff --git a/hash/a2600.xml b/hash/a2600.xml index 57b990373a6..dbe5d63d933 100644 --- a/hash/a2600.xml +++ b/hash/a2600.xml @@ -11211,8 +11211,8 @@ Info from Atariage and Atarimania </part> </software> - <software name="pitfallsg" cloneof="pitfall"> - <description>Pitfall (Star Game)</description> + <software name="pitfallsg" cloneof="pitfall"> <!-- significant visual changes --> + <description>Pitfall (Star Game) (aka Tom Boy)</description> <year>19??</year> <publisher>Star Game</publisher> <part name="cart" interface="a2600_cart"> @@ -17940,4 +17940,142 @@ Info from Atariage and Atarimania </dataarea> </part> </software> + + <!-- The AtariAge logo looks incorrect, but games function, there are probably other version too, YouTube shows a 2007 version. --> + <software name="stelstok"> + <description>Stella's Stocking 2008</description> + <year>2008</year> + <publisher>AtariAge</publisher> + <sharedfeat name="compatibility" value="NTSC" /> + <part name="cart" interface="a2600_cart"> + <feature name="slot" value="a26_x07" /> + <dataarea name="rom" size="65536"> + <rom name="m27c512.bin" size="65536" crc="c1da7d3b" sha1="4d9c06940754ba03e2eca2d88ea4201b8d9e7805" offset="0" /> + </dataarea> + </part> + </software> + + <!-- This was released by the author, also available via Atariage, are both versions the same? needs HARMONY/MELODY emulation --> + <software name="stayfr2" supported="no"> + <description>Stay Frosty 2 (NTSC)</description> + <year>2013</year> + <publisher>Spiceware</publisher> + <sharedfeat name="compatibility" value="NTSC" /> + <part name="cart" interface="a2600_cart"> + <feature name="slot" value="a26_harmony" /> + <dataarea name="rom" size="0x8000"> + <rom name="SF2_20131217_RC8_NTSC.bin" size="0x8000" crc="4eb739ab" sha1="5eceaf8e90bd9a002f4935f082df7b25716dceb0" offset="0" /> + </dataarea> + </part> + </software> + + <software name="stayfr2d" cloneof="stayfr2" supported="no"> + <description>Stay Frosty 2 (NTSC, demo)</description> + <year>2013</year> + <publisher>Spiceware</publisher> + <sharedfeat name="compatibility" value="NTSC" /> + <part name="cart" interface="a2600_cart"> + <feature name="slot" value="a26_harmony" /> + <dataarea name="rom" size="0x8000"> + <rom name="SF2_demo_NTSC.bin" size="0x8000" crc="fd850bd6" sha1="bd8166da7777c66e6bb3ab0c77563193d8289f5f" offset="0" /> + </dataarea> + </part> + </software> + + + <software name="stayfr2e" cloneof="stayfr2" supported="no"> + <description>Stay Frosty 2 (PAL)</description> + <year>2013</year> + <publisher>Spiceware</publisher> + <sharedfeat name="compatibility" value="PAL" /> + <part name="cart" interface="a2600_cart"> + <feature name="slot" value="a26_harmony" /> + <dataarea name="rom" size="0x8000"> + <rom name="SF2_20131217_RC8_PAL.bin" size="0x8000" crc="7b495dc3" sha1="1625ef74b0a48c2968fad832ab8e2edc8187a53f" offset="0" /> + </dataarea> + </part> + </software> + + <software name="stayfr2de" cloneof="stayfr2" supported="no"> + <description>Stay Frosty 2 (PAL, demo)</description> + <year>2013</year> + <publisher>Spiceware</publisher> + <sharedfeat name="compatibility" value="PAL" /> + <part name="cart" interface="a2600_cart"> + <feature name="slot" value="a26_harmony" /> + <dataarea name="rom" size="0x8000"> + <rom name="SF2_demo_PAL.bin" size="0x8000" crc="b47582f3" sha1="73625429e73f1b354e0cbe6a360d79590032de2b" offset="0" /> + </dataarea> + </part> + </software> + + <software name="spcrocks" supported="no"> + <description>Space Rocks (RC7, NTSC)</description> + <year>2012</year> + <publisher>Spiceware</publisher> + <sharedfeat name="compatibility" value="NTSC" /> + <part name="cart" interface="a2600_cart"> + <feature name="slot" value="a26_harmony" /> + <dataarea name="rom" size="0x8000"> + <rom name="spacerocks20121129_NTSC.bin" size="0x8000" crc="c5d8eb83" sha1="bf3af5c76bb4dded5cb9c9b232c369250ad20ac4" offset="0" /> + </dataarea> + </part> + </software> + + <software name="spcrockse" cloneof="spcrocks" supported="no"> + <description>Space Rocks (RC7, PAL)</description> + <year>2012</year> + <publisher>Spiceware</publisher> + <sharedfeat name="compatibility" value="PAL" /> + <part name="cart" interface="a2600_cart"> + <feature name="slot" value="a26_harmony" /> + <dataarea name="rom" size="0x8000"> + <rom name="spacerocks20121129_PAL.bin" size="0x8000" crc="133cb923" sha1="0511a35ee435227fbb5665e8488590eb993256f7" offset="0" /> + </dataarea> + </part> + </software> + + <software name="frantic" supported="no"> + <description>Frantic (20140305, NTSC)</description> + <year>2014</year> + <publisher>Spiceware</publisher> + <sharedfeat name="compatibility" value="NTSC" /> + <part name="cart" interface="a2600_cart"> + <feature name="slot" value="a26_harmony" /> + <dataarea name="rom" size="0x8000"> + <rom name="frantic20140305.bin" size="0x8000" crc="04d0f558" sha1="ee2a004a50861c5fdfbdabfa5ed4bf825333ec43" offset="0" /> + </dataarea> + </part> + </software> + + <software name="harmbios" supported="no"> <!-- I think these are the bios roms if you're using it as a multi-game cart? --> + <description>Harmony Bios Updater</description> + <year>2014</year> + <publisher>Harmony</publisher> + <sharedfeat name="compatibility" value="NTSC" /> + <part name="cart" interface="a2600_cart"> + <feature name="slot" value="a26_harmony" /> + <dataarea name="rom" size="0x8000"> + <rom name="bios_updater_NTSC.cu" size="0x8000" crc="03153eb2" sha1="cd9ee1d820737b3887ebe5fc6fe96a2a043ab009" offset="0" /> + </dataarea> + <dataarea name="bios" size="0x21400"> + <rom name="hbios_106_NTSC_official_beta.bin" size="0x21400" crc="1e1d237b" sha1="8fd74e0119bce43a89bcc4998b750bc6884971da" offset="0" /> + <rom name="hbios_106_NTSC_beta_2.bin" size="0x21400" crc="807b86bd" sha1="633960295c30e7430b3ce58f6244495f4b708e9d" offset="0" /> + <rom name="hbios_106_NTSC.bin" size="0x21400" crc="48664301" sha1="aaa5e839f307734306c2a9ccbe38482579c70391" offset="0" /> + + <rom name="hbios_105_NTSC.bin" size="0x19400" crc="c0b8aae9" sha1="68b10153695da505756eb7dc7cc4a7e93fe68860" offset="0" /> + <rom name="hbios_105_PAL50.bin" size="0x19400" crc="fb942c80" sha1="81bba9d9c245d23cc4b9503180ebe2d67bf1e117" offset="0" /> + <rom name="hbios_105_PAL60.bin" size="0x19400" crc="b59ebe6d" sha1="873830286c66935fd23e3ea7c192e6573e056cbd" offset="0" /> + + <rom name="eeloader_104e_NTSC.bin" size="0x36f8" crc="ad04a8d9" sha1="c83d724299875cd5ea8d6be05db12d688ce8eff1" offset="0" /> + <rom name="eeloader_104e_PAL50.bin" size="0x36f8" crc="4868ba51" sha1="e6a65523824ecf4f2a5145e2c5118cfb4bee059d" offset="0" /> + <rom name="eeloader_104e_PAL60.bin" size="0x36f8" crc="58845532" sha1="255b5c9f4f2f7322c20d2619126cd150a1b8f71c" offset="0" /> + + </dataarea> + + </part> + </software> + </softwarelist> + + diff --git a/hash/a5200.xml b/hash/a5200.xml index d6232cf3a63..274a3e142a9 100644 --- a/hash/a5200.xml +++ b/hash/a5200.xml @@ -1472,4 +1472,18 @@ Possible Undumped protos: - </dataarea> </part> </software> + + <software name="5200temp"> + <description>5200 Tempest</description> + <year>2012</year> + <publisher>Atariage</publisher> <!-- unlicensed? --> + <info name="developer" value="Keithen" /> + <part name="cart" interface="a8bit_cart"> + <feature name="slot" value="a5200" /> + <dataarea name="rom" size="32768"> + <rom name="tempest (atariage).bin" size="32768" crc="a6400e17" sha1="0cb2bd6ed89ce6710ac092533a24f1248688c88c" offset="0" /> + </dataarea> + </part> + </software> + </softwarelist> diff --git a/hash/apple2gs.xml b/hash/apple2gs.xml index 5238471d9cd..ddec424df6e 100644 --- a/hash/apple2gs.xml +++ b/hash/apple2gs.xml @@ -2823,7 +2823,7 @@ </software> <software name="kingqst4"> - <description>King's Quest IV </description> + <description>King's Quest IV</description> <year>1989</year> <publisher>Sierra</publisher> @@ -3203,7 +3203,7 @@ <software name="mathblst"> <description>Math Blaster Plus!</description> <year>1989</year> - <publisher>Davidson and Associates </publisher> + <publisher>Davidson and Associates</publisher> <part name="flop1" interface="floppy_3_5"> <dataarea name="flop" size="819264"> diff --git a/hash/bbc_32016_flop.xml b/hash/bbc_32016_flop.xml new file mode 100644 index 00000000000..d27f7000be1 --- /dev/null +++ b/hash/bbc_32016_flop.xml @@ -0,0 +1,195 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE softwarelist SYSTEM "softwarelist.dtd"> + +<!-- Acorn Cambridge Workstation Disks --> + +<!-- Loading Instructions: + + Hold down the SHIFT key and press and release the BREAK key. +--> + +<softwarelist name="bbc_32016_flop" description="Cambridge Workstation Distribution Discs"> + + <software name="panos111" supported="no"> + <description>1 PanOS Startup and Utilities v1.1</description> + <year>1985</year> + <publisher>Acorn Computers</publisher> + <info name="format" value="DFS" /> + <info name="compatibility" value="32016 co-processor" /> + <part name="flop1" interface="floppy_5_25"> + <dataarea name="flop" size="407552"> + <rom name="panos11-1.ssd" size="407552" crc="bec45a4d" sha1="4634c4bc7fc62576a0cfe2ac43d75abfca7458fc" offset="0" /> + </dataarea> + </part> + </software> + + <software name="panos112" supported="no"> + <description>2 PanOS System v1.1</description> + <year>1985</year> + <publisher>Acorn Computers</publisher> + <info name="format" value="DFS" /> + <info name="compatibility" value="32016 co-processor" /> + <part name="flop1" interface="floppy_5_25"> + <dataarea name="flop" size="245760"> + <rom name="panos11-2.ssd" size="245760" crc="e80fb7c4" sha1="41cd9b89a0b3e844f22b2afc7ff4acc52ae7d70c" offset="0" /> + </dataarea> + </part> + </software> + + <software name="panos113" supported="no"> + <description>3 FORTRAN 77 (PanOS) v1.1</description> + <year>1985</year> + <publisher>Acorn Computers</publisher> + <info name="format" value="DFS" /> + <info name="compatibility" value="32016 co-processor" /> + <part name="flop1" interface="floppy_5_25"> + <dataarea name="flop" size="309760"> + <rom name="panos11-3.ssd" size="309760" crc="43841e68" sha1="99afc53f9964f825f0361bbe5f9c228e4a24fa9c" offset="0" /> + </dataarea> + </part> + </software> + + <software name="panos114" supported="no"> + <description>4 ISO PASCAL (PanOS) v1.1</description> + <year>1985</year> + <publisher>Acorn Computers</publisher> + <info name="format" value="DFS" /> + <info name="compatibility" value="32016 co-processor" /> + <part name="flop1" interface="floppy_5_25"> + <dataarea name="flop" size="360960"> + <rom name="panos11-4.ssd" size="360960" crc="634a61a5" sha1="232f80862d038f3932a8333bd3690e2e7f0aa25c" offset="0" /> + </dataarea> + </part> + </software> + + <software name="panos115" supported="no"> + <description>5 C (PanOS) v1.1</description> + <year>1985</year> + <publisher>Acorn Computers</publisher> + <info name="format" value="DFS" /> + <info name="compatibility" value="32016 co-processor" /> + <part name="flop1" interface="floppy_5_25"> + <dataarea name="flop" size="401664"> + <rom name="panos11-5.ssd" size="401664" crc="99c7c7ad" sha1="bf5d4cece6673a04c634ea59af19cad3ed74e58b" offset="0" /> + </dataarea> + </part> + </software> + + <software name="panos116" supported="no"> + <description>6 Cambridge LISP (PanOS) v1.1</description> + <year>1985</year> + <publisher>Acorn Computers</publisher> + <info name="format" value="DFS" /> + <info name="compatibility" value="32016 co-processor" /> + <part name="flop1" interface="floppy_5_25"> + <dataarea name="flop" size="409600"> + <rom name="panos11-6.ssd" size="409600" crc="e125d3c1" sha1="35f3cb89abc909e0d6787ffa2e727f0f4b1937b9" offset="0" /> + </dataarea> + </part> + </software> + + <software name="panos117" supported="no"> + <description>7 Welcome Programs v1.1</description> + <year>1985</year> + <publisher>Acorn Computers</publisher> + <info name="format" value="DFS" /> + <info name="compatibility" value="32016 co-processor" /> + <part name="flop1" interface="floppy_5_25"> + <dataarea name="flop" size="377344"> + <rom name="panos11-7.ssd" size="377344" crc="baa462ea" sha1="22cab34f8f51b13a3995db63a83354097c0a613e" offset="0" /> + </dataarea> + </part> + </software> + + <software name="panos141" supported="no"> + <description>1 PanOS Startup and Utilities v1.4</description> + <year>1985</year> + <publisher>Acorn Computers</publisher> + <info name="format" value="DFS" /> + <info name="compatibility" value="32016 co-processor" /> + <part name="flop1" interface="floppy_5_25"> + <dataarea name="flop" size="384768"> + <rom name="panos14-1.ssd" size="384768" crc="eed42267" sha1="55a8a650ad214e2c623f6c0a2639acc96cd264cf" offset="0" /> + </dataarea> + </part> + </software> + + <software name="panos142" supported="no"> + <description>2 PanOS System v1.4</description> + <year>1985</year> + <publisher>Acorn Computers</publisher> + <info name="format" value="DFS" /> + <info name="compatibility" value="32016 co-processor" /> + <part name="flop1" interface="floppy_5_25"> + <dataarea name="flop" size="205060"> + <rom name="panos14-2.ssd" size="205060" crc="5f0b7639" sha1="4bd9e7ee5db79f4c0f3608b7d2b9b5437aae356d" offset="0" /> + </dataarea> + </part> + </software> + + <software name="panos143" supported="no"> + <description>3 FORTRAN 77 (PanOS) v1.4</description> + <year>1985</year> + <publisher>Acorn Computers</publisher> + <info name="format" value="DFS" /> + <info name="compatibility" value="32016 co-processor" /> + <part name="flop1" interface="floppy_5_25"> + <dataarea name="flop" size="290304"> + <rom name="panos14-3.ssd" size="290304" crc="5b28d9e4" sha1="e8503acb278259483bcb82697c3a8006be09ce42" offset="0" /> + </dataarea> + </part> + </software> + + <software name="panos144" supported="no"> + <description>4 ISO PASCAL (PanOS) v1.4</description> + <year>1985</year> + <publisher>Acorn Computers</publisher> + <info name="format" value="DFS" /> + <info name="compatibility" value="32016 co-processor" /> + <part name="flop1" interface="floppy_5_25"> + <dataarea name="flop" size="378624"> + <rom name="panos14-4.ssd" size="378624" crc="62fc2639" sha1="f2ceeccb021f4c5030150244fb47897cc7e63f80" offset="0" /> + </dataarea> + </part> + </software> + + <software name="panos145" supported="no"> + <description>5 C (PanOS) v1.4</description> + <year>1985</year> + <publisher>Acorn Computers</publisher> + <info name="format" value="DFS" /> + <info name="compatibility" value="32016 co-processor" /> + <part name="flop1" interface="floppy_5_25"> + <dataarea name="flop" size="378624"> + <rom name="panos14-5.ssd" size="378624" crc="2f0940f6" sha1="873942b6033fd234db791b34d4df76a866f366b7" offset="0" /> + </dataarea> + </part> + </software> + + <software name="panos146" supported="no"> + <description>6 Cambridge LISP (PanOS) v1.4</description> + <year>1985</year> + <publisher>Acorn Computers</publisher> + <info name="format" value="DFS" /> + <info name="compatibility" value="32016 co-processor" /> + <part name="flop1" interface="floppy_5_25"> + <dataarea name="flop" size="409088"> + <rom name="panos14-6.ssd" size="409088" crc="5337964d" sha1="bfecd5cada401d6dfeb410ebc17fb62333f19bbc" offset="0" /> + </dataarea> + </part> + </software> + + <software name="panos147" supported="no"> + <description>7 Welcome Programs v1.4</description> + <year>1985</year> + <publisher>Acorn Computers</publisher> + <info name="format" value="DFS" /> + <info name="compatibility" value="32016 co-processor" /> + <part name="flop1" interface="floppy_5_25"> + <dataarea name="flop" size="402176"> + <rom name="panos14-7.ssd" size="402176" crc="2e5e4fe4" sha1="f69687efea606468a72ed1363f6eab0ce8203f6b" offset="0" /> + </dataarea> + </part> + </software> + +</softwarelist> diff --git a/hash/bbc_65c102_flop.xml b/hash/bbc_65c102_flop.xml new file mode 100644 index 00000000000..e57500fa5e3 --- /dev/null +++ b/hash/bbc_65c102_flop.xml @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE softwarelist SYSTEM "softwarelist.dtd"> + +<!-- BBC Master 65C102 Co-Processor Support Disc --> + +<!-- Loading Instructions: + + Hold down the SHIFT key and press and release the BREAK key. +--> + +<softwarelist name="bbc_65c102_flop" description="BBC Master 65C102 Co-Processor Support Disc"> + + <software name="coprosup" supported="no"> + <description>65C102 Co-Processor Support Disc</description> + <year>1983</year> + <publisher>Acorn Computers</publisher> + <info name="format" value="DFS" /> + <info name="compatibility" value="65C102 co-processor" /> + <part name="flop1" interface="floppy_5_25"> + <dataarea name="flop" size="102400"> + <rom name="bbcmaster65c102coprocessorsupportdisc.ssd" size="102400" crc="f6378bb4" sha1="03bfe9e860ecc6117f2e78771c4e301751269055" offset="0" /> + </dataarea> + </part> + </software> + +</softwarelist> diff --git a/hash/bbc_80186_flop.xml b/hash/bbc_80186_flop.xml new file mode 100644 index 00000000000..d6416305ce5 --- /dev/null +++ b/hash/bbc_80186_flop.xml @@ -0,0 +1,234 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE softwarelist SYSTEM "softwarelist.dtd"> + +<!-- BBC Master 512 System Discs --> + +<!-- Loading Instructions: + + Hold down the SHIFT key and press and release the BREAK key. +--> + +<softwarelist name="bbc_80186_flop" description="BBC Master 512 System Discs"> + + <software name="dosboot" supported="no"> + <description>512 Disc 1 DOS Plus Boot v2.1</description> + <year>1986</year> + <publisher>Acorn Computers</publisher> + <info name="format" value="ADFS-DOS" /> + <info name="compatibility" value="80186 co-processor" /> + <part name="flop1" interface="floppy_5_25"> + <dataarea name="flop" size="655360"> + <rom name="bbcmaster512-disc1-dosplusboot-v2.1.adl" size="655360" crc="7805045c" sha1="89ad16c97842f94809cf05eb9b079867944ca8d8" offset="0" /> + </dataarea> + </part> + </software> + + <software name="dosboot12a" cloneof="dosboot" supported="no"> + <description>512 Disc 1 DOS Plus Boot v1.2a</description> + <year>1986</year> + <publisher>Acorn Computers</publisher> + <info name="format" value="ADFS-DOS" /> + <info name="compatibility" value="80186 co-processor" /> + <part name="flop1" interface="floppy_5_25"> + <dataarea name="flop" size="655360"> + <rom name="bbcmaster512-disc1-dosplusboot-v1.2a.adl" size="655360" crc="264fff88" sha1="7d3386e117b96cc08e78d80ba0d226821e945eac" offset="0" /> + </dataarea> + </part> + </software> + + <software name="dosboot12" cloneof="dosboot" supported="no"> + <description>512 Disc 1 DOS Plus Boot v1.2</description> + <year>1986</year> + <publisher>Acorn Computers</publisher> + <info name="format" value="ADFS-DOS" /> + <info name="compatibility" value="80186 co-processor" /> + <part name="flop1" interface="floppy_5_25"> + <dataarea name="flop" size="655360"> + <rom name="bbcmaster512-disc1-dosplusboot-v1.2.adl" size="655360" crc="c2677483" sha1="2df6155aecfd4fc9595cd95359b153d158c313a3" offset="0" /> + </dataarea> + </part> + </software> + + <software name="gemapps" supported="no"> + <description>512 Disc 2 GEM Applications</description> + <year>1986</year> + <publisher>Acorn Computers</publisher> + <info name="format" value="DOS+" /> + <info name="compatibility" value="80186 co-processor" /> + <part name="flop1" interface="floppy_5_25"> + <dataarea name="flop" size="819200"> + <rom name="bbcmaster512-disc2-gemapplications.img" size="819200" crc="68b1cdfe" sha1="0fd737ab5c8499727e6ec3711e59566e702244e7" offset="0" /> + </dataarea> + </part> + </software> + + <software name="gemdata" supported="no"> + <description>512 Disc 3 GEM Data</description> + <year>1986</year> + <publisher>Acorn Computers</publisher> + <info name="format" value="DOS+" /> + <info name="compatibility" value="80186 co-processor" /> + <part name="flop1" interface="floppy_5_25"> + <dataarea name="flop" size="819200"> + <rom name="bbcmaster512-disc3-gemdata.img" size="819200" crc="b463f444" sha1="e80911c292aba1b601507c75d9233a79887e3b51" offset="0" /> + </dataarea> + </part> + </software> + + <software name="misc" supported="no"> + <description>512 Disc 4 Miscellaneous</description> + <year>1986</year> + <publisher>Acorn Computers</publisher> + <info name="format" value="DOS+" /> + <info name="compatibility" value="80186 co-processor" /> + <part name="flop1" interface="floppy_5_25"> + <dataarea name="flop" size="819200"> + <rom name="bbcmaster512-disc4-miscellaneous.img" size="819200" crc="2de63513" sha1="e6718419d4d6f6a834653655f6334667b5c4c355" offset="0" /> + </dataarea> + </part> + </software> + + <software name="dabs11" supported="no"> + <description>Dabs Shareware Vol.1 Disc 1</description> + <year>19??</year> + <publisher>Dabs Press</publisher> + <info name="format" value="DOS+" /> + <info name="compatibility" value="80186 co-processor" /> + <part name="flop1" interface="floppy_5_25"> + <dataarea name="flop" size="819200"> + <rom name="dabs-shareware-vol1-disc1.img" size="819200" crc="767569f6" sha1="103718d7410cf635eb56010fa6204012fcddb719" offset="0" /> + </dataarea> + </part> + </software> + + <software name="dabs12" supported="no"> + <description>Dabs Shareware Vol.1 Disc 2</description> + <year>19??</year> + <publisher>Dabs Press</publisher> + <info name="format" value="DOS+" /> + <info name="compatibility" value="80186 co-processor" /> + <part name="flop1" interface="floppy_5_25"> + <dataarea name="flop" size="819200"> + <rom name="dabs-shareware-vol1-disc2.img" size="819200" crc="011ac2db" sha1="8dc11173655864c6a1d37251bc88f512ba43a09c" offset="0" /> + </dataarea> + </part> + </software> + + <software name="dabs13" supported="no"> + <description>Dabs Shareware Vol.1 Disc 3</description> + <year>19??</year> + <publisher>Dabs Press</publisher> + <info name="format" value="DOS+" /> + <info name="compatibility" value="80186 co-processor" /> + <part name="flop1" interface="floppy_5_25"> + <dataarea name="flop" size="819200"> + <rom name="dabs-shareware-vol1-disc3.img" size="819200" crc="531d3a4b" sha1="a75dd613f4f5bc096a01e259620d16b154305ba8" offset="0" /> + </dataarea> + </part> + </software> + + <software name="dabs14" supported="no"> + <description>Dabs Shareware Vol.1 Disc 4</description> + <year>19??</year> + <publisher>Dabs Press</publisher> + <info name="format" value="DOS+" /> + <info name="compatibility" value="80186 co-processor" /> + <part name="flop1" interface="floppy_5_25"> + <dataarea name="flop" size="819200"> + <rom name="dabs-shareware-vol1-disc4.img" size="819200" crc="ee1a6961" sha1="c970d723d9b9ee55717928850897d6b21c376c5e" offset="0" /> + </dataarea> + </part> + </software> + + <software name="dabs15" supported="no"> + <description>Dabs Shareware Vol.1 Disc 5</description> + <year>19??</year> + <publisher>Dabs Press</publisher> + <info name="format" value="DOS+" /> + <info name="compatibility" value="80186 co-processor" /> + <part name="flop1" interface="floppy_5_25"> + <dataarea name="flop" size="819200"> + <rom name="dabs-shareware-vol1-disc5.img" size="819200" crc="4ab201a7" sha1="094d3af950631a803960d19b573be0e65c19158d" offset="0" /> + </dataarea> + </part> + </software> + + <software name="dabs21" supported="no"> + <description>Dabs Shareware Vol.2 Disc 1</description> + <year>19??</year> + <publisher>Dabs Press</publisher> + <info name="format" value="DOS+" /> + <info name="compatibility" value="80186 co-processor" /> + <part name="flop1" interface="floppy_5_25"> + <dataarea name="flop" size="819200"> + <rom name="dabs-shareware-vol2-disc1.img" size="819200" crc="ba7e3ed4" sha1="b5d649a7bdc4ccd75f99e0636ad0a0b6ec71c4cf" offset="0" /> + </dataarea> + </part> + </software> + + <software name="dabs22" supported="no"> + <description>Dabs Shareware Vol.2 Disc 2</description> + <year>19??</year> + <publisher>Dabs Press</publisher> + <info name="format" value="DOS+" /> + <info name="compatibility" value="80186 co-processor" /> + <part name="flop1" interface="floppy_5_25"> + <dataarea name="flop" size="819200"> + <rom name="dabs-shareware-vol2-disc2.img" size="819200" crc="b858f06c" sha1="698c6a29fc2f549e8b8ff057e1289c41fc6647e5" offset="0" /> + </dataarea> + </part> + </software> + + <software name="dabs23" supported="no"> + <description>Dabs Shareware Vol.2 Disc 3</description> + <year>19??</year> + <publisher>Dabs Press</publisher> + <info name="format" value="DOS+" /> + <info name="compatibility" value="80186 co-processor" /> + <part name="flop1" interface="floppy_5_25"> + <dataarea name="flop" size="819200"> + <rom name="dabs-shareware-vol2-disc3.img" size="819200" crc="2f066a93" sha1="7b2c4b4355ba9855f9167e27d9316ed928dae010" offset="0" /> + </dataarea> + </part> + </software> + + <software name="dabs24" supported="no"> + <description>Dabs Shareware Vol.2 Disc 4</description> + <year>19??</year> + <publisher>Dabs Press</publisher> + <info name="format" value="DOS+" /> + <info name="compatibility" value="80186 co-processor" /> + <part name="flop1" interface="floppy_5_25"> + <dataarea name="flop" size="819200"> + <rom name="dabs-shareware-vol2-disc4.img" size="819200" crc="d507700b" sha1="9d5a75b90eb73387eda913f12dde8cc5cf8c9cab" offset="0" /> + </dataarea> + </part> + </software> + + <software name="dabs25" supported="no"> + <description>Dabs Shareware Vol.2 Disc 5</description> + <year>19??</year> + <publisher>Dabs Press</publisher> + <info name="format" value="DOS+" /> + <info name="compatibility" value="80186 co-processor" /> + <part name="flop1" interface="floppy_5_25"> + <dataarea name="flop" size="819200"> + <rom name="dabs-shareware-vol2-disc5.img" size="819200" crc="3cfdd202" sha1="e4e8230f29aff2c6bc4a1e218c9be4c9d157fbef" offset="0" /> + </dataarea> + </part> + </software> + + <software name="dabs2b" supported="no"> + <description>Dabs Shareware Vol.2 Bonus</description> + <year>19??</year> + <publisher>Dabs Press</publisher> + <info name="format" value="DOS+" /> + <info name="compatibility" value="80186 co-processor" /> + <part name="flop1" interface="floppy_5_25"> + <dataarea name="flop" size="819200"> + <rom name="dabs-shareware-vol2-bonus.img" size="819200" crc="69b81821" sha1="2977d4628e262907ddf5f5b3ad35abf703092809" offset="0" /> + </dataarea> + </part> + </software> + +</softwarelist> diff --git a/hash/bbc_arm_flop.xml b/hash/bbc_arm_flop.xml new file mode 100644 index 00000000000..60f75068514 --- /dev/null +++ b/hash/bbc_arm_flop.xml @@ -0,0 +1,78 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE softwarelist SYSTEM "softwarelist.dtd"> + +<!-- ARM Evaluation System Discs --> + +<!-- Loading Instructions: + + Hold down the SHIFT key and press and release the BREAK key. +--> + +<softwarelist name="bbc_arm_flop" description="ARM Evaluation System Discs"> + + <software name="armeval1" supported="no"> + <description>ARM Evaluation System Disc 1</description> + <year>1986</year> + <publisher>Acorn Computers</publisher> + <info name="format" value="ADFS" /> + <info name="compatibility" value="ARM co-processor" /> + <part name="flop1" interface="floppy_5_25"> + <dataarea name="flop" size="655360"> + <rom name="armevaluationsystem-disc1.adl" size="655360" crc="c8d6fd8d" sha1="fad5516b2407279c68bca0d21cda1a5880a22248" offset="0" /> + </dataarea> + </part> + </software> + + <software name="armeval2" supported="no"> + <description>ARM Evaluation System Disc 2</description> + <year>1986</year> + <publisher>Acorn Computers</publisher> + <info name="format" value="ADFS" /> + <info name="compatibility" value="ARM co-processor" /> + <part name="flop1" interface="floppy_5_25"> + <dataarea name="flop" size="655360"> + <rom name="armevaluationsystem-disc2.adl" size="655360" crc="5fee623f" sha1="ef084f6bac30471e9cbb06a498901e92b858bffa" offset="0" /> + </dataarea> + </part> + </software> + + <software name="armeval3" supported="no"> + <description>ARM Evaluation System Disc 3</description> + <year>1986</year> + <publisher>Acorn Computers</publisher> + <info name="format" value="ADFS" /> + <info name="compatibility" value="ARM co-processor" /> + <part name="flop1" interface="floppy_5_25"> + <dataarea name="flop" size="655360"> + <rom name="armevaluationsystem-disc3.adl" size="655360" crc="8511d59e" sha1="be855b2a96c165cf1c76d9128edafb6df5ba47ca" offset="0" /> + </dataarea> + </part> + </software> + + <software name="armeval4" supported="no"> + <description>ARM Evaluation System Disc 4</description> + <year>1986</year> + <publisher>Acorn Computers</publisher> + <info name="format" value="ADFS" /> + <info name="compatibility" value="ARM co-processor" /> + <part name="flop1" interface="floppy_5_25"> + <dataarea name="flop" size="655360"> + <rom name="armevaluationsystem-disc4.adl" size="655360" crc="78dce270" sha1="4a6974193c1cefe2b7c21d06be33da9e32eea793" offset="0" /> + </dataarea> + </part> + </software> + + <software name="armeval5" supported="no"> + <description>ARM Evaluation System Disc 5</description> + <year>1986</year> + <publisher>Acorn Computers</publisher> + <info name="format" value="ADFS" /> + <info name="compatibility" value="ARM co-processor" /> + <part name="flop1" interface="floppy_5_25"> + <dataarea name="flop" size="655360"> + <rom name="armevaluationsystem-disc5.adl" size="655360" crc="c77d9325" sha1="9ac7e92916a0f69214208d06ae22a285cf3e46d7" offset="0" /> + </dataarea> + </part> + </software> + +</softwarelist> diff --git a/hash/bbc_z80_flop.xml b/hash/bbc_z80_flop.xml new file mode 100644 index 00000000000..6cff60c7cd5 --- /dev/null +++ b/hash/bbc_z80_flop.xml @@ -0,0 +1,278 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE softwarelist SYSTEM "softwarelist.dtd"> + +<!-- BBC Micro Model B Disks - Z80 co-processor required --> + +<!-- Loading CP/M: + + Reset with Z80 co-processor enabled and Acorn CP/M System Disc 1 in drive 0. +--> + +<softwarelist name="bbc_z80_flop" description="BBC Micro Model B disks - Z80"> + + <software name="cpmsys1" supported="no"> + <description>Acorn CP/M System Disc 1</description> + <year>1984</year> + <publisher>Acorn</publisher> + <info name="serial" value="CP2-884-003481" /> + <info name="format" value="CP/M" /> + <info name="usage" value="Hard reset with Z80 co-processor enabled" /> + <info name="compatibility" value="Z80 co-processor" /> + <part name="flop1" interface="floppy_5_25"> + <dataarea name="flop" size="409600"> + <rom name="acorn_cpm_system_disk1.ssd" size="409600" crc="78686d61" sha1="28f33e5e356d307d7e35714b34c18e672aec0031" offset="0" /> + </dataarea> + </part> + </software> + + <software name="cpmsys2" supported="no"> + <description>Acorn CP/M System Disc 2</description> + <year>1984</year> + <publisher>Acorn</publisher> + <info name="format" value="CP/M" /> + <info name="compatibility" value="Z80 co-processor" /> + <part name="flop1" interface="floppy_5_25"> + <dataarea name="flop" size="409600"> + <rom name="acorn_cpm_system_disk2.ssd" size="409600" crc="afeaa342" sha1="e4b838dae211317c8ccadf47a17fa2ab5aa436a4" offset="0" /> + </dataarea> + </part> + </software> + + <software name="cpmsys3" supported="no"> + <description>Acorn CP/M System Disc 3</description> + <year>1984</year> + <publisher>Acorn</publisher> + <info name="format" value="CP/M" /> + <info name="compatibility" value="Z80 co-processor" /> + <part name="flop1" interface="floppy_5_25"> + <dataarea name="flop" size="409600"> + <rom name="acorn_cpm_system_disk3.ssd" size="409600" crc="edc26e0e" sha1="7650ecbd02ee0a9f3e986c96719c791db5505de6" offset="0" /> + </dataarea> + </part> + </software> + + <software name="cpmsys4" supported="no"> + <description>Acorn CP/M System Disc 4</description> + <year>1984</year> + <publisher>Acorn</publisher> + <info name="format" value="CP/M" /> + <info name="compatibility" value="Z80 co-processor" /> + <part name="flop1" interface="floppy_5_25"> + <dataarea name="flop" size="409600"> + <rom name="acorn_cpm_system_disk4.ssd" size="409600" crc="53dbea69" sha1="1ab9fe7f7ea7b69e6dd1a1ebccd24eae9677b749" offset="0" /> + </dataarea> + </part> + </software> + + <software name="cpmsys5" supported="no"> + <description>Acorn CP/M System Disc 5</description> + <year>1984</year> + <publisher>Acorn</publisher> + <info name="serial" value="A02 AC UK0013257" /> + <info name="format" value="CP/M" /> + <info name="compatibility" value="Z80 co-processor" /> + <part name="flop1" interface="floppy_5_25"> + <dataarea name="flop" size="409600"> + <rom name="acorn_cpm_system_disk5.ssd" size="409600" crc="cf426f1c" sha1="7e336b8ae82138b7c6e19c59ba20c0664b4c8a77" offset="0" /> + </dataarea> + </part> + </software> + + <software name="cpmsys6" supported="no"> + <description>Acorn CP/M System Disc 6</description> + <year>1984</year> + <publisher>Acorn</publisher> + <info name="serial" value="A02 AG UK0013440" /> + <info name="format" value="CP/M" /> + <info name="compatibility" value="Z80 co-processor" /> + <part name="flop1" interface="floppy_5_25"> + <dataarea name="flop" size="409600"> + <rom name="acorn_cpm_system_disk6.ssd" size="409600" crc="03575faa" sha1="f568a23ae3b0d17866f55bf16ca29a351850167c" offset="0" /> + </dataarea> + </part> + </software> + + <software name="cpmsys7" supported="no"> + <description>Acorn CP/M System Disc 7</description> + <year>1984</year> + <publisher>Acorn</publisher> + <info name="serial" value="BQ03261BC" /> + <info name="format" value="CP/M" /> + <info name="compatibility" value="Z80 co-processor" /> + <part name="flop1" interface="floppy_5_25"> + <dataarea name="flop" size="409600"> + <rom name="acorn_cpm_system_disk7.ssd" size="409600" crc="8ae52625" sha1="23c102b852eab471a45fac588c8e326cc96e1368" offset="0" /> + </dataarea> + </part> + </software> + + <software name="cpmutils" supported="no"> + <description>CP/M Utilities Disc</description> + <year>1984</year> + <publisher>Acorn</publisher> + <info name="format" value="CP/M" /> + <info name="compatibility" value="Z80 co-processor" /> + <part name="flop1" interface="floppy_5_25"> + <dataarea name="flop" size="409600"> + <rom name="cpm_utilities_disc.dsd" size="409600" crc="1afbcc5f" sha1="ec4cf1810d43e0000b92943204dfd593bec883f1" offset="0" /> + </dataarea> + </part> + </software> + + <software name="basicprg" supported="no"> + <description>BASIC Program Disc</description> + <year>1984</year> + <publisher>Acorn</publisher> + <info name="format" value="CP/M" /> + <info name="compatibility" value="Z80 co-processor" /> + <part name="flop1" interface="floppy_5_25"> + <dataarea name="flop" size="409600"> + <rom name="basic_program_disc.dsd" size="409600" crc="827304e7" sha1="76b808b059982ad6f1ab3454b745f83f2fc6ab1d" offset="0" /> + </dataarea> + </part> + </software> + + <software name="cobolprg" supported="no"> + <description>CIS COBOL Program Disc</description> + <year>1984</year> + <publisher>Acorn</publisher> + <info name="format" value="CP/M" /> + <info name="compatibility" value="Z80 co-processor" /> + <part name="flop1" interface="floppy_5_25"> + <dataarea name="flop" size="409600"> + <rom name="cis_cobol_program_disc.dsd" size="409600" crc="a7b8d740" sha1="f2d6cb366d00031958f1da774bc61521f61f86fe" offset="0" /> + </dataarea> + </part> + </software> + + <software name="memoprg" supported="no"> + <description>MemoPlan Program Disc</description> + <year>1984</year> + <publisher>Acorn</publisher> + <info name="format" value="CP/M" /> + <info name="compatibility" value="Z80 co-processor" /> + <part name="flop1" interface="floppy_5_25"> + <dataarea name="flop" size="409600"> + <rom name="memoplan_program_disc.dsd" size="409600" crc="1a3eaf3e" sha1="87c047857e0bcd4abf6fc1c785e0e0035147fd0a" offset="0" /> + </dataarea> + </part> + </software> + + <software name="graphprg" supported="no"> + <description>GraphPlan Program Disc</description> + <year>1984</year> + <publisher>Acorn</publisher> + <info name="format" value="CP/M" /> + <info name="compatibility" value="Z80 co-processor" /> + <part name="flop1" interface="floppy_5_25"> + <dataarea name="flop" size="409600"> + <rom name="graphplan_program_disc.dsd" size="409600" crc="015eca7c" sha1="c18216ca44bfd21d2119a33630691363b22c32b1" offset="0" /> + </dataarea> + </part> + </software> + + <software name="fileprg" supported="no"> + <description>FilePlan Program Disc</description> + <year>1984</year> + <publisher>Acorn</publisher> + <info name="format" value="CP/M" /> + <info name="compatibility" value="Z80 co-processor" /> + <part name="flop1" interface="floppy_5_25"> + <dataarea name="flop" size="409600"> + <rom name="fileplan_program_disc.dsd" size="409600" crc="8b832b7e" sha1="9d3f9401e098b8ab50c842552eb6ac98195647f7" offset="0" /> + </dataarea> + </part> + </software> + + <software name="accntprg" supported="no"> + <description>Accountant Program Disc</description> + <year>1984</year> + <publisher>Acorn</publisher> + <info name="format" value="CP/M" /> + <info name="compatibility" value="Z80 co-processor" /> + <part name="flop1" interface="floppy_5_25"> + <dataarea name="flop" size="409600"> + <rom name="accountant_program_disc.dsd" size="409600" crc="02a76ee8" sha1="3119b294f63c6beb7726c6a5c73065a130efc8e2" offset="0" /> + </dataarea> + </part> + </software> + + <software name="accntdat" supported="no"> + <description>Accountant Data Disc</description> + <year>1984</year> + <publisher>Acorn</publisher> + <info name="format" value="CP/M" /> + <info name="compatibility" value="Z80 co-processor" /> + <part name="flop1" interface="floppy_5_25"> + <dataarea name="flop" size="409600"> + <rom name="accountant_data_disc.dsd" size="409600" crc="d2b4c506" sha1="875e123044c9dee63c9c1f2b1fa8f248125f3dc7" offset="0" /> + </dataarea> + </part> + </software> + + <software name="nucldef" supported="no"> + <description>Nucleus Definitions Program Disc</description> + <year>1984</year> + <publisher>Acorn</publisher> + <info name="format" value="CP/M" /> + <info name="compatibility" value="Z80 co-processor" /> + <part name="flop1" interface="floppy_5_25"> + <dataarea name="flop" size="409600"> + <rom name="nucleus_definitions_program_disc.dsd" size="409600" crc="447e8629" sha1="2e39dfdae5aebaa7719e35499b13d5e6ac445f03" offset="0" /> + </dataarea> + </part> + </software> + + <software name="nuclrpt" supported="no"> + <description>Nucleus Report Program Disc</description> + <year>1984</year> + <publisher>Acorn</publisher> + <info name="format" value="CP/M" /> + <info name="compatibility" value="Z80 co-processor" /> + <part name="flop1" interface="floppy_5_25"> + <dataarea name="flop" size="409600"> + <rom name="nucleus_reporter_program_disc.dsd" size="409600" crc="c2e51084" sha1="62117dde924b10c7af241e640e468c3ca35db016" offset="0" /> + </dataarea> + </part> + </software> + + <software name="nuclparm" supported="no"> + <description>Nucleus Parameter File Program Disc</description> + <year>1984</year> + <publisher>Acorn</publisher> + <info name="format" value="CP/M" /> + <info name="compatibility" value="Z80 co-processor" /> + <part name="flop1" interface="floppy_5_25"> + <dataarea name="flop" size="409600"> + <rom name="nucleus_parameter_file_program_disc.dsd" size="409600" crc="2c81fc08" sha1="b60bbfac15aab888c5be5e03b5977419b0e61903" offset="0" /> + </dataarea> + </part> + </software> + + <software name="startday" supported="no"> + <description>Start Of Day Disc</description> + <year>1984</year> + <publisher>Acorn</publisher> + <info name="format" value="CP/M" /> + <info name="compatibility" value="Z80 co-processor" /> + <part name="flop1" interface="floppy_5_25"> + <dataarea name="flop" size="409600"> + <rom name="start_of_day_disc.dsd" size="409600" crc="f85aa0f5" sha1="4221d8c64dba5e44acd770effbce7fe2bc0da77e" offset="0" /> + </dataarea> + </part> + </software> + + <software name="colcave" supported="no"> + <description>Colossal Cave</description> + <year>19??</year> + <publisher><unknown></publisher> + <info name="format" value="CP/M" /> + <info name="compatibility" value="Z80 co-processor" /> + <part name="flop1" interface="floppy_5_25"> + <dataarea name="flop" size="409600"> + <rom name="colossal_cave.ssd" size="409600" crc="95094ab0" sha1="0d213680b2934c42b821cfd3796219775780cdc8" offset="0" /> + </dataarea> + </part> + </software> + +</softwarelist> diff --git a/hash/bbca_cass.xml b/hash/bbca_cass.xml index cd2c8a2cdff..5997bd81cd1 100644 --- a/hash/bbca_cass.xml +++ b/hash/bbca_cass.xml @@ -10,6 +10,8 @@ Use the relevant command to load the software, usually CHAIN"" or *RUN, though some earlier titles from Micro Power require *LOAD. --> +<!-- This list was compiled from the archive at http://www.stairwaytohell.com/. Additional titles will be added as they are made available at http://stardot.org.uk/ forum. --> + <softwarelist name="bbca_cass" description="BBC Micro Model A cassettes"> <!-- Games --> @@ -29,6 +31,7 @@ <description>Arcade Action</description> <year>1982</year> <publisher>Acornsoft</publisher> + <info name="release" value="G06" /> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="13352"> <rom name="arcadeaction-v2.5(1982)(acornsoft)(g06).uef" size="13352" crc="6c2db1cd" sha1="b86be839f41ce68dc229f4ca84bac63c24326f9a" offset="0"/> @@ -38,7 +41,7 @@ <software name="beebtrek"> <description>Beebtrek</description> - <year>19??</year> + <year>1982</year> <publisher>Software For All</publisher> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="7235"> @@ -73,6 +76,7 @@ <description>Draughts And Reversi</description> <year>1983</year> <publisher>Acornsoft</publisher> + <info name="release" value="G20" /> <part name="cass1" interface="bbc_cass"> <dataarea name="cass" size="6165"> <rom name="dar-draughts-v2.1(1983)(acornsoft)(g20).uef" size="6165" crc="35e365ed" sha1="0000bae54eaaa8d5507cc0d7a444aaeac03df97d" offset="0" /> @@ -87,7 +91,7 @@ <software name="famgames"> <description>Family Games</description> - <year>19??</year> + <year>1982</year> <publisher>I.J.K.</publisher> <part name="cass1" interface="bbc_cass"> <dataarea name="cass" size="2152"> @@ -123,7 +127,7 @@ <software name="fruitmc"> <description>Fruit Machine</description> - <year>19??</year> + <year>198?</year> <publisher>Computer Concepts</publisher> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="4421"> @@ -209,6 +213,18 @@ </part> </software> + <software name="spacinva"> + <description>Space Invaders 16K</description> + <year>1982</year> + <publisher>David McKeran</publisher> + <info name="usage" value="Load with *RUN" /> + <part name="cass" interface="bbc_cass"> + <dataarea name="cass" size="4513"> + <rom name="spaceinvaders16k_run(1982)(davidmckeran).uef" size="4513" crc="a95a6a41" sha1="dff22b2d7a5c1d5355b8f72edf60acaa67f06c90" offset="0" /> + </dataarea> + </part> + </software> + <software name="spacmaze"> <description>Space Maze</description> <year>1981</year> @@ -222,7 +238,7 @@ <software name="sppirate"> <description>Space Pirates</description> - <year>19??</year> + <year>1982</year> <publisher>Bug Byte</publisher> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="3557"> @@ -233,7 +249,7 @@ <software name="startrek"> <description>Star Trek</description> - <year>19??</year> + <year>1982</year> <publisher>I.J.K.</publisher> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="5376"> @@ -248,6 +264,7 @@ <description>Peeko Computer (Ger)</description> <year>198?</year> <publisher>Acornsoft</publisher> + <info name="release" value="E02" /> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="4821"> <rom name="peekocomputer-german(198x)(acornsoft)(e02).uef" size="4821" crc="c6503a6b" sha1="813a6399a45a75a4aab3d2edd1722488edf41a52" offset="0" /> @@ -259,6 +276,7 @@ <description>Peeko Computer</description> <year>198?</year> <publisher>Acornsoft</publisher> + <info name="release" value="E02" /> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="3993"> <rom name="peekocomputer(198x)(acornsoft)(e02).uef" size="3993" crc="9a78f3b9" sha1="ff974eb52d6d984637e21e15a883a7572991e38b" offset="0" /> @@ -270,6 +288,7 @@ <description>Business Games (Ger)</description> <year>198?</year> <publisher>Acornsoft</publisher> + <info name="release" value="E03" /> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="11858"> <rom name="businessgames-german(198x)(acornsoft)(e03).uef" size="11858" crc="ae23e0dd" sha1="2a4ca1e06870e41d9fa4c4e86ab196251869b160" offset="0" /> @@ -281,6 +300,7 @@ <description>Word Hunt (Ger)</description> <year>198?</year> <publisher>Acornsoft</publisher> + <info name="release" value="E05" /> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="10849"> <rom name="wordhunt-german(198x)(acornsoft)(e05).uef" size="10849" crc="e412d5af" sha1="3163432f2388b0795ec03b61ab77e90e37a3f18d" offset="0" /> @@ -292,6 +312,7 @@ <description>Word Sequencing (Ger)</description> <year>198?</year> <publisher>Acornsoft</publisher> + <info name="release" value="E06" /> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="10883"> <rom name="wordsequencing-german(198x)(acornsoft)(e06).uef" size="10883" crc="605ebb74" sha1="5d2b67151889a0fa90c490dd4db40d579a8fb386" offset="0" /> @@ -303,6 +324,7 @@ <description>Word Sequencing</description> <year>198?</year> <publisher>Acornsoft</publisher> + <info name="release" value="E06" /> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="7955"> <rom name="wordsequencing(198x)(acornsoft)(e06).uef" size="7955" crc="b6a37e42" sha1="b0b2088cd4bbbed7accd33e943eb8f343e36c7a2" offset="0" /> @@ -314,6 +336,7 @@ <description>Missing Signs (Ger)</description> <year>198?</year> <publisher>Acornsoft</publisher> + <info name="release" value="E09" /> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="11055"> <rom name="missingsigns-german(198x)(acornsoft)(e09).uef" size="11055" crc="3a6c4f59" sha1="e02115cbf2cdcc0996b12fe8db25c02ca234248b" offset="0" /> @@ -325,6 +348,7 @@ <description>Missing Signs</description> <year>198?</year> <publisher>Acornsoft</publisher> + <info name="release" value="E09" /> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="7977"> <rom name="missingsigns(198x)(acornsoft)(e09).uef" size="7977" crc="7da85f67" sha1="ebc8116fa980c0d268918a3aa333f772de0a7cb9" offset="0" /> diff --git a/hash/bbcb_cass.xml b/hash/bbcb_cass.xml index 74f030d4883..24df9e99c88 100644 --- a/hash/bbcb_cass.xml +++ b/hash/bbcb_cass.xml @@ -7,11 +7,13 @@ <!-- Loading Instructions: - If the system has a disk drive (which the BBC Model B does by default in MESS) you must type *TAPE, then use the relevant command to load the software, usually CHAIN"" or *RUN, though some earlier titles from Micro Power require *LOAD. + If the system has a disk drive (which the BBC Model B does by default in MAME) you must type *TAPE, then use the relevant command to load the software, usually CHAIN"" or *RUN, though some earlier titles from Micro Power require *LOAD. - To start/stop the tape you must use the MESS menus, so you'll have to turn full keyboard mode off with Scroll Lock, then navigate the menus, turning Scroll Lock back on when you're finished. + To start/stop the tape you must use the MAME menus, so you'll have to turn full keyboard mode off with Scroll Lock, then navigate the menus, turning Scroll Lock back on when you're finished. --> +<!-- This list was compiled from the archive at http://www.stairwaytohell.com/. Additional titles will be added as they are made available at http://stardot.org.uk/ forum. --> + <softwarelist name="bbcb_cass" description="BBC Micro Model B cassettes"> <!-- Games --> @@ -182,6 +184,30 @@ </part> </software> + <software name="3in1a"> + <description>3 in 1 (A) Task Force/Demolish/Cosmos</description> + <year>1983</year> + <publisher>RH Software</publisher> + <info name="release" value="RHS006C" /> + <part name="cass" interface="bbc_cass"> + <dataarea name="cass" size="11743"> + <rom name="3in1a(1983)(rhsoft).uef" size="11743" crc="4b9569a3" sha1="f06da8b81d5a3194968a38face99268a358d0865" offset="0" /> + </dataarea> + </part> + </software> + + <software name="3in1b"> + <description>3 in 1 (B) Death 14/Knockout/Space Raiders</description> + <year>1983</year> + <publisher>RH Software</publisher> + <info name="release" value="RHS007C" /> + <part name="cass" interface="bbc_cass"> + <dataarea name="cass" size="9443"> + <rom name="3in1b(1983)(rhsoft).uef" size="9443" crc="a806a03b" sha1="00fbd8424e9c4907266e46f63a8fe574e982bc99" offset="0" /> + </dataarea> + </part> + </software> + <software name="737flsim"> <description>737 Flight Simulator</description> <year>1983</year> @@ -445,6 +471,7 @@ <description>Airlift (Bug Byte)</description> <year>198?</year> <publisher>Bug Byte</publisher> + <info name="compatibility" value="OS0.1" /> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="4048"> <rom name="airlift(bugbyte).uef" size="4048" crc="320ca53e" sha1="c30257b0139b87ea02a7fb6ca47bab0616dc7674" offset="0" /> @@ -685,6 +712,17 @@ </part> </software> + <software name="airbrush"> + <description>Airbrush</description> + <year>1983</year> + <publisher>Soft Hits</publisher> + <part name="cass" interface="bbc_cass"> + <dataarea name="cass" size="3980"> + <rom name="airbrush(1983)(softhits).uef" size="3980" crc="108683a7" sha1="55a729efbcf8e435d3ef8f31f881b3dd20b9c08d" offset="0" /> + </dataarea> + </part> + </software> + <software name="antix"> <description>Antix</description> <year>19??</year> @@ -760,6 +798,7 @@ <description>Arcadians</description> <year>1982</year> <publisher>Acornsoft</publisher> + <info name="release" value="G14" /> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="13255"> <rom name="arcadians-v1.2(1982)(acornsoft)(g14).uef" size="13255" crc="e8418496" sha1="78c73583c25d54f89d21dbb6564ac4f26c7949b5" offset="0" /> @@ -950,6 +989,7 @@ <description>Aviator</description> <year>1983</year> <publisher>Acornsoft</publisher> + <info name="release" value="G02" /> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="18084"> <rom name="aviator-v1.1(1983)(acornsoft)(g02).uef" size="18084" crc="8fe4373a" sha1="c3853da35b9b22b44333db3cd43cee36fa8922df" offset="0" /> @@ -1264,7 +1304,7 @@ </software> <software name="beebbeep"> - <description>Beeb Beep</description> + <description>Beeb-Beep</description> <year>1982</year> <publisher>I.J.K.</publisher> <part name="cass" interface="bbc_cass"> @@ -1366,6 +1406,7 @@ <description>Black Box and Gambit</description> <year>1984</year> <publisher>Acornsoft</publisher> + <info name="release" value="G34" /> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="13391"> <rom name="blackboxandgambit-v1(1984)(acornsoft)(g34).uef" size="13391" crc="a5be6678" sha1="478967d65ce36a168a0428aa21663f9e65b97411" offset="0" /> @@ -1610,6 +1651,7 @@ <description>Bouncer</description> <year>1984</year> <publisher>Acornsoft</publisher> + <info name="release" value="G35" /> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="8722"> <rom name="bouncer-v1(1984)(acornsoft)(g35).uef" size="8722" crc="6f68649c" sha1="1cd59da929fe95cc04132ef4316f3939ed60f828" offset="0" /> @@ -1632,6 +1674,7 @@ <description>Boxer</description> <year>1984</year> <publisher>Acornsoft</publisher> + <info name="release" value="G31" /> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="9143"> <rom name="boxer-v1(1984)(acornsoft)(g31).uef" size="9143" crc="9b78d174" sha1="47b0b4e13eafcf5fd48064c787cd046a29620093" offset="0" /> @@ -1843,6 +1886,17 @@ </part> </software> + <software name="bunfun"> + <description>Bun Fun</description> + <year>1983</year> + <publisher>Squirrel Soft</publisher> + <part name="cass" interface="bbc_cass"> + <dataarea name="cass" size="5252"> + <rom name="bunfun(1983)(squirrel).uef" size="5252" crc="9e656d0b" sha1="bc711d8577bff7c208eee7d7d304a0adec60605d" offset="0" /> + </dataarea> + </part> + </software> + <software name="cesarcat"> <description>Caesar the Cat</description> <year>198?</year> @@ -1880,6 +1934,7 @@ <description>Carousel</description> <year>1983</year> <publisher>Acornsoft</publisher> + <info name="release" value="G24" /> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="9733"> <rom name="carousel-v1.1(1983)(acornsoft)(g24).uef" size="9733" crc="c8937c86" sha1="064c5a26c72af93f1905d473d94154b739faa74e" offset="0" /> @@ -1887,6 +1942,19 @@ </part> </software> + <software name="carwarsp"> + <description>Car Wars/Planet of the Aliens</description> + <year>1982</year> + <publisher>Software For All</publisher> + <info name="usage" value="CH."CAR-WARS"/CH."ALIEN-P"" /> + <info name="compatibility" value="OS0.1" /> + <part name="cass" interface="bbc_cass"> + <dataarea name="cass" size="5898"> + <rom name="carwars-planetofthealiens(1982)(softwareforall).uef" size="5898" crc="6b5c21be" sha1="118a88d8fcda5020986d09f37e476c6642081e1f" offset="0" /> + </dataarea> + </part> + </software> + <software name="cascad50"> <description>Cascade 50</description> <year>198?</year> @@ -1973,6 +2041,7 @@ <description>Castle of Riddles v1.0</description> <year>1982</year> <publisher>Acornsoft</publisher> + <info name="release" value="G17" /> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="15634"> <rom name="castleofriddles-v1.0(1982)(acornsoft)(g17).uef" size="15634" crc="f61d67f7" sha1="404dfc37c0876d79c7d57c7137943e4916119e25" offset="0" /> @@ -1984,6 +2053,7 @@ <description>Castle of Riddles v2.0</description> <year>1982</year> <publisher>Acornsoft</publisher> + <info name="release" value="G17" /> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="15602"> <rom name="castleofriddles-v2.0(1982)(acornsoft)(g17).uef" size="15602" crc="339f7688" sha1="d36002d0e8ab0b3cfb6672be72a8f36180c26c67" offset="0" /> @@ -2205,6 +2275,7 @@ <description>Chess v2.1</description> <year>1982</year> <publisher>Acornsoft</publisher> + <info name="release" value="G10" /> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="12900"> <rom name="chess-acornsoft-v2.1(1982)(acornsoft)(g10).uef" size="12900" crc="cef54328" sha1="ac378be88dee4df98902f30690338ed84a4481b4" offset="0" /> @@ -2216,6 +2287,7 @@ <description>Chess v2.2</description> <year>1982</year> <publisher>Acornsoft</publisher> + <info name="release" value="G10" /> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="12900"> <rom name="chess-acornsoft-v2.2(1982)(acornsoft)(g10).uef" size="12900" crc="0ab8406d" sha1="a978801af4e9ea4c4eff0db7726b55cf90137ca6" offset="0" /> @@ -2402,6 +2474,17 @@ </part> </software> + <software name="citydefd"> + <description>City Defend</description> + <year>1983</year> + <publisher>MGB Software</publisher> + <part name="cass" interface="bbc_cass"> + <dataarea name="cass" size="3666"> + <rom name="citydefend(1983)(mgb).uef" size="3666" crc="08b47d1c" sha1="6f22bc6e6b502624ca5dd8eefd063241dc00951d" offset="0" /> + </dataarea> + </part> + </software> + <software name="claresjo"> <description>Clares Joystick Software</description> <year>198?</year> @@ -2416,7 +2499,7 @@ <software name="c50fleet"> <description>Class50 Fleet Manager</description> <year>1986</year> - <publisher>DeeKay</publisher> + <publisher>Dee-Kay</publisher> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="9010"> <rom name="class50fleetmanager(1986)(deekay).uef" size="9010" crc="50f6ef8d" sha1="4b64060cad4ebbddd8859bc371c9cff013749631" offset="0" /> @@ -2747,10 +2830,10 @@ <software name="cornishr"> <description>Cornish Riviera</description> <year>1984</year> - <publisher>DeeKay</publisher> + <publisher>Dee-Kay</publisher> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="12748"> - <rom name="cornishriviera(1984)(deekey).uef" size="12748" crc="f6f09624" sha1="ff1c44e18eba1c159c4496d887f8b35b587c9f65" offset="0" /> + <rom name="cornishriviera(1984)(deekay).uef" size="12748" crc="f6f09624" sha1="ff1c44e18eba1c159c4496d887f8b35b587c9f65" offset="0" /> </dataarea> </part> </software> @@ -2836,6 +2919,7 @@ <description>Countdown To Doom</description> <year>1982</year> <publisher>Acornsoft</publisher> + <info name="release" value="G19" /> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="18954"> <rom name="countdowntodoom-v3.2(1982)(acornsoft)(g19).uef" size="18954" crc="3d9938d0" sha1="aa8be5912da9683a32099e57004143fc98b2b7d2" offset="0" /> @@ -2930,6 +3014,7 @@ <description>Crazy Tracer</description> <year>1983</year> <publisher>Acornsoft</publisher> + <info name="release" value="G26" /> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="8535"> <rom name="crazytracer-v1.1(1983)(acornsoft)(g26).uef" size="8535" crc="e21bdd04" sha1="bdcc817714497541709582029c3e30be4a61488d" offset="0" /> @@ -3031,6 +3116,7 @@ <description>Cube Master</description> <year>1982</year> <publisher>Acornsoft</publisher> + <info name="release" value="G08" /> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="5883"> <rom name="cubemaster-v1.0(1982)(acornsoft)(g08).uef" size="5883" crc="0f4a40f6" sha1="bcf0b137a5dcc2e56d10c847d4c372abbe171c44" offset="0" /> @@ -3283,6 +3369,7 @@ <description>Defender v1.0 (Deleted)</description> <year>1982</year> <publisher>Acornsoft</publisher> + <info name="release" value="G02 (deleted)" /> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="8358"> <rom name="defender-v1.0(1982)(acornsoft)(g02).uef" size="8358" crc="d981bff4" sha1="4a38d349f4b23cc7983e1537c85ec89bb8df22d6" offset="0" /> @@ -3310,7 +3397,7 @@ <software name="delticfl"> <description>Deltic Fleet Manager</description> <year>1986</year> - <publisher>DeeKay</publisher> + <publisher>Dee-Kay</publisher> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="10387"> <rom name="delticfleetmanager(1986)(deekay).uef" size="10387" crc="aa950744" sha1="8849d09fb4fa999374bea528885e6653de54275a" offset="0" /> @@ -3731,6 +3818,7 @@ <description>Drogna</description> <year>1983</year> <publisher>Acornsoft</publisher> + <info name="release" value="G27" /> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="7979"> <rom name="drogna-v1(1983)(acornsoft)(g27).uef" size="7979" crc="24ef9bab" sha1="cd41f48683b11593598f59b611df6380f2aab9fc" offset="0" /> @@ -3896,6 +3984,7 @@ <description>Elite</description> <year>1984</year> <publisher>Acornsoft</publisher> + <info name="release" value="G38" /> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="27174"> <rom name="elite-v1.0(1984)(acornsoft)(g38).uef" size="27174" crc="c942b5af" sha1="95be4a10a29af210df0f74529194fb29c8ca0e68" offset="0" /> @@ -4048,11 +4137,11 @@ <software name="evenstar"> <description>Evening Star</description> - <year>198?</year> - <publisher>Hewson</publisher> + <year>1987</year> + <publisher>Hewson Consultants</publisher> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="16686"> - <rom name="eveningstar(hewson).uef" size="16686" crc="c249e3aa" sha1="aeb3937ae0ddb04abe191f83c170417f4d469c65" offset="0" /> + <rom name="eveningstar(1987)(hewson).uef" size="16686" crc="c249e3aa" sha1="aeb3937ae0ddb04abe191f83c170417f4d469c65" offset="0" /> </dataarea> </part> </software> @@ -4170,11 +4259,11 @@ <software name="fantdiam"> <description>Fantasia Diamond</description> - <year>198?</year> - <publisher>Hewson</publisher> + <year>1984</year> + <publisher>Hewson Consultants</publisher> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="14023"> - <rom name="fantasiadiamond_be(hewson).uef" size="14023" crc="05abfffb" sha1="b71f2539c76be388560585ccca602b36d0b0d831" offset="0" /> + <rom name="fantasiadiamond_be(1984)(hewson).uef" size="14023" crc="05abfffb" sha1="b71f2539c76be388560585ccca602b36d0b0d831" offset="0" /> </dataarea> </part> </software> @@ -4282,6 +4371,7 @@ <description>Firebug</description> <year>1984</year> <publisher>Acornsoft</publisher> + <info name="release" value="G39" /> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="9118"> <rom name="firebug-v1(1984)(acornsoft)(g39).uef" size="9118" crc="637c6756" sha1="8b2c5e35e8195bd1cd48671d36466b4cb7d3c390" offset="0" /> @@ -4447,7 +4537,7 @@ <software name="flyingsc"> <description>Flying Scotsman</description> <year>1984</year> - <publisher>DeeKey</publisher> + <publisher>Dee-Kay</publisher> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="12458"> <rom name="flyingscotsman(1984)(deekay).uef" size="12458" crc="7337be10" sha1="d07137c61e8b98b9049fdbdb030e04c69e512e36" offset="0" /> @@ -4572,6 +4662,7 @@ <description>Free Fall</description> <year>1983</year> <publisher>Acornsoft</publisher> + <info name="release" value="G28" /> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="14302"> <rom name="freefall-v1.2(1983)(acornsoft)(g28).uef" size="14302" crc="388da7c1" sha1="6829c13f0d8437b80ab97ce8cc60605143adc4fc" offset="0" /> @@ -4820,8 +4911,21 @@ <year>1983</year> <publisher>Kansas</publisher> <part name="cass" interface="bbc_cass"> - <dataarea name="cass" size="6671"> - <rom name="galacticfirebird(1983)(kansas).uef" size="6671" crc="82b7effb" sha1="1746291194e0527d4b32b99f881b651fa51b5f95" offset="0" /> + <dataarea name="cass" size="6201"> + <rom name="galacticfirebird(1983)(kansas).uef" size="6201" crc="22c5a0f8" sha1="c5ff440649e6175354820b8768770f9d36efed2b" offset="0" /> + </dataarea> + </part> + </software> + + <software name="galintru"> + <description>Galactic Intruder</description> + <year>1983</year> + <publisher>Cosma</publisher> + <info name="usage" value="Load with *RUN" /> + <info name="compatibility" value="OS0.1" /> + <part name="cass" interface="bbc_cass"> + <dataarea name="cass" size="5712"> + <rom name="galacticintruder(1983)(cosma).uef" size="5712" crc="344fdc0a" sha1="92949ce6f003f517eb4a3c8e12e396ac5ef36cce" offset="0" /> </dataarea> </part> </software> @@ -4974,6 +5078,17 @@ </part> </software> + <software name="gampack1"> + <description>Games Pack One</description> + <year>1983</year> + <publisher>Logic Systems</publisher> + <part name="cass" interface="bbc_cass"> + <dataarea name="cass" size="7005"> + <rom name="gamespackone(1983)(logic).uef" size="7005" crc="e8fca86b" sha1="0bcc999316246b726362cfe935cc983da8250497" offset="0" /> + </dataarea> + </part> + </software> + <software name="gamstrat"> <description>Games of Strategy</description> <year>1982</year> @@ -4986,7 +5101,7 @@ </software> <software name="gatecras"> - <description>Gatecrasher </description> + <description>Gatecrasher</description> <year>198?</year> <publisher>Quicksilva</publisher> <part name="cass" interface="bbc_cass"> @@ -5000,6 +5115,7 @@ <description>Gateway To Karos</description> <year>1983</year> <publisher>Acornsoft</publisher> + <info name="release" value="G30" /> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="21761"> <rom name="gatewaytokaros-v1.2(1983)(acornsoft)(g30).uef" size="21761" crc="837ac45a" sha1="3104549e9be80fd055d20254b690871bb93c2a54" offset="0" /> @@ -5007,6 +5123,17 @@ </part> </software> + <software name="gatwexp"> + <description>Gatwick Express</description> + <year>1986</year> + <publisher>Dee-Kay</publisher> + <part name="cass" interface="bbc_cass"> + <dataarea name="cass" size="9582"> + <rom name="gatwickexpress(1986)(deekay).uef" size="9582" crc="7b817880" sha1="cca1f3190934b1ec675b41438e9429e857a86071" offset="0" /> + </dataarea> + </part> + </software> + <software name="genesisp"> <description>Genesis Project</description> <year>198?</year> @@ -5067,6 +5194,7 @@ <description>Go</description> <year>1984</year> <publisher>Acornsoft</publisher> + <info name="release" value="G42" /> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="12814"> <rom name="go-v1(1984)(acornsoft)(g42).uef" size="12814" crc="e7bbcff3" sha1="0189d4ec49f327ee570d007e489e41acf0247003" offset="0" /> @@ -5085,6 +5213,22 @@ </part> </software> + <software name="gobbler"> + <description>Gobbler</description> + <year>1983</year> + <publisher>MGB Software</publisher> + <part name="cass1" interface="bbc_cass"> + <dataarea name="cass" size="3129"> + <rom name="gobbler1k(1983)(mgb).uef" size="3129" crc="f155d05d" sha1="e18d9f3b6bbabd2f91bebcd3a202fe19aa811bb9" offset="0" /> + </dataarea> + </part> + <part name="cass2" interface="bbc_cass"> + <dataarea name="cass" size="3043"> + <rom name="gobbler2j(1983)(mgb).uef" size="3043" crc="7759f9ad" sha1="843dabc4c7c0deee658d39769afe90b50dac2478" offset="0" /> + </dataarea> + </part> + </software> + <software name="golddigg"> <description>Gold Digger</description> <year>1984</year> @@ -5498,14 +5642,25 @@ </part> </software> + <software name="harleq"> + <description>Harlequin</description> + <year>1984</year> + <publisher>Haresoft</publisher> + <part name="cass" interface="bbc_cass"> + <dataarea name="cass" size="10106"> + <rom name="harlequin(1984)(kansas).uef" size="10106" crc="86515ca0" sha1="8818e12fcd96ab25dd3173183c0f4f9f75212718" offset="0" /> + </dataarea> + </part> + </software> + <software name="heathrow"> <description>Heathrow ATC</description> - <year>198?</year> - <publisher>Hewson</publisher> + <year>1984</year> + <publisher>Hewson Consultants</publisher> <info name="usage" value="Load with *RUN" /> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="6540"> - <rom name="heathrowatc_run(hewson).uef" size="6540" crc="842f3975" sha1="c5995c8e7d6c833509ac2ad32f610bfe1ed560c9" offset="0" /> + <rom name="heathrowatc_run(1984)(hewson).uef" size="6540" crc="842f3975" sha1="c5995c8e7d6c833509ac2ad32f610bfe1ed560c9" offset="0" /> </dataarea> </part> </software> @@ -5714,6 +5869,7 @@ <description>Hopper v2.1</description> <year>1983</year> <publisher>Acornsoft</publisher> + <info name="release" value="G23" /> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="7958"> <rom name="hopper-v2.1(1983)(acornsoft)(g23).uef" size="7958" crc="6799d1a5" sha1="0b5bef8cd1fbf0a6032ed705150c6729d30f65f3" offset="0" /> @@ -5725,6 +5881,7 @@ <description>Hopper v2.2</description> <year>1983</year> <publisher>Acornsoft</publisher> + <info name="release" value="G23" /> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="7957"> <rom name="hopper-v2.2(1983)(acornsoft)(g23).uef" size="7957" crc="934807a1" sha1="39eb04e7844d06743e510ad835148bf982e94350" offset="0" /> @@ -5856,7 +6013,7 @@ <software name="hyperdri"> <description>Hyperdrive</description> - <year>198?</year> + <year>1983</year> <publisher>I.J.K.</publisher> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="3892"> @@ -5869,6 +6026,7 @@ <description>Hyper Sports</description> <year>1984</year> <publisher>Imagine</publisher> + <info name="compatibility" value="disable Speech" /> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="42614"> <rom name="hypersports(1984)(imagine).uef" size="42614" crc="0e4c5bd1" sha1="011c3e1089562c85407b25c6394fae2f0ea393b7" offset="0" /> @@ -6141,6 +6299,30 @@ </part> </software> + <software name="invaderm"> + <description>Invaders (MP Software)</description> + <year>1983</year> + <publisher>MP Software</publisher> + <info name="usage" value="Load with *RUN" /> + <part name="cass" interface="bbc_cass"> + <dataarea name="cass" size="3804"> + <rom name="invaders_run(1983)(mpsoft).uef" size="3804" crc="2b10a843" sha1="70843f42ccb7626540d9795ac691c491c18399c5" offset="0" /> + </dataarea> + </part> + </software> + + <software name="invaderp"> + <description>Invaders (PSS)</description> + <year>1982</year> + <publisher>PSS</publisher> + <info name="usage" value="Load with *RUN" /> + <part name="cass" interface="bbc_cass"> + <dataarea name="cass" size="9422"> + <rom name="invaders_run(1982)(pss).uef" size="9422" crc="1cbfc3b3" sha1="e0e38521bc283f8a9b312432d0d351048077f934" offset="0" /> + </dataarea> + </part> + </software> + <software name="invaders"> <description>Invaders (Superior Software)</description> <year>1982</year> @@ -6218,6 +6400,7 @@ <description>JCB Digger</description> <year>1983</year> <publisher>Acornsoft</publisher> + <info name="release" value="G09" /> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="10051"> <rom name="jcbdigger-v1.1(1983)(acornsoft)(g09).uef" size="10051" crc="2a6abe99" sha1="81ee3924e027bf16429d0a013711ebf008c752bc" offset="0" /> @@ -6350,7 +6533,7 @@ </software> <software name="jr"> - <description>JR</description> + <description>J.R.</description> <year>1982</year> <publisher>Software For All</publisher> <part name="cass" interface="bbc_cass"> @@ -6540,6 +6723,7 @@ <description>Kingdom of Hamil</description> <year>1983</year> <publisher>Acornsoft</publisher> + <info name="release" value="G25" /> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="18905"> <rom name="kingdomofhamil-v1.1(1983)(acornsoft)(g25).uef" size="18905" crc="851a33cb" sha1="f19156edaf9ed1097739eda2227e0068d72629a6" offset="0" /> @@ -6673,6 +6857,7 @@ <description>Labyrinth</description> <year>1984</year> <publisher>Acornsoft</publisher> + <info name="release" value="G41" /> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="15623"> <rom name="labyrinth-v1.0(1984)(acornsoft)(g41).uef" size="15623" crc="4052af69" sha1="32955760cde941a02e97371bc30542e235542244" offset="0" /> @@ -6785,7 +6970,7 @@ <software name="lasvegas"> <description>Las Vegas</description> <year>198?</year> - <publisher>RH Soft</publisher> + <publisher>RH Software</publisher> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="4646"> <rom name="lasvegas(rhsoft).uef" size="4646" crc="7579ef3d" sha1="b43a84785f783fa30af0232d11d3f3d8215e60cf" offset="0" /> @@ -6816,8 +7001,8 @@ </software> <software name="leapfrog"> - <description>Leap Frog</description> - <year>198?</year> + <description>Leap-Frog</description> + <year>1983</year> <publisher>I.J.K.</publisher> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="6652"> @@ -6884,7 +7069,7 @@ <software name="lickeyrt"> <description>Lickey Route</description> <year>1985</year> - <publisher>DeeKay</publisher> + <publisher>Dee-Kay</publisher> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="12372"> <rom name="lickeyroute(1985)(deekay).uef" size="12372" crc="079e2ebd" sha1="d51772570b83be8e7c479b3f106374094307c9ea" offset="0" /> @@ -6914,6 +7099,17 @@ </part> </software> + <software name="lcycles"> + <description>Light Cycles</description> + <year>1983</year> + <publisher>PAEAN Systems</publisher> + <part name="cass" interface="bbc_cass"> + <dataarea name="cass" size="4888"> + <rom name="lightcycles(1983)(paean).uef" size="4888" crc="955813de" sha1="ee4e476e4f5aaa698396f6e2a34945788e830b9c" offset="0" /> + </dataarea> + </part> + </software> + <software name="litepen"> <description>LitePen v1.02</description> <year>198?</year> @@ -7159,6 +7355,7 @@ <description>Magic Mushrooms</description> <year>1985</year> <publisher>Acornsoft</publisher> + <info name="release" value="G46" /> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="9083"> <rom name="magicmushrooms-v1(1985)(acornsoft)(g46).uef" size="9083" crc="54d740e1" sha1="a5a4e50e8ef8beef4f0d1ae304aa5c36853382f4" offset="0" /> @@ -7267,7 +7464,7 @@ <software name="mastcutl"> <description>Master Cutler</description> <year>1984</year> - <publisher>DeeKay</publisher> + <publisher>Dee-Kay</publisher> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="12315"> <rom name="mastercutler(1984)(deekay).uef" size="12315" crc="b68d4bf4" sha1="6efe71e668c1ac9b90cd0cbe81eb232c9bb69075" offset="0" /> @@ -7335,6 +7532,7 @@ <description>Maze</description> <year>1982</year> <publisher>Acornsoft</publisher> + <info name="release" value="G11" /> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="10689"> <rom name="maze-v1(1982)(acornsoft)(g11).uef" size="10689" crc="95415e93" sha1="3c725157d1cee91a52bf4a9cbc822d892212e6f4" offset="0" /> @@ -7389,7 +7587,7 @@ <software name="mendipst"> <description>Mendips Stone</description> <year>1986</year> - <publisher>DeeKay</publisher> + <publisher>Dee-Kay</publisher> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="7945"> <rom name="mendipsstone_be(1986)(deekay).uef" size="7945" crc="bc59d28b" sha1="8ccaff6be99b48c0a827e20414dd6d4ccb8b5fa4" offset="0" /> @@ -7412,6 +7610,7 @@ <description>Meteor Mission</description> <year>1984</year> <publisher>Acornsoft</publisher> + <info name="release" value="G29" /> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="7512"> <rom name="meteormission-v1(1984)(acornsoft)(g29).uef" size="7512" crc="921df4c6" sha1="1c0445f26f3607b9c7a69a5d308e587c1b8386b6" offset="0" /> @@ -7434,6 +7633,7 @@ <description>Meteors</description> <year>1982</year> <publisher>Acornsoft</publisher> + <info name="release" value="G13" /> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="6875"> <rom name="meteors-v1(1982)(acornsoft)(g13).uef" size="6875" crc="c737a94a" sha1="f06045f46f052a614bb3e2625007cb6ed5fb719a" offset="0" /> @@ -7628,6 +7828,7 @@ <description>Missile Base v2.0</description> <year>1982</year> <publisher>Acornsoft</publisher> + <info name="release" value="G18" /> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="8534"> <rom name="missilebase-v2.0(1982)(acornsoft)(g18).uef" size="8534" crc="574b5833" sha1="d9cf1b4cbafb2921f1c24af1513d33c769354eab" offset="0" /> @@ -7681,7 +7882,7 @@ <software name="binvader"> <description>Model B Invaders</description> - <year>198?</year> + <year>1983</year> <publisher>I.J.K.</publisher> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="7294"> @@ -7738,6 +7939,7 @@ <description>Monsters v3.0</description> <year>1982</year> <publisher>Acornsoft</publisher> + <info name="release" value="G03" /> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="7388"> <rom name="monsters-v3.0(1982)(acornsoft)(g03).uef" size="7388" crc="60ff8790" sha1="e4a6cdafac14471c2a090c822087fbeb67824ce5" offset="0" /> @@ -7749,6 +7951,7 @@ <description>Monsters v3.1</description> <year>1982</year> <publisher>Acornsoft</publisher> + <info name="release" value="G03" /> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="7385"> <rom name="monsters-v3.1(1982)(acornsoft)(g03).uef" size="7385" crc="8a58e5cc" sha1="440fa54ec9852f42c8d50862e05c9fe99f3fe5c7" offset="0" /> @@ -7760,6 +7963,7 @@ <description>Monsters v3.2</description> <year>1982</year> <publisher>Acornsoft</publisher> + <info name="release" value="G03" /> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="8699"> <rom name="monsters-v3.2(1982)(acornsoft)(g03).uef" size="8699" crc="9b7941e1" sha1="d1a408f1f895de16d9927863f89a27c1ff6e879b" offset="0" /> @@ -8122,6 +8326,17 @@ </part> </software> + <software name="neandman"> + <description>Neanderthal Man</description> + <year>1984</year> + <publisher>Alligata</publisher> + <part name="cass" interface="bbc_cass"> + <dataarea name="cass" size="7559"> + <rom name="neanderthalman(1984)(alligata).uef" size="7559" crc="1be9bd75" sha1="241b0ea1724ab98679a989321db15ad8a85fa200" offset="0" /> + </dataarea> + </part> + </software> + <software name="nemesis"> <description>Nemesis</description> <year>1983</year> @@ -8181,7 +8396,7 @@ <software name="nightfli"> <description>Nightflite</description> <year>198?</year> - <publisher>Hewson</publisher> + <publisher>Hewson Consultants</publisher> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="6031"> <rom name="nightflite(hewson).uef" size="6031" crc="2232802a" sha1="09ba3978a7f3e26095d92699b83742f147ab84ec" offset="0" /> @@ -8545,7 +8760,7 @@ <software name="peakflee"> <description>Peak Fleet Manager</description> <year>1987</year> - <publisher>DeeKay</publisher> + <publisher>Dee-Kay</publisher> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="8628"> <rom name="peakfleetmanager(1987)(deekay).uef" size="8628" crc="665431ac" sha1="684bca758498d6027a68bef6c951b2eb09795b6d" offset="0" /> @@ -8678,6 +8893,7 @@ <description>Philosopher's Quest</description> <year>1982</year> <publisher>Acornsoft</publisher> + <info name="release" value="G01" /> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="16930"> <rom name="philosophersquest-v2.0(1982)(acornsoft)(g01).uef" size="16930" crc="0310eeb8" sha1="dfe227e334b3174029f5445b1b396eadc2fe2826" offset="0" /> @@ -8871,6 +9087,7 @@ <description>Planetoid v2.0</description> <year>1982</year> <publisher>Acornsoft</publisher> + <info name="release" value="G15" /> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="8382"> <rom name="planetoid-v2.0(1982)(acornsoft)(g15).uef" size="8382" crc="c5a6ebed" sha1="27551cee8e8768b33d5fe2092c2fbeb5ecf3d787" offset="0" /> @@ -8882,6 +9099,7 @@ <description>Planetoid v2.1</description> <year>1982</year> <publisher>Acornsoft</publisher> + <info name="release" value="G15" /> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="8381"> <rom name="planetoid-v2.1(1982)(acornsoft)(g15).uef" size="8381" crc="0ae03de4" sha1="06f40cdf9bdc69b89010713c30431f7b6c483c2c" offset="0" /> @@ -8914,7 +9132,7 @@ <software name="plegaron"> <description>Plegaron People Eaters</description> <year>198?</year> - <publisher>RH Soft</publisher> + <publisher>RH Software</publisher> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="3976"> <rom name="plegaronpeopleeaters(rhsoft).uef" size="3976" crc="32afd308" sha1="5f78038bb05173076311c294651e21967917a99a" offset="0" /> @@ -9348,6 +9566,7 @@ <description>Quondam</description> <year>1984</year> <publisher>Acornsoft</publisher> + <info name="release" value="G40" /> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="19907"> <rom name="quondam-v1(1984)(acornsoft)(g40).uef" size="19907" crc="77491c63" sha1="8b1f5f462bc1eb52ffb70cbdc37e678617a7277f" offset="0" /> @@ -9639,6 +9858,7 @@ <description>Revs 4 Tracks</description> <year>1985</year> <publisher>Acornsoft</publisher> + <info name="release" value="G44" /> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="27303"> <rom name="revs4tracks-srr(1985)(acornsoft)(g44).uef" size="27303" crc="64da77c6" sha1="2f438e5c5e117e9c65833264790fb2c2c4158aa6" offset="0" /> @@ -9650,6 +9870,7 @@ <description>Revs</description> <year>1984</year> <publisher>Acornsoft</publisher> + <info name="release" value="G43" /> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="31111"> <rom name="revs.hq(1984)(acornsoft)(g43).uef" size="31111" crc="42b8a114" sha1="9d4ff3aa3370c49b4ace00162d2117f0fe2bc442" offset="0" /> @@ -9751,6 +9972,28 @@ </part> </software> + <software name="robinshw"> + <description>Robin of Sherwood</description> + <year>198?</year> + <publisher>Reflections Software</publisher> + <part name="cass" interface="bbc_cass"> + <dataarea name="cass" size="7164"> + <rom name="robinofsherwood(reflections).uef" size="7164" crc="53394a42" sha1="1dfc4e87c9767829821b30412c30d159f331e343" offset="0" /> + </dataarea> + </part> + </software> + + <software name="robobrai"> + <description>Robo Brain</description> + <year>1983</year> + <publisher>MGB Software</publisher> + <part name="cass" interface="bbc_cass"> + <dataarea name="cass" size="5190"> + <rom name="robobrain(1983)(mgb).uef" size="5190" crc="16abb7b0" sha1="cf3cddc19b1fa4af64a1ba58ad08e5cc1b7dbb86" offset="0" /> + </dataarea> + </part> + </software> + <software name="roboman"> <description>Roboman</description> <year>198?</year> @@ -9799,6 +10042,7 @@ <description>Rocket Raid v1</description> <year>1982</year> <publisher>Acornsoft</publisher> + <info name="release" value="G05" /> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="7912"> <rom name="rocketraid-v1(1982)(acornsoft)(g05).uef" size="7912" crc="15d61216" sha1="843e6ba8637352b946cef168cc1a46c900ca432d" offset="0" /> @@ -9810,6 +10054,7 @@ <description>Rocket Raid v2.0</description> <year>1982</year> <publisher>Acornsoft</publisher> + <info name="release" value="G05" /> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="7931"> <rom name="rocketraid-v2.0(1982)(acornsoft)(g05).uef" size="7931" crc="4827a001" sha1="e67e12145a55be7f1152fe00d7185214abbf3a2b" offset="0" /> @@ -9821,6 +10066,7 @@ <description>Rocket Raid v2.1</description> <year>1982</year> <publisher>Acornsoft</publisher> + <info name="release" value="G05" /> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="7933"> <rom name="rocketraid-v2.1(1982)(acornsoft)(g05).uef" size="7933" crc="f63b0425" sha1="e4178ad35c36791babca5bd5cb4328142eaf2b2c" offset="0" /> @@ -9913,7 +10159,7 @@ <software name="royalsct"> <description>Royal Scot</description> <year>1984</year> - <publisher>DeeKay</publisher> + <publisher>Dee-Kay</publisher> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="12898"> <rom name="royalscot(1984)(deekay).uef" size="12898" crc="27da2fc7" sha1="71e15371dcc300961de29d601ee68371876ec98e" offset="0" /> @@ -9924,7 +10170,7 @@ <software name="rtcbirmi"> <description>RTC Birmingham</description> <year>198?</year> - <publisher>DeeKay</publisher> + <publisher>Dee-Kay</publisher> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="8222"> <rom name="rtcbirmingham_be(deekay).uef" size="8222" crc="ef8b2908" sha1="4c18a4b2f63e4f811ea54b2ed03710f18e20a402" offset="0" /> @@ -9935,7 +10181,7 @@ <software name="rtcbuxtn"> <description>RTC Buxton</description> <year>1987</year> - <publisher>DeeKay</publisher> + <publisher>Dee-Kay</publisher> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="9005"> <rom name="rtcbuxton(1987)(deekay).uef" size="9005" crc="a72b8bfb" sha1="a383afe3e1ae681c338054de03c516132cecf67c" offset="0" /> @@ -9946,7 +10192,7 @@ <software name="rtccrewe"> <description>RTC Crewe</description> <year>1987</year> - <publisher>DeeKay</publisher> + <publisher>Dee-Kay</publisher> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="8527"> <rom name="rtccrewe_be(1987)(deekay).uef" size="8527" crc="56eec158" sha1="785f4f2fa8fedc287e80c0ea60675e884dc95402" offset="0" /> @@ -9957,7 +10203,7 @@ <software name="rtcdonca"> <description>RTC Doncaster</description> <year>1988</year> - <publisher>DeeKay</publisher> + <publisher>Dee-Kay</publisher> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="7551"> <rom name="rtcdoncaster_be(1988)(deekay).uef" size="7551" crc="abced791" sha1="750cf1971d166bff1d08229a416160439c74c6a0" offset="0" /> @@ -9968,7 +10214,7 @@ <software name="rtckingx"> <description>RTC Kings Cross</description> <year>1986</year> - <publisher>DeeKay</publisher> + <publisher>Dee-Kay</publisher> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="11315"> <rom name="rtckingscross(1986)(deekay).uef" size="11315" crc="fe451538" sha1="272796eb55976cd8cf7478463e5966a0770ca88c" offset="0" /> @@ -9979,7 +10225,7 @@ <software name="rtclimes"> <description>RTC Limestreet</description> <year>198?</year> - <publisher>DeeKay</publisher> + <publisher>Dee-Kay</publisher> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="10948"> <rom name="rtclimestreet(deekay).uef" size="10948" crc="5a2aca83" sha1="47b5876b2b9e8043a59a0d2c3232a0a244456839" offset="0" /> @@ -9990,7 +10236,7 @@ <software name="rtcpaddi"> <description>RTC Paddington</description> <year>1986</year> - <publisher>DeeKay</publisher> + <publisher>Dee-Kay</publisher> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="10900"> <rom name="rtcpaddington(1986)(deekay).uef" size="10900" crc="e43dbfef" sha1="c7c1a0dd39c4fcb5784a228f3fcc8fd1cd72b50e" offset="0" /> @@ -10001,7 +10247,7 @@ <software name="rtcpenza"> <description>RTC Penzance</description> <year>1985</year> - <publisher>DeeKay</publisher> + <publisher>Dee-Kay</publisher> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="11330"> <rom name="rtcpenzance(1985)(deekay).uef" size="11330" crc="8a62b238" sha1="ac5599bf803f8bf7cd50a18c157e24b4a452a332" offset="0" /> @@ -10180,6 +10426,17 @@ </part> </software> + <software name="scotrexp"> + <description>ScotRail Express</description> + <year>1985</year> + <publisher>Dee-Kay</publisher> + <part name="cass" interface="bbc_cass"> + <dataarea name="cass" size="11180"> + <rom name="scotrailexpress_b(1985)(deekay).uef" size="11180" crc="7da63e0d" sha1="43ebdfd491958d2258ef374cde08fa565ae361bc" offset="0" /> + </dataarea> + </part> + </software> + <software name="scrabble"> <description>Scrabble</description> <year>198?</year> @@ -10308,18 +10565,18 @@ <publisher>Cabinsoft</publisher> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="2481"> - <rom name="securityromdemonstration(cabinsoft.uef" size="2481" crc="753c6dbf" sha1="b22714e296107cbd2b319938232ed1db7ff28ae5" offset="0" /> + <rom name="securityromdemonstration(cabinsoft).uef" size="2481" crc="753c6dbf" sha1="b22714e296107cbd2b319938232ed1db7ff28ae5" offset="0" /> </dataarea> </part> </software> <software name="sentinel"> <description>Sentinel</description> - <year>198?</year> + <year>1983</year> <publisher>PSS</publisher> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="5940"> - <rom name="sentinel(pss).uef" size="5940" crc="b19573db" sha1="9a2e6c1cfa320a4e3b96eb692c7d9b5e40bf55cf" offset="0" /> + <rom name="sentinel(1983)(pss).uef" size="5940" crc="b19573db" sha1="9a2e6c1cfa320a4e3b96eb692c7d9b5e40bf55cf" offset="0" /> </dataarea> </part> </software> @@ -10328,6 +10585,7 @@ <description>The Seventh Star</description> <year>1984</year> <publisher>Acornsoft</publisher> + <info name="release" value="G36" /> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="22732"> <rom name="seventhstar-v1.0(1984)(acornsoft)(g36).uef" size="22732" crc="a3202842" sha1="a83ddaf4e4d39e61aa44fd7eaa07dea510dbdd36" offset="0" /> @@ -10382,7 +10640,7 @@ <software name="shbounds"> <description>Shedmaster Bounds Greene</description> <year>1987</year> - <publisher>DeeKay</publisher> + <publisher>Dee-Kay</publisher> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="7782"> <rom name="shedmasterboundsgreen_be(1987)(deekay).uef" size="7782" crc="3b4b1e8c" sha1="7b89e3a903d026d2a380e1855b953e5ebf610cde" offset="0" /> @@ -10393,7 +10651,7 @@ <software name="shfinpar"> <description>Shedmaster Finsbury Park</description> <year>198?</year> - <publisher>DeeKay</publisher> + <publisher>Dee-Kay</publisher> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="7479"> <rom name="shedmasterfinsburypark_be(deekay).uef" size="7479" crc="d611e533" sha1="88970796ea38b34f3809ffb2d2dfa642c700c396" offset="0" /> @@ -10492,11 +10750,11 @@ <software name="skislalo"> <description>Ski Slalom</description> - <year>198?</year> - <publisher>RH Soft</publisher> + <year>1982</year> + <publisher>RH Software</publisher> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="7697"> - <rom name="skislalom(rhsoft).uef" size="7697" crc="d8221260" sha1="136d014abd437f1ea00788a32f2b626617b381c7" offset="0" /> + <rom name="skislalom(1982)(rhsoft).uef" size="7697" crc="d8221260" sha1="136d014abd437f1ea00788a32f2b626617b381c7" offset="0" /> </dataarea> </part> </software> @@ -10538,6 +10796,7 @@ <description>Sliding Block Puzzles v1.0</description> <year>1982</year> <publisher>Acornsoft</publisher> + <info name="release" value="G12" /> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="13546"> <rom name="slidingblockpuzzles-v1.0(1982)(acornsoft)(g12).uef" size="13546" crc="731299fd" sha1="8208e7cdb6ba40713fb44922cdf0f893a72ca6d6" offset="0" /> @@ -10549,6 +10808,7 @@ <description>Sliding Block Puzzles v2.3</description> <year>1982</year> <publisher>Acornsoft</publisher> + <info name="release" value="G12" /> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="14702"> <rom name="slidingblockpuzzles-v2.3(1982)(acornsoft)(g12).uef" size="14702" crc="dc26f6e9" sha1="684924eafe6e6054b2aa7c6ca55c01595ec1a330" offset="0" /> @@ -10635,11 +10895,12 @@ <software name="snailtra"> <description>Snail Trail</description> - <year>198?</year> - <publisher>RH Soft</publisher> + <year>1983</year> + <publisher>RH Software</publisher> + <info name="release" value="RHS004C" /> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="3596"> - <rom name="snailtrail(rhsoft).uef" size="3596" crc="ee60ab61" sha1="af8021dead673b6244ce5a08fab4247705a5ce92" offset="0" /> + <rom name="snailtrail(1983)(rhsoft).uef" size="3596" crc="ee60ab61" sha1="af8021dead673b6244ce5a08fab4247705a5ce92" offset="0" /> </dataarea> </part> </software> @@ -10681,6 +10942,7 @@ <description>Snapper v1</description> <year>1982</year> <publisher>Acornsoft</publisher> + <info name="release" value="G04" /> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="6568"> <rom name="snapper-v1(1982)(acornsoft)(g04).uef" size="6568" crc="dd094359" sha1="7baac890a5d40f332f491d3eaebfcc7eaee18044" offset="0" /> @@ -10692,6 +10954,7 @@ <description>Snapper v2.1</description> <year>1982</year> <publisher>Acornsoft</publisher> + <info name="release" value="G04" /> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="7330"> <rom name="snapper-v2.1(1982)(acornsoft)(g04).uef" size="7330" crc="d0ee1a50" sha1="aa34d0e1a6d3fb862194705b77a016822b54ceaf" offset="0" /> @@ -10703,6 +10966,7 @@ <description>Snapper v2.2</description> <year>1982</year> <publisher>Acornsoft</publisher> + <info name="release" value="G04" /> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="7331"> <rom name="snapper-v2.2(1982)(acornsoft)(g04).uef" size="7331" crc="ef5ee5d1" sha1="1a365530f20fcbc99f5b4e9f36445c393b9482d8" offset="0" /> @@ -10714,6 +10978,7 @@ <description>Snooker (Acornsoft)</description> <year>1983</year> <publisher>Acornsoft</publisher> + <info name="release" value="G21" /> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="7270"> <rom name="snooker-acornsoft-v2.0(1983)(acornsoft)(g21).uef" size="7270" crc="d60da42b" sha1="79281c87db0191cc559f542dfcbc43a1ce15880a" offset="0" /> @@ -10790,7 +11055,7 @@ <software name="sdevonhy"> <description>South Devon Hydraulics</description> <year>1986</year> - <publisher>DeeKay</publisher> + <publisher>Dee-Kay</publisher> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="9817"> <rom name="southdevonhydraulics_be(1986)(deekay).uef" size="9817" crc="077ca5a1" sha1="3740634d311e3c629fca3ddc9bb2c7f2fb096100" offset="0" /> @@ -10800,11 +11065,11 @@ <software name="sbelle"> <description>Southern Belle</description> - <year>198?</year> - <publisher>Hewson</publisher> + <year>1986</year> + <publisher>Hewson Consultants</publisher> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="17855"> - <rom name="southernbelle(hewson).uef" size="17855" crc="bbc456d4" sha1="4f11b9d0f4b061cb6c497b4cda8c41f22eb25932" offset="0" /> + <rom name="southernbelle(1986)(hewson).uef" size="17855" crc="bbc456d4" sha1="4f11b9d0f4b061cb6c497b4cda8c41f22eb25932" offset="0" /> </dataarea> </part> </software> @@ -10858,6 +11123,7 @@ <description>Space Fighter</description> <year>1982</year> <publisher>Superior Software</publisher> + <info name="compatibility" value="disable Speech" /> <info name="usage" value="Load with *RUN" /> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="8053"> @@ -10866,6 +11132,18 @@ </part> </software> + <software name="spguard"> + <description>Spaceguard</description> + <year>1983</year> + <publisher>MP Software</publisher> + <info name="usage" value="Load with *RUN" /> + <part name="cass" interface="bbc_cass"> + <dataarea name="cass" size="4280"> + <rom name="spaceguard_run(1983)(mpsoft).uef" size="4280" crc="eeaf252a" sha1="9f56303dda43d941b20191b0433873595af0badf" offset="0" /> + </dataarea> + </part> + </software> + <software name="sphawks"> <description>Space Hawks</description> <year>1982</year> @@ -10901,6 +11179,18 @@ </part> </software> + <software name="spacinvb"> + <description>Space Invaders 32K</description> + <year>1982</year> + <publisher>David McKeran</publisher> + <info name="usage" value="Load with *RUN" /> + <part name="cass" interface="bbc_cass"> + <dataarea name="cass" size="4677"> + <rom name="spaceinvaders32k_run(1982)(davidmckeran).uef" size="4677" crc="0d6b4b06" sha1="4118583ce81c22bc13d06e162e1565935b6c6331" offset="0" /> + </dataarea> + </part> + </software> + <software name="spjailer"> <description>Space Jailer</description> <year>198?</year> @@ -10912,6 +11202,17 @@ </part> </software> + <software name="skingdom"> + <description>Space Kingdom</description> + <year>1983</year> + <publisher>Cosma</publisher> + <part name="cass" interface="bbc_cass"> + <dataarea name="cass" size="10207"> + <rom name="spacekingdom(1983)(cosma).uef" size="10207" crc="6e08b728" sha1="71b43cf1f5ff8fbac04b5a679aaf20e26410ddf2" offset="0" /> + </dataarea> + </part> + </software> + <software name="spmansid"> <description>Spaceman Sid</description> <year>1984</year> @@ -11076,6 +11377,7 @@ <description>Sphinx Adventure</description> <year>1982</year> <publisher>Acornsoft</publisher> + <info name="release" value="G07" /> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="13999"> <rom name="sphinxadventure-v1.0(1982)(acornsoft)(g07).uef" size="13999" crc="d71fcbc5" sha1="177135bfa47a0bc46cdcf29342aacb10339303e6" offset="0" /> @@ -11406,6 +11708,7 @@ <description>Starship Command</description> <year>1983</year> <publisher>Acornsoft</publisher> + <info name="release" value="G22" /> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="12949"> <rom name="starshipcommand-v1.1(1983)(acornsoft)(g22).uef" size="12949" crc="92204551" sha1="7606748c501013fde28357214e74134ce84b5d50" offset="0" /> @@ -11840,6 +12143,7 @@ <description>Super Invaders</description> <year>1982</year> <publisher>Acornsoft</publisher> + <info name="release" value="G16" /> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="6377"> <rom name="superinvaders-v1(1982)(acornsoft)(g16).uef" size="6377" crc="fd1fd9d5" sha1="35e7c2717a8ae193f9321fcb9a3734e1c3ea5668" offset="0" /> @@ -12085,7 +12389,7 @@ <software name="teestyne"> <description>Tees-Tyne Pullman</description> <year>1986</year> - <publisher>DeeKay</publisher> + <publisher>Dee-Kay</publisher> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="11984"> <rom name="tees-tynepullman(1986)(deekay).uef" size="11984" crc="7cec68ec" sha1="12dfe5c4d39e5531210295ca6919ba6812101350" offset="0" /> @@ -12195,6 +12499,7 @@ <description>Tetrapod</description> <year>1984</year> <publisher>Acornsoft</publisher> + <info name="release" value="G32" /> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="9542"> <rom name="tetrapod-v1(1984)(acornsoft)(g32).uef" size="9542" crc="8c1b883a" sha1="d2e327fc890d245dbc624b197b4bc0e86db09911" offset="0" /> @@ -12436,7 +12741,7 @@ <software name="middaysc"> <description>The Midday Scot</description> <year>1986</year> - <publisher>DeeKay</publisher> + <publisher>Dee-Kay</publisher> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="13372"> <rom name="themid-dayscot(1986)(deekay).uef" size="13372" crc="5c9d53d0" sha1="46a66a4ab4df31a088d86f950e5b04e9f4cfe2bc" offset="0" /> @@ -12522,6 +12827,17 @@ </part> </software> + <software name="thamesl"> + <description>Thames Local</description> + <year>1986</year> + <publisher>Dee-Kay</publisher> + <part name="cass" interface="bbc_cass"> + <dataarea name="cass" size="9334"> + <rom name="thameslocal_be(1986)(deekay).uef" size="9334" crc="d313a3de" sha1="20db76cc4073b56e2a1049aa3f28b753b07fe8f7" offset="0" /> + </dataarea> + </part> + </software> + <software name="thesting"> <description>The Sting</description> <year>1984</year> @@ -13029,6 +13345,17 @@ </part> </software> + <software name="tycoon"> + <description>Tycoon</description> + <year>1984</year> + <publisher>Warlock Software</publisher> + <part name="cass" interface="bbc_cass"> + <dataarea name="cass" size="14508"> + <rom name="tycoon(1984)(warlock).uef" size="14508" crc="6efc1003" sha1="957864695a866cb7ba0445d361614e1e3bc81552" offset="0" /> + </dataarea> + </part> + </software> + <software name="ultronpprr" cloneof="ultron"> <description>Ultron (Power Pack)</description> <year>1986</year> @@ -13250,6 +13577,7 @@ <description>Volcano</description> <year>1984</year> <publisher>Acornsoft</publisher> + <info name="release" value="G33" /> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="9951"> <rom name="volcano-v1(1984)(acornsoft)(g33).uef" size="9951" crc="6750ea2f" sha1="5079d10c287cdab70bb1c73078fc05c488aff045" offset="0" /> @@ -14015,6 +14343,7 @@ <description>Desk Diary</description> <year>198?</year> <publisher>Acornsoft</publisher> + <info name="release" value="B01" /> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="8831"> <rom name="deskdiary(198x)(acornsoft)(b01).uef" size="8831" crc="fa88d857" sha1="e12a6e25e371a141c7152a8e88474be2967cb4c2" offset="0" /> @@ -14026,6 +14355,7 @@ <description>Forecast</description> <year>198?</year> <publisher>Acornsoft</publisher> + <info name="release" value="B02" /> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="13657"> <rom name="forecast(198x)(acornsoft)(b02).uef" size="13657" crc="63f563b6" sha1="e3624dcd75ec92a610d152821931ef0a020681db" offset="0" /> @@ -14053,6 +14383,7 @@ <description>Personal Money Management</description> <year>198?</year> <publisher>Acornsoft</publisher> + <info name="release" value="B05" /> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="11383"> <rom name="personalmoneymanagement(198x)(acornsoft)(b05).uef" size="11383" crc="ab870373" sha1="8c287a4e4427ad60c023a651f78e78e8952f9abb" offset="0" /> @@ -14064,6 +14395,7 @@ <description>Stock Control</description> <year>198?</year> <publisher>Acornsoft</publisher> + <info name="release" value="B11" /> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="4706"> <rom name="stockcontrol(198x)(acornsoft)(b11).uef" size="4706" crc="b53b4c25" sha1="e91185367082cced699e8899e62e9d854d79cc6a" offset="0" /> @@ -14263,6 +14595,7 @@ <description>Chemical Analysis</description> <year>198?</year> <publisher>Acornsoft</publisher> + <info name="release" value="E12" /> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="14615"> <rom name="chemicalanalysis(198x)(acornsoft)(e12).uef" size="14615" crc="ba8cf4d3" sha1="8a3ce907763a834a2a1ddd8d26bbc25a9838e6c8" offset="0" /> @@ -14274,6 +14607,7 @@ <description>Chemical Simulations</description> <year>198?</year> <publisher>Acornsoft</publisher> + <info name="release" value="E13" /> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="22182"> <rom name="chemicalsimulations(198x)(acornsoft)(e13).uef" size="22182" crc="120f468c" sha1="991f98f80465c6a7e5c2d3db5b6228f5be247d64" offset="0" /> @@ -14285,6 +14619,7 @@ <description>Chemical Structures</description> <year>198?</year> <publisher>Acornsoft</publisher> + <info name="release" value="E14" /> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="7832"> <rom name="chemicalstructures(198x)(acornsoft)(e14).uef" size="7832" crc="854200b2" sha1="d1076fc51983acdd7eff655256d973a5daa01d4e" offset="0" /> @@ -14746,6 +15081,7 @@ <description>Sentence Sequencing</description> <year>198?</year> <publisher>Acornsoft</publisher> + <info name="release" value="E07" /> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="8628"> <rom name="sentencesequencing(198x)(acornsoft)(e07).uef" size="8628" crc="a7cbdc3b" sha1="ee718b17f7810fffdc309b693873bafca8018933" offset="0" /> @@ -14850,6 +15186,7 @@ <description>Tree Of Knowledge</description> <year>198?</year> <publisher>Acornsoft</publisher> + <info name="release" value="E04" /> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="10563"> <rom name="treeofknowlege(198x)(acornsoft)(e04).uef" size="10563" crc="3c8b5c61" sha1="53d21c483fcbfacb22fb1afc63d1f38bc479e6f2" offset="0" /> @@ -14949,6 +15286,7 @@ <description>Spooky Manor</description> <year>198?</year> <publisher>Acornsoft</publisher> + <info name="release" value="E18" /> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="17433"> <rom name="spookymanor-v1(198x)(acornsoft)(e18).uef" size="17433" crc="14f8ddae" sha1="17a0e69bfb907557f7f90003eeb1cc351fc3ae97" offset="0" /> @@ -14960,6 +15298,7 @@ <description>Workshop</description> <year>198?</year> <publisher>Acornsoft</publisher> + <info name="release" value="E23" /> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="11126"> <rom name="workshop-v1(198x)(acornsoft)(e23).uef" size="11126" crc="abfeb34b" sha1="512dd8b9ca14cefb27978392bcb5ffb98535a715" offset="0" /> @@ -14971,6 +15310,7 @@ <description>ABC</description> <year>198?</year> <publisher>Acornsoft</publisher> + <info name="release" value="E24" /> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="13886"> <rom name="abc(198x)(acornsoft)(e24).uef" size="13886" crc="1da6a521" sha1="0b3ea05602f07fe084f46723f65613f1a13d5a56" offset="0" /> @@ -15009,8 +15349,9 @@ <software name="forth"> <description>Forth</description> - <year>198?</year> + <year>1982</year> <publisher>Acornsoft</publisher> + <info name="release" value="L01" /> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="17212"> <rom name="forth(acornsoft).uef" size="17212" crc="1eda123d" sha1="f4a545734043bc631bfc3affa7bda26203c89b42" offset="0" /> @@ -15022,6 +15363,7 @@ <description>LISP</description> <year>1982</year> <publisher>Acornsoft</publisher> + <info name="release" value="L02" /> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="12734"> <rom name="lisp(1982)(acornsoft)(l02).uef" size="12734" crc="f93222c5" sha1="fd2b12ce8a273d0b2340c86627c82dec85a7366e" offset="0" /> @@ -15159,6 +15501,7 @@ <description>Creative Graphics</description> <year>198?</year> <publisher>Acornsoft</publisher> + <info name="release" value="X01" /> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="9543"> <rom name="creativegraphics(198x)(acornsoft)(x01).uef" size="9543" crc="b1879555" sha1="5f603d2a1c0693c4d91d8695e473e65e5c6ba3c5" offset="0" /> @@ -15197,6 +15540,7 @@ <description>Picture Maker</description> <year>1983</year> <publisher>Acornsoft</publisher> + <info name="release" value="X03" /> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="18501"> <rom name="picturemaker(1983)(acornsoft)(x03).uef" size="18501" crc="5a1ad93a" sha1="a7bec5e1b1271335e33f9fdb92b1bb0dfe01a232" offset="0" /> @@ -15208,6 +15552,7 @@ <description>Shirley Conran's Magic Garden</description> <year>1983</year> <publisher>Acornsoft</publisher> + <info name="release" value="X04" /> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="14024"> <rom name="shirleyconransmagicgarden(1983)(acornsoft)(x04).uef" size="14024" crc="19697140" sha1="992cf0986bffcc8c8c5bf7eccd262ab34157298b" offset="0" /> @@ -15219,6 +15564,7 @@ <description>One to Nine</description> <year>198?</year> <publisher>Acornsoft</publisher> + <info name="release" value="X07" /> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="6845"> <rom name="onetonine(198x)(acornsoft)(x07).uef" size="6845" crc="c9cdc624" sha1="63e3f8d61c49773f2c9437bfb103a0787cf70e5a" offset="0" /> @@ -15230,6 +15576,7 @@ <description>Paul Daniel's Magic Show</description> <year>198?</year> <publisher>Acornsoft</publisher> + <info name="release" value="X11" /> <part name="cass" interface="bbc_cass"> <dataarea name="cass" size="25634"> <rom name="pauldanielsmagicshow(198x)(acornsoft)(x11).uef" size="25634" crc="794f3de0" sha1="efa0139ad02dac3867fb4a446216b384ffb58efa" offset="0" /> @@ -15241,6 +15588,7 @@ <description>Linkword Spanish</description> <year>1984</year> <publisher>Acornsoft</publisher> + <info name="release" value="X15" /> <part name="cass1" interface="bbc_cass"> <dataarea name="cass" size="25919"> <rom name="linkwordspanish-side1(1984)(acornsoft)(x15).uef" size="25919" crc="f67a4b4a" sha1="857996b61e180ac4c5e73c0dc41e1fb07756de46" offset="0" /> diff --git a/hash/bbcb_flop.xml b/hash/bbcb_flop.xml new file mode 100644 index 00000000000..295a030428b --- /dev/null +++ b/hash/bbcb_flop.xml @@ -0,0 +1,117 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE softwarelist SYSTEM "softwarelist.dtd"> + +<!-- BBC Micro Model B Disks --> + +<!-- Loading Instructions: + + Hold down the SHIFT key and press and release the BREAK key. +--> + +<!-- This list was compiled from the archive at http://www.stairwaytohell.com/. Additional titles will be added as they are made available at http://stardot.org.uk/ forum. --> + +<!-- All images in this list contain no protection, they are either deprotected disc images or transferred from cassette. Some may never have been protected and will be marked if known. --> + + +<softwarelist name="bbcb_flop" description="BBC Micro Model B disks"> + + <software name="3dbombal"> + <description>3D Bomb Alley</description> + <year>1983</year> + <publisher>Software Invasion</publisher> + <part name="flop1" interface="floppy_5_25"> + <dataarea name="flop" size="102400"> + <rom name="3dbomballey.ssd" size="102400" crc="5a8deaff" sha1="d0f4716a376e4407492b4db7f87597bc07d7651f" offset="0" /> + </dataarea> + </part> + </software> + + <software name="cutekill"> + <description>Cute To Kill: Beyond Infinity</description> + <year>1987</year> + <publisher>Mandarin</publisher> + <part name="flop1" interface="floppy_5_25"> + <dataarea name="flop" size="48640"> + <rom name="beyondinfinity-cutetokill.ssd" size="48640" crc="350daf5c" sha1="afe6bc6448e86e6bc6bee34cae09c8cf46828b1b" offset="0" /> + </dataarea> + </part> + </software> + + <software name="elite"> + <description>Elite</description> + <year>1984</year> + <publisher>Acornsoft</publisher> + <part name="flop1" interface="floppy_5_25"> + <dataarea name="flop" size="204800"> + <rom name="elitebbc.ssd" size="204800" crc="1f15458d" sha1="ac47c0d6d0006ceef2102dda521df3364aff32aa" offset="0" /> + </dataarea> + </part> + </software> + + <software name="elitexec" supported="partial"> + <description>Elite (Executive Edition)</description> + <year>1986</year> + <publisher>Acornsoft</publisher> + <part name="flop1" interface="floppy_5_25"> + <dataarea name="flop" size="204800"> + <rom name="elite_executive.ssd" size="204800" crc="f10aea60" sha1="cbd40dd9cad231f2f093e64665a69b64ddab5608" offset="0" /> + </dataarea> + </part> + </software> + + <software name="eyes"> + <description>Eyes</description> + <year>1984</year> + <publisher>Ocean (Unreleased)</publisher> + <part name="flop1" interface="floppy_5_25"> + <dataarea name="flop" size="12544"> + <rom name="eyes-unreleased.ssd" size="12544" crc="19f1dd27" sha1="182b05ef661872b4e63a7e627675f1f6297da8df" offset="0" /> + </dataarea> + </part> + </software> + + <software name="frogman"> + <description>Frogman (Demo)</description> + <year>1993</year> + <publisher>Unreleased</publisher> + <part name="flop1" interface="floppy_5_25"> + <dataarea name="flop" size="65280"> + <rom name="frogman-demo.ssd" size="65280" crc="c4fc4bc9" sha1="c81ab2374b31fb3cd761e5a6aca7ed1fc321667f" offset="0" /> + </dataarea> + </part> + </software> + + <software name="mapocaly"> + <description>Mega Apocalypse</description> + <year>1988</year> + <publisher>Martech (Unreleased)</publisher> + <part name="flop1" interface="floppy_5_25"> + <dataarea name="flop" size="40192"> + <rom name="megaapocalypse.ssd" size="40192" crc="4a6e1489" sha1="399e09d9782d7f0068a9acd9113595657dbb4673" offset="0" /> + </dataarea> + </part> + </software> + + <software name="ssgames"> + <description>Superior Software - Games on Disc</description> + <year>1983</year> + <publisher>Superior Software (Demo)</publisher> + <part name="flop1" interface="floppy_5_25"> + <dataarea name="flop" size="78336"> + <rom name="superiorsoftware-games.ssd" size="78336" crc="6ba0c45b" sha1="df86cfeae73db805307b0e3120fe008ab7a5bc38" offset="0" /> + </dataarea> + </part> + </software> + + <software name="welcome"> + <description>Welcome and Disc Utils</description> + <year>1982</year> + <publisher>Acorn</publisher> + <part name="flop1" interface="floppy_5_25"> + <dataarea name="flop" size="78336"> + <rom name="welcome.ssd" size="78336" crc="03728f14" sha1="d212aa33a14b30dc2ff64920f834fe8c4e6715cc" offset="0" /> + </dataarea> + </part> + </software> + +</softwarelist> diff --git a/hash/bbcb_us_flop.xml b/hash/bbcb_us_flop.xml index 9a9f2499922..29c2581d3ce 100644 --- a/hash/bbcb_us_flop.xml +++ b/hash/bbcb_us_flop.xml @@ -14,7 +14,6 @@ <description>Introductory and Utilities Disk</description> <year>1983</year> <publisher>Acorn</publisher> - <info name="protection" value="none" /> <part name="flop1" interface="floppy_5_25"> <dataarea name="flop" size="204800"> <rom name="introductory_utils(1983)(acorn).ssd" size="204800" crc="60612fc2" sha1="037f7c3499547d5ac5f88e812d7765ccaf27d6e1" offset="0" /> diff --git a/hash/bbcm_flop.xml b/hash/bbcm_flop.xml new file mode 100644 index 00000000000..76256841722 --- /dev/null +++ b/hash/bbcm_flop.xml @@ -0,0 +1,41 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE softwarelist SYSTEM "softwarelist.dtd"> + +<!-- BBC Master Disks --> + +<!-- Loading Instructions: + + Hold down the SHIFT key and press and release the BREAK key. + + Ensure suitable DFS is active for FM and MFM images. + - FM requires DFS (D and BREAK) + - MFM requires ADFS (A and BREAK) +--> + +<softwarelist name="bbcm_flop" description="BBC Master disks"> + + <software name="welcomem"> + <description>Welcome & Utilities Disc</description> + <year>1986</year> + <publisher>Acorn</publisher> + <info name="format" value="ADFS" /> + <part name="flop1" interface="floppy_5_25"> + <dataarea name="flop" size="655360"> + <rom name="masterwelcome.adl" size="655360" crc="606598eb" sha1="13cb8944fc6905bc601a94b5c271d1df2b0a4644" offset="0" /> + </dataarea> + </part> + </software> + + <software name="elitexec" supported="partial"> + <description>Elite (Executive Edition)</description> + <year>1986</year> + <publisher>Acornsoft</publisher> + <info name="format" value="DFS" /> + <part name="flop1" interface="floppy_5_25"> + <dataarea name="flop" size="204800"> + <rom name="elite_executive.ssd" size="204800" crc="f10aea60" sha1="cbd40dd9cad231f2f093e64665a69b64ddab5608" offset="0" /> + </dataarea> + </part> + </software> + +</softwarelist> diff --git a/hash/bbcmc_flop.xml b/hash/bbcmc_flop.xml index f685734bd13..258a9407560 100644 --- a/hash/bbcmc_flop.xml +++ b/hash/bbcmc_flop.xml @@ -14,7 +14,6 @@ <description>BBC Master Compact Welcome Disc</description> <year>1986</year> <publisher>Acorn</publisher> - <info name="protection" value="none" /> <part name="flop1" interface="floppy_3_5"> <dataarea name="flop" size="655360"> <rom name="welcome_compact.adl" size="655360" crc="9d747205" sha1="04cfd6d1e08e8f695befb2948e27d63fd7842b8f" offset="0" /> diff --git a/hash/coleco.xml b/hash/coleco.xml index 0507262ed25..1b5fddfcc4f 100644 --- a/hash/coleco.xml +++ b/hash/coleco.xml @@ -2236,7 +2236,7 @@ <software name="startrek"> <!-- Star Trek - Strategic Operations Simulator (1984)(Coleco).bin --> - <description>Star Trek: Strategic Operations Simulator </description> + <description>Star Trek: Strategic Operations Simulator</description> <year>1984</year> <publisher>Coleco / CBS</publisher> <info name="developer" value="Sega" /> diff --git a/hash/cpc_cass.xml b/hash/cpc_cass.xml index 69c76541031..5706cf394ef 100644 --- a/hash/cpc_cass.xml +++ b/hash/cpc_cass.xml @@ -2691,7 +2691,7 @@ Please stick to using the floppy versions for the time being... </software> <software name="avm" supported="no"> - <description>Animal / Vegetable / Mineral (UK) </description> + <description>Animal / Vegetable / Mineral (UK)</description> <year>1984</year> <publisher>Amsoft</publisher> <info name="usage" value="Load with |TAPE and then RUN""" /> @@ -4759,7 +4759,7 @@ Please stick to using the floppy versions for the time being... </software> <software name="billykidlg" cloneof="billykid" supported="no"> - <description>Billy The Kid (UK, LightGun) </description> + <description>Billy The Kid (UK, LightGun)</description> <year>1989</year> <publisher>Mastertronic</publisher> <info name="usage" value="Load with |TAPE and then RUN""" /> @@ -4795,7 +4795,7 @@ Please stick to using the floppy versions for the time being... </software> <software name="bionicc" supported="no"> - <description>Bionic Commando (UK, Colour Screen) </description> + <description>Bionic Commando (UK, Colour Screen)</description> <year>1988</year> <publisher>Go!</publisher> <info name="usage" value="Load with |TAPE and then RUN""" /> @@ -4807,7 +4807,7 @@ Please stick to using the floppy versions for the time being... </software> <software name="bioniccgs" cloneof="bionicc" supported="no"> - <description>Bionic Commando (UK, Green Screen) </description> + <description>Bionic Commando (UK, Green Screen)</description> <year>1988</year> <publisher>Go!</publisher> <info name="usage" value="Load with |TAPE and then RUN""" /> @@ -6219,7 +6219,7 @@ Please stick to using the floppy versions for the time being... <software name="caldrmag" supported="no"> <description>El Caldero Magico (Spa)</description> <year>1986</year> - <publisher>Humanes </publisher> + <publisher>Humanes</publisher> <info name="usage" value="Load with |TAPE and then RUN""" /> <part name="cass1" interface="cpc_cass"> <dataarea name="cass" size="24785"> @@ -6713,7 +6713,7 @@ Please stick to using the floppy versions for the time being... </software> <software name="catastrp" supported="no"> - <description>Catastrophes - Ile Infernale (UK) </description> + <description>Catastrophes - Ile Infernale (UK)</description> <year>1985</year> <publisher>Amsoft</publisher> <info name="usage" value="Load with |TAPE and then RUN""" /> @@ -7171,7 +7171,7 @@ Please stick to using the floppy versions for the time being... </software> <software name="cheatmd2" supported="no"> - <description>Cheat Mode II The Revenge! (UK) </description> + <description>Cheat Mode II The Revenge! (UK)</description> <year>1990</year> <publisher>Amstrad Action</publisher> <info name="usage" value="Load with |TAPE and then RUN""" /> @@ -8739,7 +8739,7 @@ Please stick to using the floppy versions for the time being... </software> <software name="copout" supported="no"> - <description>Cop-Out (UK) </description> + <description>Cop-Out (UK)</description> <year>1986</year> <publisher>Mikrogen</publisher> <info name="usage" value="Load with |TAPE and then RUN""" /> @@ -9743,7 +9743,7 @@ Please stick to using the floppy versions for the time being... </software> <software name="dandares" cloneof="dandare" supported="no"> - <description>Dan Dare - Pilot of the Future (UK)</description> + <description>Dan Dare - Pilot of the Future [Discovery Informatic] (UK)</description> <year>1986</year> <publisher>Discovery Informatic</publisher> <info name="usage" value="Load with |TAPE and then RUN""" /> @@ -9755,7 +9755,7 @@ Please stick to using the floppy versions for the time being... </software> <software name="dandare" supported="no"> - <description>Dan Dare - Pilot of the Future (UK) </description> + <description>Dan Dare - Pilot of the Future [Virgin Games] (UK)</description> <year>1986</year> <publisher>Virgin Games</publisher> <info name="usage" value="Load with |TAPE and then RUN""" /> @@ -10440,7 +10440,7 @@ Please stick to using the floppy versions for the time being... </software> <software name="defordie" supported="no"> - <description>Defend or Die (UK) </description> + <description>Defend or Die (UK)</description> <year>1985</year> <publisher>Alligata Software</publisher> <info name="usage" value="Load with |TAPE and then RUN""" /> @@ -11393,7 +11393,7 @@ Please stick to using the floppy versions for the time being... <software name="ddragon" supported="no"> <description>Double Dragon (UK)</description> <year>1988</year> - <publisher> Animagic </publisher> + <publisher>Animagic</publisher> <info name="usage" value="Load with |TAPE and then RUN""" /> <part name="cass1" interface="cpc_cass"> <dataarea name="cass" size="151797"> @@ -11405,7 +11405,7 @@ Please stick to using the floppy versions for the time being... <software name="ddragons" cloneof="ddragon" supported="no"> <description>Double Dragon (Spa)</description> <year>1988</year> - <publisher> Animagic </publisher> + <publisher>Animagic</publisher> <info name="usage" value="Load with |TAPE and then RUN""" /> <part name="cass1" interface="cpc_cass"> <dataarea name="cass" size="145958"> @@ -20672,7 +20672,7 @@ Please stick to using the floppy versions for the time being... <software name="knightlr" supported="no"> <description>Knight Lore (UK, Ricochet)</description> <year>1984</year> - <publisher> Ricochet </publisher> + <publisher>Ricochet</publisher> <info name="usage" value="Load with |TAPE and then RUN""" /> <part name="cass1" interface="cpc_cass"> <dataarea name="cass" size="42795"> @@ -37630,7 +37630,7 @@ Please stick to using the floppy versions for the time being... </software> <software name="totrecal" supported="no"> - <description>Total Recall (UK) </description> + <description>Total Recall (UK)</description> <year>1990</year> <publisher>Ocean Software</publisher> <info name="usage" value="Load with |TAPE and then RUN""" /> diff --git a/hash/cpc_flop.xml b/hash/cpc_flop.xml index e0aad39d829..cbff12ee39d 100644 --- a/hash/cpc_flop.xml +++ b/hash/cpc_flop.xml @@ -22167,7 +22167,7 @@ stick to CPC-Power disks, when available) <software name="climbit" supported="no"> <description>Climb-It (UK)</description> <year>1985</year> - <publisher> Tynesoft </publisher> + <publisher>Tynesoft</publisher> <part name="flop1" interface="floppy_3"> <dataarea name="flop" size="194816"> <rom name="climb-it (uk) (1985).dsk" size="194816" crc="aa513c20" sha1="7bbd3dcc7c3a425d2fe30184dd921ec93b6327f4" offset="0" /> @@ -22179,7 +22179,7 @@ stick to CPC-Power disks, when available) <software name="climbita" cloneof="climbit" supported="no"> <description>Climb-It (UK, Alt)</description> <year>1985</year> - <publisher> Tynesoft </publisher> + <publisher>Tynesoft</publisher> <part name="flop1" interface="floppy_3"> <dataarea name="flop" size="194816"> <rom name="climbit (1984)(tynesoft).dsk" size="194816" crc="8ee28f87" sha1="a4469759a7393d799bd608e41f444b4840efc758" offset="0" /> diff --git a/hash/dmv.xml b/hash/dmv.xml index 3230286466c..34024b0f67c 100644 --- a/hash/dmv.xml +++ b/hash/dmv.xml @@ -382,7 +382,7 @@ <software name="zcom20"> <!-- CP/M-80 --> <description>Z-Com v2.0</description> <year>1988</year> - <publisher>Alpha Systems </publisher> + <publisher>Alpha Systems</publisher> <part name="flop" interface="floppy_5_25"> <dataarea name="flop" size="235708"> <rom name="580nzbk.td0" size="235708" crc="a5b9fab9" sha1="d96c46c32227b4959844729cb54602b809e45d04" offset="0" /> diff --git a/hash/gameboy.xml b/hash/gameboy.xml index d60af84b7be..1df75b20e3d 100644 --- a/hash/gameboy.xml +++ b/hash/gameboy.xml @@ -22734,7 +22734,7 @@ </software> <software name="wcup94"> - <description>World Cup USA '94 (Euro) </description> + <description>World Cup USA '94 (Euro)</description> <year>1994</year> <publisher>U.S. Gold</publisher> <info name="serial" value="DMG-W9-UKV"/> diff --git a/hash/ibm5150.xml b/hash/ibm5150.xml index 8bfa1bfc4c5..044184ec2f9 100644 --- a/hash/ibm5150.xml +++ b/hash/ibm5150.xml @@ -559,7 +559,7 @@ Known PC Booter Games Not Dumped, Or Dumped and Lost when Demonlord's Site went </software> <software name="defcrown"> - <description>Defender of the Crown [ega] (PC Booter) </description> + <description>Defender of the Crown [ega] (PC Booter)</description> <year>1987</year> <publisher>Mindscape</publisher> <info name="developer" value="Master Designer Software" /> diff --git a/hash/ibm5170.xml b/hash/ibm5170.xml index ab17b4115c7..f285356df25 100644 --- a/hash/ibm5170.xml +++ b/hash/ibm5170.xml @@ -3276,7 +3276,7 @@ Missing files come here </software> <software name="cldispdu"> - <description>Cirrus Logic Display Drivers and Utilities (Version 1.30) </description> + <description>Cirrus Logic Display Drivers and Utilities (Version 1.30)</description> <year>1993</year> <publisher>Knowledge Dynamics Corp,</publisher> <part name="flop1" interface="floppy_3_5"> diff --git a/hash/lisa.xml b/hash/lisa.xml index 99364e71cc7..67dacd2d7ef 100644 --- a/hash/lisa.xml +++ b/hash/lisa.xml @@ -581,7 +581,7 @@ </software> <software name="macwrk3"> - <description>Lisa Macworks XL 3.0 </description> + <description>Lisa Macworks XL 3.0</description> <year>1985</year> <publisher>Apple Computer Inc.</publisher> <info name="finder" value="4.1" /> diff --git a/hash/megadriv.xml b/hash/megadriv.xml index 843499bab81..eb531e19d5d 100644 --- a/hash/megadriv.xml +++ b/hash/megadriv.xml @@ -21791,6 +21791,19 @@ Notice that these are not working on real hardware due to bugged code with VDP i </part> </software> + + <software name="puttsqup" > + <description>Putty Squad (prototype)</description> + <year>1992</year> + <publisher>System 3 / Ocean</publisher> + <part name="cart" interface="megadriv_cart"> + <dataarea name="rom" width="16" endianness="big" size="0x100000"> + <rom name="PS-md.BIN" size="0x100000" crc="2348da80" sha1="f529598f56c581854d2bde2ee960100273813539" offset="0x000000"/> + </dataarea> + </part> + </software> + + <software name="putter"> <description>Putter Golf (Jpn, SegaNet)</description> <year>1991</year> diff --git a/hash/msx1_cart.xml b/hash/msx1_cart.xml index 3edabf9a0d8..8fee1415c74 100644 --- a/hash/msx1_cart.xml +++ b/hash/msx1_cart.xml @@ -13456,7 +13456,7 @@ kept for now until finding out what those bytes affect... <software name="supersyn"> <description>Super Synth (Jpn)</description> <year>1984</year> - <publisher>Victor </publisher> + <publisher>Victor</publisher> <info name="serial" value="M-20001" /> <info name="alt_title" value="スーパーシンセ" /> <part name="cart" interface="msx_cart"> @@ -13469,7 +13469,7 @@ kept for now until finding out what those bytes affect... <software name="supersyna" cloneof="supersyn"> <description>Super Synth (Jpn, Alt)</description> <year>1984</year> - <publisher>Victor </publisher> + <publisher>Victor</publisher> <info name="serial" value="M-20001" /> <info name="alt_title" value="スーパーシンセ" /> <part name="cart" interface="msx_cart"> diff --git a/hash/msx1_flop.xml b/hash/msx1_flop.xml index 75d82782c10..b15cae49df2 100644 --- a/hash/msx1_flop.xml +++ b/hash/msx1_flop.xml @@ -3333,7 +3333,7 @@ The following floppies came with the machines. </software> <software name="odysseyk"> - <description>Odyssey-K </description> + <description>Odyssey-K</description> <year>19??</year> <publisher><tape2disk hack></publisher> <part name="flop1" interface="floppy_3_5"> @@ -7887,7 +7887,7 @@ The following floppies came with the machines. </software> <software name="flashgor"> - <description>Flash Gordon </description> + <description>Flash Gordon</description> <year>19??</year> <publisher><tape2disk hack></publisher> <part name="flop1" interface="floppy_3_5"> @@ -9504,7 +9504,7 @@ The following floppies came with the machines. </software> <software name="jumpland"> - <description>Jump Land </description> + <description>Jump Land</description> <year>19??</year> <publisher><cart2disk hack></publisher> <part name="flop1" interface="floppy_3_5"> @@ -14685,7 +14685,7 @@ The following floppies came with the machines. </software> <software name="wbells"> - <description>Wedding Bells </description> + <description>Wedding Bells</description> <year>19??</year> <publisher><cart2disk hack></publisher> <part name="flop1" interface="floppy_3_5"> diff --git a/hash/osborne1.xml b/hash/osborne1.xml index 55132004944..138aad0a3ea 100644 --- a/hash/osborne1.xml +++ b/hash/osborne1.xml @@ -123,7 +123,7 @@ </software> <software name="actcpm"> - <description>60K CP/M vers 2.20 for Osborne </description> + <description>60K CP/M vers 2.20 for Osborne</description> <year>19??</year> <publisher>Australian Computer & Telecommunications</publisher> <part name="flop1" interface="floppy_5_25"> @@ -280,4 +280,4 @@ </part> </software> -</softwarelist>
\ No newline at end of file +</softwarelist> diff --git a/hash/pc8801_flop.xml b/hash/pc8801_flop.xml index eb66b7041fe..15886d0dae2 100644 --- a/hash/pc8801_flop.xml +++ b/hash/pc8801_flop.xml @@ -43797,7 +43797,7 @@ ExtractDisk [08]"PCM set " -> "gc-clusterz music disk(vol.1-7)_08.d88" </software> <software name="nt3mus05"> - <description>NT-3 Music Disk - Yume no Fantasia - SBII </description> + <description>NT-3 Music Disk - Yume no Fantasia - SBII</description> <year>1991</year> <publisher><doujin></publisher> <info name="developer" value="Active Gamers" /> @@ -53621,7 +53621,7 @@ ExtractDisk [02]"DISK_B " -> "game music library_02.d88" </software> <software name="pc8801gb"> - <description>PC-8801 Game Pack </description> + <description>PC-8801 Game Pack</description> <year>19??</year> <publisher><unknown></publisher> <part name="flop1" interface="floppy_5_25"> diff --git a/hash/pc98.xml b/hash/pc98.xml index b173fe1e073..16e0899c9f0 100644 --- a/hash/pc98.xml +++ b/hash/pc98.xml @@ -48370,7 +48370,7 @@ Requires MS-DOS 5.00H plus an unknown procedure (HDD install?) </software> <software name="microms2" supported="no"> - <description>Micro Musician II </description> + <description>Micro Musician II</description> <year>19??</year> <publisher>Music Network</publisher> <part name="flop1" interface="floppy_5_25"> diff --git a/hash/pico.xml b/hash/pico.xml index 3644ab2e99b..94265c61fa6 100644 --- a/hash/pico.xml +++ b/hash/pico.xml @@ -3823,9 +3823,9 @@ But how do later protos fit with this theory? Maybe the later protos were from t <dataarea name="rom" size="524288"> <rom name="mpr-18458-t.ic1" size="524288" crc="6340c18a" sha1="101d5652ffd704788f1f44b671be843e3430e58a" offset="000000" loadflag="load16_word_swap" /> </dataarea> - <!-- this is a 22 track companion audio CD (to be played on standalone CD player while operating the game?) --> - <!-- dumping software / drive: BurnAtOnce 0.99.5 / TS-L633R --> - <diskarea name="cdrom"> + <!-- this is a 22 track companion audio CD (to be played on standalone CD player while operating the game?) --> + <!-- dumping software / drive: BurnAtOnce 0.99.5 / TS-L633R --> + <diskarea name="cdrom"> <disk name="sanouk5cd" sha1="c9330bbf118405c02347bd83a1cc24ab2bb4310d"/> </diskarea> </part> diff --git a/hash/pro128s_flop.xml b/hash/pro128s_flop.xml new file mode 100644 index 00000000000..b40068439bd --- /dev/null +++ b/hash/pro128s_flop.xml @@ -0,0 +1,407 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE softwarelist SYSTEM "softwarelist.dtd"> + +<!-- Olivetti Prodest PC 128S Disks --> + +<!-- Loading Instructions: + + Hold down the SHIFT key and press and release the BREAK key. + + Most of the dumps in this list were obtained from http://hierax.altervista.org/prodest/adfs.htm, covers and screenshots can also be found at http://pc128s.altervista.org/software.html. +--> + +<softwarelist name="pro128s_flop" description="Olivetti Prodest PC 128S disks"> + + <!-- Games --> + + <software name="aviator"> + <description>Aviator</description> + <year>1987</year> + <publisher>Olivetti Prodest</publisher> + <part name="flop1" interface="floppy_3_5"> + <dataarea name="flop" size="327680"> + <rom name="aviator.adm" size="327680" crc="98f1d06d" sha1="c8614cd080991d19cbf40ef205d049343d738a5f" offset="0" /> + </dataarea> + </part> + </software> + + <software name="bribbon1"> + <description>Blue Ribbon 1</description> + <year>1987</year> + <publisher>Olivetti Prodest</publisher> + <part name="flop1" interface="floppy_3_5"> + <dataarea name="flop" size="327680"> + <rom name="blueribbon1.adm" size="327680" crc="4bda3704" sha1="2c23d43f01d35fc1397377d8317b148be804cc72" offset="0" /> + </dataarea> + </part> + </software> + + <software name="bribbon2"> + <description>Blue Ribbon 2</description> + <year>1987</year> + <publisher>Olivetti Prodest</publisher> + <part name="flop1" interface="floppy_3_5"> + <dataarea name="flop" size="327680"> + <rom name="blueribbon2.adm" size="327680" crc="9cf20547" sha1="3e490286c043b3066a05785cc217b0b0866ffc09" offset="0" /> + </dataarea> + </part> + </software> + + <software name="carambol"> + <description>Carambola</description> + <year>1987</year> + <publisher>Olivetti Prodest</publisher> + <part name="flop1" interface="floppy_3_5"> + <dataarea name="flop" size="327680"> + <rom name="biliardo.adm" size="327680" crc="741ade8a" sha1="304d90b8fbd5c8fbbe77f9ba28708e4fe6196594" offset="0" /> + </dataarea> + </part> + </software> + + <software name="futuresh"> + <description>Future Shock</description> + <year>1987</year> + <publisher>Olivetti Prodest</publisher> + <info name="release" value="SF9960" /> + <part name="flop1" interface="floppy_3_5"> + <dataarea name="flop" size="163840"> + <rom name="futureshock.ads" size="163840" crc="8a57f63a" sha1="b22b82181f9a59c468cf7f438105663ec5a34def" offset="0" /> + </dataarea> + </part> + </software> + + <software name="goal"> + <description>Goal!</description> + <year>1987</year> + <publisher>Olivetti Prodest</publisher> + <info name="release" value="SF9950" /> + <part name="flop1" interface="floppy_3_5"> + <dataarea name="flop" size="163840"> + <rom name="goal.ads" size="163840" crc="d01bfcb5" sha1="1e047405cf875f5849101807fa579a1df186847d" offset="0" /> + </dataarea> + </part> + </software> + + <software name="golf"> + <description>Golf</description> + <year>1987</year> + <publisher>Olivetti Prodest</publisher> + <info name="release" value="SF9610" /> + <part name="flop1" interface="floppy_3_5"> + <dataarea name="flop" size="327680"> + <rom name="birdie.adm" size="327680" crc="a63260d0" sha1="613aceab8d31e38fa762dd3d10c39d58856a7f30" offset="0" /> + </dataarea> + </part> + </software> + + <software name="jetsetw2"> + <description>Jet Set Willy II</description> + <year>1987</year> + <publisher>Olivetti Prodest</publisher> + <info name="release" value="SF1050" /> + <part name="flop1" interface="floppy_3_5"> + <dataarea name="flop" size="163840"> + <rom name="jetsetwilly2.ads" size="163840" crc="c87fdbbd" sha1="c84573f6cc7a24d4c7f0206efc0ce8506abf7d02" offset="0" /> + </dataarea> + </part> + </software> + + <software name="modemsec"> + <description>Modem's Secret</description> + <year>1987</year> + <publisher>Olivetti Prodest</publisher> + <part name="flop1" interface="floppy_3_5"> + <dataarea name="flop" size="327680"> + <rom name="modemssecret.adm" size="327680" crc="c08cd3b7" sha1="ae2ae68fe505d9180dcf85827feeae777c0535e9" offset="0" /> + </dataarea> + </part> + </software> + + <software name="overdriv"> + <description>Overdrive & Centibug</description> + <year>1987</year> + <publisher>Olivetti Prodest</publisher> + <part name="flop1" interface="floppy_3_5"> + <dataarea name="flop" size="327680"> + <rom name="overdrive_centibug.adm" size="327680" crc="a99d9e29" sha1="e44116199ae711131937a5de010bdcab541a87b3" offset="0" /> + </dataarea> + </part> + </software> + + <software name="revs"> + <description>Revs</description> + <year>1987</year> + <publisher>Olivetti Prodest</publisher> + <part name="flop1" interface="floppy_3_5"> + <dataarea name="flop" size="327680"> + <rom name="revs.adm" size="327680" crc="c445ec45" sha1="4bef4edf44a727c0b36d81cf5ddd8064a13eb039" offset="0" /> + </dataarea> + </part> + </software> + + <software name="sarcade1"> + <description>Super Arcade 1</description> + <year>1987</year> + <publisher>Olivetti Prodest</publisher> + <info name="release" value="SF9560" /> + <part name="flop1" interface="floppy_3_5"> + <dataarea name="flop" size="163840"> + <rom name="superarcade1.ads" size="163840" crc="893e6201" sha1="16da10a80ea6bf53b13d1d4225dd86e2801ab3e4" offset="0" /> + </dataarea> + </part> + </software> + + <software name="sarcade2"> + <description>Super Arcade 2</description> + <year>1987</year> + <publisher>Olivetti Prodest</publisher> + <info name="release" value="SF9570" /> + <part name="flop1" interface="floppy_3_5"> + <dataarea name="flop" size="327680"> + <rom name="superarcade2.adm" size="327680" crc="23a176fc" sha1="95652e6d587873a4b71c2ac6acb5c339c27c8f6c" offset="0" /> + </dataarea> + </part> + </software> + + <software name="sarcade3"> + <description>Super Arcade 3</description> + <year>1987</year> + <publisher>Olivetti Prodest</publisher> + <part name="flop1" interface="floppy_3_5"> + <dataarea name="flop" size="327680"> + <rom name="superarcade3.adm" size="327680" crc="c34681e0" sha1="2c3cb301ecb1fbd5b2cedd1d12385ed263c39cfd" offset="0" /> + </dataarea> + </part> + </software> + + <software name="sarcade4"> + <description>Super Arcade 4</description> + <year>1987</year> + <publisher>Olivetti Prodest</publisher> + <part name="flop1" interface="floppy_3_5"> + <dataarea name="flop" size="327680"> + <rom name="superarcade4.adm" size="327680" crc="3b4510ab" sha1="058e56ac99fc8af81c05cefb8bf8954c5fa0d7e7" offset="0" /> + </dataarea> + </part> + </software> + + <software name="sarcade5"> + <description>Super Arcade 5</description> + <year>1987</year> + <publisher>Olivetti Prodest</publisher> + <info name="release" value="SF9850" /> + <part name="flop1" interface="floppy_3_5"> + <dataarea name="flop" size="163840"> + <rom name="superarcade5.ads" size="163840" crc="c588888e" sha1="9ce948ef458a3a74e89d8cc94ff0f292d8ae8989" offset="0" /> + </dataarea> + </part> + </software> + + <software name="scacchi"> + <description>Scacchi (Ita)</description> + <year>1987</year> + <publisher>Olivetti Prodest</publisher> + <part name="flop1" interface="floppy_3_5"> + <dataarea name="flop" size="655360"> + <rom name="scacchi.adl" size="655360" crc="08a45c85" sha1="a0b38359657c6df80f58e00578ad961a316d2385" offset="0" /> + </dataarea> + </part> + </software> + + <software name="smashgra"> + <description>Smash & Grab & Mr Wiz</description> + <year>1987</year> + <publisher>Olivetti Prodest</publisher> + <part name="flop1" interface="floppy_3_5"> + <dataarea name="flop" size="327680"> + <rom name="smash_mrwiz.adm" size="327680" crc="2fba2c48" sha1="2e9c5ce65da83c2ac0b59f387ebe4fbd171d93c5" offset="0" /> + </dataarea> + </part> + </software> + + <software name="starstri"> + <description>Star Striker & Wallaby</description> + <year>1987</year> + <publisher>Olivetti Prodest</publisher> + <part name="flop1" interface="floppy_3_5"> + <dataarea name="flop" size="327680"> + <rom name="starstriker_wallaby.adm" size="327680" crc="7768d196" sha1="f76cf06efc9c9b6ce01d5d6e9c656bdc034236c4" offset="0" /> + </dataarea> + </part> + </software> + + <software name="tetris"> + <description>Tetris</description> + <year>1991</year> + <publisher>ConcaSoft</publisher> + <part name="flop1" interface="floppy_3_5"> + <dataarea name="flop" size="655360"> + <rom name="tetris.adl" size="655360" crc="eca99e42" sha1="5ec5ea8674a9c43df249b2d74095a979b5346ff4" offset="0" /> + </dataarea> + </part> + </software> + + <software name="thebigko"> + <description>The Big KO!</description> + <year>1987</year> + <publisher>Olivetti Prodest</publisher> + <part name="flop1" interface="floppy_3_5"> + <dataarea name="flop" size="163840"> + <rom name="thebigko.ads" size="163840" crc="503066e5" sha1="a3315e6d4f4afa49838f1a1223a9c37192d5db32" offset="0" /> + </dataarea> + </part> + </software> + + <software name="vindaloo"> + <description>Vindaloo</description> + <year>1987</year> + <publisher>Olivetti Prodest</publisher> + <info name="release" value="SF9930" /> + <part name="flop1" interface="floppy_3_5"> + <dataarea name="flop" size="163840"> + <rom name="vindaloo.ads" size="163840" crc="3eca401d" sha1="b5a244ba57977a78e00dbead0e6dcb6e46af9823" offset="0" /> + </dataarea> + </part> + </software> + + <software name="winter"> + <description>Olimpiadi Invernali</description> + <year>1987</year> + <publisher>Olivetti Prodest</publisher> + <part name="flop1" interface="floppy_3_5"> + <dataarea name="flop" size="163840"> + <rom name="winter.ads" size="163840" crc="32d023b5" sha1="4d3fdc630e6170ca9b7b72386047be34aaaf98f2" offset="0" /> + </dataarea> + </part> + </software> + + <software name="xor"> + <description>XOR (Ita)</description> + <year>1987</year> + <publisher>Olivetti Prodest</publisher> + <part name="flop1" interface="floppy_3_5"> + <dataarea name="flop" size="327680"> + <rom name="xor.adm" size="327680" crc="71aef802" sha1="c13637b53a1043558febbc0ca9821f9467f02122" offset="0" /> + </dataarea> + </part> + </software> + + <!-- Business --> + + <software name="artista"> + <description>Artista</description> + <year>1987</year> + <publisher>Olivetti Prodest</publisher> + <part name="flop1" interface="floppy_3_5"> + <dataarea name="flop" size="327680"> + <rom name="artista.adm" size="327680" crc="dbf18b92" sha1="90c595f2fe80d0729c02a5a80c07a28e374f06b0" offset="0" /> + </dataarea> + </part> + </software> + + <software name="betabase"> + <description>Beta-Base (Ita)</description> + <year>1987</year> + <publisher>Clares</publisher> + <part name="flop1" interface="floppy_3_5"> + <dataarea name="flop" size="163840"> + <rom name="betabase.ads" size="163840" crc="8351f1f4" sha1="e015c41a93bf36b681d8fa7f1a18f324e789e554" offset="0" /> + </dataarea> + </part> + </software> + + <software name="mod740"> + <description>Mod. 740 S</description> + <year>1987</year> + <publisher>Olivetti Prodest</publisher> + <part name="flop1" interface="floppy_3_5"> + <dataarea name="flop" size="327680"> + <rom name="mod740.adm" size="327680" crc="8433c242" sha1="dea4dc35a4bdbe087ec2a711869a924788b47a13" offset="0" /> + </dataarea> + </part> + </software> + + <software name="viewindx"> + <description>ViewIndex</description> + <year>1987</year> + <publisher>Olivetti Prodest</publisher> + <part name="flop1" interface="floppy_3_5"> + <dataarea name="flop" size="327680"> + <rom name="viewindex.adm" size="327680" crc="6e780731" sha1="8dfaddaa238e5f3db0b9dcbbc7ef06f4fa52102a" offset="0" /> + </dataarea> + </part> + </software> + + <software name="viewplot"> + <description>ViewPlot</description> + <year>1987</year> + <publisher>Olivetti Prodest</publisher> + <part name="flop1" interface="floppy_3_5"> + <dataarea name="flop" size="327680"> + <rom name="viewplot.adm" size="327680" crc="2ca1eade" sha1="12eaa4ac1c6a6484a886f313bb793a2c4537eb91" offset="0" /> + </dataarea> + </part> + </software> + + <software name="viewstor"> + <description>ViewStore</description> + <year>1987</year> + <publisher>Olivetti Prodest</publisher> + <part name="flop1" interface="floppy_3_5"> + <dataarea name="flop" size="327680"> + <rom name="viewstore.adm" size="327680" crc="c6a08aba" sha1="a8041767230cc029f0d48e9b7aa5bb8131817441" offset="0" /> + </dataarea> + </part> + </software> + + <!-- Educational --> + + <software name="podd"> + <description>Podd (Ita)</description> + <year>1987</year> + <publisher>Olivetti Prodest</publisher> + <part name="flop1" interface="floppy_3_5"> + <dataarea name="flop" size="163840"> + <rom name="podd.ads" size="163840" crc="53f25c1f" sha1="38269a36fd55625bde32cd24f2c90024f8d52bfe" offset="0" /> + </dataarea> + </part> + </software> + + <software name="pmagico"> + <description>Puzzle Magico (Ita)</description> + <year>1987</year> + <publisher>Olivetti Prodest</publisher> + <info name="release" value="SF9830" /> + <part name="flop1" interface="floppy_3_5"> + <dataarea name="flop" size="163840"> + <rom name="puzzlemagico.ads" size="163840" crc="f0ac8983" sha1="58a0ad38b57ca176d69e91e3e249c885800f0f80" offset="0" /> + </dataarea> + </part> + </software> + + <software name="spingi"> + <description>Spingi (Ita)</description> + <year>1987</year> + <publisher>Olivetti Prodest</publisher> + <info name="release" value="SF9840" /> + <part name="flop1" interface="floppy_3_5"> + <dataarea name="flop" size="163840"> + <rom name="spingi.ads" size="163840" crc="c5efa2cb" sha1="1518a33169fefbb6e3659561179a9296b4413f97" offset="0" /> + </dataarea> + </part> + </software> + + <!-- Languages --> + + <software name="basic"> + <description>Introduzione al BASIC</description> + <year>1987</year> + <publisher>Olivetti Prodest</publisher> + <part name="flop1" interface="floppy_3_5"> + <dataarea name="flop" size="327680"> + <rom name="basic.adm" size="327680" crc="c8c8f4ff" sha1="aed619692c40344563fba61a4324b4eeac78c11f" offset="0" /> + </dataarea> + </part> + </software> + +</softwarelist> diff --git a/hash/psion1.xml b/hash/psion1.xml index f0e6bfd1dab..495c839e295 100644 --- a/hash/psion1.xml +++ b/hash/psion1.xml @@ -89,7 +89,7 @@ </software> <software name="restaur" supported="no"> - <description>Restaurant Guide </description> + <description>Restaurant Guide</description> <year>198?</year> <publisher>Psion</publisher> <part name="cart" interface="psion_pack"> diff --git a/hash/psx.xml b/hash/psx.xml index ccb7df129cc..a829f7dc3e3 100755 --- a/hash/psx.xml +++ b/hash/psx.xml @@ -9241,7 +9241,7 @@ A few comments on these: --> <description>Keiba Eito '98 Haru Natsu (Jpn)</description> <year>1998</year> - <publisher> Shangri-La</publisher> + <publisher>Shangri-La</publisher> <info name="alt_title" value="競馬エイト '98春"/> <info name="serial" value="SLPS-01372" /> <sharedfeat name="compatibility" value="NTSC-J"/> @@ -11593,7 +11593,7 @@ A few comments on these: <rom name="Mini-Yonku Hakusou Kyoudai - Rettsu & Go!! - WGP Hyper Heat (Japan) [SLPS-01078].bin" size="460620384" crc="cbf98acb" /> <rom name="Mini-Yonku Hakusou Kyoudai - Rettsu & Go!! - WGP Hyper Heat (Japan) [SLPS-01078].cue" size="144" crc="0da04544" /> --> - <description> Mini-Yonku Bakusou Kyoudai Let's & Go!! - WGP Hyper Heat (Jpn)</description> + <description>Mini-Yonku Bakusou Kyoudai Let's & Go!! - WGP Hyper Heat (Jpn)</description> <year>1997</year> <publisher>Jaleco</publisher> <info name="alt_title" value="ミニ四駆爆走兄弟レッツ&ゴー!!WGPハイパーヒート"/> @@ -13015,7 +13015,7 @@ A few comments on these: <rom name="Pachi-Slot Teiou 6 (Japan) [SLPS-02657].bin" size="38307024" crc="a0db9eb5" /> <rom name="Pachi-Slot Teiou 6 (Japan) [SLPS-02657].cue" size="105" crc="bb8946eb" /> --> - <description> Pachi-Slot Teiou 6 - Kung Fu Lady - BangBang - Prelude 2 (Jpn)</description> + <description>Pachi-Slot Teiou 6 - Kung Fu Lady - BangBang - Prelude 2 (Jpn)</description> <year>2000</year> <publisher>Media</publisher> <info name="alt_title" value="パチスロ帝王6"/> @@ -13051,7 +13051,7 @@ A few comments on these: <rom name="Pachi-Slot Teiou Maker Suishou Manual 3 - I'm Angel - White 2 & Blue 2 (Japan) [SLPS-03130].bin" size="74965296" crc="e480a0e4" /> <rom name="Pachi-Slot Teiou Maker Suishou Manual 3 - I'm Angel - White 2 & Blue 2 (Japan) [SLPS-03130].cue" size="157" crc="bb5b72a8" /> --> - <description> Pachi-Slot Teiou - Maker Suishou Manual 3 - I'm Angel White 2 & Blue 2 (Jpn)</description> + <description>Pachi-Slot Teiou - Maker Suishou Manual 3 - I'm Angel White 2 & Blue 2 (Jpn)</description> <year>2001</year> <publisher>Media</publisher> <info name="alt_title" value="パチスロ帝王 メーカー推奨マニュアル3 アイムエンジェル〜ホワイト2&ブルー2〜"/> @@ -15890,7 +15890,7 @@ A few comments on these: <rom name="Simple 1500 Series Hello Kitty Vol.03 - Hello Kitty Block Kuzushi (Japan) [SLPM-86911].bin" size="290589600" crc="6e2afc57" /> <rom name="Simple 1500 Series Hello Kitty Vol.03 - Hello Kitty Block Kuzushi (Japan) [SLPM-86911].cue" size="728" crc="ad0cb3dc" /> --> - <description> Simple 1500 Series Hello Kitty vol.03 - Hello Kitty Block Kuzushi (Jpn)</description> + <description>Simple 1500 Series Hello Kitty vol.03 - Hello Kitty Block Kuzushi (Jpn)</description> <year>199?</year> <publisher><unknown></publisher> <info name="alt_title" value="SIMPLE1500シリーズ ハローキティ Vol.03 Hello Kitty ブロックくずし"/> diff --git a/hash/saturn.xml b/hash/saturn.xml index 9693ebafbb3..73636feb6a2 100644 --- a/hash/saturn.xml +++ b/hash/saturn.xml @@ -31214,7 +31214,7 @@ Olympic Soccer (Fra) T-7904H-09 <!-- Identifying EXHUMED... --> <software name="exhumed" supported="no"> - <description>Exhumed (Euro) </description> + <description>Exhumed (Euro)</description> <year>1998</year> <publisher>Sega</publisher> <info name="serial" value="MK81084-50"/> @@ -31550,7 +31550,7 @@ Olympic Soccer (Fra) T-7904H-09 <!-- Identifying Gun Griffon - The Eurasian Conflict v1.00 (1996)(Sega)(PAL)[!]... --> <software name="gungriff" supported="no"> - <description>Gungriffon (Euro) </description> + <description>Gungriffon (Euro)</description> <year>1996</year> <publisher>Sega</publisher> <info name="serial" value="MK81046-50"/> @@ -31943,7 +31943,7 @@ Olympic Soccer (Fra) T-7904H-09 <!-- Identifying The Lost World Jurassic Park... --> <software name="lostwrld" supported="no"> - <description>The Lost World - Jurassic Park (Euro) </description> + <description>The Lost World - Jurassic Park (Euro)</description> <year>1997</year> <publisher>Sega</publisher> <info name="serial" value="MK81065-50"/> @@ -32509,7 +32509,7 @@ Olympic Soccer (Fra) T-7904H-09 <!-- Identifying nights... --> <software name="nights" supported="no"> - <description>NiGHTS - into Dreams... (Euro) </description> + <description>NiGHTS - into Dreams... (Euro)</description> <year>1996</year> <publisher>Sega</publisher> <info name="serial" value="MK81020-50"/> @@ -33699,7 +33699,7 @@ Olympic Soccer (Fra) T-7904H-09 <!-- Identifying Ultimate Mortal Kombat 3 v1.007 (1996)(GT Interactive)(PAL)[!]... --> <software name="umk3" supported="no"> - <description>Ultimate Mortal Kombat 3 (Euro) </description> + <description>Ultimate Mortal Kombat 3 (Euro)</description> <year>1996</year> <publisher>GT Interactive</publisher> <info name="serial" value="T-25403H-50?"/> @@ -38620,7 +38620,7 @@ Olympic Soccer (Fra) T-7904H-09 <!-- Identifying vc2alpha... --> <software name="vcop2p" cloneof="vcop2" supported="no"> - <description>Virtua Cop 2 (Euro, Prototype 19951020) </description> + <description>Virtua Cop 2 (Euro, Prototype 19951020)</description> <year>1996</year> <publisher>Sega</publisher> <sharedfeat name="compatibility" value="PAL"/> @@ -38745,7 +38745,7 @@ Olympic Soccer (Fra) T-7904H-09 --> <!-- Identifying ejim2beta... --> <software name="ejim2p" cloneof="ejim2" supported="no"> - <description>Earthworm Jim 2 (Prototype 19951229) </description> + <description>Earthworm Jim 2 (Prototype 19951229)</description> <year>1996</year> <publisher>Playmates Interactive</publisher> <part name="cdrom" interface="sat_cdrom"> diff --git a/hash/sg1000.xml b/hash/sg1000.xml index ab40de24377..85d62346e22 100644 --- a/hash/sg1000.xml +++ b/hash/sg1000.xml @@ -1283,7 +1283,7 @@ A135 : 森林歷險記 / Sēnlín lìxiǎn jì -> Pitfall II (same as R-049 by A </part> </software> - <software name="herot" cloneof="hero"> + <software name="herot" cloneof="hero"> <!-- Taiwanese logo version --> <description>Qing Feng Xia (Tw)</description> <year>1985?</year> <publisher><unknown></publisher> @@ -1296,6 +1296,17 @@ A135 : 森林歷險記 / Sēnlín lìxiǎn jì -> Pitfall II (same as R-049 by A </part> </software> + <software name="herotw" cloneof="hero"> <!-- English logo version --> + <description>H.E.R.O. (Tw)</description> + <year>1985</year> + <publisher>Aaronix</publisher> + <part name="cart" interface="sg1000_cart"> + <dataarea name="rom" size="32768"> + <rom name="H.E.R.O. [english logo] (TW).sg" size="32768" crc="96f09c6d" sha1="82b530feef7c011361e21b62d2c359c626ab8a9c" offset="000000" /> + </dataarea> + </part> + </software> + <software name="homemj"> <description>Home Mahjong (Jpn, v1)</description> <year>1984</year> @@ -1347,6 +1358,17 @@ A135 : 森林歷險記 / Sēnlín lìxiǎn jì -> Pitfall II (same as R-049 by A </part> </software> + <software name="hustletw" cloneof="hustle"> + <description>Hustle Chumy / Wanpi shu (Tw)</description> + <year>1984</year> + <publisher>Aaronix</publisher> + <part name="cart" interface="sg1000_cart"> + <dataarea name="rom" size="16384"> + <rom name="Hustle Chumy (TW).sg" size="16384" crc="c4ed1fd9" sha1="e7800d107ef0a7773eea2d482b5db9d866ba74f9" offset="000000" /> + </dataarea> + </part> + </software> + <software name="hyperspt"> <description>Hyper Sports (Jpn)</description> <year>1985</year> @@ -2066,7 +2088,7 @@ A135 : 森林歷險記 / Sēnlín lìxiǎn jì -> Pitfall II (same as R-049 by A </part> </software> - <software name="motianda" cloneof="rocknbol"> + <software name="motianda" cloneof="rocknbol"> <!-- Taiwanese logo version --> <description>Mo Tian Da Lou (Tw)</description> <year>1985?</year> <publisher>Aaronix</publisher> @@ -2079,6 +2101,17 @@ A135 : 森林歷險記 / Sēnlín lìxiǎn jì -> Pitfall II (same as R-049 by A </part> </software> + <software name="rocknboltw" cloneof="rocknbol"> <!-- English logo version --> + <description>Rock n' Bolt (Tw)</description> + <year>1985</year> + <publisher>Aaronix</publisher> + <part name="cart" interface="sg1000_cart"> + <dataarea name="rom" size="32768"> + <rom name="Rock n' Bolt [english logo] (TW).sg" size="32768" crc="09a82af7" sha1="e3be08bda8459fc60836abe332e9864e7c596202" offset="000000" /> + </dataarea> + </part> + </software> + <software name="safarihu" supported="no"> <description>Safari Hunting (Jpn)</description> <year>1983</year> diff --git a/hash/sms.xml b/hash/sms.xml index bd3eabeb1ae..d855b7d69d9 100644 --- a/hash/sms.xml +++ b/hash/sms.xml @@ -120,6 +120,18 @@ </part> </software> + <software name="actionfgtw" cloneof="actionfg"> + <description>Action Fighter / Mo zhan che (Taiwan)</description> + <year>1986</year> + <publisher><unknown></publisher> + <part name="cart" interface="sms_cart"> + <dataarea name="rom" size="131072"> + <rom name="Action Fighter (TW).sms" size="131072" crc="8418f438" sha1="4f514dc568466f6b0424086edeb3fa0014f9c887" offset="000000" /> + </dataarea> + </part> + </software> + + <software name="addfam"> <description>The Addams Family (Euro)</description> <year>1993</year> @@ -2091,6 +2103,42 @@ </part> </software> + <software name="eswatp0" cloneof="eswatc"> <!-- early build, alt subtitle --> + <description>E-SWAT - The Ultimate Battle In The Factor Against Crime (prototype 0)</description> + <year>1990</year> + <publisher>Sega</publisher> + <info name="serial" value="7042"/> + <part name="cart" interface="sms_cart"> + <dataarea name="rom" size="262144"> + <rom name="E-SWAT [Proto 0].sms" size="262144" crc="4f20694a" sha1="855c2f54b700663cedd6484aab396d849dcb5290" offset="000000" /> + </dataarea> + </part> + </software> + + <software name="eswatp1" cloneof="eswatc"> + <description>E-SWAT - City Under Siege (prototype 1)</description> + <year>1990</year> + <publisher>Sega</publisher> + <info name="serial" value="7042"/> + <part name="cart" interface="sms_cart"> + <dataarea name="rom" size="262144"> + <rom name="E-SWAT [Proto 1].sms" size="262144" crc="f7ca9801" sha1="12c5005f8a0d78c75704b61bf87961875b9d29d4" offset="000000" /> + </dataarea> + </part> + </software> + + <software name="eswatp2" cloneof="eswatc"> + <description>E-SWAT - City Under Siege (prototype 2)</description> + <year>1990</year> + <publisher>Sega</publisher> + <info name="serial" value="7042"/> + <part name="cart" interface="sms_cart"> + <dataarea name="rom" size="262144"> + <rom name="E-SWAT [Proto 2].sms" size="262144" crc="fd91cc7e" sha1="63fa1fcbf941b0e0ce601b3094c6c31f997c95d8" offset="000000" /> + </dataarea> + </part> + </software> + <software name="excdizzy" supported="no"> <description>The Excellent Dizzy Collection (Euro, USA, Prototype)</description> <year>19??</year> @@ -2317,7 +2365,7 @@ <software name="finalbb" cloneof="bublbobl"> <description>Final Bubble Bobble (Jpn)</description> <year>1988</year> - <publisher>Sega </publisher> + <publisher>Sega</publisher> <info name="serial" value="G-1362"/> <info name="release" value="19880702"/> <info name="alt_title" value="ファイナル バブル ボブル" /> @@ -5681,6 +5729,17 @@ </part> </software> + <software name="supcol"> + <description>Super Columns & Tetris (Kor)</description> + <year>1990</year> + <publisher>Hi-Com</publisher> + <part name="cart" interface="sms_cart"> + <dataarea name="rom" size="262144"> + <rom name="Super Columns (KR).sms" size="32768" crc="6ce7f694" sha1="9d696b6eda1d13b8d439509beeb64210987e308e" offset="000000" /> + </dataarea> + </part> + </software> + <software name="smgp"> <description>Super Monaco GP (Euro, Bra)</description> <year>1990</year> diff --git a/hash/specpls3_flop.xml b/hash/specpls3_flop.xml index c44232fe56f..9f7b480da0d 100644 --- a/hash/specpls3_flop.xml +++ b/hash/specpls3_flop.xml @@ -144,7 +144,7 @@ <!-- SPS (CAPS) release 3557 --> <description>Butcher Hill</description> <year>1989</year> - <publisher>Gremlin Graphics Software </publisher> + <publisher>Gremlin Graphics Software</publisher> <part name="flop1" interface="floppy_3"> <dataarea name="flop" size="237460"> @@ -339,7 +339,7 @@ <!-- SPS (CAPS) release 3568 --> <description>Espionage</description> <year>1988</year> - <publisher>Grandslam Entertainments </publisher> + <publisher>Grandslam Entertainments</publisher> <info name="alt_title" value="Espionage - The Computer Game (Box)" /> <part name="flop1" interface="floppy_3"> @@ -417,7 +417,7 @@ <!-- SPS (CAPS) release 3572 --> <description>Footballer of the Year 2</description> <year>1989</year> - <publisher>Gremlin Graphics Software </publisher> + <publisher>Gremlin Graphics Software</publisher> <part name="flop1" interface="floppy_3"> <dataarea name="flop" size="259471"> @@ -926,7 +926,7 @@ <!-- SPS (CAPS) release 3595 --> <description>Pac-Land</description> <year>1989</year> - <publisher>Grandslam Entertainments </publisher> + <publisher>Grandslam Entertainments</publisher> <part name="flop1" interface="floppy_3"> <dataarea name="flop" size="114805"> diff --git a/hash/spectrum_cass.xml b/hash/spectrum_cass.xml index e4ac2f52285..e160edc903f 100644 --- a/hash/spectrum_cass.xml +++ b/hash/spectrum_cass.xml @@ -709,7 +709,141 @@ </part> </software> + <!-- Homebrew released at http://spectralinterlude.com/#download for use on real systems & emulators --> + <software name="castlvsi"> + <description>Castlevania - Spectral Interlude (v1.1, English, 128K)</description> + <year>2015</year> + <publisher>Rewind</publisher> + <part name="cass" interface="spectrum_cass"> + <dataarea name="cass" size="126394"> + <rom name="castlevania_si_en_v11.tap" size="126394" crc="c100bb38" sha1="ba89e73dbc16621fc52f886c6b1abb2d6a93ffc7" offset="0"/> + </dataarea> + </part> + </software> + + <software name="castlvsiru" cloneof="castlvsi"> + <description>Castlevania - Spectral Interlude (v1.1, Russian, 128K)</description> + <year>2015</year> + <publisher>Rewind</publisher> + <part name="cass" interface="spectrum_cass"> + <dataarea name="cass" size="127054"> + <rom name="castlevania_si_ru_v11.tap" size="127054" crc="45561b70" sha1="b44b7e93c8fbf74d23ad694182d99e5a5ec01f98" offset="0"/> + </dataarea> + </part> + </software> + + <software name="castlvsipl" cloneof="castlvsi"> + <description>Castlevania - Spectral Interlude (v1.1, Polish, 128K)</description> + <year>2015</year> + <publisher>Rewind</publisher> + <part name="cass" interface="spectrum_cass"> + <dataarea name="cass" size="127378"> + <rom name="castlevania_si_pl_v11.tap" size="127378" crc="2f11f5bd" sha1="4f4448f6f70eebdf6af81977cac61d0f41b7744f" offset="0"/> + </dataarea> + </part> + </software> + + <software name="castlvsies" cloneof="castlvsi"> + <description>Castlevania - Spectral Interlude (v1.1, Spanish, 128K)</description> + <year>2015</year> + <publisher>Rewind</publisher> + <part name="cass" interface="spectrum_cass"> + <dataarea name="cass" size="126950"> + <rom name="castlevania_si_es_v11.tap" size="126950" crc="27e8ae63" sha1="1dced2991e51854fdf31fe323aa6ee75b25d55a2" offset="0"/> + </dataarea> + </part> + </software> + <software name="castlvsiit" cloneof="castlvsi"> + <description>Castlevania - Spectral Interlude (v1.1, Italian, 128K)</description> + <year>2015</year> + <publisher>Rewind</publisher> + <part name="cass" interface="spectrum_cass"> + <dataarea name="cass" size="127355"> + <rom name="castlevania_si_it_v11.tap" size="127355" crc="d9a89fc5" sha1="885d3489c94937b0db8a536a1aa6435629942d77" offset="0"/> + </dataarea> + </part> + </software> + + <software name="castlvsi10" cloneof="castlvsi"> + <description>Castlevania - Spectral Interlude (v1.0, English, 128K)</description> + <year>2015</year> + <publisher>Rewind</publisher> + <part name="cass" interface="spectrum_cass"> + <dataarea name="cass" size="126410"> + <rom name="castlevania_si_en_v10.tap" size="126410" crc="0d022bc5" sha1="450dfd57ea7407f47bbfd785d981e4a92e166029" offset="0"/> + </dataarea> + </part> + </software> + + <software name="castlvsiru10" cloneof="castlvsi"> + <description>Castlevania - Spectral Interlude (v1.0, Russian, 128K)</description> + <year>2015</year> + <publisher>Rewind</publisher> + <part name="cass" interface="spectrum_cass"> + <dataarea name="cass" size="127066"> + <rom name="castlevania_si_ru_v10.tap" size="127066" crc="2dceb444" sha1="10ca28195652a9f3f20a48e8e761f0dd138abcf6" offset="0"/> + </dataarea> + </part> + </software> + + <software name="castlvsipl10" cloneof="castlvsi"> + <description>Castlevania - Spectral Interlude (v1.0, Polish, 128K)</description> + <year>2015</year> + <publisher>Rewind</publisher> + <part name="cass" interface="spectrum_cass"> + <dataarea name="cass" size="127361"> + <rom name="castlevania_si_pl_v10.tap" size="127361" crc="e8dc0e6b" sha1="4802a4cef916466ccbf25cabb3f447db17b802bd" offset="0"/> + </dataarea> + </part> + </software> + + <!-- V1.0 doesn't exist in Spanish? or Italian (translations were made after the 1.1 release) --> + + <!-- what are these? were there unannounced updates at some point? check data, remove if just duplicate --> + <software name="castlvsia" cloneof="castlvsi"> + <description>Castlevania - Spectral Interlude (alt, English, 128K)</description> + <year>2015</year> + <publisher>Rewind</publisher> + <part name="cass" interface="spectrum_cass"> + <dataarea name="cass" size="126416"> + <rom name="castlevania_si_en.tap" size="126416" crc="c7fb2adf" sha1="22fdb537a3e4b3ed05aac82f34103212c179db4a" offset="0"/> + </dataarea> + </part> + </software> + + <software name="castlvsirua" cloneof="castlvsi"> + <description>Castlevania - Spectral Interlude (alt, Russian, 128K)</description> + <year>2015</year> + <publisher>Rewind</publisher> + <part name="cass" interface="spectrum_cass"> + <dataarea name="cass" size="127075"> + <rom name="castlevania_si_ru.tap" size="127075" crc="e4e9bd2a" sha1="8bae5e5d2e310335f3aba96b2a0ed6c5c447eb18" offset="0"/> + </dataarea> + </part> + </software> + + <software name="castlvsipla" cloneof="castlvsi"> + <description>Castlevania - Spectral Interlude (alt, Polish, 128K)</description> + <year>2015</year> + <publisher>Rewind</publisher> + <part name="cass" interface="spectrum_cass"> + <dataarea name="cass" size="127413"> + <rom name="castlevania_si_pl.tap" size="127413" crc="98e2c6a6" sha1="6eb777aa7c0c057cf04f3162e7e80f6c4286e406" offset="0"/> + </dataarea> + </part> + </software> + + <software name="castlvsiesa" cloneof="castlvsi"> + <description>Castlevania - Spectral Interlude (alt, Spanish, 128K)</description> + <year>2015</year> + <publisher>Rewind</publisher> + <part name="cass" interface="spectrum_cass"> + <dataarea name="cass" size="126973"> + <rom name="castlevania_si_es.tap" size="126973" crc="4479be59" sha1="c5c816d4b02526c37ea44cbac8d1836ca03fd2fe" offset="0"/> + </dataarea> + </part> + </software> </softwarelist> diff --git a/hash/studio2.xml b/hash/studio2.xml index 55ead2abc0f..8ba2ea5ba40 100644 --- a/hash/studio2.xml +++ b/hash/studio2.xml @@ -159,7 +159,7 @@ MG-213 Gun Fight/Moon Ship yes </software> <software name="bjack"> - <description>TV Casino I: Blackjack </description> + <description>TV Casino I: Blackjack</description> <year>1977</year> <publisher>RCA</publisher> <info name="serial" value="18V600" /> diff --git a/hash/svmu.xml b/hash/svmu.xml index b977d9a97b4..bd7934ae9b5 100644 --- a/hash/svmu.xml +++ b/hash/svmu.xml @@ -208,7 +208,7 @@ </software> <software name="scvmugp"> - <description>SoulCalibur VMU Game Pack </description> + <description>SoulCalibur VMU Game Pack</description> <year>1999</year> <publisher>Namco</publisher> <info name="source" value="SoulCalibur" /> @@ -257,4 +257,4 @@ <!-- Samples from the Katana SDK --> -</softwarelist>
\ No newline at end of file +</softwarelist> diff --git a/hash/tandy2k.xml b/hash/tandy2k.xml index 1ded2114927..902ff8966ea 100644 --- a/hash/tandy2k.xml +++ b/hash/tandy2k.xml @@ -15,17 +15,17 @@ <year>1983</year> <publisher>Lotus</publisher> -<!-- <part name="flop1" interface="floppy_5_25"> - <dataarea name="flop" size="331572"> - <rom name="123-sys.td0" size="331572" crc="a7cacc1e" sha1="8720bb7614821403c269012adea81f6cb6d84f7d" offset="0"/> - </dataarea> - </part> - - <part name="flop2" interface="floppy_5_25"> - <dataarea name="flop" size="533442"> - <rom name="123_sys.td0" size="533442" crc="cc6845f9" sha1="a819783b18c35f7ad2531c108acfa0acdf3225bf" offset="0"/> - </dataarea> - </part> --> +<!-- <part name="flop1" interface="floppy_5_25"> + <dataarea name="flop" size="331572"> + <rom name="123-sys.td0" size="331572" crc="a7cacc1e" sha1="8720bb7614821403c269012adea81f6cb6d84f7d" offset="0"/> + </dataarea> + </part> + + <part name="flop2" interface="floppy_5_25"> + <dataarea name="flop" size="533442"> + <rom name="123_sys.td0" size="533442" crc="cc6845f9" sha1="a819783b18c35f7ad2531c108acfa0acdf3225bf" offset="0"/> + </dataarea> + </part> --> <!-- repaired copy protected by hand --> <part name="flop1" interface="floppy_5_25"> <dataarea name="flop" size="331572"> diff --git a/hash/tvc_cass.xml b/hash/tvc_cass.xml index 89fecbecbad..f5bc09d9dd5 100644 --- a/hash/tvc_cass.xml +++ b/hash/tvc_cass.xml @@ -2110,7 +2110,7 @@ </software> <software name="sajtvajo"> - <description>Sajtvájó </description> + <description>Sajtvájó</description> <year>1991</year> <publisher>Vindics</publisher> diff --git a/hash/unichamp.xml b/hash/unichamp.xml new file mode 100644 index 00000000000..c4aae48a0db --- /dev/null +++ b/hash/unichamp.xml @@ -0,0 +1,54 @@ +<?xml version="1.0"?> +<!DOCTYPE softwarelist SYSTEM "softwarelist.dtd"> + +<softwarelist name="unichamp" description="Unisonic Champion 2711 cartridges"> + + <software name="pac-02"> + <description>Professional Poker Games</description> + <year>1977</year> + <publisher>Unisonic</publisher> + <info name="serial" value="PAC-02"/> + <part name="cart" interface="unichamp_cart"> + <dataarea name="rom" size="0x1000"> + <rom name="pac-02.bin" size="0x1000" crc="fe3213be" sha1="5b9c407fe86865f3454d4be824a7f2bf53478f73" offset="0x0000"/> + </dataarea> + </part> + </software> + + <software name="pac-03"> + <description>Assorted Family Fun</description> + <year>1977</year> + <publisher>Unisonic</publisher> + <info name="serial" value="PAC-03"/> + <part name="cart" interface="unichamp_cart"> + <dataarea name="rom" size="0x1000"> + <rom name="pac-03.bin" size="0x1000" crc="f81f04bd" sha1="82e2a0fda1787d5835c457ee5745b0db0cebe079" offset="0x0000"/> + </dataarea> + </part> + </software> + + <software name="pac-04"> + <description>Family Card Games</description> + <year>1977</year> + <publisher>Unisonic</publisher> + <info name="serial" value="PAC-04"/> + <part name="cart" interface="unichamp_cart"> + <dataarea name="rom" size="0x1000"> + <rom name="pac-04.bin" size="0x1000" crc="cac09841" sha1="bc9db83f26ed0810938156db6b104b4576754225" offset="0x0000"/> + </dataarea> + </part> + </software> + + <software name="pac-05"> + <description>Math</description> + <year>1977</year> + <publisher>Unisonic</publisher> + <info name="serial" value="PAC-05"/> + <part name="cart" interface="unichamp_cart"> + <dataarea name="rom" size="0x1000"> + <rom name="pac-05.bin" size="0x1000" crc="d54a6090" sha1="e85593096f43dcf14b08fd2c9fda277008a8df8b" offset="0x0000"/> + </dataarea> + </part> + </software> + +</softwarelist> diff --git a/hash/vic1001_cart.xml b/hash/vic1001_cart.xml index b8764097a72..52abdce116f 100644 --- a/hash/vic1001_cart.xml +++ b/hash/vic1001_cart.xml @@ -2423,7 +2423,7 @@ </software> <software name="progaid"> - <description>Programmer's Aid Cartridge </description> + <description>Programmer's Aid Cartridge</description> <year>198?</year> <publisher>Commodore</publisher> <info name="serial" value="VIC-1212" /> diff --git a/hash/wscolor.xml b/hash/wscolor.xml index a90ae482935..f14e638f9e1 100644 --- a/hash/wscolor.xml +++ b/hash/wscolor.xml @@ -418,7 +418,7 @@ <software name="flashkk"> <!-- WSC --> - <description>Flash Koibito-kun </description> + <description>Flash Koibito-kun</description> <year>2000</year> <publisher>Kobunsha</publisher> <info name="serial" value="SWJ-KBSC01"/> @@ -69,6 +69,7 @@ # MACOSX_USE_LIBSDL = 1 # CYGWIN_BUILD = 1 +# BUILDDIR = build # TARGETOS = windows # CROSS_BUILD = 1 # OVERRIDE_CC = cc @@ -94,7 +95,11 @@ # FORCE_VERSION_COMPILE = 1 +ifdef PREFIX_MAKEFILE +include $(PREFIX_MAKEFILE) +else -include useroptions.mak +endif ########################################################################### ################## END USER-CONFIGURABLE OPTIONS ###################### @@ -182,6 +187,10 @@ SILENT := @ MAKEPARAMS += --no-print-directory endif +ifndef BUILDDIR +BUILDDIR := build +endif + #------------------------------------------------- # specify OS target, which further differentiates # the underlying OS; supported values are: @@ -504,6 +513,10 @@ ifdef OSD PARAMS += --osd='$(OSD)' endif +ifdef BUILDDIR +PARAMS += --build-dir='$(BUILDDIR)' +endif + ifdef TARGETOS PARAMS += --targetos='$(TARGETOS)' endif @@ -702,7 +715,7 @@ else COPY = $(SILENT) copy /Y "$(subst /,\\,$(1))" "$(subst /,\\,$(2))" endif -GENDIR = build/generated +GENDIR = $(BUILDDIR)/generated # all sources are under the src/ directory SRC = src @@ -743,7 +756,7 @@ SUBDIR := $(OSD)/$(TARGET) else SUBDIR := $(OSD)/$(TARGET)$(SUBTARGET) endif -PROJECTDIR := build/projects/$(SUBDIR) +PROJECTDIR := $(BUILDDIR)/projects/$(SUBDIR) .PHONY: all clean regenie generate all: $(GENIE) $(TARGETOS)$(ARCHITECTURE) @@ -1074,7 +1087,7 @@ $(GENIE): $(GENIE_SRC) clean: @echo Cleaning... - -@rm -rf build + -@rm -rf $(BUILDDIR) $(SILENT) $(MAKE) $(MAKEPARAMS) -C 3rdparty/genie/build/gmake.$(GENIEOS) -f genie.make clean GEN_FOLDERS := $(GENDIR)/$(TARGET)/layout/ $(GENDIR)/$(TARGET)/$(SUBTARGET)/ @@ -1167,13 +1180,13 @@ ifndef USE_SYSTEM_LIB_LUA CPPCHECK_PARAMS += -I3rdparty/lua/src endif ifndef USE_SYSTEM_LIB_ZLIB -CPPCHECK_PARAMS += -I3rdparty/zlib +CPPCHECK_PARAMS += -I3rdparty/zlib endif CPPCHECK_PARAMS += -I3rdparty/bgfx/include CPPCHECK_PARAMS += -I3rdparty/bx/include -CPPCHECK_PARAMS += -Ibuild/generated/emu -CPPCHECK_PARAMS += -Ibuild/generated/emu/layout -CPPCHECK_PARAMS += -Ibuild/generated/mame/layout +CPPCHECK_PARAMS += -I$(BUILDDIR)/generated/emu +CPPCHECK_PARAMS += -I$(BUILDDIR)/generated/emu/layout +CPPCHECK_PARAMS += -I$(BUILDDIR)/generated/mame/layout CPPCHECK_PARAMS += -DX64_WINDOWS_ABI CPPCHECK_PARAMS += -DPTR64=1 CPPCHECK_PARAMS += -DMAME_DEBUG diff --git a/scripts/genie.lua b/scripts/genie.lua index 475c110ecb5..8ec86054678 100644 --- a/scripts/genie.lua +++ b/scripts/genie.lua @@ -1,11 +1,16 @@ -- license:BSD-3-Clause -- copyright-holders:MAMEdev Team +newoption { + trigger = 'build-dir', + description = 'Build directory name', +} + premake.check_paths = true premake.make.override = { "TARGET" } MAME_DIR = (path.getabsolute("..") .. "/") MAME_DIR = string.gsub(MAME_DIR, "(%s)", "\\%1") -local MAME_BUILD_DIR = (MAME_DIR .. "build/") +local MAME_BUILD_DIR = (MAME_DIR .. _OPTIONS["build-dir"] .. "/") local naclToolchain = "" diff --git a/scripts/src/3rdparty.lua b/scripts/src/3rdparty.lua index bbe07a80b9a..ce9a950dad1 100644 --- a/scripts/src/3rdparty.lua +++ b/scripts/src/3rdparty.lua @@ -613,6 +613,16 @@ project "bgfx" configuration { } + if _OPTIONS["targetos"]=="windows" then + local version = str_to_version(_OPTIONS["gcc_version"]) + if _OPTIONS["gcc"]~=nil and string.find(_OPTIONS["gcc"], "clang") then + buildoptions { + "-Wno-unknown-attributes", + "-Wno-missing-braces", + } + end + end + defines { "__STDC_LIMIT_MACROS", "__STDC_FORMAT_MACROS", diff --git a/scripts/src/bus.lua b/scripts/src/bus.lua index a07da201d35..ce5f166c71e 100644 --- a/scripts/src/bus.lua +++ b/scripts/src/bus.lua @@ -1161,6 +1161,8 @@ if (BUSES["VCS"]~=null) then MAME_DIR .. "src/devices/bus/vcs/compumat.h", MAME_DIR .. "src/devices/bus/vcs/dpc.c", MAME_DIR .. "src/devices/bus/vcs/dpc.h", + MAME_DIR .. "src/devices/bus/vcs/harmony_melody.c", + MAME_DIR .. "src/devices/bus/vcs/harmony_melody.h", MAME_DIR .. "src/devices/bus/vcs/scharger.c", MAME_DIR .. "src/devices/bus/vcs/scharger.h", } @@ -2201,6 +2203,8 @@ if (BUSES["CPC"]~=null) then MAME_DIR .. "src/devices/bus/cpc/ddi1.h", MAME_DIR .. "src/devices/bus/cpc/magicsound.c", MAME_DIR .. "src/devices/bus/cpc/magicsound.h", + MAME_DIR .. "src/devices/bus/cpc/doubler.c", + MAME_DIR .. "src/devices/bus/cpc/doubler.h", } end diff --git a/scripts/src/cpu.lua b/scripts/src/cpu.lua index 1a8f6f0b67d..159a1090519 100644 --- a/scripts/src/cpu.lua +++ b/scripts/src/cpu.lua @@ -132,6 +132,8 @@ if (CPUS["ARM7"]~=null) then MAME_DIR .. "src/devices/cpu/arm7/arm7.h", MAME_DIR .. "src/devices/cpu/arm7/arm7thmb.c", MAME_DIR .. "src/devices/cpu/arm7/arm7ops.c", + MAME_DIR .. "src/devices/cpu/arm7/lpc210x.c", + MAME_DIR .. "src/devices/cpu/arm7/lpc210x.h", } end @@ -1134,6 +1136,7 @@ end --@src/devices/cpu/m6502/r65c02.h,CPUS["M6502"] = true --@src/devices/cpu/m6502/m65sc02.h,CPUS["M6502"] = true --@src/devices/cpu/m6502/m6504.h,CPUS["M6502"] = true +--@src/devices/cpu/m6502/m6507.h,CPUS["M6502"] = true --@src/devices/cpu/m6502/m6509.h,CPUS["M6502"] = true --@src/devices/cpu/m6502/m6510.h,CPUS["M6502"] = true --@src/devices/cpu/m6502/m6510t.h,CPUS["M6502"] = true @@ -1162,6 +1165,8 @@ if (CPUS["M6502"]~=null) then MAME_DIR .. "src/devices/cpu/m6502/m65sc02.h", MAME_DIR .. "src/devices/cpu/m6502/m6504.c", MAME_DIR .. "src/devices/cpu/m6502/m6504.h", + MAME_DIR .. "src/devices/cpu/m6502/m6507.c", + MAME_DIR .. "src/devices/cpu/m6502/m6507.h", MAME_DIR .. "src/devices/cpu/m6502/m6509.c", MAME_DIR .. "src/devices/cpu/m6502/m6509.h", MAME_DIR .. "src/devices/cpu/m6502/m6510.c", diff --git a/scripts/src/osd/sdl.lua b/scripts/src/osd/sdl.lua index 2922c8c4775..c46b25f5589 100644 --- a/scripts/src/osd/sdl.lua +++ b/scripts/src/osd/sdl.lua @@ -55,6 +55,9 @@ function maintargetosdoptions(_target,_subtarget) "SDL.dll", } end + links { + "psapi", + } configuration { "mingw*-gcc" } linkoptions{ @@ -467,6 +470,9 @@ if _OPTIONS["with-tools"] then "SDL.dll", } end + links { + "psapi", + } linkoptions{ "-municode", } diff --git a/scripts/src/tools.lua b/scripts/src/tools.lua index fc095e3d31d..416084375a1 100644 --- a/scripts/src/tools.lua +++ b/scripts/src/tools.lua @@ -171,7 +171,6 @@ end links { "dasm", - "emu", "utils", "expat", "7z", @@ -207,6 +206,7 @@ includedirs { files { MAME_DIR .. "src/tools/unidasm.c", + MAME_DIR .. "src/emu/emucore.c", } diff --git a/scripts/target/mame/arcade.lua b/scripts/target/mame/arcade.lua index d289e09b64e..b1c1652310a 100644 --- a/scripts/target/mame/arcade.lua +++ b/scripts/target/mame/arcade.lua @@ -838,6 +838,7 @@ files { MAME_DIR .. "src/mame/video/equites.c", MAME_DIR .. "src/mame/drivers/meijinsn.c", MAME_DIR .. "src/mame/drivers/shougi.c", + MAME_DIR .. "src/mame/machine/alpha8201.c", } createMAMEProjects(_target, _subtarget, "amiga") @@ -3546,6 +3547,7 @@ files { MAME_DIR .. "src/mame/drivers/stellafr.c", MAME_DIR .. "src/mame/drivers/stuntair.c", MAME_DIR .. "src/mame/drivers/su2000.c", + MAME_DIR .. "src/mame/drivers/subhuntr.c", MAME_DIR .. "src/mame/drivers/summit.c", MAME_DIR .. "src/mame/drivers/sumt8035.c", MAME_DIR .. "src/mame/drivers/supercrd.c", diff --git a/scripts/target/mame/mess.lua b/scripts/target/mame/mess.lua index a6841a0384e..61872202e6e 100644 --- a/scripts/target/mame/mess.lua +++ b/scripts/target/mame/mess.lua @@ -849,6 +849,7 @@ function linkProjects_mame_mess(_target, _subtarget) "trs", "ultimachine", "ultratec", + "unisonic", "unisys", "veb", "vidbrain", @@ -1229,6 +1230,7 @@ files { createMESSProjects(_target, _subtarget, "camputers") files { MAME_DIR .. "src/mame/drivers/camplynx.c", + MAME_DIR .. "src/lib/formats/camplynx_dsk.c", } createMESSProjects(_target, _subtarget, "canon") @@ -2135,6 +2137,7 @@ files { MAME_DIR .. "src/mame/drivers/megadriv.c", MAME_DIR .. "src/mame/drivers/saturn.c", MAME_DIR .. "src/mame/drivers/segapico.c", + MAME_DIR .. "src/mame/drivers/sega_sawatte.c", MAME_DIR .. "src/mame/drivers/segapm.c", MAME_DIR .. "src/mame/drivers/sg1000.c", MAME_DIR .. "src/mame/drivers/sms.c", @@ -2480,6 +2483,14 @@ files { MAME_DIR .. "src/mame/drivers/minicom.c", } +createMESSProjects(_target, _subtarget, "unisonic") +files { + MAME_DIR .. "src/mame/drivers/unichamp.c", + MAME_DIR .. "src/mame/video/gic.c", + MAME_DIR .. "src/mame/video/gic.c", +} + + createMESSProjects(_target, _subtarget, "unisys") files { MAME_DIR .. "src/mame/drivers/univac.c", @@ -2722,6 +2733,7 @@ files { MAME_DIR .. "src/mame/drivers/softbox.c", MAME_DIR .. "src/mame/drivers/squale.c", MAME_DIR .. "src/mame/drivers/swtpc.c", + MAME_DIR .. "src/mame/drivers/swyft.c", MAME_DIR .. "src/mame/drivers/sys2900.c", MAME_DIR .. "src/mame/drivers/systec.c", MAME_DIR .. "src/mame/drivers/tavernie.c", diff --git a/src/devices/bus/a2bus/a2bus.h b/src/devices/bus/a2bus/a2bus.h index 90ab602607d..20b941b6d06 100644 --- a/src/devices/bus/a2bus/a2bus.h +++ b/src/devices/bus/a2bus/a2bus.h @@ -149,12 +149,12 @@ public: device_a2bus_card_interface(const machine_config &mconfig, device_t &device); virtual ~device_a2bus_card_interface(); - virtual UINT8 read_c0nx(address_space &space, UINT8 offset) { logerror("a2bus: unhandled read at C0n%x\n", offset); return 0; } // C0nX - /DEVSEL - virtual void write_c0nx(address_space &space, UINT8 offset, UINT8 data) { logerror("a2bus: unhandled write %02x to C0n%x\n", data, offset); } + virtual UINT8 read_c0nx(address_space &space, UINT8 offset) { m_device.logerror("a2bus: unhandled read at C0n%x\n", offset); return 0; } // C0nX - /DEVSEL + virtual void write_c0nx(address_space &space, UINT8 offset, UINT8 data) { m_device.logerror("a2bus: unhandled write %02x to C0n%x\n", data, offset); } virtual UINT8 read_cnxx(address_space &space, UINT8 offset) { return 0; } // CnXX - /IOSEL - virtual void write_cnxx(address_space &space, UINT8 offset, UINT8 data) { logerror("a2bus: unhandled write %02x to Cn%02x\n", data, offset); } + virtual void write_cnxx(address_space &space, UINT8 offset, UINT8 data) { m_device.logerror("a2bus: unhandled write %02x to Cn%02x\n", data, offset); } virtual UINT8 read_c800(address_space &space, UINT16 offset) { return 0; } // C800 - /IOSTB - virtual void write_c800(address_space &space, UINT16 offset, UINT8 data) { logerror("a2bus: unhandled write %02x to %04x\n", data, offset + 0xc800); } + virtual void write_c800(address_space &space, UINT16 offset, UINT8 data) {m_device.logerror("a2bus: unhandled write %02x to %04x\n", data, offset + 0xc800); } virtual bool take_c800() { return true; } // override and return false if your card doesn't take over the c800 space virtual UINT8 read_inh_rom(address_space &space, UINT16 offset) { return 0; } virtual void write_inh_rom(address_space &space, UINT16 offset, UINT8 data) { } diff --git a/src/devices/bus/a2bus/a2themill.c b/src/devices/bus/a2bus/a2themill.c index 4ea020ae434..34b2cac13c1 100644 --- a/src/devices/bus/a2bus/a2themill.c +++ b/src/devices/bus/a2bus/a2themill.c @@ -7,21 +7,18 @@ Implementation of the Stellation Two The Mill 6809 card The OS9 add-on changes the address mapping as follows: - 6809 0x0000-0xafff -> 6502 0x1000-0xbfff - 6809 0xb000-0xdfff -> 6502 0xd000-0xffff - 6809 0xe000-0xefff -> 6502 0xc000-0xcfff - 6809 0xf000-0xffff -> 6502 0x0000-0x0fff + 6809 0x0000-0x7fff -> 6502 0x1000-0x8fff + 6809 0x8000-0xafff -> 6502 0xd000-0xffff + 6809 0xb000-0xbfff -> 6502 0xc000-0xcfff + 6809 0xc000-0xcfff -> 6502 0x0000-0x0fff + 6809 0xd000-0xffff -> 6502 0x9000-0xbfff - (reference: http://mirrors.apple2.org.za/ground.icaen.uiowa.edu/MiscInfo/Hardware/mill.6809 ) + (reference: "6809.txt" on one of the disks for The Mill) ProDOS "Stellation The Mill Disk.po" requires Mill in slot 2; boot the disc and type "-DEMO1" and press Enter to launch the simple demo. - The OS9 disk image available around the internet seems to be bad - the - 6809 boot vector is 0x4144 which maps to 6502 0x5144 and there's all - zeros from 6502 1000-8fff. There is valid 6809 code from 9000-BFFF - at the point where it wants to boot the 6809, but I don't know what - is supposed to be the entry point. + TODO: Add DIP switch to select standard and OS-9 modes. *********************************************************************/ @@ -103,7 +100,7 @@ void a2bus_themill_device::device_reset() { m_bEnabled = false; m_flipAddrSpace = false; - m_6809Mode = false; + m_6809Mode = true; m_status = 0xc0; // OS9 loader relies on this m_6809->set_input_line(INPUT_LINE_HALT, ASSERT_LINE); m_6809->set_input_line(INPUT_LINE_RESET, ASSERT_LINE); @@ -238,31 +235,33 @@ void a2bus_themill_device::write_c0nx(address_space &space, UINT8 offset, UINT8 READ8_MEMBER( a2bus_themill_device::dma_r ) { + // MAME startup ordering has the 6809 free-running at boot, which is undesirable + if (!m_bEnabled) + { + m_6809->set_input_line(INPUT_LINE_HALT, ASSERT_LINE); + } + if (m_6809Mode) { - if (offset <= 0xafff) + if (offset <= 0x7fff) { return slot_dma_read(space, offset+0x1000); } - else if (offset <= 0xbfff) + else if (offset <= 0xafff) { - return slot_dma_read(space, (offset&0xfff) + 0xd000); + return slot_dma_read(space, (offset&0x3fff) + 0xd000); } - else if (offset <= 0xcfff) - { - return slot_dma_read(space, (offset&0xfff) + 0xe000); - } - else if (offset <= 0xdfff) + else if (offset <= 0xbfff) { - return slot_dma_read(space, (offset&0xfff) + 0xf000); + return slot_dma_read(space, (offset&0xfff) + 0xc000); } - else if (offset <= 0xefff) + else if (offset <= 0xcfff) // 6809 Cxxx -> 6502 ZP { - return slot_dma_read(space, (offset&0xfff) + 0xc000); + return slot_dma_read(space, (offset&0xfff)); } - else // 6809 Fxxx -> 6502 ZP + else // 6809 Dxxx -> 6502 9000 { - return slot_dma_read(space, offset&0xfff); + return slot_dma_read(space, (offset-0xd000)+0x9000); } } else @@ -289,29 +288,25 @@ WRITE8_MEMBER( a2bus_themill_device::dma_w ) { if (m_6809Mode) { - if (offset <= 0xafff) + if (offset <= 0x7fff) { slot_dma_write(space, offset+0x1000, data); } - else if (offset <= 0xbfff) - { - slot_dma_write(space, (offset&0xfff) + 0xd000, data); - } - else if (offset <= 0xcfff) + else if (offset <= 0xafff) { - slot_dma_write(space, (offset&0xfff) + 0xe000, data); + slot_dma_write(space, (offset&0x3fff) + 0xd000, data); } - else if (offset <= 0xdfff) + else if (offset <= 0xbfff) { - slot_dma_write(space, (offset&0xfff) + 0xf000, data); + slot_dma_write(space, (offset&0xfff) + 0xc000, data); } - else if (offset <= 0xefff) + else if (offset <= 0xcfff) { - slot_dma_write(space, (offset&0xfff) + 0xc000, data); + slot_dma_write(space, (offset&0xfff), data); } - else // 6809 Fxxx -> 6502 ZP + else // 6809 Dxxx -> 6502 9000 { - slot_dma_write(space, offset&0xfff, data); + slot_dma_write(space, (offset-0xd000)+0x9000, data); } } else diff --git a/src/devices/bus/coco/coco_dwsock.c b/src/devices/bus/coco/coco_dwsock.c index 0c8ee07bd42..8ee53dabc32 100644 --- a/src/devices/bus/coco/coco_dwsock.c +++ b/src/devices/bus/coco/coco_dwsock.c @@ -205,6 +205,6 @@ WRITE8_MEMBER(beckerport_device::write) void beckerport_device::update_port(void) { device_stop(); - m_dwtcpport = m_dwconfigport->read_safe(65504); + m_dwtcpport = read_safe(m_dwconfigport, 65504); device_start(); } diff --git a/src/devices/bus/coco/coco_fdc.c b/src/devices/bus/coco/coco_fdc.c index bf165df42f5..1329c3a7910 100644 --- a/src/devices/bus/coco/coco_fdc.c +++ b/src/devices/bus/coco/coco_fdc.c @@ -116,7 +116,7 @@ SLOT_INTERFACE_END coco_rtc_type_t coco_fdc_device::real_time_clock() { - coco_rtc_type_t result = (coco_rtc_type_t) machine().root_device().ioport("real_time_clock")->read_safe(RTC_NONE); + coco_rtc_type_t result = coco_rtc_type_t(read_safe(machine().root_device().ioport("real_time_clock"), RTC_NONE)); /* check to make sure we don't have any invalid values */ if (((result == RTC_DISTO) && (m_disto_msm6242 == NULL)) diff --git a/src/devices/bus/coco/coco_pak.c b/src/devices/bus/coco/coco_pak.c index 72729f156a4..127c35ce2a0 100644 --- a/src/devices/bus/coco/coco_pak.c +++ b/src/devices/bus/coco/coco_pak.c @@ -89,7 +89,7 @@ void coco_pak_device::device_reset() if (m_cart->exists()) { cococart_line_value cart_line; - cart_line = machine().root_device().ioport(CART_AUTOSTART_TAG)->read_safe(0x01) + cart_line = read_safe(machine().root_device().ioport(CART_AUTOSTART_TAG), 0x01) ? COCOCART_LINE_VALUE_Q : COCOCART_LINE_VALUE_CLEAR; diff --git a/src/devices/bus/cpc/brunword4.c b/src/devices/bus/cpc/brunword4.c index cd3ab420349..9730c112e7e 100644 --- a/src/devices/bus/cpc/brunword4.c +++ b/src/devices/bus/cpc/brunword4.c @@ -98,8 +98,10 @@ WRITE8_MEMBER(cpc_brunword4_device::rombank_w) m_slot->rom_select(space,0,data & 0x3f); // repeats every 64 ROMs, this breaks upper cart ROM selection on the Plus } -void cpc_brunword4_device::set_mapping() +void cpc_brunword4_device::set_mapping(UINT8 type) { + if(type != MAP_OTHER) + return; if(m_rombank_active) { UINT8* ROM = memregion("mk4_roms")->base(); diff --git a/src/devices/bus/cpc/brunword4.h b/src/devices/bus/cpc/brunword4.h index 8b66afaefae..8c18b599e38 100644 --- a/src/devices/bus/cpc/brunword4.h +++ b/src/devices/bus/cpc/brunword4.h @@ -20,7 +20,7 @@ public: virtual const rom_entry *device_rom_region() const; DECLARE_WRITE8_MEMBER(rombank_w); - virtual void set_mapping(); + virtual void set_mapping(UINT8 type); protected: // device-level overrides diff --git a/src/devices/bus/cpc/cpcexp.h b/src/devices/bus/cpc/cpcexp.h index 1a61dc2b409..a49c2a033a9 100644 --- a/src/devices/bus/cpc/cpcexp.h +++ b/src/devices/bus/cpc/cpcexp.h @@ -56,7 +56,12 @@ #define CPC_EXP_SLOT_TAG "cpcexp" - +enum +{ + MAP_LOWER = 0, // special lower ROM handling + MAP_UPPER, // special upper ROM handling + MAP_OTHER // custom ROM handling (eg: Brunword MK4) +}; //************************************************************************** // INTERFACE CONFIGURATION MACROS @@ -98,7 +103,7 @@ public: void set_rom_bank(UINT8 sel) { m_rom_sel = sel; } // tell device the currently selected ROM UINT8 get_rom_bank() { return m_rom_sel; } - virtual void set_mapping() { }; + virtual void set_mapping(UINT8 type) { }; private: UINT8 m_rom_sel; // currently selected ROM @@ -128,7 +133,7 @@ public: DECLARE_WRITE8_MEMBER( rom_select ); void set_rom_bank(UINT8 sel) { if(m_card) m_card->set_rom_bank(sel); } // tell device the currently selected ROM - void set_mapping() { if(m_card) m_card->set_mapping(); } // tell device to enable any ROM or RAM mapping + void set_mapping(UINT8 type) { if(m_card) m_card->set_mapping(type); } // tell device to enable any ROM or RAM mapping DECLARE_WRITE_LINE_MEMBER( cursor_w ) { if(m_card) m_card->cursor_w(state); } // pass on CRTC Cursor signal DECLARE_WRITE_LINE_MEMBER( romen_w ) { if(m_card) m_card->romen_w(state); } // pass on /ROMEN signal diff --git a/src/devices/bus/cpc/ddi1.c b/src/devices/bus/cpc/ddi1.c index 2f9eef38a77..23f7b13ee61 100644 --- a/src/devices/bus/cpc/ddi1.c +++ b/src/devices/bus/cpc/ddi1.c @@ -149,8 +149,10 @@ WRITE8_MEMBER(cpc_ddi1_device::rombank_w) m_slot->rom_select(space,0,data); } -void cpc_ddi1_device::set_mapping() +void cpc_ddi1_device::set_mapping(UINT8 type) { + if(type != MAP_UPPER) + return; if(m_rom_active) { UINT8* ROM = memregion("disc_rom")->base(); diff --git a/src/devices/bus/cpc/ddi1.h b/src/devices/bus/cpc/ddi1.h index fe78153c543..9d36783d9b4 100644 --- a/src/devices/bus/cpc/ddi1.h +++ b/src/devices/bus/cpc/ddi1.h @@ -25,7 +25,8 @@ public: // optional information overrides virtual const rom_entry *device_rom_region() const; virtual machine_config_constructor device_mconfig_additions() const; - virtual void set_mapping(); + virtual void set_mapping(UINT8 type); + virtual WRITE_LINE_MEMBER( romen_w ) { m_romen = state; } DECLARE_WRITE8_MEMBER(motor_w); DECLARE_WRITE8_MEMBER(fdc_w); @@ -41,8 +42,9 @@ private: required_device<upd765_family_device> m_fdc; required_device<floppy_connector> m_connector; - + bool m_rom_active; + bool m_romen; }; // device type definition diff --git a/src/devices/bus/cpc/doubler.c b/src/devices/bus/cpc/doubler.c new file mode 100644 index 00000000000..2c753d3565e --- /dev/null +++ b/src/devices/bus/cpc/doubler.c @@ -0,0 +1,74 @@ +// license:BSD-3-Clause +// copyright-holders:Barry Rodewald +/* + * doubler.c -- Draysoft Doubler - external cassette interface for the 464 (works on 664/6128 with external cassette?), + * intended for use in duplicating cassette software + * + */ + + #include "doubler.h" + #include "includes/amstrad.h" + + //************************************************************************** +// DEVICE DEFINITIONS +//************************************************************************** + +const device_type CPC_DOUBLER = &device_creator<cpc_doubler_device>; + + +static MACHINE_CONFIG_FRAGMENT( cpc_doubler ) + MCFG_CASSETTE_ADD( "doubler_tape" ) + MCFG_CASSETTE_FORMATS(cdt_cassette_formats) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED) + MCFG_CASSETTE_INTERFACE("cpc_cass") + + // no pass-through seen on remake PCBs, unknown if actual hardware had a pass-through port or not +MACHINE_CONFIG_END + + +machine_config_constructor cpc_doubler_device::device_mconfig_additions() const +{ + return MACHINE_CONFIG_NAME( cpc_doubler ); +} + + +//************************************************************************** +// LIVE DEVICE +//************************************************************************** + +cpc_doubler_device::cpc_doubler_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : + device_t(mconfig, CPC_DOUBLER, "Draysoft Doubler", tag, owner, clock, "cpc_doubler", __FILE__), + device_cpc_expansion_card_interface(mconfig, *this), + m_tape(*this,"doubler_tape") +{ +} + +//------------------------------------------------- +// device_start - device-specific startup +//------------------------------------------------- + +void cpc_doubler_device::device_start() +{ + device_t* cpu = machine().device("maincpu"); + address_space& space = cpu->memory().space(AS_IO); + m_slot = dynamic_cast<cpc_expansion_slot_device *>(owner()); + + space.install_read_handler(0xf0e0,0xf0e0,0,0,read8_delegate(FUNC(cpc_doubler_device::ext_tape_r),this)); +} + +//------------------------------------------------- +// device_reset - device-specific reset +//------------------------------------------------- + +void cpc_doubler_device::device_reset() +{ + // TODO +} + +READ8_MEMBER(cpc_doubler_device::ext_tape_r) +{ + UINT8 data = 0; + if(m_tape->input() > 0.03) + data |= 0x20; + return data; +} diff --git a/src/devices/bus/cpc/doubler.h b/src/devices/bus/cpc/doubler.h new file mode 100644 index 00000000000..6b650179b0f --- /dev/null +++ b/src/devices/bus/cpc/doubler.h @@ -0,0 +1,45 @@ +// license:BSD-3-Clause +// copyright-holders:Barry Rodewald +/* + * doubler.c -- Draysoft Doubler - external cassette interface for the 464 (works on 664/6128 with external cassette?), + * intended for use in duplicating cassette software + * + * Uses only port F0E0 (may conflict with other peripherals, PPI port A is not usable while Doubler software is running) + * + */ + +#ifndef DOUBLER_H_ +#define DOUBLER_H_ + +#include "emu.h" +#include "cpcexp.h" +#include "imagedev/cassette.h" +#include "formats/tzx_cas.h" + +class cpc_doubler_device : public device_t, + public device_cpc_expansion_card_interface +{ +public: + // construction/destruction + cpc_doubler_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + + // optional information overrides + virtual machine_config_constructor device_mconfig_additions() const; + + DECLARE_READ8_MEMBER(ext_tape_r); + +protected: + // device-level overrides + virtual void device_start(); + virtual void device_reset(); + +private: + cpc_expansion_slot_device *m_slot; + + required_device<cassette_image_device> m_tape; +}; + +// device type definition +extern const device_type CPC_DOUBLER; + +#endif /* DOUBLER_H_ */ diff --git a/src/devices/bus/econet/e01.c b/src/devices/bus/econet/e01.c index bcb9b4b6bae..7c36679a1ab 100644 --- a/src/devices/bus/econet/e01.c +++ b/src/devices/bus/econet/e01.c @@ -4,9 +4,9 @@ Acorn FileStore E01/E01S network hard disk emulation - http://acorn.chriswhy.co.uk/Network/Econet.html - http://acorn.chriswhy.co.uk/Network/Pics/Acorn_FileStoreE01.html - http://acorn.chriswhy.co.uk/8bit_Upgrades/Acorn_FileStoreE01S.html + http://chrisacorns.computinghistory.org.uk/Network/Econet.html + http://chrisacorns.computinghistory.org.uk/Network/Pics/Acorn_FileStoreE01.html + http://chrisacorns.computinghistory.org.uk/8bit_Upgrades/Acorn_FileStoreE01S.html http://www.heyrick.co.uk/econet/fs/emulator.html http://www.pdfio.com/k-1019481.html# @@ -396,7 +396,8 @@ e01_device::e01_device(const machine_config &mconfig, const char *tag, device_t m_fdc_irq(CLEAR_LINE), m_fdc_drq(CLEAR_LINE), m_adlc_irq(CLEAR_LINE), - m_clk_en(0) + m_clk_en(0), + m_variant(TYPE_E01) { } @@ -425,7 +426,8 @@ e01_device::e01_device(const machine_config &mconfig, device_type type, const ch m_fdc_irq(CLEAR_LINE), m_fdc_drq(CLEAR_LINE), m_adlc_irq(CLEAR_LINE), - m_clk_en(0) + m_clk_en(0), + m_variant(TYPE_E01) { } diff --git a/src/devices/bus/isa/3c505.c b/src/devices/bus/isa/3c505.c index 98328c41683..83b47ff1bb1 100644 --- a/src/devices/bus/isa/3c505.c +++ b/src/devices/bus/isa/3c505.c @@ -22,9 +22,9 @@ static int verbose = VERBOSE; -#define LOG(x) { logerror ("%s: ", cpu_context()); logerror x; logerror ("\n"); } -#define LOG1(x) { if (verbose > 0) LOG(x)} -#define LOG2(x) { if (verbose > 1) LOG(x)} +#define LOG(d,x) { d->logerror ("%s: ", cpu_context()); d->logerror x; d->logerror ("\n"); } +#define LOG1(d,x) { if (verbose > 0) LOG(d,x)} +#define LOG2(d,x) { if (verbose > 1) LOG(d,x)} #define MAINCPU "maincpu" @@ -341,7 +341,7 @@ void threecom3c505_device::device_start() { set_isa_device(); - LOG1(("start 3COM 3C505")); + LOG1(this,("start 3COM 3C505")); m_installed = false; @@ -359,7 +359,7 @@ void threecom3c505_device::device_start() void threecom3c505_device::device_reset() { - LOG1(("reset 3COM 3C505")); + LOG1(this,("reset 3COM 3C505")); m_rx_fifo.reset(); m_rx_data_buffer.reset(); @@ -454,13 +454,13 @@ threecom3c505_device::data_buffer::data_buffer() : void threecom3c505_device::data_buffer::start(threecom3c505_device *device, INT32 size) { m_device = device; - LOG2(("start threecom3c505_device::data_buffer with size %0x", size)); + LOG2(device,("start threecom3c505_device::data_buffer with size %0x", size)); m_data.resize(size); } void threecom3c505_device::data_buffer::reset() { - LOG2(("reset threecom3c505_device::data_buffer")); + LOG2(m_device,("reset threecom3c505_device::data_buffer")); m_length = 0; } @@ -489,17 +489,17 @@ void threecom3c505_device::data_buffer::log(const char * title) const if (verbose > 0) { int i; - logerror("%s: %s (length=%02x)", m_device->cpu_context(), title, m_length); + m_device->logerror("%s: %s (length=%02x)", m_device->cpu_context(), title, m_length); for (i = 0; i < m_length; i++) { - logerror(" %02x", m_data[i]); + m_device->logerror(" %02x", m_data[i]); if (i >= 1023) { - logerror(" ..."); + m_device->logerror(" ..."); break; } } - logerror("\n"); + m_device->logerror("\n"); } } @@ -517,7 +517,7 @@ void threecom3c505_device::data_buffer_fifo::start( threecom3c505_device *device, INT32 size, INT32 db_size) { m_device = device; - LOG2(("start threecom3c505_device::data_buffer_fifo")); + LOG2(m_device,("start threecom3c505_device::data_buffer_fifo")); int i; // FIXME: fifo size is hardcoded @@ -531,7 +531,7 @@ void threecom3c505_device::data_buffer_fifo::start( void threecom3c505_device::data_buffer_fifo::reset() { - LOG2(("reset threecom3c505_device::data_buffer_fifo")); + LOG2(m_device,("reset threecom3c505_device::data_buffer_fifo")); m_get_index = m_put_index = 0; m_count = 0; } @@ -548,7 +548,7 @@ int threecom3c505_device::data_buffer_fifo::put(const UINT8 data[], const int le { UINT16 next_index = (m_put_index + 1) % m_size; - LOG2(("threecom3c505_device::data_buffer_fifo::put %d", m_count)); + LOG2(m_device,("threecom3c505_device::data_buffer_fifo::put %d", m_count)); if (next_index == m_get_index) { @@ -558,7 +558,7 @@ int threecom3c505_device::data_buffer_fifo::put(const UINT8 data[], const int le else if (length > ETH_BUFFER_SIZE) { // data size exceeds buffer size - LOG(("threecom3c505_device::data_buffer_fifo::put %d: data size (%d) exceeds buffer size (%d)!!!", m_count, length,ETH_BUFFER_SIZE)); + LOG(m_device,("threecom3c505_device::data_buffer_fifo::put %d: data size (%d) exceeds buffer size (%d)!!!", m_count, length,ETH_BUFFER_SIZE)); return 0; } else @@ -573,7 +573,7 @@ int threecom3c505_device::data_buffer_fifo::put(const UINT8 data[], const int le int threecom3c505_device::data_buffer_fifo::get(data_buffer *db) { - LOG2(("threecom3c505_device::data_buffer_fifo::get %d", m_count)); + LOG2(m_device,("threecom3c505_device::data_buffer_fifo::get %d", m_count)); if (m_get_index == m_put_index) { @@ -601,7 +601,7 @@ void threecom3c505_device::set_filter_list() memcpy(m_filter_list + ETHERNET_ADDR_SIZE * 2, m_multicast_list, sizeof(m_multicast_list)); int node_id = (((m_station_address[3] << 8) + m_station_address[4]) << 8) + m_station_address[5]; - LOG2(("set_filter_list node_id=%x",node_id)); + LOG2(this,("set_filter_list node_id=%x",node_id)); setfilter(this, node_id); } @@ -614,7 +614,7 @@ void threecom3c505_device::set_interrupt(enum line_state state) { if (state != irq_state) { - LOG2(("set_interrupt(%d)",state)); + LOG2(this,("set_interrupt(%d)",state)); switch (m_irq) { case 3: m_isa->irq3_w(state); break; @@ -802,7 +802,7 @@ void threecom3c505_device::do_receive_command() // receive data available ? if (m_rx_data_buffer.get_length() > 0) { - LOG2(("do_receive_command - data_length=%x rx_pending=%d", + LOG2(this,("do_receive_command - data_length=%x rx_pending=%d", m_rx_data_buffer.get_length(), m_rx_pending)); m_rx_pending--; @@ -827,7 +827,7 @@ void threecom3c505_device::do_receive_command() UINT16 buf_len = uint16_from_le(m_response.data.rcv_resp.buf_len) & ~1; if (m_rx_data_buffer.get_length() > buf_len) { - LOG1(("do_receive_command !!! buffer size too small (%d < %d)", buf_len, m_rx_data_buffer.get_length())); + LOG1(this,("do_receive_command !!! buffer size too small (%d < %d)", buf_len, m_rx_data_buffer.get_length())); m_response.data.rcv_resp.pkt_len = uint16_to_le(buf_len); m_response.data.rcv_resp.status = 0xffff; } @@ -855,7 +855,7 @@ void threecom3c505_device::do_receive_command() void threecom3c505_device::set_command_pending(int state) { - LOG2(("set_command_pending %d -> %d m_wait_for_ack=%d m_wait_for_nak=%d m_rx_pending=%d%s", + LOG2(this,("set_command_pending %d -> %d m_wait_for_ack=%d m_wait_for_nak=%d m_rx_pending=%d%s", m_command_pending, state, m_wait_for_ack, m_wait_for_nak, m_rx_pending, state ? "" :"\n")); //- verbose = onoff ? 1 : 2; @@ -890,7 +890,7 @@ void threecom3c505_device::set_command_pending(int state) } break; default: - LOG(("set_command_pending %d unexpected" , state)); + LOG(this,("set_command_pending %d unexpected" , state)); break; } @@ -990,7 +990,7 @@ void threecom3c505_device::do_command() if (command_pcp.length > sizeof(m_multicast_list) || (command_pcp.length % ETHERNET_ADDR_SIZE) != 0) { - LOG(("CMD_LOAD_MULTICAST_LIST - unexpected data size %d", command_pcp.length)); + LOG(this,("CMD_LOAD_MULTICAST_LIST - unexpected data size %d", command_pcp.length)); } else { @@ -1003,7 +1003,7 @@ void threecom3c505_device::do_command() case CMD_SET_STATION_ADDRESS: // 0x10 if (command_pcp.length != sizeof(m_station_address)) { - LOG(("CMD_SET_STATION_ADDRESS - unexpected data size %d", command_pcp.length)); + LOG(this,("CMD_SET_STATION_ADDRESS - unexpected data size %d", command_pcp.length)); memset(m_station_address, 0, sizeof(m_station_address)); } else @@ -1028,7 +1028,7 @@ void threecom3c505_device::do_command() break; default: m_microcode_version = 0; - LOG(("CMD_DOWNLOAD_PROGRAM - unexpected microcode version %04x", mc_version)); + LOG(this,("CMD_DOWNLOAD_PROGRAM - unexpected microcode version %04x", mc_version)); break; } // return microcode version as program id @@ -1111,13 +1111,13 @@ void threecom3c505_device::recv_cb(UINT8 *data, int length) m_netstat.tot_recv++; m_netstat.err_ovrrun++; // fifo overrun - LOG1(("recv_cb: data_length=%x !!! RX FIFO OVERRUN !!!", length)); + LOG1(this,("recv_cb: data_length=%x !!! RX FIFO OVERRUN !!!", length)); } else { m_netstat.tot_recv++; - LOG2(("recv_cb: data_length=%x m_rx_pending=%d", length, m_rx_pending)); + LOG2(this,("recv_cb: data_length=%x m_rx_pending=%d", length, m_rx_pending)); do_receive_command(); } @@ -1129,7 +1129,7 @@ void threecom3c505_device::recv_cb(UINT8 *data, int length) void threecom3c505_device::write_command_port(UINT8 data) { - LOG2(("writing 3C505 command port %02x - m_status=%02x m_control=%02x m_command_index=%02x", + LOG2(this,("writing 3C505 command port %02x - m_status=%02x m_control=%02x m_command_index=%02x", data, m_status, m_control, m_command_index)); if (m_command_index == 0) @@ -1137,7 +1137,7 @@ void threecom3c505_device::write_command_port(UINT8 data) switch (data) { case 0: - LOG2(("!!! writing 3C505 Command Register = %02x", data)); + LOG2(this,("!!! writing 3C505 Command Register = %02x", data)); // spurious data; reset? break; @@ -1240,7 +1240,7 @@ UINT8 threecom3c505_device::read_command_port() m_status &= ~ACRF; /* the adapter command register is no longer full */ - LOG2(("read_command_port: !!! reading 3C505 Command Register = %02x - m_status=%02x m_control=%02x", + LOG2(this,("read_command_port: !!! reading 3C505 Command Register = %02x - m_status=%02x m_control=%02x", data, m_status, m_control)); // wait for nak in control register @@ -1250,7 +1250,7 @@ UINT8 threecom3c505_device::read_command_port() { // should never happen data = 0; // 0xff; - LOG(("read_command_port: unexpected reading Command Register at index %04x", m_response_index)); + LOG(this,("read_command_port: unexpected reading Command Register at index %04x", m_response_index)); } if (m_response_index <= m_response_length + 1) @@ -1283,13 +1283,13 @@ UINT8 threecom3c505_device::read_command_port() if (!send(m_tx_data_buffer.get_data(), m_tx_data_buffer.get_length())) { // FIXME: failed to send the Ethernet packet - LOG(("read_command_port(): !!! failed to send Ethernet packet")); + LOG(this,("read_command_port(): !!! failed to send Ethernet packet")); } if (!tx_data(this, m_tx_data_buffer.get_data(), m_tx_data_buffer.get_length())) { // FIXME: failed to transmit the Ethernet packet - LOG(("read_command_port(): !!! failed to transmit Ethernet packet")); + LOG(this,("read_command_port(): !!! failed to transmit Ethernet packet")); } m_tx_data_buffer.reset(); @@ -1326,7 +1326,7 @@ void threecom3c505_device::write_data_port(UINT8 data) else if ((m_status & HRDY) == 0) { // this happened in ether.dex Test 20/1 - LOG(("write_data_port: failed to write tx data (data register not ready), data length=%x status=%x", + LOG(this,("write_data_port: failed to write tx data (data register not ready), data length=%x status=%x", m_tx_data_buffer.get_length(), m_status)); } @@ -1334,7 +1334,7 @@ void threecom3c505_device::write_data_port(UINT8 data) else if (m_command_buffer[0] == CMD_MC_F8) { // FIXME: what does it do? - LOG(("write_data_port: !!! TODO: CMD_MC_F8 !!! command=%x data=%02x", m_command_buffer[0], data)); + LOG(this,("write_data_port: !!! TODO: CMD_MC_F8 !!! command=%x data=%02x", m_command_buffer[0], data)); } #endif @@ -1353,7 +1353,7 @@ void threecom3c505_device::write_data_port(UINT8 data) default: if (!m_tx_data_buffer.append(data)) { - LOG(("write_data_port: failed to write tx data (buffer size exceeded), data length=%x", + LOG(this,("write_data_port: failed to write tx data (buffer size exceeded), data length=%x", m_tx_data_buffer.get_length())); } if (m_tx_data_buffer.get_length() == m_tx_data_length) @@ -1370,7 +1370,7 @@ void threecom3c505_device::write_data_port(UINT8 data) { if (!m_tx_data_buffer.append(data)) { - LOG(("write_data_port: failed to write tx data (buffer size exceeded), data length=%x", + LOG(this,("write_data_port: failed to write tx data (buffer size exceeded), data length=%x", m_tx_data_buffer.get_length())); } @@ -1385,7 +1385,7 @@ void threecom3c505_device::write_data_port(UINT8 data) { if (!m_program_buffer.append(data)) { - LOG(("write_data_port: failed to write program data (buffer size exceeded), data length=%x", + LOG(this,("write_data_port: failed to write program data (buffer size exceeded), data length=%x", m_program_buffer.get_length())); } @@ -1400,13 +1400,13 @@ void threecom3c505_device::write_data_port(UINT8 data) // write to data fifo if (!m_tx_data_buffer.append(data)) { - LOG(("write_data_port: failed to write tx data (buffer size exceeded), data length=%x", + LOG(this,("write_data_port: failed to write tx data (buffer size exceeded), data length=%x", m_tx_data_buffer.get_length())); } } else { - LOG(("write_data_port: unexpected command %02x data=%02x", m_command_buffer[0], data)); + LOG(this,("write_data_port: unexpected command %02x data=%02x", m_command_buffer[0], data)); } if (m_command_buffer[0] != CMD_DOWNLOAD_PROGRAM && @@ -1417,7 +1417,7 @@ void threecom3c505_device::write_data_port(UINT8 data) if (m_tx_data_buffer.get_length() > PORT_DATA_FIFO_SIZE && m_tx_data_buffer.get_length() > m_tx_data_length) { - LOG(("write_data_port: port_data tx fifo exhausted, data length=%x status=%x", + LOG(this,("write_data_port: port_data tx fifo exhausted, data length=%x status=%x", m_tx_data_buffer.get_length(), m_status)); } } @@ -1455,7 +1455,7 @@ UINT8 threecom3c505_device::read_data_port() { // FIXME: should never happen data = 0xff; - LOG(("read_data_port: unexpected reading data at index %04x)", m_rx_data_index)); + LOG(this,("read_data_port: unexpected reading data at index %04x)", m_rx_data_index)); } return data; } @@ -1469,12 +1469,12 @@ void threecom3c505_device::write_control_port(UINT8 data) switch (data & (ATTN | FLSH)) { case ATTN: - LOG2(("write_control_port %02x - Soft Reset", data)); + LOG2(this,("write_control_port %02x - Soft Reset", data)); // TODO: soft reset break; case FLSH: - LOG2(("write_control_port %02x - Flush Data Register", data)); + LOG2(this,("write_control_port %02x - Flush Data Register", data)); // flush data register if (data & DIR_) { @@ -1492,12 +1492,12 @@ void threecom3c505_device::write_control_port(UINT8 data) break; case ATTN | FLSH: - LOG2(("write_control_port %02x - Reset Adapter", data)); + LOG2(this,("write_control_port %02x - Reset Adapter", data)); device_reset(); break; case 0: - LOG2(("write_control_port %02x", data)); + LOG2(this,("write_control_port %02x", data)); // end reset if ((m_control & (ATTN | FLSH)) == (ATTN | FLSH)) @@ -1579,7 +1579,7 @@ WRITE16_MEMBER(threecom3c505_device::write) offset *= 2; m_reg[offset & 0x0f] = data; - LOG2(("writing 3C505 Register at offset=%02x with mem_mask=%04x = %04x", offset, mem_mask, data)); + LOG2(this,("writing 3C505 Register at offset=%02x with mem_mask=%04x = %04x", offset, mem_mask, data)); switch (offset) { @@ -1645,7 +1645,7 @@ READ16_MEMBER(threecom3c505_device::read) break; } - LOG2(("reading 3C505 Register at offset=%02x with mem_mask=%04x = %04x", offset, mem_mask, data)); + LOG2(this,("reading 3C505 Register at offset=%02x with mem_mask=%04x = %04x", offset, mem_mask, data)); return data; } @@ -1657,7 +1657,7 @@ void threecom3c505_device::set_verbose(int on_off) int threecom3c505_device::tx_data(device_t *device, const UINT8 data[], int length) { - LOG1(("threecom3c505_device::tx_data length=%d", length)); + LOG1(device,("threecom3c505_device::tx_data length=%d", length)); return 1; } diff --git a/src/devices/bus/isa/omti8621.c b/src/devices/bus/isa/omti8621.c index 96b1214ff85..9f86243a90a 100644 --- a/src/devices/bus/isa/omti8621.c +++ b/src/devices/bus/isa/omti8621.c @@ -215,7 +215,8 @@ MACHINE_CONFIG_FRAGMENT( omti_disk ) MCFG_PC_FDC_INTRQ_CALLBACK(WRITELINE(omti8621_device, fdc_irq_w)) MCFG_PC_FDC_DRQ_CALLBACK(WRITELINE(omti8621_device, fdc_drq_w)) MCFG_FLOPPY_DRIVE_ADD(OMTI_FDC_TAG":0", pc_hd_floppies, "525hd", omti8621_device::floppy_formats) - MCFG_FLOPPY_DRIVE_ADD(OMTI_FDC_TAG":1", pc_hd_floppies, "525hd", omti8621_device::floppy_formats) +// Apollo workstations never have more then 1 floppy drive +// MCFG_FLOPPY_DRIVE_ADD(OMTI_FDC_TAG":1", pc_hd_floppies, "525hd", omti8621_device::floppy_formats) MACHINE_CONFIG_END FLOPPY_FORMATS_MEMBER( omti8621_device::floppy_formats ) @@ -231,8 +232,12 @@ ROM_START( omti8621 ) ROM_REGION(0x4000, OMTI_CPU_REGION, 0) // disassembles fine as Z8 code ROM_LOAD( "omti_8621_102640-b.bin", 0x000000, 0x004000, CRC(e6f20dbb) SHA1(cf1990ad72eac6b296485410f5fa3309a0d6d078) ) +#if 1 + // OMTI 8621 boards for Apollo workstations never use a BIOS ROM + // They don't even have a socket for the BIOS ROM ROM_REGION(0x1000, OMTI_BIOS_REGION, 0) - ROM_LOAD("omti_bios", 0x0000, 0x1000, NO_DUMP) + ROM_LOAD_OPTIONAL("omti_bios", 0x0000, 0x1000, NO_DUMP) +#endif ROM_END static INPUT_PORTS_START( omti_port ) @@ -280,6 +285,8 @@ ioport_constructor omti8621_device::device_input_ports() const void omti8621_device::device_start() { + LOG2(("device_start")); + set_isa_device(); m_installed = false; @@ -300,7 +307,7 @@ void omti8621_device::device_reset() { static const int io_bases[8] = { 0x320, 0x324, 0x328, 0x32c, 0x1a0, 0x1a4, 0x1a8, 0x1ac }; - LOG2(("device_reset_omti8621")); + LOG2(("device_reset")); // you can't read I/O ports in device_start() even if they're required_ioport<> in your class! if (!m_installed) @@ -1201,11 +1208,13 @@ void omti8621_device::set_verbose(int on_off) get_sector - get sector diskaddr of logical unit lun into data_buffer ***************************************************************************/ +// FIXME: this will work, but is not supported by MESS +#if 0 // APOLLO_XXL UINT32 omti8621_device::get_sector(INT32 diskaddr, UINT8 *data_buffer, UINT32 length, UINT8 lun) { - omti_disk_image_device *disk = our_disks[lun]; + omti_disk_image_device *disk = omti8621_device_1->our_disks[lun]; - if (disk->m_image == NULL || !disk->m_image->exists()) + if (disk == NULL || disk->m_image == NULL || !disk->m_image->exists()) { return 0; } @@ -1222,7 +1231,7 @@ UINT32 omti8621_device::get_sector(INT32 diskaddr, UINT8 *data_buffer, UINT32 le return length; } } - +#endif /*************************************************************************** omti_set_jumper - set OMI jumpers diff --git a/src/devices/bus/isa/omti8621.h b/src/devices/bus/isa/omti8621.h index 1a49a8e3993..d08ad8fdb41 100644 --- a/src/devices/bus/isa/omti8621.h +++ b/src/devices/bus/isa/omti8621.h @@ -42,7 +42,7 @@ public: static void set_verbose(int on_off); // get sector diskaddr of logical unit lun into data_buffer - UINT32 get_sector(INT32 diskaddr, UINT8 *data_buffer, UINT32 length, UINT8 lun); + static UINT32 get_sector(INT32 diskaddr, UINT8 *data_buffer, UINT32 length, UINT8 lun); required_device<pc_fdc_interface> m_fdc; required_ioport m_iobase; diff --git a/src/devices/bus/megadrive/jcart.c b/src/devices/bus/megadrive/jcart.c index 6e45c2481f6..e99d43b9d49 100644 --- a/src/devices/bus/megadrive/jcart.c +++ b/src/devices/bus/megadrive/jcart.c @@ -180,14 +180,14 @@ READ16_MEMBER(md_jcart_device::read) if (m_jcart_io_data[0] & 0x40) { - joy[0] = m_jcart3->read_safe(0); - joy[1] = m_jcart4->read_safe(0); + joy[0] = read_safe(m_jcart3, 0); + joy[1] = read_safe(m_jcart4, 0); return (m_jcart_io_data[0] & 0x40) | joy[0] | (joy[1] << 8); } else { - joy[0] = ((m_jcart3->read_safe(0) & 0xc0) >> 2) | (m_jcart3->read_safe(0) & 0x03); - joy[1] = ((m_jcart4->read_safe(0) & 0xc0) >> 2) | (m_jcart4->read_safe(0) & 0x03); + joy[0] = ((read_safe(m_jcart3, 0) & 0xc0) >> 2) | (read_safe(m_jcart3, 0) & 0x03); + joy[1] = ((read_safe(m_jcart4, 0) & 0xc0) >> 2) | (read_safe(m_jcart4, 0) & 0x03); return (m_jcart_io_data[0] & 0x40) | joy[0] | (joy[1] << 8); } } @@ -223,14 +223,14 @@ READ16_MEMBER(md_seprom_codemast_device::read) if (m_jcart_io_data[0] & 0x40) { - joy[0] = m_jcart3->read_safe(0); - joy[1] = m_jcart4->read_safe(0); + joy[0] = read_safe(m_jcart3, 0); + joy[1] = read_safe(m_jcart4, 0); return (m_jcart_io_data[0] & 0x40) | joy[0] | (joy[1] << 8); } else { - joy[0] = ((m_jcart3->read_safe(0) & 0xc0) >> 2) | (m_jcart3->read_safe(0) & 0x03); - joy[1] = ((m_jcart4->read_safe(0) & 0xc0) >> 2) | (m_jcart4->read_safe(0) & 0x03); + joy[0] = ((read_safe(m_jcart3, 0) & 0xc0) >> 2) | (read_safe(m_jcart3, 0) & 0x03); + joy[1] = ((read_safe(m_jcart4, 0) & 0xc0) >> 2) | (read_safe(m_jcart4, 0) & 0x03); return (m_jcart_io_data[0] & 0x40) | joy[0] | (joy[1] << 8); } } diff --git a/src/devices/bus/megadrive/md_slot.h b/src/devices/bus/megadrive/md_slot.h index e7cf7e43c3b..f4a6d2f5f85 100644 --- a/src/devices/bus/megadrive/md_slot.h +++ b/src/devices/bus/megadrive/md_slot.h @@ -100,7 +100,7 @@ public: virtual int read_test() { return 0; } // used by Virtua Racing test /* this probably should do more, like make Genesis V2 'die' if the SEGA string is not written promptly */ - virtual DECLARE_WRITE16_MEMBER(write_tmss_bank) { logerror("Write to TMSS bank: offset %x data %x\n", 0xa14000 + (offset << 1), data); }; + virtual DECLARE_WRITE16_MEMBER(write_tmss_bank) { m_device.logerror("Write to TMSS bank: offset %x data %x\n", 0xa14000 + (offset << 1), data); }; virtual void rom_alloc(size_t size, const char *tag); virtual void nvram_alloc(size_t size); diff --git a/src/devices/bus/megadrive/stm95.c b/src/devices/bus/megadrive/stm95.c index 67c367425a6..cc8765f3b4a 100644 --- a/src/devices/bus/megadrive/stm95.c +++ b/src/devices/bus/megadrive/stm95.c @@ -96,7 +96,7 @@ void stm95_eeprom_device::set_sck_line(int state) WEL = 1; break; default: - logerror("STM95 EEPROM: unknown cmd %02X\n", stream_data&0xff); + machine().logerror("STM95 EEPROM: unknown cmd %02X\n", stream_data&0xff); } } break; diff --git a/src/devices/bus/rs232/pty.c b/src/devices/bus/rs232/pty.c index bc673318e2a..0039925ac85 100644 --- a/src/devices/bus/rs232/pty.c +++ b/src/devices/bus/rs232/pty.c @@ -7,132 +7,132 @@ static const int TIMER_POLL = 1; pseudo_terminal_device::pseudo_terminal_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : - device_t(mconfig, PSEUDO_TERMINAL, "Pseudo terminal", tag, owner, clock, "pseudo_terminal", __FILE__), - device_serial_interface(mconfig, *this), - device_rs232_port_interface(mconfig, *this), - device_pty_interface(mconfig, *this), - m_rs232_txbaud(*this, "RS232_TXBAUD"), - m_rs232_rxbaud(*this, "RS232_RXBAUD"), - m_rs232_startbits(*this, "RS232_STARTBITS"), - m_rs232_databits(*this, "RS232_DATABITS"), - m_rs232_parity(*this, "RS232_PARITY"), - m_rs232_stopbits(*this, "RS232_STOPBITS"), - m_input_count(0), - m_input_index(0) + device_t(mconfig, PSEUDO_TERMINAL, "Pseudo terminal", tag, owner, clock, "pseudo_terminal", __FILE__), + device_serial_interface(mconfig, *this), + device_rs232_port_interface(mconfig, *this), + device_pty_interface(mconfig, *this), + m_rs232_txbaud(*this, "RS232_TXBAUD"), + m_rs232_rxbaud(*this, "RS232_RXBAUD"), + m_rs232_startbits(*this, "RS232_STARTBITS"), + m_rs232_databits(*this, "RS232_DATABITS"), + m_rs232_parity(*this, "RS232_PARITY"), + m_rs232_stopbits(*this, "RS232_STOPBITS"), + m_input_count(0), + m_input_index(0) { } WRITE_LINE_MEMBER(pseudo_terminal_device::update_serial) { - int startbits = convert_startbits(m_rs232_startbits->read()); - int databits = convert_databits(m_rs232_databits->read()); - parity_t parity = convert_parity(m_rs232_parity->read()); - stop_bits_t stopbits = convert_stopbits(m_rs232_stopbits->read()); + int startbits = convert_startbits(m_rs232_startbits->read()); + int databits = convert_databits(m_rs232_databits->read()); + parity_t parity = convert_parity(m_rs232_parity->read()); + stop_bits_t stopbits = convert_stopbits(m_rs232_stopbits->read()); - set_data_frame(startbits, databits, parity, stopbits); + set_data_frame(startbits, databits, parity, stopbits); - int txbaud = convert_baud(m_rs232_txbaud->read()); - set_tra_rate(txbaud); + int txbaud = convert_baud(m_rs232_txbaud->read()); + set_tra_rate(txbaud); - int rxbaud = convert_baud(m_rs232_rxbaud->read()); - set_rcv_rate(rxbaud); + int rxbaud = convert_baud(m_rs232_rxbaud->read()); + set_rcv_rate(rxbaud); - output_rxd(1); + output_rxd(1); - // TODO: make this configurable - output_dcd(0); - output_dsr(0); - output_cts(0); + // TODO: make this configurable + output_dcd(0); + output_dsr(0); + output_cts(0); } static INPUT_PORTS_START(pseudo_terminal) - MCFG_RS232_BAUD("RS232_TXBAUD", RS232_BAUD_9600, "TX Baud", pseudo_terminal_device, update_serial) - MCFG_RS232_BAUD("RS232_RXBAUD", RS232_BAUD_9600, "RX Baud", pseudo_terminal_device, update_serial) - MCFG_RS232_STARTBITS("RS232_STARTBITS", RS232_STARTBITS_1, "Start Bits", pseudo_terminal_device, update_serial) - MCFG_RS232_DATABITS("RS232_DATABITS", RS232_DATABITS_8, "Data Bits", pseudo_terminal_device, update_serial) - MCFG_RS232_PARITY("RS232_PARITY", RS232_PARITY_NONE, "Parity", pseudo_terminal_device, update_serial) - MCFG_RS232_STOPBITS("RS232_STOPBITS", RS232_STOPBITS_1, "Stop Bits", pseudo_terminal_device, update_serial) + MCFG_RS232_BAUD("RS232_TXBAUD", RS232_BAUD_9600, "TX Baud", pseudo_terminal_device, update_serial) + MCFG_RS232_BAUD("RS232_RXBAUD", RS232_BAUD_9600, "RX Baud", pseudo_terminal_device, update_serial) + MCFG_RS232_STARTBITS("RS232_STARTBITS", RS232_STARTBITS_1, "Start Bits", pseudo_terminal_device, update_serial) + MCFG_RS232_DATABITS("RS232_DATABITS", RS232_DATABITS_8, "Data Bits", pseudo_terminal_device, update_serial) + MCFG_RS232_PARITY("RS232_PARITY", RS232_PARITY_NONE, "Parity", pseudo_terminal_device, update_serial) + MCFG_RS232_STOPBITS("RS232_STOPBITS", RS232_STOPBITS_1, "Stop Bits", pseudo_terminal_device, update_serial) INPUT_PORTS_END ioport_constructor pseudo_terminal_device::device_input_ports() const { - return INPUT_PORTS_NAME(pseudo_terminal); + return INPUT_PORTS_NAME(pseudo_terminal); } void pseudo_terminal_device::device_start() { - m_timer_poll = timer_alloc(TIMER_POLL); + m_timer_poll = timer_alloc(TIMER_POLL); - open(); + open(); } void pseudo_terminal_device::device_stop() { - close(); + close(); } void pseudo_terminal_device::device_reset() { - update_serial(0); - queue(); + update_serial(0); + queue(); } void pseudo_terminal_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) { - switch (id) - { - case TIMER_POLL: - queue(); - break; - - default: - device_serial_interface::device_timer(timer, id, param, ptr); - } + switch (id) + { + case TIMER_POLL: + queue(); + break; + + default: + device_serial_interface::device_timer(timer, id, param, ptr); + } } void pseudo_terminal_device::tra_callback() { - output_rxd(transmit_register_get_data_bit()); + output_rxd(transmit_register_get_data_bit()); } void pseudo_terminal_device::tra_complete() { - queue(); + queue(); } void pseudo_terminal_device::rcv_complete() { - receive_register_extract(); - write(get_received_char()); + receive_register_extract(); + write(get_received_char()); } void pseudo_terminal_device::queue(void) { - if (is_transmit_register_empty()) - { - if (m_input_index == m_input_count) - { - m_input_index = 0; - int tmp = read(m_input_buffer , sizeof(m_input_buffer)); - if (tmp > 0) { - m_input_count = tmp; - } else { - m_input_count = 0; - } - } - - if (m_input_count != 0) - { - transmit_register_setup(m_input_buffer[ m_input_index++ ]); - - m_timer_poll->adjust(attotime::never); - } - else - { - int txbaud = convert_baud(m_rs232_txbaud->read()); - m_timer_poll->adjust(attotime::from_hz(txbaud)); - } - } + if (is_transmit_register_empty()) + { + if (m_input_index == m_input_count) + { + m_input_index = 0; + int tmp = read(m_input_buffer , sizeof(m_input_buffer)); + if (tmp > 0) { + m_input_count = tmp; + } else { + m_input_count = 0; + } + } + + if (m_input_count != 0) + { + transmit_register_setup(m_input_buffer[ m_input_index++ ]); + + m_timer_poll->adjust(attotime::never); + } + else + { + int txbaud = convert_baud(m_rs232_txbaud->read()); + m_timer_poll->adjust(attotime::from_hz(txbaud)); + } + } } const device_type PSEUDO_TERMINAL = &device_creator<pseudo_terminal_device>; diff --git a/src/devices/bus/rs232/pty.h b/src/devices/bus/rs232/pty.h index 1f4ddbce754..222ee446b53 100644 --- a/src/devices/bus/rs232/pty.h +++ b/src/devices/bus/rs232/pty.h @@ -7,44 +7,44 @@ #include "rs232.h" class pseudo_terminal_device : public device_t, - public device_serial_interface, - public device_rs232_port_interface, - public device_pty_interface + public device_serial_interface, + public device_rs232_port_interface, + public device_pty_interface { public: - pseudo_terminal_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + pseudo_terminal_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - virtual DECLARE_WRITE_LINE_MEMBER( input_txd ) { - device_serial_interface::rx_w(state); - } + virtual DECLARE_WRITE_LINE_MEMBER( input_txd ) { + device_serial_interface::rx_w(state); + } - DECLARE_WRITE_LINE_MEMBER(update_serial); + DECLARE_WRITE_LINE_MEMBER(update_serial); protected: - virtual ioport_constructor device_input_ports() const; - virtual void device_start(); - virtual void device_stop(); - virtual void device_reset(); - virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); + virtual ioport_constructor device_input_ports() const; + virtual void device_start(); + virtual void device_stop(); + virtual void device_reset(); + virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); - virtual void tra_callback(); - virtual void tra_complete(); - virtual void rcv_complete(); + virtual void tra_callback(); + virtual void tra_complete(); + virtual void rcv_complete(); private: - required_ioport m_rs232_txbaud; - required_ioport m_rs232_rxbaud; - required_ioport m_rs232_startbits; - required_ioport m_rs232_databits; - required_ioport m_rs232_parity; - required_ioport m_rs232_stopbits; - - UINT8 m_input_buffer[ 1024 ]; - UINT32 m_input_count; - UINT32 m_input_index; - emu_timer *m_timer_poll; - - void queue(void); + required_ioport m_rs232_txbaud; + required_ioport m_rs232_rxbaud; + required_ioport m_rs232_startbits; + required_ioport m_rs232_databits; + required_ioport m_rs232_parity; + required_ioport m_rs232_stopbits; + + UINT8 m_input_buffer[ 1024 ]; + UINT32 m_input_count; + UINT32 m_input_index; + emu_timer *m_timer_poll; + + void queue(void); }; extern const device_type PSEUDO_TERMINAL; diff --git a/src/devices/bus/rs232/rs232.c b/src/devices/bus/rs232/rs232.c index cb2d1771a6e..411a31a8f01 100644 --- a/src/devices/bus/rs232/rs232.c +++ b/src/devices/bus/rs232/rs232.c @@ -111,5 +111,5 @@ SLOT_INTERFACE_START( default_rs232_devices ) SLOT_INTERFACE("null_modem", NULL_MODEM) SLOT_INTERFACE("printer", SERIAL_PRINTER) SLOT_INTERFACE("terminal", SERIAL_TERMINAL) - SLOT_INTERFACE("pty", PSEUDO_TERMINAL) + SLOT_INTERFACE("pty", PSEUDO_TERMINAL) SLOT_INTERFACE_END diff --git a/src/devices/bus/snes/snes_slot.c b/src/devices/bus/snes/snes_slot.c index d44325d728f..92da3357dd1 100644 --- a/src/devices/bus/snes/snes_slot.c +++ b/src/devices/bus/snes/snes_slot.c @@ -466,7 +466,7 @@ static int snes_validate_infoblock( UINT8 *infoblock, UINT32 offset ) /* This determines if a cart is in Mode 20, 21, 22 or 25; sets state->m_cart[0].mode and state->m_cart[0].sram accordingly; and returns the offset of the internal header (needed to detect BSX and ST carts) */ -static UINT32 snes_find_hilo_mode( UINT8 *buffer, UINT32 buf_len ) +static UINT32 snes_find_hilo_mode(device_t *device, UINT8 *buffer, UINT32 buf_len ) { UINT8 valid_mode20 = 0; UINT8 valid_mode21 = 0; @@ -492,7 +492,7 @@ static UINT32 snes_find_hilo_mode( UINT8 *buffer, UINT32 buf_len ) else retvalue = 0x40ffc0; - logerror( "\t HiROM/LoROM id: %s (LoROM: %d , HiROM: %d, ExHiROM: %d)\n", + device->logerror( "\t HiROM/LoROM id: %s (LoROM: %d , HiROM: %d, ExHiROM: %d)\n", (retvalue == 0x007fc0) ? "LoROM" : (retvalue == 0x00ffc0) ? "HiROM" : (retvalue == 0x40ffc0) ? "ExHiROM" : "Other", @@ -847,7 +847,7 @@ void base_sns_cart_slot_device::setup_nvram() UINT32 size = 0; if (software_entry() == NULL) { - int hilo_mode = snes_find_hilo_mode(ROM, m_cart->get_rom_size()); + int hilo_mode = snes_find_hilo_mode(this, ROM, m_cart->get_rom_size()); UINT8 sram_size = (m_type == SNES_SFX) ? (ROM[0x00ffbd] & 0x07) : (ROM[hilo_mode + 0x18] & 0x07); if (sram_size) { @@ -893,7 +893,7 @@ bool base_sns_cart_slot_device::call_softlist_load(software_list_device &swlist, void base_sns_cart_slot_device::get_cart_type_addon(UINT8 *ROM, UINT32 len, int &type, int &addon) { // First, look if the cart is HiROM or LoROM (and set snes_cart accordingly) - int hilo_mode = snes_find_hilo_mode(ROM, len); + int hilo_mode = snes_find_hilo_mode(this,ROM, len); switch (hilo_mode) { @@ -1244,7 +1244,7 @@ void base_sns_cart_slot_device::internal_header_logging(UINT8 *ROM, UINT32 len) /*f8*/ UNK, "Cybersoft", UNK, "Psygnosis", UNK, UNK, "Davidson", UNK, }; - int hilo_mode = snes_find_hilo_mode(ROM, len); + int hilo_mode = snes_find_hilo_mode(this,ROM, len); char title[21], rom_id[4], company_id[2]; int type = 0, company, addon, has_ram = 0, has_sram = 0; switch (hilo_mode) diff --git a/src/devices/bus/ti99x/gromport.c b/src/devices/bus/ti99x/gromport.c index 2119a93c348..a948051939e 100644 --- a/src/devices/bus/ti99x/gromport.c +++ b/src/devices/bus/ti99x/gromport.c @@ -1514,7 +1514,7 @@ WRITE8_MEMBER(ti99_cartridge_pcb::write) gromwrite(space, offset, data, mem_mask); else { - if (TRACE_ILLWRITE) logerror("%s: Cannot write to ROM space at %04x\n", tag(), offset); + if (TRACE_ILLWRITE) space.device().logerror("%s: Cannot write to ROM space at %04x\n", tag(), offset); } } @@ -1601,7 +1601,7 @@ WRITE8_MEMBER(ti99_minimem_cartridge::write) { if ((offset & 0x1000)==0x0000) { - if (TRACE_ILLWRITE) logerror("%s: Write access to cartridge ROM at address %04x ignored", tag(), offset); + if (TRACE_ILLWRITE) space.device().logerror("%s: Write access to cartridge ROM at address %04x ignored", tag(), offset); } else { @@ -1683,7 +1683,7 @@ READ8Z_MEMBER(ti99_super_cartridge::crureadz) if ((offset & 0xfff0) == 0x0800) { - if (TRACE_CRU) logerror("%s: CRU accessed at %04x\n", tag(), offset); + if (TRACE_CRU) space.device().logerror("%s: CRU accessed at %04x\n", tag(), offset); UINT8 val = 0x02 << (m_ram_page << 1); *value = (val >> ((offset - 0x0800)>>1)) & 0xff; } @@ -1693,7 +1693,7 @@ WRITE8_MEMBER(ti99_super_cartridge::cruwrite) { if ((offset & 0xfff0) == 0x0800) { - if (TRACE_CRU) logerror("%s: CRU accessed at %04x\n", tag(), offset); + if (TRACE_CRU) space.device().logerror("%s: CRU accessed at %04x\n", tag(), offset); if (data != 0) m_ram_page = (offset-0x0802)>>2; } @@ -2051,7 +2051,7 @@ WRITE8_MEMBER(ti99_gromemu_cartridge::gromemuwrite) // Accept low address byte (second write) m_grom_address = (m_grom_address & 0xff00) | data; m_waddr_LSB = false; - if (TRACE_GROM) logerror("%s: Set grom address %04x\n", tag(), m_grom_address); + if (TRACE_GROM) space.device().logerror("%s: Set grom address %04x\n", tag(), m_grom_address); } else { @@ -2061,7 +2061,7 @@ WRITE8_MEMBER(ti99_gromemu_cartridge::gromemuwrite) } } else { - if (TRACE_ILLWRITE) logerror("%s: Ignoring write to GROM area at address %04x\n", tag(), m_grom_address); + if (TRACE_ILLWRITE) space.device().logerror("%s: Ignoring write to GROM area at address %04x\n", tag(), m_grom_address); } } @@ -2130,7 +2130,7 @@ rpk::rpk(emu_options& options, const char* sysname) rpk::~rpk() { - if (TRACE_RPK) logerror("gromport/RPK: Destroy RPK\n"); + //if (TRACE_RPK) logerror("gromport/RPK: Destroy RPK\n"); } /* @@ -2238,7 +2238,7 @@ rpk_socket* rpk_reader::load_rom_resource(zip_file* zip, xml_data_node* rom_reso file = xml_get_attribute_string(rom_resource_node, "file", NULL); if (file == NULL) throw rpk_exception(RPK_INVALID_LAYOUT, "<rom> must have a 'file' attribute"); - if (TRACE_RPK) logerror("gromport/RPK: Loading ROM contents for socket '%s' from file %s\n", socketname, file); + //if (TRACE_RPK) logerror("gromport/RPK: Loading ROM contents for socket '%s' from file %s\n", socketname, file); // check for crc crcstr = xml_get_attribute_string(rom_resource_node, "crc", NULL); @@ -2326,7 +2326,7 @@ rpk_socket* rpk_reader::load_ram_resource(emu_options &options, xml_data_node* r contents = global_alloc_array_clear(UINT8, length); if (contents==NULL) throw rpk_exception(RPK_OUT_OF_MEMORY); - if (TRACE_RPK) logerror("gromport/RPK: Allocating RAM buffer (%d bytes) for socket '%s'\n", length, socketname); + //if (TRACE_RPK) logerror("gromport/RPK: Allocating RAM buffer (%d bytes) for socket '%s'\n", length, socketname); ram_pname = NULL; @@ -2348,7 +2348,7 @@ rpk_socket* rpk_reader::load_ram_resource(emu_options &options, xml_data_node* r std::string ram_pathname = std::string(system_name).append(PATH_SEPARATOR).append(ram_filename); ram_pname = core_strdup(ram_pathname.c_str()); // load, and fill rest with 00 - if (TRACE_RPK) logerror("gromport/RPK: Loading NVRAM contents from '%s'\n", ram_pname); + //if (TRACE_RPK) logerror("gromport/RPK: Loading NVRAM contents from '%s'\n", ram_pname); image_battery_load_by_name(options, ram_pname, contents, length, 0x00); } } @@ -2438,7 +2438,7 @@ rpk* rpk_reader::open(emu_options &options, const char *filename, const char *sy // We'll try to find the PCB type on the provided type list. pcb_type = xml_get_attribute_string(pcb_node, "type", NULL); if (pcb_type==NULL) throw rpk_exception(RPK_INVALID_LAYOUT, "<pcb> must have a 'type' attribute"); - if (TRACE_RPK) logerror("gromport/RPK: Cartridge says it has PCB type '%s'\n", pcb_type); + //if (TRACE_RPK) logerror("gromport/RPK: Cartridge says it has PCB type '%s'\n", pcb_type); i=0; do diff --git a/src/devices/bus/tiki100/8088.c b/src/devices/bus/tiki100/8088.c index 1065c856340..d8c9fe201b5 100644 --- a/src/devices/bus/tiki100/8088.c +++ b/src/devices/bus/tiki100/8088.c @@ -14,7 +14,7 @@ // MACROS/CONSTANTS //************************************************************************** -#define I8088_TAG "u3" +#define I8088_TAG "u3" diff --git a/src/devices/bus/tiki100/8088.h b/src/devices/bus/tiki100/8088.h index 2700866a169..6bfa5e723bc 100644 --- a/src/devices/bus/tiki100/8088.h +++ b/src/devices/bus/tiki100/8088.h @@ -24,7 +24,7 @@ // ======================> tiki100_8088_t class tiki100_8088_t : public device_t, - public device_tiki100bus_card_interface + public device_tiki100bus_card_interface { public: // construction/destruction diff --git a/src/devices/bus/tiki100/exp.h b/src/devices/bus/tiki100/exp.h index fc25c522c79..e41b18e7831 100644 --- a/src/devices/bus/tiki100/exp.h +++ b/src/devices/bus/tiki100/exp.h @@ -105,8 +105,8 @@ public: // ======================> tiki100_bus_slot_t class tiki100_bus_slot_t : public device_t, - public device_slot_interface, - public device_z80daisy_interface + public device_slot_interface, + public device_z80daisy_interface { public: // construction/destruction diff --git a/src/devices/bus/tiki100/hdc.c b/src/devices/bus/tiki100/hdc.c index 2b978635ead..504222f0f48 100644 --- a/src/devices/bus/tiki100/hdc.c +++ b/src/devices/bus/tiki100/hdc.c @@ -14,7 +14,7 @@ // MACROS/CONSTANTS //************************************************************************** -#define WD1010_TAG "hdc" +#define WD1010_TAG "hdc" diff --git a/src/devices/bus/tiki100/hdc.h b/src/devices/bus/tiki100/hdc.h index d06342fc66c..fefde73c2e7 100644 --- a/src/devices/bus/tiki100/hdc.h +++ b/src/devices/bus/tiki100/hdc.h @@ -25,7 +25,7 @@ // ======================> tiki100_hdc_t class tiki100_hdc_t : public device_t, - public device_tiki100bus_card_interface + public device_tiki100bus_card_interface { public: // construction/destruction diff --git a/src/devices/bus/vcs/harmony_melody.c b/src/devices/bus/vcs/harmony_melody.c new file mode 100644 index 00000000000..d6bf0291fdc --- /dev/null +++ b/src/devices/bus/vcs/harmony_melody.c @@ -0,0 +1,146 @@ +// license:BSD-3-Clause +// copyright-holders:David Haywood +/*************************************************************************** + +Harmony / Melody cart for the A2600 + +The Harmony cart is a 'modern' A2600 cartridge, used for homebrew etc. It has +an SD slot and can be connected to a PC, roms can be transfered to it with +software on the PC side. It uses an ARM7TDMI-S LPC2103 @ 70 Mhz to emulate +the mapper behavior of other cartridges. It has an SD card slot for storing +game data. + +The Melody version of the cartridge has been used for several recent A2600 +commercial releases as well as some reproductions due to it's ability to be +programmed as any other cartridge type. This lacks the SD slot? + +The 'DPC+' games by SpiceWare run on a Harmony / Melody cart, DPC+ seems to +be a virtual 'software mapper' programmed on the ARM rather than a real mapper. + + +There is also a 'Harmony Encore' cartridge which adds support for some of the +games the original couldn't handle due to them having larger ROMs and more +complex banking schemes (Stella's Stocking etc.) + +some Harmony cart details can be found at +http://atariage.com/forums/topic/156500-latest-harmony-cart-software/ + + +DPC+ notes +---------- + +Some info on the Harmony / Melody when configured as DPC+ hardware can be found on Darrell Spice Jr's guides: +http://atariage.com/forums/blog/148/entry-11811-dpcarm-part-6-dpc-cartridge-layout/ +http://atariage.com/forums/blog/148/entry-11883-dpcarm-part-7-6507arm-exchange-of-information/ +http://atariage.com/forums/blog/148/entry-11903-dpcarm-part-8-multiple-functions/ +http://atariage.com/forums/blog/148/entry-11935-dpcarm-part-9-functional-menu/ +http://atariage.com/forums/blog/148/entry-11964-dpcarm-part-10-score-timer-display/ +http://atariage.com/forums/blog/148/entry-11988-dpcarm-part-12-gamepad-support/ + +map: + Bankswitching uses addresses $FFF6-$FFFB + + * ARM RAM mapped at $40000000 in this area + $0000-$0BFF: HARMONY/MELODY driver (not accessible by 2600 itself) (copied to $40000000 - $40000bff on startup by ARM) + $0C00-$1BFF: Bank 0 (each bank can map to 0x1000 - 0x1fff in 6507 space, like other carts) + $1C00-$2BFF: Bank 1 + $2C00-$3BFF: Bank 2 + $3C00-$4BFF: Bank 3 + $4C00-$5BFF: Bank 4 + $5C00-$6BFF: Bank 5 (default bank is bank 5) + $6C00-$7BFF: Display Data (indirect access) (copied to $40000C00 - $40001bff on startup by ARM) + $7C00-$7FFF: Synth Frequency Data (not accessible by 2600 itself) (copied to $40001C00 - $40001fff on startup by ARM) + +***************************************************************************/ + + +#include "emu.h" +#include "harmony_melody.h" + + + + + +// cart device + +const device_type A26_ROM_HARMONY = &device_creator<a26_rom_harmony_device>; + + +a26_rom_harmony_device::a26_rom_harmony_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) + : a26_rom_f8_device(mconfig, A26_ROM_HARMONY, "Atari 2600 ROM Cart HARMONY/MELODY", tag, owner, clock, "a2600_harmony", __FILE__), + m_cpu(*this, "arm") +{ +} + +//------------------------------------------------- +// mapper specific start/reset +//------------------------------------------------- + +void a26_rom_harmony_device::device_start() +{ + save_item(NAME(m_base_bank)); +} + +static ADDRESS_MAP_START( harmony_arm7_map, AS_PROGRAM, 32, a26_rom_harmony_device ) +ADDRESS_MAP_END + +static MACHINE_CONFIG_FRAGMENT( a26_harmony ) + MCFG_CPU_ADD("arm", LPC2103, 70000000) + MCFG_CPU_PROGRAM_MAP(harmony_arm7_map) +MACHINE_CONFIG_END + +machine_config_constructor a26_rom_harmony_device::device_mconfig_additions() const +{ + return MACHINE_CONFIG_NAME( a26_harmony ); +} + +// actually if the ARM code is doing this and providing every opcode to the main CPU based +// on bus activity then we shouldn't be doing and of this here (if the ROM is actually +// the internal Flash rom of the ARM CPU then the A2600 CPU won't be able to see it directly +// at all?) +// +// instead we need the ARM monitoring the bus at all times and supplying the code on +// demand transparent to the main CPU? is this theory correct? + +void a26_rom_harmony_device::device_reset() +{ + m_base_bank = 5; + + memcpy(m_cpu->m_flash, m_rom, 0x8000); + m_cpu->reset(); +} + +READ8_MEMBER(a26_rom_harmony_device::read8_r) +{ + return m_rom[offset + (m_base_bank * 0x1000)]; +} + + +void a26_rom_harmony_device::check_bankswitch(offs_t offset) +{ + switch (offset) + { + case 0x0FF6: m_base_bank = 0; break; + case 0x0FF7: m_base_bank = 1; break; + case 0x0FF8: m_base_bank = 2; break; + case 0x0FF9: m_base_bank = 3; break; + case 0x0FFa: m_base_bank = 4; break; + case 0x0FFb: m_base_bank = 5; break; + default: break; + } +} + +READ8_MEMBER(a26_rom_harmony_device::read_rom) +{ + UINT8 retvalue = read8_r(space, offset + 0xc00); // banks start at 0xc00 + + check_bankswitch(offset); + + return retvalue; +} + +WRITE8_MEMBER(a26_rom_harmony_device::write_bank) +{ + check_bankswitch(offset); +// a26_rom_f8_device::write_bank(space, offset, data); +} diff --git a/src/devices/bus/vcs/harmony_melody.h b/src/devices/bus/vcs/harmony_melody.h new file mode 100644 index 00000000000..004a2ea61f7 --- /dev/null +++ b/src/devices/bus/vcs/harmony_melody.h @@ -0,0 +1,42 @@ +// license:BSD-3-Clause +// copyright-holders:David Haywood +#ifndef __VCS_HARMONY_H +#define __VCS_HARMONY_H + +#include "rom.h" +#include "cpu/arm7/lpc210x.h" + + +// ======================> a26_rom_harmony_device + +class a26_rom_harmony_device : public a26_rom_f8_device +{ +public: + // construction/destruction + a26_rom_harmony_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + + // device-level overrides + virtual void device_start(); + virtual machine_config_constructor device_mconfig_additions() const; + virtual void device_reset(); + + // reading and writing + virtual DECLARE_READ8_MEMBER(read_rom); + virtual DECLARE_WRITE8_MEMBER(write_bank); + + + DECLARE_READ8_MEMBER(read8_r); + + void check_bankswitch(offs_t offset); + +protected: + +private: + required_device<lpc210x_device> m_cpu; +}; + + +// device type definition +extern const device_type A26_ROM_HARMONY; + +#endif diff --git a/src/devices/bus/vcs/rom.c b/src/devices/bus/vcs/rom.c index b689db7094e..6449f756ed4 100755 --- a/src/devices/bus/vcs/rom.c +++ b/src/devices/bus/vcs/rom.c @@ -41,6 +41,7 @@ const device_type A26_ROM_JVP = &device_creator<a26_rom_jvp_device>; const device_type A26_ROM_4IN1 = &device_creator<a26_rom_4in1_device>; const device_type A26_ROM_8IN1 = &device_creator<a26_rom_8in1_device>; const device_type A26_ROM_32IN1 = &device_creator<a26_rom_32in1_device>; +const device_type A26_ROM_X07 = &device_creator<a26_rom_x07_device>; a26_rom_2k_device::a26_rom_2k_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) @@ -179,6 +180,11 @@ a26_rom_32in1_device::a26_rom_32in1_device(const machine_config &mconfig, const { } +a26_rom_x07_device::a26_rom_x07_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) + : a26_rom_f6_device(mconfig, A26_ROM_X07, "Atari VCS 2600 ROM Carts w/X07 bankswitch", tag, owner, clock, "vcs_x07", __FILE__) +{ +} + void a26_rom_2k_device::device_start() { @@ -1048,3 +1054,52 @@ READ8_MEMBER(a26_rom_32in1_device::read_rom) { return m_rom[(offset & 0x7ff) + (m_base_bank * 0x800)]; } + + +/*------------------------------------------------- + "X07 Bankswitch" Carts: + banking done with a PALC22V10B + implementation based on information at + http://blog.kevtris.org/blogfiles/Atari%202600%20Mappers.txt + --------------------------------------------------*/ + +READ8_MEMBER(a26_rom_x07_device::read_rom) +{ + return m_rom[offset + (m_base_bank * 0x1000)]; +} + +WRITE8_MEMBER(a26_rom_x07_device::write_bank) +{ + /* + A13 A0 + ---------------- + 0 1xxx nnnn 1101 + */ + + if ((offset & 0x180f) == 0x080d) + { + m_base_bank = (offset & 0x00f0) >> 4; + } + /* + A13 A0 + ---------------- + 0 0xxx 0nxx xxxx + */ + + if ((offset & 0x1880) == 0x0000) + { + // only has an effect if bank is already 14 or 15 + if (m_base_bank == 14 || m_base_bank == 15) + { + if (offset & 0x0040) + { + m_base_bank = 15; + } + else + { + m_base_bank = 14; + } + + } + } +} diff --git a/src/devices/bus/vcs/rom.h b/src/devices/bus/vcs/rom.h index 2d7b73586be..e7139e0d18e 100755 --- a/src/devices/bus/vcs/rom.h +++ b/src/devices/bus/vcs/rom.h @@ -365,6 +365,21 @@ public: }; +// ======================> a26_rom_x07_device + +class a26_rom_x07_device : public a26_rom_f6_device +{ +public: + // construction/destruction + a26_rom_x07_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + + // reading and writing + virtual DECLARE_READ8_MEMBER(read_rom); + virtual DECLARE_WRITE8_MEMBER(write_bank); +}; + + + // device type definition extern const device_type A26_ROM_2K; extern const device_type A26_ROM_4K; @@ -386,6 +401,7 @@ extern const device_type A26_ROM_JVP; extern const device_type A26_ROM_4IN1; extern const device_type A26_ROM_8IN1; extern const device_type A26_ROM_32IN1; +extern const device_type A26_ROM_X07; #endif diff --git a/src/devices/bus/vcs/vcs_slot.c b/src/devices/bus/vcs/vcs_slot.c index d04f45a195e..e4824d91d60 100755 --- a/src/devices/bus/vcs/vcs_slot.c +++ b/src/devices/bus/vcs/vcs_slot.c @@ -156,6 +156,8 @@ static const vcs_slot slot_list[] = { A26_4IN1, "a26_4in1" }, { A26_8IN1, "a26_8in1" }, { A26_32IN1, "a26_32in1" }, + { A26_X07, "a26_x07" }, + { A26_HARMONY, "a26_harmony" }, }; static int vcs_get_pcb_id(const char *slot) diff --git a/src/devices/bus/vcs/vcs_slot.h b/src/devices/bus/vcs/vcs_slot.h index 9b087988d80..154c08fdd5b 100755 --- a/src/devices/bus/vcs/vcs_slot.h +++ b/src/devices/bus/vcs/vcs_slot.h @@ -34,7 +34,9 @@ enum A26_4IN1, A26_DPC, A26_SS, - A26_CM + A26_CM, + A26_X07, + A26_HARMONY, }; diff --git a/src/devices/cpu/alph8201/8201dasm.c b/src/devices/cpu/alph8201/8201dasm.c index c22a4316ea4..76581fe0ab0 100644 --- a/src/devices/cpu/alph8201/8201dasm.c +++ b/src/devices/cpu/alph8201/8201dasm.c @@ -1,5 +1,17 @@ // license:BSD-3-Clause // copyright-holders:Tatsuyuki Satoh +/* + +Notice: please do not modify this file, except in case of compile- or critical emulation error +A more accurate implementation is in mame/alpha8201.* + +cpu/alph8201/ will be removed soon + + + + +*/ + /**************************************************************************** Alpha 8201/8301 Disassembler diff --git a/src/devices/cpu/alph8201/alph8201.c b/src/devices/cpu/alph8201/alph8201.c index e575f149d34..06c4deb020e 100644 --- a/src/devices/cpu/alph8201/alph8201.c +++ b/src/devices/cpu/alph8201/alph8201.c @@ -1,5 +1,17 @@ // license:BSD-3-Clause // copyright-holders:Tatsuyuki Satoh +/* + +Notice: please do not modify this file, except in case of compile- or critical emulation error +A more accurate implementation is in mame/alpha8201.* + +cpu/alph8201/ will be removed soon + + + + +*/ + /**************************************************************************** Alpha8201 Emulator @@ -154,8 +166,8 @@ Timming #include "alph8201.h" -const device_type ALPHA8201 = &device_creator<alpha8201_cpu_device>; -const device_type ALPHA8301 = &device_creator<alpha8301_cpu_device>; +const device_type ALPHA8201L = &device_creator<alpha8201_cpu_device>; +const device_type ALPHA8301L = &device_creator<alpha8301_cpu_device>; /* instruction cycle count */ @@ -174,7 +186,7 @@ const device_type ALPHA8301 = &device_creator<alpha8301_cpu_device>; alpha8201_cpu_device::alpha8201_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) - : cpu_device(mconfig, ALPHA8201, "ALPHA-8201", tag, owner, clock, "alpha8201", __FILE__) + : cpu_device(mconfig, ALPHA8201L, "ALPHA-8201L", tag, owner, clock, "alpha8201l", __FILE__) , m_program_config("program", ENDIANNESS_LITTLE, 8, 10, 0) , m_io_config("io", ENDIANNESS_LITTLE, 8, 6, 0) , m_opmap(opcode_8201) @@ -191,7 +203,7 @@ alpha8201_cpu_device::alpha8201_cpu_device(const machine_config &mconfig, device } alpha8301_cpu_device::alpha8301_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) - : alpha8201_cpu_device(mconfig, ALPHA8301, "ALPHA-8301", tag, owner, clock, "alpha8301", __FILE__) + : alpha8201_cpu_device(mconfig, ALPHA8301L, "ALPHA-8301L", tag, owner, clock, "alpha8301l", __FILE__) { m_opmap = opcode_8301; } diff --git a/src/devices/cpu/alph8201/alph8201.h b/src/devices/cpu/alph8201/alph8201.h index 16555803988..73b90974d83 100644 --- a/src/devices/cpu/alph8201/alph8201.h +++ b/src/devices/cpu/alph8201/alph8201.h @@ -1,5 +1,17 @@ // license:BSD-3-Clause // copyright-holders:Tatsuyuki Satoh +/* + +Notice: please do not modify this file, except in case of compile- or critical emulation error +A more accurate implementation is in mame/alpha8201.* + +cpu/alph8201/ will be removed soon + + + + +*/ + /**************************************************************************\ * Alpha8201 Emulator * * * @@ -401,8 +413,8 @@ public: }; -extern const device_type ALPHA8201; -extern const device_type ALPHA8301; +extern const device_type ALPHA8201L; +extern const device_type ALPHA8301L; #endif /* __ALPH8201_H__ */ diff --git a/src/devices/cpu/alto2/a2curt.c b/src/devices/cpu/alto2/a2curt.c index c5d9353f768..1225a5d62d5 100644 --- a/src/devices/cpu/alto2/a2curt.c +++ b/src/devices/cpu/alto2/a2curt.c @@ -14,7 +14,7 @@ void alto2_cpu_device::f1_early_curt_block() { m_dsp.curt_blocks = true; m_task_wakeup &= ~(1 << m_task); - LOG((LOG_CURT,2," BLOCK %s\n", task_name(m_task))); + LOG((this,LOG_CURT,2," BLOCK %s\n", task_name(m_task))); } /** @@ -23,7 +23,7 @@ void alto2_cpu_device::f1_early_curt_block() void alto2_cpu_device::f2_late_load_xpreg() { m_dsp.xpreg = X_RDBITS(m_bus,16,6,15); - LOG((LOG_CURT, 9," XPREG<- BUS[6-15] (%#o)\n", m_dsp.xpreg)); + LOG((this,LOG_CURT, 9," XPREG<- BUS[6-15] (%#o)\n", m_dsp.xpreg)); } /** @@ -46,7 +46,7 @@ void alto2_cpu_device::f2_late_load_xpreg() void alto2_cpu_device::f2_late_load_csr() { m_dsp.csr = m_bus; - LOG((LOG_CURT, m_dsp.csr ? 2 : 9," CSR<- BUS (%#o)\n", m_dsp.csr)); + LOG((this,LOG_CURT, m_dsp.csr ? 2 : 9," CSR<- BUS (%#o)\n", m_dsp.csr)); } /** diff --git a/src/devices/cpu/alto2/a2dht.c b/src/devices/cpu/alto2/a2dht.c index 3b70d371259..3ed8450a5dd 100644 --- a/src/devices/cpu/alto2/a2dht.c +++ b/src/devices/cpu/alto2/a2dht.c @@ -15,7 +15,7 @@ void alto2_cpu_device::f1_early_dht_block() m_dsp.dht_blocks = true; // clear the wakeup for the display horizontal task m_task_wakeup &= ~(1 << m_task); - LOG((LOG_DHT,2," BLOCK %s\n", task_name(m_task))); + LOG((this,LOG_DHT,2," BLOCK %s\n", task_name(m_task))); } /** @@ -30,7 +30,7 @@ void alto2_cpu_device::f2_late_dht_setmode() { UINT16 r = X_RDBITS(m_bus,16,0,0); m_dsp.setmode = m_bus; - LOG((LOG_DHT,2," SETMODE<- BUS (%#o), branch on BUS[0] (%#o | %#o)\n", m_bus, m_next2, r)); + LOG((this,LOG_DHT,2," SETMODE<- BUS (%#o), branch on BUS[0] (%#o | %#o)\n", m_bus, m_next2, r)); m_next2 |= r; } diff --git a/src/devices/cpu/alto2/a2disk.c b/src/devices/cpu/alto2/a2disk.c index 1a8736962bb..4ca564c0bd2 100644 --- a/src/devices/cpu/alto2/a2disk.c +++ b/src/devices/cpu/alto2/a2disk.c @@ -364,12 +364,12 @@ void alto2_cpu_device::kwd_timing(int bitclk, int datin, int block) int i; UINT8 s0, s1; - LOG((LOG_DISK,9," *** KWD timing bitclk:%d datin:%d block:%d\n", bitclk, datin, block)); + LOG((this,LOG_DISK,9," *** KWD timing bitclk:%d datin:%d block:%d\n", bitclk, datin, block)); if (0 == m_dsk.seclate) { // if SECLATE is 0, WDDONE' never goes low (counter's clear has precedence). if (m_dsk.bitcount) { - LOG((LOG_DISK,7," SECLATE:0 clears bitcount:0\n")); + LOG((this,LOG_DISK,7," SECLATE:0 clears bitcount:0\n")); m_dsk.bitcount = 0; } } @@ -386,7 +386,7 @@ void alto2_cpu_device::kwd_timing(int bitclk, int datin, int block) * counter. It has been loaded with 15, so it counts to 16 on * the next rising edge and makes WDDONE' go to 0. */ - LOG((LOG_DISK,7," HIORDBIT:1 sets WFFO:1\n")); + LOG((this,LOG_DISK,7," HIORDBIT:1 sets WFFO:1\n")); PUT_KCOM_WFFO(m_dsk.kcom, 1); // TODO: show disk indicators } @@ -402,14 +402,14 @@ void alto2_cpu_device::kwd_timing(int bitclk, int datin, int block) * and Q will be 1. LOAD' is deassterted: count on clock. */ m_dsk.bitcount = (m_dsk.bitcount + 1) % 16; - LOG((LOG_DISK,6," WFFO:1 count bitcount:%2d\n", m_dsk.bitcount)); + LOG((this,LOG_DISK,6," WFFO:1 count bitcount:%2d\n", m_dsk.bitcount)); } else { /* * If BUS[4] (WFFO) was 0, both J and K' will be 0, and Q * will be 0. LOAD' is asserted and will load on rising bitclock (now) */ m_dsk.bitcount = 15; - LOG((LOG_DISK,6," WFFO:0 load bitcount:%2d\n", m_dsk.bitcount)); + LOG((this,LOG_DISK,6," WFFO:0 load bitcount:%2d\n", m_dsk.bitcount)); } } if (!m_dsk.bitclk && bitclk) { @@ -420,7 +420,7 @@ void alto2_cpu_device::kwd_timing(int bitclk, int datin, int block) } if (m_dsk.wddone != wddone) { - LOG((LOG_DISK,8," WDDONE':%d->%d\n", m_dsk.wddone, wddone)); + LOG((this,LOG_DISK,8," WDDONE':%d->%d\n", m_dsk.wddone, wddone)); } if (15 == m_dsk.bitcount) { @@ -437,7 +437,7 @@ void alto2_cpu_device::kwd_timing(int bitclk, int datin, int block) m_dsk.datain = m_dsk.shiftin & 0177777; /* load the output shift register */ m_dsk.shiftout = m_dsk.dataout; - LOG((LOG_DISK,8," LATCH in:%06o (0x%04x) out:%06o (0x%04x)\n", m_dsk.datain, m_dsk.datain, m_dsk.dataout, m_dsk.dataout)); + LOG((this,LOG_DISK,8," LATCH in:%06o (0x%04x) out:%06o (0x%04x)\n", m_dsk.datain, m_dsk.datain, m_dsk.dataout, m_dsk.dataout)); } } else { /* CARRY = 0 -> WDDONE' = 1 */ @@ -472,10 +472,10 @@ void alto2_cpu_device::kwd_timing(int bitclk, int datin, int block) for (i = 0; i < 4; i++) { #if ALTO2_DEBUG if (m_sysclka0[i] != m_sysclka1[i]) { - LOG((LOG_DISK,9," SYSCLKA' %s\n", raise_lower[m_sysclka1[i]])); + LOG((this,LOG_DISK,9," SYSCLKA' %s\n", raise_lower[m_sysclka1[i]])); } if (m_sysclkb0[i] != m_sysclkb1[i]) { - LOG((LOG_DISK,9," SYSCLKB' %s\n", raise_lower[m_sysclkb1[i]])); + LOG((this,LOG_DISK,9," SYSCLKB' %s\n", raise_lower[m_sysclkb1[i]])); } #endif @@ -654,7 +654,7 @@ void alto2_cpu_device::kwd_timing(int bitclk, int datin, int block) // rising edge immediately if ((m_dsk.wdinit = WDINIT) == 1) m_dsk.wdinit0 = 1; - LOG((LOG_DISK,8," WDINIT:%d\n", m_dsk.wdinit)); + LOG((this,LOG_DISK,8," WDINIT:%d\n", m_dsk.wdinit)); } /* @@ -663,7 +663,7 @@ void alto2_cpu_device::kwd_timing(int bitclk, int datin, int block) */ if ((m_dsk.ff_53a & JKFF_Q) && (m_dsk.ff_43a & JKFF_Q)) { if (m_dsk.wdtskena == 1) { - LOG((LOG_DISK,2," WDTSKENA':0 and WAKEKWDT':0 wake KWD\n")); + LOG((this,LOG_DISK,2," WDTSKENA':0 and WAKEKWDT':0 wake KWD\n")); m_dsk.wdtskena = 0; m_task_wakeup |= 1 << task_kwd; } @@ -672,7 +672,7 @@ void alto2_cpu_device::kwd_timing(int bitclk, int datin, int block) * If Q (43a) is 1, the WDTSKENA' signal is deasserted. */ if (m_dsk.wdtskena == 0) { - LOG((LOG_DISK,2," WDTSKENA':1\n")); + LOG((this,LOG_DISK,2," WDTSKENA':1\n")); m_dsk.wdtskena = 1; m_task_wakeup &= ~(1 << task_kwd); } @@ -681,21 +681,21 @@ void alto2_cpu_device::kwd_timing(int bitclk, int datin, int block) if (0 != m_dsk.kfer) { // no fatal error: ready AND not seqerr AND seekok if (!RDYLAT && !SEQERR && SEEKOK) { - LOG((LOG_DISK,6," reset KFER\n")); + LOG((this,LOG_DISK,6," reset KFER\n")); m_dsk.kfer = 0; } } else { // fatal error: not ready OR seqerr OR not seekok if (RDYLAT) { - LOG((LOG_DISK,6," RDYLAT sets KFER\n")); + LOG((this,LOG_DISK,6," RDYLAT sets KFER\n")); m_dsk.kfer = 1; } if (SEQERR) { - LOG((LOG_DISK,6," SEQERR sets KFER\n")); + LOG((this,LOG_DISK,6," SEQERR sets KFER\n")); m_dsk.kfer = 1; } if (!SEEKOK) { - LOG((LOG_DISK,6," not SEEKOK sets KFER\n")); + LOG((this,LOG_DISK,6," not SEEKOK sets KFER\n")); m_dsk.kfer = 1; } } @@ -706,12 +706,12 @@ void alto2_cpu_device::kwd_timing(int bitclk, int datin, int block) */ if (m_dsk.ff_22b & JKFF_Q) { if (0 == (m_task_wakeup & (1 << task_ksec))) { - LOG((LOG_DISK,6," STSKENA:1; WAKEST':0 wake KSEC\n")); + LOG((this,LOG_DISK,6," STSKENA:1; WAKEST':0 wake KSEC\n")); m_task_wakeup |= 1 << task_ksec; } } else { if (0 != (m_task_wakeup & (1 << task_ksec))) { - LOG((LOG_DISK,6," STSKENA:0; WAKEST':1\n")); + LOG((this,LOG_DISK,6," STSKENA:0; WAKEST':1\n")); m_task_wakeup &= ~(1 << task_ksec); } } @@ -743,7 +743,7 @@ void alto2_cpu_device::kwd_timing(int bitclk, int datin, int block) m_dsk.seclate_timer->adjust(attotime::from_nsec(TW_SECLATE), 1); if (m_dsk.seclate) { m_dsk.seclate = 0; - LOG((LOG_DISK,6," SECLATE -> 0 pulse until cycle %lld\n", cycle() + TW_SECLATE / ALTO2_UCYCLE)); + LOG((this,LOG_DISK,6," SECLATE -> 0 pulse until cycle %lld\n", cycle() + TW_SECLATE / ALTO2_UCYCLE)); } } @@ -752,17 +752,17 @@ void alto2_cpu_device::kwd_timing(int bitclk, int datin, int block) #if ALTO2_DEBUG if (0 == m_dsk.egate || 0 == m_dsk.wrgate || 0 == m_dsk.rdgate) { // log the reason why gates are deasserted - LOG((LOG_DISK,6," deassert gates because of")); + LOG((this,LOG_DISK,6," deassert gates because of")); if (m_task_wakeup & (1 << task_ksec)) { - LOG((LOG_DISK,6," KSECWAKE")); + LOG((this,LOG_DISK,6," KSECWAKE")); } if (GET_KCOM_XFEROFF(m_dsk.kcom)) { - LOG((LOG_DISK,6," XFEROFF")); + LOG((this,LOG_DISK,6," XFEROFF")); } if (m_dsk.kfer) { - LOG((LOG_DISK,6," KFER")); + LOG((this,LOG_DISK,6," KFER")); } - LOG((LOG_DISK,6,"\n")); + LOG((this,LOG_DISK,6,"\n")); } #endif // sector task is active OR xferoff is set OR fatal error @@ -776,14 +776,14 @@ void alto2_cpu_device::kwd_timing(int bitclk, int datin, int block) if (m_dsk.ok_to_run) { #if ALTO2_DEBUG if (1 == m_dsk.egate || 1 == m_dsk.wrgate) { - LOG((LOG_DISK,6," assert ")); + LOG((this,LOG_DISK,6," assert ")); if (m_dsk.egate) { - LOG((LOG_DISK,6," EGATE")); + LOG((this,LOG_DISK,6," EGATE")); } if (m_dsk.wrgate) { - LOG((LOG_DISK,6," WRGATE")); + LOG((this,LOG_DISK,6," WRGATE")); } - LOG((LOG_DISK,6,"\n")); + LOG((this,LOG_DISK,6,"\n")); } #endif // assert erase and write gates @@ -794,7 +794,7 @@ void alto2_cpu_device::kwd_timing(int bitclk, int datin, int block) } else { #if ALTO2_DEBUG if (1 == m_dsk.rdgate) { - LOG((LOG_DISK,6," assert RDGATE\n")); + LOG((this,LOG_DISK,6," assert RDGATE\n")); } #endif // assert read gate @@ -817,7 +817,7 @@ void alto2_cpu_device::kwd_timing(int bitclk, int datin, int block) void alto2_cpu_device::disk_seclate(void* ptr, INT32 arg) { (void)ptr; - LOG((LOG_DISK,2," SECLATE -> %d\n", arg)); + LOG((this,LOG_DISK,2," SECLATE -> %d\n", arg)); m_dsk.seclate = arg; m_dsk.seclate_timer->enable(false); } @@ -830,7 +830,7 @@ void alto2_cpu_device::disk_seclate(void* ptr, INT32 arg) void alto2_cpu_device::disk_ok_to_run(void* ptr, INT32 arg) { (void)ptr; - LOG((LOG_DISK,2," OK TO RUN -> %d\n", arg)); + LOG((this,LOG_DISK,2," OK TO RUN -> %d\n", arg)); m_dsk.ok_to_run = arg; m_dsk.ok_to_run_timer->enable(false); } @@ -863,7 +863,7 @@ void alto2_cpu_device::disk_strobon(void* ptr, INT32 arg) int cylinder = arg / 4; diablo_hd_device* dhd = m_drive[unit]; - LOG((LOG_DISK,2," STROBE #%d restore:%d cylinder:%d dhd:%p\n", unit, restore, cylinder, dhd)); + LOG((this,LOG_DISK,2," STROBE #%d restore:%d cylinder:%d dhd:%p\n", unit, restore, cylinder, dhd)); dhd->set_cylinder(cylinder); dhd->set_restore(restore); @@ -873,7 +873,7 @@ void alto2_cpu_device::disk_strobon(void* ptr, INT32 arg) dhd->set_strobe(strobe); // pulse the strobe signal to the unit int lai = dhd->get_log_addx_interlock_0(); - LOG((LOG_DISK,6," LAI':%d\n", lai)); + LOG((this,LOG_DISK,6," LAI':%d\n", lai)); /** * JK flip-flop 44a (LAI' clocked) * <PRE> @@ -903,16 +903,16 @@ void alto2_cpu_device::disk_strobon(void* ptr, INT32 arg) } else { /* clear the monoflop 52b, i.e. no timer restart */ - LOG((LOG_DISK,2," STROBON:%d\n", m_dsk.strobe)); + LOG((this,LOG_DISK,2," STROBON:%d\n", m_dsk.strobe)); /* update the seekok status: SKINC' && LAI' && Q' of FF 44a */ int seekok = dhd->get_seek_incomplete_0(); if (seekok != m_dsk.seekok) { m_dsk.seekok = seekok; - LOG((LOG_DISK,2," SEEKOK:%d\n", m_dsk.seekok)); + LOG((this,LOG_DISK,2," SEEKOK:%d\n", m_dsk.seekok)); } } - LOG((LOG_DISK,2," current cylinder:%d\n", dhd->get_cylinder())); + LOG((this,LOG_DISK,2," current cylinder:%d\n", dhd->get_cylinder())); /* if the strobe is still set, restart the timer */ if (m_dsk.strobe) { @@ -930,7 +930,7 @@ void alto2_cpu_device::disk_ready_mf31a(void* ptr, INT32 arg) diablo_hd_device* dhd = m_drive[m_dsk.drive]; m_dsk.ready_mf31a = arg & dhd->get_ready_0(); /* log the not ready result with level 0, else 2 */ - LOG((LOG_DISK,m_dsk.ready_mf31a ? 0 : 2," mf31a:%d %sready\n", m_dsk.ready_mf31a, m_dsk.ready_mf31a ? "not " : "")); + LOG((this,LOG_DISK,m_dsk.ready_mf31a ? 0 : 2," mf31a:%d %sready\n", m_dsk.ready_mf31a, m_dsk.ready_mf31a ? "not " : "")); } /** @@ -982,16 +982,16 @@ void alto2_cpu_device::bs_early_read_kstat() r = m_dsk.kstat; - LOG((LOG_DISK,1," <-KSTAT; BUS &= %#o\n", r)); - LOG((LOG_DISK,2," SECTOR : %#o\n", GET_KSTAT_SECTOR(m_dsk.kstat))); - LOG((LOG_DISK,2," DONE : %#o\n", GET_KSTAT_DONE(m_dsk.kstat))); - LOG((LOG_DISK,2," SEEKFAIL : %d\n", GET_KSTAT_SEEKFAIL(m_dsk.kstat))); - LOG((LOG_DISK,2," SEEK : %d\n", GET_KSTAT_SEEK(m_dsk.kstat))); - LOG((LOG_DISK,2," NOTRDY : %d\n", GET_KSTAT_NOTRDY(m_dsk.kstat))); - LOG((LOG_DISK,2," DATALATE : %d\n", GET_KSTAT_DATALATE(m_dsk.kstat))); - LOG((LOG_DISK,2," IDLE : %d\n", GET_KSTAT_IDLE(m_dsk.kstat))); - LOG((LOG_DISK,2," CKSUM : %d\n", GET_KSTAT_CKSUM(m_dsk.kstat))); - LOG((LOG_DISK,2," COMPLETION : %#o\n", GET_KSTAT_COMPLETION(m_dsk.kstat))); + LOG((this,LOG_DISK,1," <-KSTAT; BUS &= %#o\n", r)); + LOG((this,LOG_DISK,2," SECTOR : %#o\n", GET_KSTAT_SECTOR(m_dsk.kstat))); + LOG((this,LOG_DISK,2," DONE : %#o\n", GET_KSTAT_DONE(m_dsk.kstat))); + LOG((this,LOG_DISK,2," SEEKFAIL : %d\n", GET_KSTAT_SEEKFAIL(m_dsk.kstat))); + LOG((this,LOG_DISK,2," SEEK : %d\n", GET_KSTAT_SEEK(m_dsk.kstat))); + LOG((this,LOG_DISK,2," NOTRDY : %d\n", GET_KSTAT_NOTRDY(m_dsk.kstat))); + LOG((this,LOG_DISK,2," DATALATE : %d\n", GET_KSTAT_DATALATE(m_dsk.kstat))); + LOG((this,LOG_DISK,2," IDLE : %d\n", GET_KSTAT_IDLE(m_dsk.kstat))); + LOG((this,LOG_DISK,2," CKSUM : %d\n", GET_KSTAT_CKSUM(m_dsk.kstat))); + LOG((this,LOG_DISK,2," COMPLETION : %#o\n", GET_KSTAT_COMPLETION(m_dsk.kstat))); m_bus &= r; } @@ -1009,7 +1009,7 @@ void alto2_cpu_device::bs_early_read_kdata() UINT16 r; /* get the current word from the drive */ r = m_dsk.datain; - LOG((LOG_DISK,1," <-KDATA (%#o)\n", r)); + LOG((this,LOG_DISK,1," <-KDATA (%#o)\n", r)); m_bus &= r; } @@ -1023,7 +1023,7 @@ void alto2_cpu_device::bs_early_read_kdata() void alto2_cpu_device::f1_late_strobe() { if (GET_KCOM_SENDADR(m_dsk.kcom)) { - LOG((LOG_DISK,1," STROBE (SENDADR:1)\n")); + LOG((this,LOG_DISK,1," STROBE (SENDADR:1)\n")); /* Set the STROBON flag and start the STROBON monoflop */ m_dsk.strobe = 1; disk_strobon(0, @@ -1031,7 +1031,7 @@ void alto2_cpu_device::f1_late_strobe() 2 * GET_KADDR_RESTORE(m_dsk.kaddr) + m_dsk.drive); } else { - LOG((LOG_DISK,1," STROBE (w/o SENDADR)\n")); + LOG((this,LOG_DISK,1," STROBE (w/o SENDADR)\n")); /* FIXME: what to do if SENDADR isn't set? */ } } @@ -1046,10 +1046,10 @@ void alto2_cpu_device::f1_late_strobe() */ void alto2_cpu_device::f1_late_load_kstat() { - LOG((LOG_DISK,1," KSTAT<-; BUS[12-15] %#o\n", m_bus)); - LOG((LOG_DISK,2," IDLE : %d\n", GET_KSTAT_IDLE(m_bus))); - LOG((LOG_DISK,2," CKSUM : %d\n", GET_KSTAT_CKSUM(m_bus))); - LOG((LOG_DISK,2," COMPLETION : %#o\n", GET_KSTAT_COMPLETION(m_bus))); + LOG((this,LOG_DISK,1," KSTAT<-; BUS[12-15] %#o\n", m_bus)); + LOG((this,LOG_DISK,2," IDLE : %d\n", GET_KSTAT_IDLE(m_bus))); + LOG((this,LOG_DISK,2," CKSUM : %d\n", GET_KSTAT_CKSUM(m_bus))); + LOG((this,LOG_DISK,2," COMPLETION : %#o\n", GET_KSTAT_COMPLETION(m_bus))); /* KSTAT[12] is just taken from BUS[12] */ PUT_KSTAT_IDLE(m_dsk.kstat, GET_KSTAT_IDLE(m_bus)); @@ -1096,7 +1096,7 @@ void alto2_cpu_device::f1_late_load_kdata() PUT_KADDR_DRIVE(m_dsk.kaddr, GET_KADDR_DRIVE(m_bus)); m_dsk.drive = GET_KADDR_DRIVE(m_dsk.kaddr); - LOG((LOG_DISK,1," KDATA<-; BUS (%#o) (drive:%d restore:%d %d/%d/%02d)\n", + LOG((this,LOG_DISK,1," KDATA<-; BUS (%#o) (drive:%d restore:%d %d/%d/%02d)\n", m_bus, GET_KADDR_DRIVE(m_dsk.kaddr), GET_KADDR_RESTORE(m_dsk.kaddr), @@ -1121,7 +1121,7 @@ void alto2_cpu_device::f1_late_load_kdata() } #endif } else { - LOG((LOG_DISK,1," KDATA<-; BUS %#o (%#x)\n", m_bus, m_bus)); + LOG((this,LOG_DISK,1," KDATA<-; BUS %#o (%#x)\n", m_bus, m_bus)); } } @@ -1163,22 +1163,22 @@ void alto2_cpu_device::f1_late_increcno() case RECNO_HEADER: m_dsk.krecno = RECNO_LABEL; m_dsk.krwc = GET_KADR_LABEL(m_dsk.kadr); - LOG((LOG_DISK,2," INCRECNO; HEADER -> LABEL (%o, rwc:%o)\n", m_dsk.krecno, m_dsk.krwc)); + LOG((this,LOG_DISK,2," INCRECNO; HEADER -> LABEL (%o, rwc:%o)\n", m_dsk.krecno, m_dsk.krwc)); break; case RECNO_NOTHING: m_dsk.krecno = RECNO_HEADER; m_dsk.krwc = GET_KADR_HEADER(m_dsk.kadr); - LOG((LOG_DISK,2," INCRECNO; NOTHING -> HEADER (%o, rwc:%o)\n", m_dsk.krecno, m_dsk.krwc)); + LOG((this,LOG_DISK,2," INCRECNO; NOTHING -> HEADER (%o, rwc:%o)\n", m_dsk.krecno, m_dsk.krwc)); break; case RECNO_LABEL: m_dsk.krecno = RECNO_DATA; m_dsk.krwc = GET_KADR_DATA(m_dsk.kadr); - LOG((LOG_DISK,2," INCRECNO; LABEL -> DATA (%o, rwc:%o)\n", m_dsk.krecno, m_dsk.krwc)); + LOG((this,LOG_DISK,2," INCRECNO; LABEL -> DATA (%o, rwc:%o)\n", m_dsk.krecno, m_dsk.krwc)); break; case RECNO_DATA: m_dsk.krecno = RECNO_NOTHING; m_dsk.krwc = 0; /* read (?) */ - LOG((LOG_DISK,2," INCRECNO; DATA -> NOTHING (%o, rwc:%o)\n", m_dsk.krecno, m_dsk.krwc)); + LOG((this,LOG_DISK,2," INCRECNO; DATA -> NOTHING (%o, rwc:%o)\n", m_dsk.krecno, m_dsk.krwc)); break; } // TODO: show disk indicator @@ -1274,7 +1274,7 @@ void alto2_cpu_device::f1_late_clrstat() /* start monoflop 31a, which resets ready_mf31a */ m_dsk.ready_timer->adjust(attotime::from_nsec(TW_READY), 1); - LOG((LOG_DISK,1," CLRSTAT (44a:%d 44b:%d 45a:%d 45b:%d 31a:%d)\n", + LOG((this,LOG_DISK,1," CLRSTAT (44a:%d 44b:%d 45a:%d 45b:%d 31a:%d)\n", m_dsk.ff_44a & JKFF_Q ? 1 : 0, m_dsk.ff_44b & JKFF_Q ? 1 : 0, m_dsk.ff_45a & JKFF_Q ? 1 : 0, m_dsk.ff_45b & JKFF_Q ? 1 : 0, m_dsk.ready_mf31a)); @@ -1299,12 +1299,12 @@ void alto2_cpu_device::f1_late_load_kcom() { UINT16 change = m_dsk.kcom ^ m_bus; m_dsk.kcom = m_bus; - LOG((LOG_DISK,2," KCOM<-; BUS %06o\n", m_dsk.kcom)); - LOG((LOG_DISK,2," XFEROFF : %d\n", GET_KCOM_XFEROFF(m_dsk.kcom))); - LOG((LOG_DISK,2," WDINHIB : %d\n", GET_KCOM_WDINHIB(m_dsk.kcom))); - LOG((LOG_DISK,2," BCLKSRC : %d\n", GET_KCOM_BCLKSRC(m_dsk.kcom))); - LOG((LOG_DISK,2," WFFO : %d\n", GET_KCOM_WFFO(m_dsk.kcom))); - LOG((LOG_DISK,2," SENDADR : %d\n", GET_KCOM_SENDADR(m_dsk.kcom))); + LOG((this,LOG_DISK,2," KCOM<-; BUS %06o\n", m_dsk.kcom)); + LOG((this,LOG_DISK,2," XFEROFF : %d\n", GET_KCOM_XFEROFF(m_dsk.kcom))); + LOG((this,LOG_DISK,2," WDINHIB : %d\n", GET_KCOM_WDINHIB(m_dsk.kcom))); + LOG((this,LOG_DISK,2," BCLKSRC : %d\n", GET_KCOM_BCLKSRC(m_dsk.kcom))); + LOG((this,LOG_DISK,2," WFFO : %d\n", GET_KCOM_WFFO(m_dsk.kcom))); + LOG((this,LOG_DISK,2," SENDADR : %d\n", GET_KCOM_SENDADR(m_dsk.kcom))); if (GET_KCOM_WDINHIB(change)) { // WDALLOW going 0: should asynchronously reset 43a and 53a and set 53b if (m_task == task_kwd) { @@ -1407,13 +1407,13 @@ void alto2_cpu_device::f1_late_load_kadr() // current read/write/check is that for the header m_dsk.krwc = GET_KADR_HEADER(m_dsk.kadr); - LOG((LOG_DISK,1," KADR<-; BUS[8-14] #%o\n", m_dsk.kadr)); - LOG((LOG_DISK,2," SEAL : %d\n", GET_KADR_SEAL(m_dsk.kadr))); - LOG((LOG_DISK,2," HEADER : %s (%#o)\n", rwc_name[GET_KADR_HEADER(m_dsk.kadr)], GET_KADR_HEADER(m_dsk.kadr))); - LOG((LOG_DISK,2," LABEL : %s (%#o)\n", rwc_name[GET_KADR_LABEL(m_dsk.kadr)], GET_KADR_LABEL(m_dsk.kadr))); - LOG((LOG_DISK,2," DATA : %s (%#o)\n", rwc_name[GET_KADR_DATA(m_dsk.kadr)], GET_KADR_DATA(m_dsk.kadr))); - LOG((LOG_DISK,2," NOXFER : %d\n", GET_KADR_NOXFER(m_dsk.kadr))); - LOG((LOG_DISK,2," unused : %d (drive?)\n", GET_KADR_UNUSED(m_dsk.kadr))); + LOG((this,LOG_DISK,1," KADR<-; BUS[8-14] #%o\n", m_dsk.kadr)); + LOG((this,LOG_DISK,2," SEAL : %d\n", GET_KADR_SEAL(m_dsk.kadr))); + LOG((this,LOG_DISK,2," HEADER : %s (%#o)\n", rwc_name[GET_KADR_HEADER(m_dsk.kadr)], GET_KADR_HEADER(m_dsk.kadr))); + LOG((this,LOG_DISK,2," LABEL : %s (%#o)\n", rwc_name[GET_KADR_LABEL(m_dsk.kadr)], GET_KADR_LABEL(m_dsk.kadr))); + LOG((this,LOG_DISK,2," DATA : %s (%#o)\n", rwc_name[GET_KADR_DATA(m_dsk.kadr)], GET_KADR_DATA(m_dsk.kadr))); + LOG((this,LOG_DISK,2," NOXFER : %d\n", GET_KADR_NOXFER(m_dsk.kadr))); + LOG((this,LOG_DISK,2," unused : %d (drive?)\n", GET_KADR_UNUSED(m_dsk.kadr))); // TODO: show disk indicator in the GUI? } @@ -1426,7 +1426,7 @@ void alto2_cpu_device::f2_late_init() { // INIT = current task == KWD and WDINIT UINT16 r = (m_task == task_kwd && m_dsk.wdinit0) ? 037 : 0; - LOG((LOG_DISK,1," INIT; %sbranch (%#o | %#o)\n", r ? "" : "no ", m_next2, r)); + LOG((this,LOG_DISK,1," INIT; %sbranch (%#o | %#o)\n", r ? "" : "no ", m_next2, r)); m_next2 |= r; m_dsk.wdinit0 = 0; } @@ -1471,22 +1471,22 @@ void alto2_cpu_device::f2_late_rwc() switch (m_dsk.krecno) { case RECNO_HEADER: - LOG((LOG_DISK,1," RWC; %sbranch header(%d):%s (%#o|%#o|%#o)\n", + LOG((this,LOG_DISK,1," RWC; %sbranch header(%d):%s (%#o|%#o|%#o)\n", (r | init) ? "" : "no ", m_dsk.krecno, rwc_name[m_dsk.krwc], m_next2, r, init)); break; case RECNO_NOTHING: - LOG((LOG_DISK,1," RWC; %sbranch pageno(%d):%s (%#o|%#o|%#o)\n", + LOG((this,LOG_DISK,1," RWC; %sbranch pageno(%d):%s (%#o|%#o|%#o)\n", (r | init) ? "" : "no ", m_dsk.krecno, rwc_name[m_dsk.krwc], m_next2, r, init)); break; case RECNO_LABEL: - LOG((LOG_DISK,1," RWC; %sbranch label(%d):%s (%#o|%#o|%#o)\n", + LOG((this,LOG_DISK,1," RWC; %sbranch label(%d):%s (%#o|%#o|%#o)\n", (r | init) ? "" : "no ", m_dsk.krecno, rwc_name[m_dsk.krwc], m_next2, r, init)); break; case RECNO_DATA: - LOG((LOG_DISK,1," RWC; %sbranch data(%d):%s (%#o|%#o|%#o)\n", + LOG((this,LOG_DISK,1," RWC; %sbranch data(%d):%s (%#o|%#o|%#o)\n", (r | init) ? "" : "no ", m_dsk.krecno, rwc_name[m_dsk.krwc], m_next2, r, init)); break; @@ -1510,7 +1510,7 @@ void alto2_cpu_device::f2_late_recno() { UINT16 r = m_dsk.krecno; UINT16 init = (m_task == task_kwd && m_dsk.wdinit0) ? 037 : 0; - LOG((LOG_DISK,1," RECNO; %sbranch recno:%d (%#o|%#o|%#o)\n", (r | init) ? "" : "no ", m_dsk.krecno, m_next2, r, init)); + LOG((this,LOG_DISK,1," RECNO; %sbranch recno:%d (%#o|%#o|%#o)\n", (r | init) ? "" : "no ", m_dsk.krecno, m_next2, r, init)); m_next2 |= r | init; m_dsk.wdinit0 = 0; } @@ -1524,7 +1524,7 @@ void alto2_cpu_device::f2_late_xfrdat() { UINT16 r = GET_KADR_NOXFER(m_dsk.kadr) ? 0 : 1; UINT16 init = (m_task == task_kwd && m_dsk.wdinit0) ? 037 : 0; - LOG((LOG_DISK,1," XFRDAT; %sbranch (%#o|%#o|%#o)\n", (r | init) ? "" : "no ", m_next2, r, init)); + LOG((this,LOG_DISK,1," XFRDAT; %sbranch (%#o|%#o|%#o)\n", (r | init) ? "" : "no ", m_next2, r, init)); m_next2 |= r | init; m_dsk.wdinit0 = 0; } @@ -1540,7 +1540,7 @@ void alto2_cpu_device::f2_late_swrnrdy() UINT16 r = dhd->get_seek_read_write_0(); UINT16 init = (m_task == task_kwd && m_dsk.wdinit0) ? 037 : 0; - LOG((LOG_DISK,1," SWRNRDY; %sbranch (%#o|%#o|%#o)\n", (r | init) ? "" : "no ", m_next2, r, init)); + LOG((this,LOG_DISK,1," SWRNRDY; %sbranch (%#o|%#o|%#o)\n", (r | init) ? "" : "no ", m_next2, r, init)); m_next2 |= r | init; m_dsk.wdinit0 = 0; } @@ -1555,7 +1555,7 @@ void alto2_cpu_device::f2_late_nfer() UINT16 r = m_dsk.kfer ? 0 : 1; UINT16 init = (m_task == task_kwd && m_dsk.wdinit0) ? 037 : 0; - LOG((LOG_DISK,1," NFER; %sbranch (%#o|%#o|%#o)\n", (r | init) ? "" : "no ", m_next2, r, init)); + LOG((this,LOG_DISK,1," NFER; %sbranch (%#o|%#o|%#o)\n", (r | init) ? "" : "no ", m_next2, r, init)); m_next2 |= r | init; m_dsk.wdinit0 = 0; } @@ -1584,7 +1584,7 @@ void alto2_cpu_device::f2_late_strobon() UINT16 r = m_dsk.strobe; UINT16 init = (m_task == task_kwd && m_dsk.wdinit0) ? 037 : 0; - LOG((LOG_DISK,2," STROBON; %sbranch (%#o|%#o|%#o)\n", (r | init) ? "" : "no ", m_next2, r, init)); + LOG((this,LOG_DISK,2," STROBON; %sbranch (%#o|%#o|%#o)\n", (r | init) ? "" : "no ", m_next2, r, init)); m_next2 |= r | init; m_dsk.wdinit0 = 0; } @@ -1620,7 +1620,7 @@ void alto2_cpu_device::disk_bitclk(void* ptr, INT32 arg) } else { bit = (m_dsk.shiftout >> 15) & 1; kwd_timing(clk, bit, 0); - LOG((LOG_DISK,8," BITCLK#%d bit:%d (write) @%lldns\n", arg, bit, ntime())); + LOG((this,LOG_DISK,8," BITCLK#%d bit:%d (write) @%lldns\n", arg, bit, ntime())); if (clk) dhd->wr_data(arg, bit); else @@ -1629,7 +1629,7 @@ void alto2_cpu_device::disk_bitclk(void* ptr, INT32 arg) } else if (GET_KCOM_BCLKSRC(m_dsk.kcom)) { /* always select the crystal clock */ bit = dhd->rd_data(arg); - LOG((LOG_DISK,8," BITCLK#%d bit:%d (read, crystal) @%lldns\n", arg, bit, ntime())); + LOG((this,LOG_DISK,8," BITCLK#%d bit:%d (read, crystal) @%lldns\n", arg, bit, ntime())); kwd_timing(clk, bit, 0); } else { /* if XFEROFF is set, keep the bit at 1 (RDGATE' is high) */ @@ -1638,7 +1638,7 @@ void alto2_cpu_device::disk_bitclk(void* ptr, INT32 arg) } else { clk = dhd->rd_clock(arg); bit = dhd->rd_data(arg); - LOG((LOG_DISK,8," BITCLK#%d bit:%d (read, driveclk) @%lldns\n", arg, bit, ntime())); + LOG((this,LOG_DISK,8," BITCLK#%d bit:%d (read, driveclk) @%lldns\n", arg, bit, ntime())); } kwd_timing(clk, bit, 0); } @@ -1669,15 +1669,15 @@ void alto2_cpu_device::disk_bitclk(void* ptr, INT32 arg) void alto2_cpu_device::next_sector(int unit) { diablo_hd_device* dhd = m_drive[unit]; - LOG((LOG_DISK,0,"%s dhd=%p\n", __FUNCTION__, dhd)); + LOG((this,LOG_DISK,0,"%s dhd=%p\n", __FUNCTION__, dhd)); // get bit time in pico seconds m_dsk.bitclk_time[unit] = static_cast<int>(dhd->bit_time().as_attoseconds() / 1000000); #if USE_BITCLK_TIMER - LOG((LOG_DISK,0," unit #%d stop bitclk\n", unit)); + LOG((this,LOG_DISK,0," unit #%d stop bitclk\n", unit)); m_dsk.bitclk_timer->enable(false); #else if (m_bitclk_time >= 0) { - LOG((LOG_DISK,0," unit #%d stop bitclk\n", unit)); + LOG((this,LOG_DISK,0," unit #%d stop bitclk\n", unit)); m_bitclk_time = -1; m_bitclk_index = -1; } @@ -1690,7 +1690,7 @@ void alto2_cpu_device::next_sector(int unit) m_dsk.shiftin = 0; m_dsk.shiftout = 0; - LOG((LOG_DISK,1," unit #%d sector %d start\n", unit, GET_KSTAT_SECTOR(m_dsk.kstat))); + LOG((this,LOG_DISK,1," unit #%d sector %d start\n", unit, GET_KSTAT_SECTOR(m_dsk.kstat))); #if USE_BITCLK_TIMER // HACK: no command, no bit clock diff --git a/src/devices/cpu/alto2/a2disp.c b/src/devices/cpu/alto2/a2disp.c index 3f902431efa..7391e506146 100644 --- a/src/devices/cpu/alto2/a2disp.c +++ b/src/devices/cpu/alto2/a2disp.c @@ -291,13 +291,13 @@ void alto2_cpu_device::unload_word() UINT8 a38 = m_disp_a38[m_dsp.ra * 16 + m_dsp.wa]; if (FIFO_MBEMPTY(a38)) { - LOG((LOG_DISPL,1, " DSP FIFO underrun y:%d x:%d\n", y, x)); + LOG((this,LOG_DISPL,1, " DSP FIFO underrun y:%d x:%d\n", y, x)); } else { word ^= m_dsp.fifo[m_dsp.ra]; m_dsp.ra = (m_dsp.ra + 1) % ALTO2_DISPLAY_FIFO; - LOG((LOG_DISPL,3, " DSP pull %04x from FIFO[%02o] y:%d x:%d\n", + LOG((this,LOG_DISPL,3, " DSP pull %04x from FIFO[%02o] y:%d x:%d\n", word, (m_dsp.ra - 1) & (ALTO2_DISPLAY_FIFO - 1), y, x)); } @@ -334,10 +334,10 @@ void alto2_cpu_device::unload_word() */ void alto2_cpu_device::display_state_machine() { - LOG((LOG_DISPL,5,"DSP%03o:", m_dsp.state)); + LOG((this,LOG_DISPL,5,"DSP%03o:", m_dsp.state)); if (020 == m_dsp.state) { - LOG((LOG_DISPL,2," HLC=%d", m_dsp.hlc)); + LOG((this,LOG_DISPL,2," HLC=%d", m_dsp.hlc)); } UINT8 a63 = m_disp_a63[m_dsp.state]; @@ -361,14 +361,14 @@ void alto2_cpu_device::display_state_machine() // Rising edge of VBLANK: remember HLC[1-10] where the VBLANK starts m_dsp.vblank = m_dsp.hlc & ~02000; - LOG((LOG_DISPL,1, " VBLANK")); + LOG((this,LOG_DISPL,1, " VBLANK")); // VSYNC is always within VBLANK, thus we handle it only here if (A66_VSYNC(a66)) { if (!A66_VSYNC(m_dsp.a66)) { - LOG((LOG_DISPL,1, " VSYNC/ (wake DVT)")); + LOG((this,LOG_DISPL,1, " VSYNC/ (wake DVT)")); /* * The display vertical task DVT is woken once per field * at the beginning of vertical retrace. @@ -393,7 +393,7 @@ void alto2_cpu_device::display_state_machine() * the word task can be woken until the start of the * next field. */ - LOG((LOG_DISPL,1, " VBLANKPULSE (wake DHT)")); + LOG((this,LOG_DISPL,1, " VBLANKPULSE (wake DHT)")); m_dsp.dht_blocks = false; m_dsp.dwt_blocks = false; m_task_wakeup |= 1 << task_dht; @@ -406,7 +406,7 @@ void alto2_cpu_device::display_state_machine() if (!A63_HBLANK(a63) && A63_HBLANK(m_dsp.a63)) { // Falling edge of a63 HBLANK starts unloading of FIFO words - LOG((LOG_DISPL,1, " HBLANK\\ UNLOAD")); + LOG((this,LOG_DISPL,1, " HBLANK\\ UNLOAD")); m_unload_time = ALTO2_DISPLAY_BITTIME(m_dsp.halfclock ? 32 : 16); m_unload_word = 0; } @@ -422,17 +422,17 @@ void alto2_cpu_device::display_state_machine() if (!m_dsp.dwt_blocks && !m_dsp.dht_blocks && !FIFO_STOPWAKE(a38)) { m_task_wakeup |= 1 << task_dwt; - LOG((LOG_DISPL,1, " (wake DWT)")); + LOG((this,LOG_DISPL,1, " (wake DWT)")); } // Stop waking up the DWT when SCANEND is active if (A63_SCANEND(a63)) { m_task_wakeup &= ~(1 << task_dwt); - LOG((LOG_DISPL,1, " SCANEND")); + LOG((this,LOG_DISPL,1, " SCANEND")); } - LOG((LOG_DISPL,1, "%s", A63_HBLANK(a63) ? " HBLANK": "")); + LOG((this,LOG_DISPL,1, "%s", A63_HBLANK(a63) ? " HBLANK": "")); if (A63_HSYNC(a63)) { @@ -440,7 +440,7 @@ void alto2_cpu_device::display_state_machine() if (!A63_HSYNC(m_dsp.a63)) { // Rising edge of HSYNC => CLRBUF - LOG((LOG_DISPL,1, " HSYNC/ (CLRBUF)")); + LOG((this,LOG_DISPL,1, " HSYNC/ (CLRBUF)")); /* * The hardware sets the buffer empty and clears the DWT block * flip-flop at the beginning of horizontal retrace for @@ -457,7 +457,7 @@ void alto2_cpu_device::display_state_machine() } else { - LOG((LOG_DISPL,1, " HSYNC")); + LOG((this,LOG_DISPL,1, " HSYNC")); } } else @@ -475,7 +475,7 @@ void alto2_cpu_device::display_state_machine() m_task_wakeup |= 1 << task_curt; } - LOG((LOG_DISPL,1, " NEXT:%03o\n", next)); + LOG((this,LOG_DISPL,1, " NEXT:%03o\n", next)); m_dsp.a63 = a63; m_dsp.a66 = a66; @@ -491,7 +491,7 @@ void alto2_cpu_device::display_state_machine() void alto2_cpu_device::f2_late_evenfield() { UINT16 r = HLC1024 ^ 1; - LOG((LOG_DISPL,2," EVENFIELD branch (%#o | %#o)\n", m_next2, r)); + LOG((this,LOG_DISPL,2," EVENFIELD branch (%#o | %#o)\n", m_next2, r)); m_next2 |= r; } diff --git a/src/devices/cpu/alto2/a2dvt.c b/src/devices/cpu/alto2/a2dvt.c index acb51d92e7c..8704ad0d53d 100644 --- a/src/devices/cpu/alto2/a2dvt.c +++ b/src/devices/cpu/alto2/a2dvt.c @@ -13,7 +13,7 @@ void alto2_cpu_device::f1_early_dvt_block() { // m_task_wakeup &= ~(1 << m_task); - LOG((LOG_DVT,2," BLOCK %s\n", task_name(m_task))); + LOG((this,LOG_DVT,2," BLOCK %s\n", task_name(m_task))); } diff --git a/src/devices/cpu/alto2/a2dwt.c b/src/devices/cpu/alto2/a2dwt.c index 19831e3fd46..b5fd716617c 100644 --- a/src/devices/cpu/alto2/a2dwt.c +++ b/src/devices/cpu/alto2/a2dwt.c @@ -19,7 +19,7 @@ void alto2_cpu_device::f1_early_dwt_block() /* clear the wakeup for the display word task */ m_task_wakeup &= ~(1 << m_task); - LOG((LOG_DWT,2," BLOCK %s\n", task_name(m_task))); + LOG((this,LOG_DWT,2," BLOCK %s\n", task_name(m_task))); /* wakeup the display horizontal task, if it didn't block itself */ if (!m_dsp.dht_blocks) @@ -31,13 +31,13 @@ void alto2_cpu_device::f1_early_dwt_block() */ void alto2_cpu_device::f2_late_dwt_load_ddr() { - LOG((LOG_DWT,2," DDR<- BUS (%#o)\n", m_bus)); + LOG((this,LOG_DWT,2," DDR<- BUS (%#o)\n", m_bus)); m_dsp.fifo[m_dsp.wa] = m_bus; m_dsp.wa = (m_dsp.wa + 1) % ALTO2_DISPLAY_FIFO; UINT8 a38 = m_disp_a38[m_dsp.ra * 16 + m_dsp.wa]; if (FIFO_STOPWAKE(a38)) m_task_wakeup &= ~(1 << task_dwt); - LOG((LOG_DWT,2, " DWT push %04x into FIFO[%02o]%s\n", + LOG((this,LOG_DWT,2, " DWT push %04x into FIFO[%02o]%s\n", m_bus, (m_dsp.wa - 1) & (ALTO2_DISPLAY_FIFO - 1), FIFO_STOPWAKE(a38) ? " STOPWAKE" : "")); } diff --git a/src/devices/cpu/alto2/a2emu.c b/src/devices/cpu/alto2/a2emu.c index fd30fa1d0f8..d5475fccef5 100644 --- a/src/devices/cpu/alto2/a2emu.c +++ b/src/devices/cpu/alto2/a2emu.c @@ -251,7 +251,7 @@ void alto2_cpu_device::bs_early_emu_disp() if (IR_X(m_emu.ir)) { r = ((signed char)r) & 0177777; } - LOG((LOG_EMU,2, " <-DISP (%06o)\n", r)); + LOG((this,LOG_EMU,2, " <-DISP (%06o)\n", r)); m_bus &= r; } @@ -264,7 +264,7 @@ void alto2_cpu_device::f1_early_emu_block() { #if 0 CPU_CLR_TASK_WAKEUP(m_task); - LOG((LOG_EMU,2, " BLOCK %02o:%s\n", m_task, task_name(m_task))); + LOG((this,LOG_EMU,2, " BLOCK %02o:%s\n", m_task, task_name(m_task))); #elif 0 fatal(1, "Emulator task want's to BLOCK.\n" \ "%s-%04o: r:%02o af:%02o bs:%02o f1:%02o f2:%02o" \ @@ -283,7 +283,7 @@ void alto2_cpu_device::f1_early_emu_block() */ void alto2_cpu_device::f1_late_emu_load_rmr() { - LOG((LOG_EMU,2," RMR<-; BUS (%#o)\n", m_bus)); + LOG((this,LOG_EMU,2," RMR<-; BUS (%#o)\n", m_bus)); m_reset_mode = m_bus; } @@ -292,7 +292,7 @@ void alto2_cpu_device::f1_late_emu_load_rmr() */ void alto2_cpu_device::f1_late_emu_load_esrb() { - LOG((LOG_EMU,2," ESRB<-; BUS[12-14] (%#o)\n", m_bus)); + LOG((this,LOG_EMU,2," ESRB<-; BUS[12-14] (%#o)\n", m_bus)); m_s_reg_bank[m_task] = X_RDBITS(m_bus,16,12,14); } @@ -305,7 +305,7 @@ void alto2_cpu_device::f1_late_emu_load_esrb() void alto2_cpu_device::f1_early_rsnf() { UINT16 r = 0177400 | m_ether_id; - LOG((LOG_EMU,2," <-RSNF; (%#o)\n", r)); + LOG((this,LOG_EMU,2," <-RSNF; (%#o)\n", r)); m_bus &= r; } @@ -338,13 +338,13 @@ void alto2_cpu_device::f1_early_rsnf() */ void alto2_cpu_device::f1_early_startf() { - LOG((LOG_EMU,2," STARTF (BUS is %06o)\n", m_bus)); + LOG((this,LOG_EMU,2," STARTF (BUS is %06o)\n", m_bus)); /* TODO: what do we do here? reset the CPU on bit 0? */ if (X_BIT(m_bus,16,0)) { - LOG((LOG_EMU,2,"**** Software boot feature\n")); + LOG((this,LOG_EMU,2,"**** Software boot feature\n")); soft_reset(); } else { - LOG((LOG_EMU,2,"**** Ethernet start function\n")); + LOG((this,LOG_EMU,2,"**** Ethernet start function\n")); eth_startf(); } } @@ -355,7 +355,7 @@ void alto2_cpu_device::f1_early_startf() void alto2_cpu_device::f2_late_busodd() { UINT16 r = m_bus & 1; - LOG((LOG_EMU,2," BUSODD; %sbranch (%#o|%#o)\n", r ? "" : "no ", m_next2, r)); + LOG((this,LOG_EMU,2," BUSODD; %sbranch (%#o|%#o)\n", r ? "" : "no ", m_next2, r)); m_next2 |= r; } @@ -369,12 +369,12 @@ void alto2_cpu_device::f2_late_magic() case f1_l_lsh_1: // <-L MLSH 1 XC = (m_t >> 15) & 1; m_shifter = (m_l << 1) | XC; - LOG((LOG_EMU,2," <-L MLSH 1 (shifer:%06o XC:%o)", m_shifter, XC)); + LOG((this,LOG_EMU,2," <-L MLSH 1 (shifer:%06o XC:%o)", m_shifter, XC)); break; case f1_l_rsh_1: // <-L MRSH 1 XC = (m_t & 1) << 15; m_shifter = (m_l >> 1) | XC; - LOG((LOG_EMU,2," <-L MRSH 1 (shifter:%06o XC:%o)", m_shifter, XC)); + LOG((this,LOG_EMU,2," <-L MRSH 1 (shifter:%06o XC:%o)", m_shifter, XC)); break; case f1_l_lcy_8: // <-L LCY 8 m_shifter = (m_l >> 8) | (m_l << 8); @@ -391,7 +391,7 @@ void alto2_cpu_device::f2_late_magic() void alto2_cpu_device::f2_early_load_dns() { X_WRBITS(m_rsel, 5, 3, 4, IR_DstAC(m_emu.ir) ^ 3); - LOG((LOG_EMU,2," DNS<-; rsel := DstAC (%#o %s)\n", m_rsel, r_name(m_rsel))); + LOG((this,LOG_EMU,2," DNS<-; rsel := DstAC (%#o %s)\n", m_rsel, r_name(m_rsel))); } /** @@ -445,22 +445,22 @@ void alto2_cpu_device::f2_late_load_dns() case f1_l_rsh_1: // <-L RSH 1 NEWCARRY = m_l & 1; m_shifter = ((m_l >> 1) | (XC << 15)) & 0177777; - LOG((LOG_EMU,2," DNS; <-L RSH 1 (shifter:%06o XC:%o NEWCARRY:%o)", m_shifter, XC, NEWCARRY)); + LOG((this,LOG_EMU,2," DNS; <-L RSH 1 (shifter:%06o XC:%o NEWCARRY:%o)", m_shifter, XC, NEWCARRY)); break; case f1_l_lsh_1: // <-L LSH 1 NEWCARRY = (m_l >> 15) & 1; m_shifter = ((m_l << 1) | XC) & 0177777; - LOG((LOG_EMU,2," DNS; <-L LSH 1 (shifter:%06o XC:%o NEWCARRY:%o)", m_shifter, XC, NEWCARRY)); + LOG((this,LOG_EMU,2," DNS; <-L LSH 1 (shifter:%06o XC:%o NEWCARRY:%o)", m_shifter, XC, NEWCARRY)); break; case f1_l_lcy_8: // <-L LCY 8 NEWCARRY = XC; m_shifter = (m_l >> 8) | (m_l << 8); - LOG((LOG_EMU,2," DNS; (shifter:%06o NEWCARRY:%o)", m_shifter, NEWCARRY)); + LOG((this,LOG_EMU,2," DNS; (shifter:%06o NEWCARRY:%o)", m_shifter, NEWCARRY)); break; default: // other NEWCARRY = XC; m_shifter = m_l; - LOG((LOG_EMU,2," DNS; (shifter:%06o NEWCARRY:%o)", m_shifter, NEWCARRY)); + LOG((this,LOG_EMU,2," DNS; (shifter:%06o NEWCARRY:%o)", m_shifter, NEWCARRY)); break; } SHZERO = (m_shifter == 0); @@ -482,7 +482,7 @@ void alto2_cpu_device::f2_late_load_dns() void alto2_cpu_device::f2_early_acdest() { X_WRBITS(m_rsel, 5, 3, 4, IR_DstAC(m_emu.ir) ^ 3); - LOG((LOG_EMU,2," ACDEST<-; mux (rsel:%#o %s)\n", m_rsel, r_name(m_rsel))); + LOG((this,LOG_EMU,2," ACDEST<-; mux (rsel:%#o %s)\n", m_rsel, r_name(m_rsel))); } #if ALTO2_DEBUG @@ -493,35 +493,35 @@ void alto2_cpu_device::bitblt_info() int bbt = m_r[rsel_ac2]; int val = debug_read_mem(bbt); - LOG((LOG_EMU,3," BITBLT AC1:%06o AC2:%06o\n", m_r[rsel_ac1], m_r[rsel_ac2])); - LOG((LOG_EMU,3," function : %06o\n", val)); - LOG((LOG_EMU,3," src extRAM: %o\n", X_BIT(val,16,10))); - LOG((LOG_EMU,3," dst extRAM: %o\n", X_BIT(val,16,11))); - LOG((LOG_EMU,3," src type : %o (%s)\n", X_RDBITS(val,16,12,13), type_name[X_RDBITS(val,16,12,13)])); - LOG((LOG_EMU,3," operation : %o (%s)\n", X_RDBITS(val,16,14,15), oper_name[X_RDBITS(val,16,14,15)])); + LOG((this,LOG_EMU,3," BITBLT AC1:%06o AC2:%06o\n", m_r[rsel_ac1], m_r[rsel_ac2])); + LOG((this,LOG_EMU,3," function : %06o\n", val)); + LOG((this,LOG_EMU,3," src extRAM: %o\n", X_BIT(val,16,10))); + LOG((this,LOG_EMU,3," dst extRAM: %o\n", X_BIT(val,16,11))); + LOG((this,LOG_EMU,3," src type : %o (%s)\n", X_RDBITS(val,16,12,13), type_name[X_RDBITS(val,16,12,13)])); + LOG((this,LOG_EMU,3," operation : %o (%s)\n", X_RDBITS(val,16,14,15), oper_name[X_RDBITS(val,16,14,15)])); val = debug_read_mem(bbt+1); - LOG((LOG_EMU,3," unused AC2: %06o (%d)\n", val, val)); + LOG((this,LOG_EMU,3," unused AC2: %06o (%d)\n", val, val)); val = debug_read_mem(bbt+2); - LOG((LOG_EMU,3," DBCA : %06o (%d)\n", val, val)); + LOG((this,LOG_EMU,3," DBCA : %06o (%d)\n", val, val)); val = debug_read_mem(bbt+3); - LOG((LOG_EMU,3," DBMR : %06o (%d words)\n", val, val)); + LOG((this,LOG_EMU,3," DBMR : %06o (%d words)\n", val, val)); val = debug_read_mem(bbt+4); - LOG((LOG_EMU,3," DLX : %06o (%d bits)\n", val, val)); + LOG((this,LOG_EMU,3," DLX : %06o (%d bits)\n", val, val)); val = debug_read_mem(bbt+5); - LOG((LOG_EMU,3," DTY : %06o (%d scanlines)\n", val, val)); + LOG((this,LOG_EMU,3," DTY : %06o (%d scanlines)\n", val, val)); val = debug_read_mem(bbt+6); - LOG((LOG_EMU,3," DW : %06o (%d bits)\n", val, val)); + LOG((this,LOG_EMU,3," DW : %06o (%d bits)\n", val, val)); val = debug_read_mem(bbt+7); - LOG((LOG_EMU,3," DH : %06o (%d scanlines)\n", val, val)); + LOG((this,LOG_EMU,3," DH : %06o (%d scanlines)\n", val, val)); val = debug_read_mem(bbt+8); - LOG((LOG_EMU,3," SBCA : %06o (%d)\n", val, val)); + LOG((this,LOG_EMU,3," SBCA : %06o (%d)\n", val, val)); val = debug_read_mem(bbt+9); - LOG((LOG_EMU,3," SBMR : %06o (%d words)\n", val, val)); + LOG((this,LOG_EMU,3," SBMR : %06o (%d words)\n", val, val)); val = debug_read_mem(bbt+10); - LOG((LOG_EMU,3," SLX : %06o (%d bits)\n", val, val)); + LOG((this,LOG_EMU,3," SLX : %06o (%d bits)\n", val, val)); val = debug_read_mem(bbt+11); - LOG((LOG_EMU,3," STY : %06o (%d scanlines)\n", val, val)); - LOG((LOG_EMU,3," GRAY0-3 : %06o %06o %06o %06o\n", + LOG((this,LOG_EMU,3," STY : %06o (%d scanlines)\n", val, val)); + LOG((this,LOG_EMU,3," GRAY0-3 : %06o %06o %06o %06o\n", debug_read_mem(bbt+12), debug_read_mem(bbt+13), debug_read_mem(bbt+14), debug_read_mem(bbt+15))); } @@ -540,31 +540,31 @@ void alto2_cpu_device::f2_late_load_ir() /* special logging of some opcodes */ switch (m_bus) { case op_CYCLE: - LOG((LOG_EMU,3," CYCLE AC0:#o\n", m_r[rsel_ac0])); + LOG((this,LOG_EMU,3," CYCLE AC0:#o\n", m_r[rsel_ac0])); break; case op_CYCLE + 1: case op_CYCLE + 2: case op_CYCLE + 3: case op_CYCLE + 4: case op_CYCLE + 5: case op_CYCLE + 6: case op_CYCLE + 7: case op_CYCLE + 8: case op_CYCLE + 9: case op_CYCLE +10: case op_CYCLE +11: case op_CYCLE +12: case op_CYCLE +13: case op_CYCLE +14: case op_CYCLE +15: - LOG((LOG_EMU,3," CYCLE %#o\n", m_bus - op_CYCLE)); + LOG((this,LOG_EMU,3," CYCLE %#o\n", m_bus - op_CYCLE)); break; case op_BLT: - LOG((LOG_EMU,3," BLT dst:%#o src:%#o size:%#o\n", + LOG((this,LOG_EMU,3," BLT dst:%#o src:%#o size:%#o\n", (m_r[rsel_ac1] + m_r[rsel_ac3] + 1) & 0177777, (m_r[rsel_ac0] + 1) & 017777, -m_r[rsel_ac3] & 0177777)); break; case op_BLKS: - LOG((LOG_EMU,3," BLKS dst:%#o val:%#o size:%#o\n", + LOG((this,LOG_EMU,3," BLKS dst:%#o val:%#o size:%#o\n", (m_r[rsel_ac1] + m_r[rsel_ac3] + 1) & 0177777, m_r[rsel_ac0], -m_r[rsel_ac3] & 0177777)); break; case op_DIAGNOSE1: - LOG((LOG_EMU,3," DIAGNOSE1 AC0:%06o AC1:%06o AC2:%06o AC3:%06o\n", + LOG((this,LOG_EMU,3," DIAGNOSE1 AC0:%06o AC1:%06o AC2:%06o AC3:%06o\n", m_r[rsel_ac0], m_r[rsel_ac1], m_r[rsel_ac2], m_r[rsel_ac3])); break; case op_DIAGNOSE2: - LOG((LOG_EMU,3," DIAGNOSE2 AC0:%06o AC1:%06o AC2:%06o AC3:%06o\n", + LOG((this,LOG_EMU,3," DIAGNOSE2 AC0:%06o AC1:%06o AC2:%06o AC3:%06o\n", m_r[rsel_ac0], m_r[rsel_ac1], m_r[rsel_ac2], m_r[rsel_ac3])); break; @@ -572,19 +572,19 @@ void alto2_cpu_device::f2_late_load_ir() bitblt_info(); break; case op_RDRAM: - LOG((LOG_EMU,3," RDRAM addr:%#o\n", m_r[rsel_ac1])); + LOG((this,LOG_EMU,3," RDRAM addr:%#o\n", m_r[rsel_ac1])); break; case op_WRTRAM: - LOG((LOG_EMU,3," WRTAM addr:%#o upper:%06o lower:%06o\n", m_r[rsel_ac1], m_r[rsel_ac0], m_r[rsel_ac3])); + LOG((this,LOG_EMU,3," WRTAM addr:%#o upper:%06o lower:%06o\n", m_r[rsel_ac1], m_r[rsel_ac0], m_r[rsel_ac3])); break; case op_JMPRAM: - LOG((LOG_EMU,3," JMPRAM addr:%#o\n", m_r[rsel_ac1])); + LOG((this,LOG_EMU,3," JMPRAM addr:%#o\n", m_r[rsel_ac1])); break; case op_XMLDA: - LOG((LOG_EMU,3," XMLDA AC0 = [bank:%o AC1:#o]\n", m_bank_reg[m_task] & 3, m_r[rsel_ac1])); + LOG((this,LOG_EMU,3," XMLDA AC0 = [bank:%o AC1:#o]\n", m_bank_reg[m_task] & 3, m_r[rsel_ac1])); break; case op_XMSTA: - LOG((LOG_EMU,3," XMSTA [bank:%o AC1:#o] = AC0 (%#o)\n", m_bank_reg[m_task] & 3, m_r[rsel_ac1], m_r[rsel_ac0])); + LOG((this,LOG_EMU,3," XMSTA [bank:%o AC1:#o] = AC0 (%#o)\n", m_bank_reg[m_task] & 3, m_r[rsel_ac1], m_r[rsel_ac0])); break; } #endif @@ -604,12 +604,12 @@ void alto2_cpu_device::f2_late_idisp() if (IR_ARITH(m_emu.ir)) { /* 1xxxxxxxxxxxxxxx */ r = IR_SH(m_emu.ir) ^ 3; /* complement of SH */ - LOG((LOG_EMU,2," IDISP<-; branch on SH^3 (%#o|%#o)\n", m_next2, r)); + LOG((this,LOG_EMU,2," IDISP<-; branch on SH^3 (%#o|%#o)\n", m_next2, r)); } else { int addr = CTL2K_U3(f2_emu_idisp) + X_RDBITS(m_emu.ir,16,1,7); /* 0???????xxxxxxxx */ r = m_ctl2k_u3[addr]; - LOG((LOG_EMU,2," IDISP<-; IR (%#o) branch on PROM ctl2k_u3[%03o] (%#o|%#o)\n", m_emu.ir, addr, m_next2, r)); + LOG((this,LOG_EMU,2," IDISP<-; IR (%#o) branch on PROM ctl2k_u3[%03o] (%#o|%#o)\n", m_emu.ir, addr, m_next2, r)); } m_next2 |= r; } @@ -620,7 +620,7 @@ void alto2_cpu_device::f2_late_idisp() void alto2_cpu_device::f2_early_acsource() { X_WRBITS(m_rsel, 5, 3, 4, IR_SrcAC(m_emu.ir) ^ 3); - LOG((LOG_EMU,2," <-ACSOURCE; rsel := SrcAC (%#o %s)\n", m_rsel, r_name(m_rsel))); + LOG((this,LOG_EMU,2," <-ACSOURCE; rsel := SrcAC (%#o %s)\n", m_rsel, r_name(m_rsel))); } /** @@ -633,12 +633,12 @@ void alto2_cpu_device::f2_late_acsource() if (IR_ARITH(m_emu.ir)) { /* 1xxxxxxxxxxxxxxx */ r = IR_SH(m_emu.ir) ^ 3; /* complement of SH */ - LOG((LOG_EMU,2," <-ACSOURCE; branch on SH^3 (%#o|%#o)\n", m_next2, r)); + LOG((this,LOG_EMU,2," <-ACSOURCE; branch on SH^3 (%#o|%#o)\n", m_next2, r)); } else { int addr = CTL2K_U3(f2_emu_acsource) + X_RDBITS(m_emu.ir,16,1,7); /* 0???????xxxxxxxx */ r = m_ctl2k_u3[addr]; - LOG((LOG_EMU,2," <-ACSOURCE; branch on PROM ctl2k_u3[%03o] (%#o|%#o)\n", addr, m_next2, r)); + LOG((this,LOG_EMU,2," <-ACSOURCE; branch on PROM ctl2k_u3[%03o] (%#o|%#o)\n", addr, m_next2, r)); } m_next2 |= r; } diff --git a/src/devices/cpu/alto2/a2ether.c b/src/devices/cpu/alto2/a2ether.c index 32d8a716f49..314da97cc7a 100644 --- a/src/devices/cpu/alto2/a2ether.c +++ b/src/devices/cpu/alto2/a2ether.c @@ -207,35 +207,35 @@ static const UINT16 breath_of_life_data[BREATHLEN] = }; #if DEBUG_PACKETS -static void dump_ascii(const UINT16 *src, size_t size) +static void dump_ascii(device_t *device, const UINT16 *src, size_t size) { - logerror(" ["); + device->logerror(" ["); for (size_t offs = 0; offs < size; offs++) { char ch1 = src[offs] / 256; char ch2 = src[offs] % 256; - logerror("%c", ch1 < 32 || ch1 > 126 ? '.' : ch1); - logerror("%c", ch2 < 32 || ch2 > 126 ? '.' : ch2); + device->logerror("%c", ch1 < 32 || ch1 > 126 ? '.' : ch1); + device->logerror("%c", ch2 < 32 || ch2 > 126 ? '.' : ch2); } - logerror("]\n"); + device->logerror("]\n"); } -static void dump_packet(const char* name, const UINT16 *src, size_t addr, size_t size) +static void dump_packet(device_t *device, const char* name, const UINT16 *src, size_t addr, size_t size) { size_t offs; for (offs = 0; offs < size; offs++) { UINT16 word = src[offs]; if (offs % 8) { - logerror(" %06o", word); + device->logerror(" %06o", word); } else { if (offs > 0) - dump_ascii(&src[offs-8], 8); - logerror("%s\t%05o: %06o", name, static_cast<unsigned>(addr + offs), word); + dump_ascii(device, &src[offs-8], 8); + device->logerror("%s\t%05o: %06o", name, static_cast<unsigned>(addr + offs), word); } } if (offs % 8) { - dump_ascii(&src[offs - (offs % 8)], offs % 8); + dump_ascii(device, &src[offs - (offs % 8)], offs % 8); } else if (offs > 0) { - dump_ascii(&src[offs - 8], 8); + dump_ascii(device, &src[offs - 8], 8); } } #endif @@ -246,7 +246,7 @@ static void dump_packet(const char* name, const UINT16 *src, size_t addr, size_t void alto2_cpu_device::eth_wakeup() { register int st = m_eth.status; - LOG((LOG_ETH,0,"IBUSY=%d OBUSY=%d ", GET_ETH_IBUSY(st), GET_ETH_OBUSY(st))); + LOG((this,LOG_ETH,0,"IBUSY=%d OBUSY=%d ", GET_ETH_IBUSY(st), GET_ETH_OBUSY(st))); UINT8 busy = GET_ETH_IBUSY(st) | GET_ETH_OBUSY(st); if (0 == busy) { // if not busy, reset the FIFO read and write counters @@ -263,27 +263,27 @@ void alto2_cpu_device::eth_wakeup() * input gone */ if (GET_ETH_IDL(st)) { - LOG((LOG_ETH,0,"POST (input data late)\n")); + LOG((this,LOG_ETH,0,"POST (input data late)\n")); m_task_wakeup |= 1 << task_ether; return; } if (GET_ETH_OCMD(st)) { - LOG((LOG_ETH,0,"POST (output command)\n")); + LOG((this,LOG_ETH,0,"POST (output command)\n")); m_task_wakeup |= 1 << task_ether; return; } if (GET_ETH_ICMD(st)) { - LOG((LOG_ETH,0,"POST (input command)\n")); + LOG((this,LOG_ETH,0,"POST (input command)\n")); m_task_wakeup |= 1 << task_ether; return; } if (GET_ETH_OGONE(st)) { - LOG((LOG_ETH,0,"POST (output gone)\n")); + LOG((this,LOG_ETH,0,"POST (output gone)\n")); m_task_wakeup |= 1 << task_ether; return; } if (GET_ETH_IGONE(st)) { - LOG((LOG_ETH,0,"POST (input gone)\n")); + LOG((this,LOG_ETH,0,"POST (input gone)\n")); m_task_wakeup |= 1 << task_ether; return; } @@ -319,7 +319,7 @@ void alto2_cpu_device::eth_wakeup() UINT8 IDR = ~(GET_ETH_IBUSY(st) & i2); if (0 == IDR) { m_task_wakeup |= 1 << task_ether; - LOG((LOG_ETH,0,"IDR (input data ready)\n")); + LOG((this,LOG_ETH,0,"IDR (input data ready)\n")); return; } @@ -350,7 +350,7 @@ void alto2_cpu_device::eth_wakeup() UINT8 ODR = ~(GET_ETH_OBUSY(st) & ~GET_ETH_OEOT(st) & o1); if (0 == ODR) { m_task_wakeup |= 1 << task_ether; - LOG((LOG_ETH,0,"ODR (output data ready)\n")); + LOG((this,LOG_ETH,0,"ODR (output data ready)\n")); return; } @@ -362,12 +362,12 @@ void alto2_cpu_device::eth_wakeup() */ if (m_ewfct) { m_task_wakeup |= 1 << task_ether; - LOG((LOG_ETH,0,"EWFCT (ether wake function)\n")); + LOG((this,LOG_ETH,0,"EWFCT (ether wake function)\n")); return; } // otherwise no more wakeups for the ether task - LOG((LOG_ETH,0,"stop wake\n")); + LOG((this,LOG_ETH,0,"stop wake\n")); m_task_wakeup &= ~(1 << task_ether); } @@ -539,7 +539,7 @@ void alto2_cpu_device::tx_packet(void* ptr, INT32 arg) // the last word sent is the CRC if (-1 == arg) { m_eth.tx_timer->reset(); - LOG((LOG_ETH,0," CRC:%06o\n", m_eth.tx_crc)); + LOG((this,LOG_ETH,0," CRC:%06o\n", m_eth.tx_crc)); // TODO: send the CRC as final word of the packet m_eth.tx_crc = 0; PUT_ETH_OGONE(m_eth.status, 1); // set the OGONE flip flop @@ -578,7 +578,7 @@ void alto2_cpu_device::eth_startf() PUT_ETH_ICMD(m_eth.status, X_BIT(m_bus,16,14)); PUT_ETH_OCMD(m_eth.status, X_BIT(m_bus,16,15)); #endif - LOG((LOG_ETH,3, " STARTF; ICMD=%u OCMD=%u\n", GET_ETH_ICMD(m_eth.status), GET_ETH_ICMD(m_eth.status))); + LOG((this,LOG_ETH,3, " STARTF; ICMD=%u OCMD=%u\n", GET_ETH_ICMD(m_eth.status), GET_ETH_ICMD(m_eth.status))); eth_wakeup(); } @@ -591,7 +591,7 @@ void alto2_cpu_device::eth_startf() void alto2_cpu_device::bs_early_eidfct() { UINT16 r = m_eth.fifo[m_eth.fifo_rd]; - LOG((LOG_ETH,3, " <-EIDFCT; pull %06o from FIFO[%02o]\n", r, m_eth.fifo_rd)); + LOG((this,LOG_ETH,3, " <-EIDFCT; pull %06o from FIFO[%02o]\n", r, m_eth.fifo_rd)); m_eth.fifo_rd = (m_eth.fifo_rd + 1) % ALTO2_ETHER_FIFO_SIZE; m_bus &= r; @@ -600,7 +600,7 @@ void alto2_cpu_device::bs_early_eidfct() m_eth.rx_packet[m_eth.rx_count] = r; m_eth.rx_count++; if (ALTO2_ETHER_PACKET_SIZE == m_eth.rx_count) { - dump_packet("RX", m_eth.rx_packet, 0, m_eth.rx_count); + dump_packet(this,"RX", m_eth.rx_packet, 0, m_eth.rx_count); m_eth.rx_count = 0; } #endif @@ -612,7 +612,7 @@ void alto2_cpu_device::bs_early_eidfct() */ void alto2_cpu_device::f1_early_eth_block() { - LOG((LOG_ETH,2," BLOCK %s\n", task_name(m_task))); + LOG((this,LOG_ETH,2," BLOCK %s\n", task_name(m_task))); m_task_wakeup &= ~(1 << task_ether); } @@ -625,7 +625,7 @@ void alto2_cpu_device::f1_early_eth_block() void alto2_cpu_device::f1_early_eilfct() { UINT16 r = m_eth.fifo[m_eth.fifo_rd]; - LOG((LOG_ETH,3, " <-EILFCT; %06o at FIFO[%02o]\n", r, m_eth.fifo_rd)); + LOG((this,LOG_ETH,3, " <-EILFCT; %06o at FIFO[%02o]\n", r, m_eth.fifo_rd)); m_bus &= r; } @@ -658,13 +658,13 @@ void alto2_cpu_device::f1_early_epfct() X_WRBITS(r,16,15,15,~GET_ETH_IT(st)); // BUS[13] = IT (input ???) m_bus &= r; - LOG((LOG_ETH,3, " <-EPFCT; BUS[8-15] = STATUS (%#o)\n", r)); - LOG((LOG_ETH,5, " IDL' : %u\n", GET_ETH_IDL(r))); - LOG((LOG_ETH,5, " COLL' : %u\n", GET_ETH_COLL(r))); - LOG((LOG_ETH,5, " CRC' : %u\n", GET_ETH_CRC(r))); - LOG((LOG_ETH,5, " ICMD' : %u\n", GET_ETH_ICMD(r))); - LOG((LOG_ETH,5, " OCMD' : %u\n", GET_ETH_OCMD(r))); - LOG((LOG_ETH,5, " IT' : %u\n", GET_ETH_IT(r))); + LOG((this,LOG_ETH,3, " <-EPFCT; BUS[8-15] = STATUS (%#o)\n", r)); + LOG((this,LOG_ETH,5, " IDL' : %u\n", GET_ETH_IDL(r))); + LOG((this,LOG_ETH,5, " COLL' : %u\n", GET_ETH_COLL(r))); + LOG((this,LOG_ETH,5, " CRC' : %u\n", GET_ETH_CRC(r))); + LOG((this,LOG_ETH,5, " ICMD' : %u\n", GET_ETH_ICMD(r))); + LOG((this,LOG_ETH,5, " OCMD' : %u\n", GET_ETH_OCMD(r))); + LOG((this,LOG_ETH,5, " IT' : %u\n", GET_ETH_IT(r))); eth_wakeup(); } @@ -700,7 +700,7 @@ void alto2_cpu_device::f1_late_ewfct() */ void alto2_cpu_device::f2_late_eodfct() { - LOG((LOG_ETH,3, " EODFCT<-; push %06o into FIFO[%02o]\n", m_bus, m_eth.fifo_wr)); + LOG((this,LOG_ETH,3, " EODFCT<-; push %06o into FIFO[%02o]\n", m_bus, m_eth.fifo_wr)); m_eth.fifo[m_eth.fifo_wr] = m_bus; m_eth.fifo_wr = (m_eth.fifo_wr + 1) % ALTO2_ETHER_FIFO_SIZE; @@ -709,7 +709,7 @@ void alto2_cpu_device::f2_late_eodfct() m_eth.tx_packet[m_eth.tx_count] = m_bus; m_eth.tx_count++; if (ALTO2_ETHER_PACKET_SIZE == m_eth.tx_count) { - dump_packet("TX", m_eth.tx_packet, 0, m_eth.tx_count); + dump_packet(this,"TX", m_eth.tx_packet, 0, m_eth.tx_count); m_eth.tx_count = 0; } #endif @@ -735,7 +735,7 @@ void alto2_cpu_device::f2_late_eodfct() */ void alto2_cpu_device::f2_late_eosfct() { - LOG((LOG_ETH,3, " EOSFCT\n")); + LOG((this,LOG_ETH,3, " EOSFCT\n")); PUT_ETH_WLF(m_eth.status, 1); PUT_ETH_OBUSY(m_eth.status, 1); eth_wakeup(); @@ -756,7 +756,7 @@ void alto2_cpu_device::f2_late_erbfct() UINT16 r = 0; X_WRBITS(r,10,6,6,GET_ETH_ICMD(m_eth.status)); X_WRBITS(r,10,7,7,GET_ETH_OCMD(m_eth.status)); - LOG((LOG_ETH,3, " ERBFCT; NEXT[6-7] = ICMD,OCMD (%#o | %#o)\n", m_next2, r)); + LOG((this,LOG_ETH,3, " ERBFCT; NEXT[6-7] = ICMD,OCMD (%#o | %#o)\n", m_next2, r)); m_next2 |= r; eth_wakeup(); } @@ -797,7 +797,7 @@ void alto2_cpu_device::f2_late_ebfct() GET_ETH_OCMD(m_eth.status) | GET_ETH_IGONE(m_eth.status) | GET_ETH_OGONE(m_eth.status)); - LOG((LOG_ETH,3, " EBFCT; NEXT ... (%#o | %#o)\n", m_next2, r)); + LOG((this,LOG_ETH,3, " EBFCT; NEXT ... (%#o | %#o)\n", m_next2, r)); m_next2 |= r; } @@ -812,7 +812,7 @@ void alto2_cpu_device::f2_late_ecbfct() UINT16 r = 0; UINT8 a49 = m_ether_a49[16 * m_eth.fifo_wr + m_eth.fifo_rd]; X_WRBITS(r,10,7,7,~BE(a49)); - LOG((LOG_ETH,3, " ECBFCT; NEXT[7] = FIFO %sempty (%#o | %#o)\n", r ? "not " : "is ", m_next2, r)); + LOG((this,LOG_ETH,3, " ECBFCT; NEXT[7] = FIFO %sempty (%#o | %#o)\n", r ? "not " : "is ", m_next2, r)); m_next2 |= r; } @@ -826,7 +826,7 @@ void alto2_cpu_device::f2_late_ecbfct() */ void alto2_cpu_device::f2_late_eisfct() { - LOG((LOG_ETH,3, " EISFCT\n")); + LOG((this,LOG_ETH,3, " EISFCT\n")); PUT_ETH_IBUSY(m_eth.status, 1); eth_wakeup(); } diff --git a/src/devices/cpu/alto2/a2hw.c b/src/devices/cpu/alto2/a2hw.c index cc8a77c3f54..8e2dd031e64 100644 --- a/src/devices/cpu/alto2/a2hw.c +++ b/src/devices/cpu/alto2/a2hw.c @@ -242,7 +242,7 @@ READ16_MEMBER( alto2_cpu_device::utilin_r ) data = m_hw.utilin; if (!space.debugger_access()) { - LOG((LOG_HW,2," UTILIN rd %#o (%#o)\n", offset, data)); + LOG((this,LOG_HW,2," UTILIN rd %#o (%#o)\n", offset, data)); } return data; } @@ -258,7 +258,7 @@ READ16_MEMBER( alto2_cpu_device::xbus_r ) UINT16 data = m_hw.xbus[offset & 3]; if (!space.debugger_access()) { - LOG((LOG_HW,2," XBUS[%d] rd %#o (%#o)\n", offset & 3, offset, data)); + LOG((this,LOG_HW,2," XBUS[%d] rd %#o (%#o)\n", offset & 3, offset, data)); } return data; } @@ -274,7 +274,7 @@ READ16_MEMBER( alto2_cpu_device::xbus_r ) WRITE16_MEMBER( alto2_cpu_device::xbus_w ) { if (!space.debugger_access()) { - LOG((LOG_HW,2," XBUS[%d] wr %#o (%#o)\n", offset & 3, offset, data)); + LOG((this,LOG_HW,2," XBUS[%d] wr %#o (%#o)\n", offset & 3, offset, data)); } m_hw.xbus[offset&3] = data; } @@ -289,7 +289,7 @@ READ16_MEMBER( alto2_cpu_device::utilout_r ) { UINT16 data = m_hw.utilout ^ 0177777; if (!space.debugger_access()) { - LOG((0,2," UTILOUT rd %#o (%#o)\n", offset, data)); + LOG((this,0,2," UTILOUT rd %#o (%#o)\n", offset, data)); } return data; } @@ -305,7 +305,7 @@ READ16_MEMBER( alto2_cpu_device::utilout_r ) WRITE16_MEMBER( alto2_cpu_device::utilout_w ) { if (!space.debugger_access()) { - LOG((LOG_HW,2," UTILOUT wr %#o (%#o)\n", offset, data)); + LOG((this,LOG_HW,2," UTILOUT wr %#o (%#o)\n", offset, data)); } m_hw.utilout = data ^ 0177777; diff --git a/src/devices/cpu/alto2/a2jkff.h b/src/devices/cpu/alto2/a2jkff.h index 687313607b1..9f9caa5c558 100644 --- a/src/devices/cpu/alto2/a2jkff.h +++ b/src/devices/cpu/alto2/a2jkff.h @@ -68,7 +68,7 @@ static inline jkff_t update_jkff(UINT8 s0, UINT8 s1, const char* jkff_name) /* both J and K' are 0: set Q to 0, Q' to 1 */ s1 = (s1 & ~JKFF_Q) | JKFF_Q0; if (s0 & JKFF_Q) { - LOG((LOG_DISK,9,"\t\t%s J:0 K':0 -> Q:0\n", jkff_name)); + LOG((this,LOG_DISK,9,"\t\t%s J:0 K':0 -> Q:0\n", jkff_name)); } break; case JKFF_J: @@ -77,11 +77,11 @@ static inline jkff_t update_jkff(UINT8 s0, UINT8 s1, const char* jkff_name) s1 = (s1 & ~JKFF_Q) | JKFF_Q0; else s1 = (s1 | JKFF_Q) & ~JKFF_Q0; - LOG((LOG_DISK,9,"\t\t%s J:0 K':1 flip-flop Q:%d\n", jkff_name, (s1 & JKFF_Q) ? 1 : 0)); + LOG((this,LOG_DISK,9,"\t\t%s J:0 K':1 flip-flop Q:%d\n", jkff_name, (s1 & JKFF_Q) ? 1 : 0)); break; case JKFF_K: if ((s0 ^ s1) & JKFF_Q) { - LOG((LOG_DISK,9,"\t\t%s J:0 K':1 keep Q:%d\n", jkff_name, (s1 & JKFF_Q) ? 1 : 0)); + LOG((this,LOG_DISK,9,"\t\t%s J:0 K':1 keep Q:%d\n", jkff_name, (s1 & JKFF_Q) ? 1 : 0)); } /* J is 0, and K' is 1: keep Q as is */ if (s0 & JKFF_Q) @@ -93,7 +93,7 @@ static inline jkff_t update_jkff(UINT8 s0, UINT8 s1, const char* jkff_name) /* both J and K' are 1: set Q to 1 */ s1 = (s1 | JKFF_Q) & ~JKFF_Q0; if (!(s0 & JKFF_Q)) { - LOG((LOG_DISK,9,"\t\t%s J:1 K':1 -> Q:1\n", jkff_name)); + LOG((this,LOG_DISK,9,"\t\t%s J:1 K':1 -> Q:1\n", jkff_name)); } break; } @@ -106,21 +106,21 @@ static inline jkff_t update_jkff(UINT8 s0, UINT8 s1, const char* jkff_name) /* S' is 1, C' is 0: set Q to 0, Q' to 1 */ s1 = (s1 & ~JKFF_Q) | JKFF_Q0; if (s0 & JKFF_Q) { - LOG((LOG_DISK,9,"\t\t%s C':0 -> Q:0\n", jkff_name)); + LOG((this,LOG_DISK,9,"\t\t%s C':0 -> Q:0\n", jkff_name)); } break; case JKFF_C: /* S' is 0, C' is 1: set Q to 1, Q' to 0 */ s1 = (s1 | JKFF_Q) & ~JKFF_Q0; if (!(s0 & JKFF_Q)) { - LOG((LOG_DISK,9,"\t\t%s S':0 -> Q:1\n", jkff_name)); + LOG((this,LOG_DISK,9,"\t\t%s S':0 -> Q:1\n", jkff_name)); } break; case 0: default: /* unstable state (what to do?) */ s1 = s1 | JKFF_Q | JKFF_Q0; - LOG((LOG_DISK,9,"\t\t%s C':0 S':0 -> Q:1 and Q':1 <unstable>\n", jkff_name)); + LOG((this,LOG_DISK,9,"\t\t%s C':0 S':0 -> Q:1 and Q':1 <unstable>\n", jkff_name)); break; } return static_cast<jkff_t>(s1); diff --git a/src/devices/cpu/alto2/a2kbd.c b/src/devices/cpu/alto2/a2kbd.c index fa1bb5f9596..45800f03bd2 100644 --- a/src/devices/cpu/alto2/a2kbd.c +++ b/src/devices/cpu/alto2/a2kbd.c @@ -32,11 +32,11 @@ READ16_MEMBER( alto2_cpu_device::kbd_ad_r ) } m_kbd.matrix[offset & 03] = data; if (!space.debugger_access()) { - LOG((LOG_KBD,2," read KBDAD+%o (%#o)\n", offset & 3, data)); + LOG((this,LOG_KBD,2," read KBDAD+%o (%#o)\n", offset & 3, data)); } if (0 == (offset & 3) && (m_kbd.bootkey != 0177777)) { if (!space.debugger_access()) { - LOG((0,2," boot keys (%#o & %#o)\n", data, m_kbd.bootkey)); + LOG((this,0,2," boot keys (%#o & %#o)\n", data, m_kbd.bootkey)); } data &= m_kbd.bootkey; m_kbd.bootkey = 0177777; diff --git a/src/devices/cpu/alto2/a2ksec.c b/src/devices/cpu/alto2/a2ksec.c index b6ca5359dc6..fe8990b9707 100644 --- a/src/devices/cpu/alto2/a2ksec.c +++ b/src/devices/cpu/alto2/a2ksec.c @@ -10,7 +10,7 @@ //! f1_ksec_block early: block the disk sector task void alto2_cpu_device::f1_early_ksec_block() { - LOG((LOG_KSEC,2," BLOCK %s\n", task_name(m_task))); + LOG((this,LOG_KSEC,2," BLOCK %s\n", task_name(m_task))); disk_block(m_task); } diff --git a/src/devices/cpu/alto2/a2kwd.c b/src/devices/cpu/alto2/a2kwd.c index 1eb060258a8..5ed7a75dfd3 100644 --- a/src/devices/cpu/alto2/a2kwd.c +++ b/src/devices/cpu/alto2/a2kwd.c @@ -10,7 +10,7 @@ //! f1_kwd_block early: block the disk word task void alto2_cpu_device::f1_early_kwd_block() { - LOG((LOG_KWD,2," BLOCK %s\n", task_name(m_task))); + LOG((this,LOG_KWD,2," BLOCK %s\n", task_name(m_task))); disk_block(m_task); } diff --git a/src/devices/cpu/alto2/a2mem.c b/src/devices/cpu/alto2/a2mem.c index b84653ebdd9..84b41e784d8 100644 --- a/src/devices/cpu/alto2/a2mem.c +++ b/src/devices/cpu/alto2/a2mem.c @@ -446,20 +446,20 @@ UINT32 alto2_cpu_device::hamming_code(int write, UINT32 dw_addr, UINT32 dw_data) PUT_MESR_BANK(m_mem.mesr, (dw_addr >> 15)); /* latch memory address register */ m_mem.mear = m_mem.mar & 0177777; - LOG((LOG_MEM,5," memory error at dword addr:%07o data:%011o check:%03o\n", dw_addr * 2, dw_data, hpb)); - LOG((LOG_MEM,6," MEAR: %06o\n", m_mem.mear)); - LOG((LOG_MEM,6," MESR: %06o\n", m_mem.mesr ^ 0177777)); - LOG((LOG_MEM,7," Hamming code read : %#o\n", GET_MESR_HAMMING(m_mem.mesr))); - LOG((LOG_MEM,7," Parity error : %o\n", GET_MESR_PERR(m_mem.mesr))); - LOG((LOG_MEM,7," Memory parity bit : %o\n", GET_MESR_PARITY(m_mem.mesr))); - LOG((LOG_MEM,7," Hamming syndrome : %#o (bit #%d)\n", GET_MESR_SYNDROME(m_mem.mesr), hamming_lut[GET_MESR_SYNDROME(m_mem.mesr)])); - LOG((LOG_MEM,7," Memory bank : %#o\n", GET_MESR_BANK(m_mem.mesr))); - LOG((LOG_MEM,6," MECR: %06o\n", m_mem.mecr ^ 0177777)); - LOG((LOG_MEM,7," Test Hamming code : %#o\n", GET_MECR_TEST_CODE(m_mem.mecr))); - LOG((LOG_MEM,7," Test mode : %s\n", GET_MECR_TEST_MODE(m_mem.mecr) ? "on" : "off")); - LOG((LOG_MEM,7," INT on single-bit err: %s\n", GET_MECR_INT_SBERR(m_mem.mecr) ? "on" : "off")); - LOG((LOG_MEM,7," INT on double-bit err: %s\n", GET_MECR_INT_DBERR(m_mem.mecr) ? "on" : "off")); - LOG((LOG_MEM,7," Error correction : %s\n", GET_MECR_ERRCORR(m_mem.mecr) ? "off" : "on")); + LOG((this,LOG_MEM,5," memory error at dword addr:%07o data:%011o check:%03o\n", dw_addr * 2, dw_data, hpb)); + LOG((this,LOG_MEM,6," MEAR: %06o\n", m_mem.mear)); + LOG((this,LOG_MEM,6," MESR: %06o\n", m_mem.mesr ^ 0177777)); + LOG((this,LOG_MEM,7," Hamming code read : %#o\n", GET_MESR_HAMMING(m_mem.mesr))); + LOG((this,LOG_MEM,7," Parity error : %o\n", GET_MESR_PERR(m_mem.mesr))); + LOG((this,LOG_MEM,7," Memory parity bit : %o\n", GET_MESR_PARITY(m_mem.mesr))); + LOG((this,LOG_MEM,7," Hamming syndrome : %#o (bit #%d)\n", GET_MESR_SYNDROME(m_mem.mesr), hamming_lut[GET_MESR_SYNDROME(m_mem.mesr)])); + LOG((this,LOG_MEM,7," Memory bank : %#o\n", GET_MESR_BANK(m_mem.mesr))); + LOG((this,LOG_MEM,6," MECR: %06o\n", m_mem.mecr ^ 0177777)); + LOG((this,LOG_MEM,7," Test Hamming code : %#o\n", GET_MECR_TEST_CODE(m_mem.mecr))); + LOG((this,LOG_MEM,7," Test mode : %s\n", GET_MECR_TEST_MODE(m_mem.mecr) ? "on" : "off")); + LOG((this,LOG_MEM,7," INT on single-bit err: %s\n", GET_MECR_INT_SBERR(m_mem.mecr) ? "on" : "off")); + LOG((this,LOG_MEM,7," INT on double-bit err: %s\n", GET_MECR_INT_DBERR(m_mem.mecr) ? "on" : "off")); + LOG((this,LOG_MEM,7," Error correction : %s\n", GET_MECR_ERRCORR(m_mem.mecr) ? "off" : "on")); } if (-1 == hamming_lut[syndrome]) { /* double-bit error: wake task_part, if we're told so */ @@ -471,7 +471,7 @@ UINT32 alto2_cpu_device::hamming_code(int write, UINT32 dw_addr, UINT32 dw_data) m_task_wakeup |= 1 << task_part; /* should we correct the single bit error ? */ if (0 == GET_MECR_ERRCORR(m_mem.mecr)) { - LOG((LOG_MEM,0," correct bit #%d addr:%07o data:%011o check:%03o\n", hamming_lut[syndrome], dw_addr * 2, dw_data, hpb)); + LOG((this,LOG_MEM,0," correct bit #%d addr:%07o data:%011o check:%03o\n", hamming_lut[syndrome], dw_addr * 2, dw_data, hpb)); dw_data ^= 1ul << hamming_lut[syndrome]; } } @@ -493,7 +493,7 @@ READ16_MEMBER( alto2_cpu_device::mear_r ) { int data = m_mem.error ? m_mem.mear : m_mem.mar; if (!space.debugger_access()) { - LOG((LOG_MEM,2," MEAR read %07o\n", data)); + LOG((this,LOG_MEM,2," MEAR read %07o\n", data)); } return data; } @@ -518,16 +518,16 @@ READ16_MEMBER( alto2_cpu_device::mesr_r ) { UINT16 data = m_mem.mesr ^ 0177777; if (!space.debugger_access()) { - LOG((LOG_MEM,2," MESR read %07o\n", data)); - LOG((LOG_MEM,6," Hamming code read : %#o\n", GET_MESR_HAMMING(data))); - LOG((LOG_MEM,6," Parity error : %o\n", GET_MESR_PERR(data))); - LOG((LOG_MEM,6," Memory parity bit : %o\n", GET_MESR_PARITY(data))); + LOG((this,LOG_MEM,2," MESR read %07o\n", data)); + LOG((this,LOG_MEM,6," Hamming code read : %#o\n", GET_MESR_HAMMING(data))); + LOG((this,LOG_MEM,6," Parity error : %o\n", GET_MESR_PERR(data))); + LOG((this,LOG_MEM,6," Memory parity bit : %o\n", GET_MESR_PARITY(data))); #if USE_HAMMING_CHECK - LOG((LOG_MEM,6," Hamming syndrome : %#o (bit #%d)\n", GET_MESR_SYNDROME(data), hamming_lut[GET_MESR_SYNDROME(data)])); + LOG((this,LOG_MEM,6," Hamming syndrome : %#o (bit #%d)\n", GET_MESR_SYNDROME(data), hamming_lut[GET_MESR_SYNDROME(data)])); #else - LOG((LOG_MEM,6," Hamming syndrome : %#o\n", GET_MESR_SYNDROME(data))); + LOG((this,LOG_MEM,6," Hamming syndrome : %#o\n", GET_MESR_SYNDROME(data))); #endif - LOG((LOG_MEM,6," Memory bank : %#o\n", GET_MESR_BANK(data))); + LOG((this,LOG_MEM,6," Memory bank : %#o\n", GET_MESR_BANK(data))); } return data; } @@ -535,7 +535,7 @@ READ16_MEMBER( alto2_cpu_device::mesr_r ) WRITE16_MEMBER( alto2_cpu_device::mesr_w ) { if (!space.debugger_access()) { - LOG((LOG_MEM,2," MESR write %07o (clear MESR; was %07o)\n", data, m_mem.mesr)); + LOG((this,LOG_MEM,2," MESR write %07o (clear MESR; was %07o)\n", data, m_mem.mesr)); } m_mem.mesr = 0; // set all bits to 0 m_mem.error = 0; // reset the error flag @@ -569,12 +569,12 @@ WRITE16_MEMBER( alto2_cpu_device::mecr_w ) X_WRBITS(m_mem.mecr,16, 0, 3,0); X_WRBITS(m_mem.mecr,16,15,15,0); if (!space.debugger_access()) { - LOG((LOG_MEM,2," MECR write %07o\n", data)); - LOG((LOG_MEM,6," Test Hamming code : %#o\n", GET_MECR_TEST_CODE(m_mem.mecr))); - LOG((LOG_MEM,6," Test mode : %s\n", GET_MECR_TEST_MODE(m_mem.mecr) ? "on" : "off")); - LOG((LOG_MEM,6," INT on single-bit err: %s\n", GET_MECR_INT_SBERR(m_mem.mecr) ? "on" : "off")); - LOG((LOG_MEM,6," INT on double-bit err: %s\n", GET_MECR_INT_DBERR(m_mem.mecr) ? "on" : "off")); - LOG((LOG_MEM,6," Error correction : %s\n", GET_MECR_ERRCORR(m_mem.mecr) ? "off" : "on")); + LOG((this,LOG_MEM,2," MECR write %07o\n", data)); + LOG((this,LOG_MEM,6," Test Hamming code : %#o\n", GET_MECR_TEST_CODE(m_mem.mecr))); + LOG((this,LOG_MEM,6," Test mode : %s\n", GET_MECR_TEST_MODE(m_mem.mecr) ? "on" : "off")); + LOG((this,LOG_MEM,6," INT on single-bit err: %s\n", GET_MECR_INT_SBERR(m_mem.mecr) ? "on" : "off")); + LOG((this,LOG_MEM,6," INT on double-bit err: %s\n", GET_MECR_INT_DBERR(m_mem.mecr) ? "on" : "off")); + LOG((this,LOG_MEM,6," Error correction : %s\n", GET_MECR_ERRCORR(m_mem.mecr) ? "off" : "on")); } } @@ -586,12 +586,12 @@ READ16_MEMBER( alto2_cpu_device::mecr_r ) UINT16 data = m_mem.mecr ^ 0177777; /* set all spare bits */ if (!space.debugger_access()) { - LOG((LOG_MEM,2," MECR read %07o\n", data)); - LOG((LOG_MEM,6," Test Hamming code : %#o\n", GET_MECR_TEST_CODE(data))); - LOG((LOG_MEM,6," Test mode : %s\n", GET_MECR_TEST_MODE(data) ? "on" : "off")); - LOG((LOG_MEM,6," INT on single-bit err: %s\n", GET_MECR_INT_SBERR(data) ? "on" : "off")); - LOG((LOG_MEM,6," INT on double-bit err: %s\n", GET_MECR_INT_DBERR(data) ? "on" : "off")); - LOG((LOG_MEM,6," Error correction : %s\n", GET_MECR_ERRCORR(data) ? "off" : "on")); + LOG((this,LOG_MEM,2," MECR read %07o\n", data)); + LOG((this,LOG_MEM,6," Test Hamming code : %#o\n", GET_MECR_TEST_CODE(data))); + LOG((this,LOG_MEM,6," Test mode : %s\n", GET_MECR_TEST_MODE(data) ? "on" : "off")); + LOG((this,LOG_MEM,6," INT on single-bit err: %s\n", GET_MECR_INT_SBERR(data) ? "on" : "off")); + LOG((this,LOG_MEM,6," INT on double-bit err: %s\n", GET_MECR_INT_DBERR(data) ? "on" : "off")); + LOG((this,LOG_MEM,6," Error correction : %s\n", GET_MECR_ERRCORR(data) ? "off" : "on")); } return data; } @@ -626,7 +626,7 @@ void alto2_cpu_device::load_mar(UINT8 rsel, UINT32 addr) * starting a memory refresh cycle * currently we don't do anything special */ - LOG((LOG_MEM,5, " MAR<-; refresh cycle @ %#o\n", addr)); + LOG((this,LOG_MEM,5, " MAR<-; refresh cycle @ %#o\n", addr)); m_mem.mar = addr; m_mem.access = ALTO2_MEM_REFRESH; m_mem.cycle = cycle(); @@ -635,7 +635,7 @@ void alto2_cpu_device::load_mar(UINT8 rsel, UINT32 addr) m_mem.mar = addr; if (addr < m_mem.size) { - LOG((LOG_MEM,2, " MAR<-; mar = %#o\n", addr)); + LOG((this,LOG_MEM,2, " MAR<-; mar = %#o\n", addr)); m_mem.access = ALTO2_MEM_RAM; // fetch the memory double-word to the read/write latches m_mem.rmdd = m_mem.wmdd = m_mem.ram[m_mem.mar/2]; @@ -657,12 +657,12 @@ UINT16 alto2_cpu_device::read_mem() UINT32 base_addr; if (ALTO2_MEM_NONE == m_mem.access) { - LOG((LOG_MEM,0," fatal: mem read with no preceding address\n")); + LOG((this,LOG_MEM,0," fatal: mem read with no preceding address\n")); return 0177777; } if (cycle() > m_mem.cycle + 4) { - LOG((LOG_MEM,0," fatal: mem read (MAR %#o) too late (+%lld cyc)\n", m_mem.mar, cycle() - m_mem.cycle)); + LOG((this,LOG_MEM,0," fatal: mem read (MAR %#o) too late (+%lld cyc)\n", m_mem.mar, cycle() - m_mem.cycle)); m_mem.access = ALTO2_MEM_NONE; return 0177777; } @@ -670,7 +670,7 @@ UINT16 alto2_cpu_device::read_mem() base_addr = m_mem.mar & 0177777; if (base_addr >= ALTO2_IO_PAGE_BASE && m_mem.mar < ALTO2_RAM_SIZE) { m_mem.md = m_iomem->read_word(m_iomem->address_to_byte(base_addr)); - LOG((LOG_MEM,6," MD = MMIO[%#o] (%#o)\n", base_addr, m_mem.md)); + LOG((this,LOG_MEM,6," MD = MMIO[%#o] (%#o)\n", base_addr, m_mem.md)); m_mem.access = ALTO2_MEM_NONE; #if ALTO2_DEBUG watch_read(m_mem.mar, m_mem.md); @@ -684,7 +684,7 @@ UINT16 alto2_cpu_device::read_mem() m_mem.rmdd = hamming_code(0, m_mem.mar/2, m_mem.rmdd); #endif m_mem.md = (m_mem.mar & ALTO2_MEM_ODD) ? GET_ODD(m_mem.rmdd) : GET_EVEN(m_mem.rmdd); - LOG((LOG_MEM,6," MD = RAM[%#o] (%#o)\n", m_mem.mar, m_mem.md)); + LOG((this,LOG_MEM,6," MD = RAM[%#o] (%#o)\n", m_mem.mar, m_mem.md)); #if ALTO2_DEBUG watch_read(m_mem.mar, m_mem.md); @@ -714,12 +714,12 @@ void alto2_cpu_device::write_mem(UINT16 data) m_mem.md = data & 0177777; if (ALTO2_MEM_NONE == m_mem.access) { - LOG((LOG_MEM,0," fatal: mem write with no preceding address\n")); + LOG((this,LOG_MEM,0," fatal: mem write with no preceding address\n")); return; } if (cycle() > m_mem.cycle + 4) { - LOG((LOG_MEM,0," fatal: mem write (MAR %#o, data %#o) too late (+%lld cyc)\n", m_mem.mar, data, cycle() - m_mem.cycle)); + LOG((this,LOG_MEM,0," fatal: mem write (MAR %#o, data %#o) too late (+%lld cyc)\n", m_mem.mar, data, cycle() - m_mem.cycle)); m_mem.access = ALTO2_MEM_NONE; return; } @@ -727,7 +727,7 @@ void alto2_cpu_device::write_mem(UINT16 data) base_addr = m_mem.mar & 0177777; if (base_addr >= ALTO2_IO_PAGE_BASE && m_mem.mar < ALTO2_RAM_SIZE) { m_iomem->write_word(m_iomem->address_to_byte(base_addr), m_mem.md); - LOG((LOG_MEM,6, " MMIO[%#o] = MD (%#o)\n", base_addr, m_mem.md)); + LOG((this,LOG_MEM,6, " MMIO[%#o] = MD (%#o)\n", base_addr, m_mem.md)); m_mem.access = ALTO2_MEM_NONE; #if ALTO2_DEBUG watch_write(m_mem.mar, m_mem.md); @@ -735,7 +735,7 @@ void alto2_cpu_device::write_mem(UINT16 data) return; } - LOG((LOG_MEM,6, " RAM[%#o] = MD (%#o)\n", m_mem.mar, m_mem.md)); + LOG((this,LOG_MEM,6, " RAM[%#o] = MD (%#o)\n", m_mem.mar, m_mem.md)); if (m_mem.mar & ALTO2_MEM_ODD) PUT_ODD(m_mem.wmdd, m_mem.md); else diff --git a/src/devices/cpu/alto2/a2mrt.c b/src/devices/cpu/alto2/a2mrt.c index c57cd85728f..921eb35ad69 100644 --- a/src/devices/cpu/alto2/a2mrt.c +++ b/src/devices/cpu/alto2/a2mrt.c @@ -12,7 +12,7 @@ void alto2_cpu_device::f1_early_mrt_block() { /* clear the wakeup for the memory refresh task */ m_task_wakeup &= ~(1 << m_task); - LOG((LOG_MRT,2," BLOCK %s\n", task_name(m_task))); + LOG((this,LOG_MRT,2," BLOCK %s\n", task_name(m_task))); } //! called by the CPU when MRT becomes active diff --git a/src/devices/cpu/alto2/a2ram.c b/src/devices/cpu/alto2/a2ram.c index 92986996270..0f133c2dfd6 100644 --- a/src/devices/cpu/alto2/a2ram.c +++ b/src/devices/cpu/alto2/a2ram.c @@ -80,25 +80,25 @@ void alto2_cpu_device::rdram() if (GET_CRAM_RAMROM(m_cram_addr)) { /* read CROM 0 at current mpc */ addr = m_mpc & ALTO2_UCODE_PAGE_MASK; - LOG((LOG_CPU,0," rdram: ROM [%05o] ", addr)); + LOG((this,LOG_CPU,0," rdram: ROM [%05o] ", addr)); } else { /* read CRAM[bank] */ addr = bank * ALTO2_UCODE_PAGE_SIZE + wordaddr; - LOG((LOG_CPU,0," rdram: RAM%d [%04o] ", bank, wordaddr)); + LOG((this,LOG_CPU,0," rdram: RAM%d [%04o] ", bank, wordaddr)); } m_rdram_flag = false; if (ALTO2_UCODE_RAM_BASE + addr >= ALTO2_UCODE_SIZE) { value = 0177777; /* ??? */ - LOG((LOG_CPU,0,"invalid address (%06o)\n", addr)); + LOG((this,LOG_CPU,0,"invalid address (%06o)\n", addr)); return; } value = RD_CRAM(addr) ^ ALTO2_UCODE_INVERTED; if (GET_CRAM_HALFSEL(m_cram_addr)) { value = value >> 16; - LOG((LOG_CPU,0,"upper:%06o\n", value & 0177777)); + LOG((this,LOG_CPU,0,"upper:%06o\n", value & 0177777)); } else { - LOG((LOG_CPU,0,"lower:%06o\n", value & 0177777)); + LOG((this,LOG_CPU,0,"lower:%06o\n", value & 0177777)); } m_bus &= value; } @@ -120,7 +120,7 @@ void alto2_cpu_device::wrtram() UINT32 value = ((m_m << 16) | m_alu) ^ ALTO2_UCODE_INVERTED; UINT32 addr = bank * ALTO2_UCODE_PAGE_SIZE + wordaddr; // write RAM 0,1,2 - LOG((LOG_CPU,0," wrtram: RAM%d [%04o] upper:%06o lower:%06o", bank, wordaddr, m_m, m_alu)); + LOG((this,LOG_CPU,0," wrtram: RAM%d [%04o] upper:%06o lower:%06o", bank, wordaddr, m_m, m_alu)); #if DEBUG_WRTRAM char buff[128]; @@ -136,10 +136,10 @@ void alto2_cpu_device::wrtram() m_wrtram_flag = false; if (ALTO2_UCODE_RAM_BASE + addr >= ALTO2_UCODE_SIZE) { - LOG((LOG_CPU,0," invalid address %06o\n", addr)); + LOG((this,LOG_CPU,0," invalid address %06o\n", addr)); return; } - LOG((LOG_CPU,0,"\n")); + LOG((this,LOG_CPU,0,"\n")); WR_CRAM(addr, value); } @@ -156,10 +156,10 @@ void alto2_cpu_device::bs_early_read_sreg() if (m_d_rsel) { UINT8 bank = m_s_reg_bank[m_task]; r = m_s[bank][m_d_rsel]; - LOG((LOG_RAM,2," <-S%02o; bus &= S[%o][%02o] (%#o)\n", m_d_rsel, bank, m_d_rsel, r)); + LOG((this,LOG_RAM,2," <-S%02o; bus &= S[%o][%02o] (%#o)\n", m_d_rsel, bank, m_d_rsel, r)); } else { r = m_m; - LOG((LOG_RAM,2," <-S%02o; bus &= M (%#o)\n", m_d_rsel, r)); + LOG((this,LOG_RAM,2," <-S%02o; bus &= M (%#o)\n", m_d_rsel, r)); } m_bus &= r; } @@ -170,7 +170,7 @@ void alto2_cpu_device::bs_early_read_sreg() void alto2_cpu_device::bs_early_load_sreg() { int r = 0; /* ??? */ - LOG((LOG_RAM,2," S%02o<- BUS &= garbage (%#o)\n", m_d_rsel, r)); + LOG((this,LOG_RAM,2," S%02o<- BUS &= garbage (%#o)\n", m_d_rsel, r)); m_bus &= r; } @@ -181,7 +181,7 @@ void alto2_cpu_device::bs_late_load_sreg() { UINT8 bank = m_s_reg_bank[m_task]; m_s[bank][m_d_rsel] = m_m; - LOG((LOG_RAM,2," S%02o<- S[%o][%02o] := %#o\n", m_d_rsel, bank, m_d_rsel, m_m)); + LOG((this,LOG_RAM,2," S%02o<- S[%o][%02o] := %#o\n", m_d_rsel, bank, m_d_rsel, m_m)); } /** @@ -191,7 +191,7 @@ void alto2_cpu_device::branch_ROM(const char *from, int page) { (void)from; m_next2 = (m_next2 & ALTO2_UCODE_PAGE_MASK) + page * ALTO2_UCODE_PAGE_SIZE; - LOG((LOG_RAM,2," SWMODE: branch from %s to ROM%d (%#o)\n", from, page, m_next2)); + LOG((this,LOG_RAM,2," SWMODE: branch from %s to ROM%d (%#o)\n", from, page, m_next2)); } /** @@ -201,7 +201,7 @@ void alto2_cpu_device::branch_RAM(const char *from, int page) { (void)from; m_next2 = (m_next2 & ALTO2_UCODE_PAGE_MASK) + ALTO2_UCODE_RAM_BASE + page * ALTO2_UCODE_PAGE_SIZE; - LOG((LOG_RAM,2," SWMODE: branch from %s to RAM%d\n", from, page, m_next2)); + LOG((this,LOG_RAM,2," SWMODE: branch from %s to RAM%d\n", from, page, m_next2)); } /** @@ -367,7 +367,7 @@ void alto2_cpu_device::f1_late_swmode() void alto2_cpu_device::f1_late_wrtram() { m_wrtram_flag = true; - LOG((LOG_RAM,2," WRTRAM\n")); + LOG((this,LOG_RAM,2," WRTRAM\n")); } /** @@ -376,7 +376,7 @@ void alto2_cpu_device::f1_late_wrtram() void alto2_cpu_device::f1_late_rdram() { m_rdram_flag = true; - LOG((LOG_RAM,2," RDRAM\n")); + LOG((this,LOG_RAM,2," RDRAM\n")); } #if (ALTO2_UCODE_RAM_PAGES == 3) @@ -390,7 +390,7 @@ void alto2_cpu_device::f1_late_rdram() */ void alto2_cpu_device::f1_late_load_rmr() { - LOG((LOG_RAM,2," RMR<-; BUS (%#o)\n", m_bus)); + LOG((this,LOG_RAM,2," RMR<-; BUS (%#o)\n", m_bus)); m_reset_mode = m_bus; } #else // ALTO2_UCODE_RAM_PAGES != 3 @@ -400,7 +400,7 @@ void alto2_cpu_device::f1_late_load_rmr() void alto2_cpu_device::f1_late_load_srb() { m_s_reg_bank[m_task] = X_RDBITS(m_bus,16,12,14) % ALTO2_SREG_BANKS; - LOG((LOG_RAM,2," SRB<-; srb[%d] := %#o\n", m_task, m_s_reg_bank[m_task])); + LOG((this,LOG_RAM,2," SRB<-; srb[%d] := %#o\n", m_task, m_s_reg_bank[m_task])); } #endif diff --git a/src/devices/cpu/alto2/alto2cpu.c b/src/devices/cpu/alto2/alto2cpu.c index 9c62096b5dd..1e02302e2b4 100644 --- a/src/devices/cpu/alto2/alto2cpu.c +++ b/src/devices/cpu/alto2/alto2cpu.c @@ -24,7 +24,7 @@ int g_log_types = LOG_DISK | LOG_ETH; int g_log_level = 8; bool g_log_newline = true; -void logprintf(int type, int level, const char* format, ...) +void logprintf(device_t *device, int type, int level, const char* format, ...) { static const char* type_name[] = { "[CPU]", @@ -61,11 +61,11 @@ void logprintf(int type, int level, const char* format, ...) // last line had a \n - print type name for (int i = 0; i < sizeof(type_name)/sizeof(type_name[0]); i++) if (type & (1 << i)) - logerror("%-7s ", type_name[i]); + device->logerror("%-7s ", type_name[i]); } va_list ap; va_start(ap, format); - vlogerror(format, ap); + device->vlogerror(format, ap); va_end(ap); g_log_newline = format[strlen(format) - 1] == '\n'; } @@ -1271,12 +1271,12 @@ const char* alto2_cpu_device::f2_name(UINT8 f2) #if ALTO2_DEBUG void alto2_cpu_device::watch_read(UINT32 addr, UINT32 data) { - LOG((LOG_MEM,0,"mem: rd[%06o] = %06o\n", addr, data)); + LOG((this,LOG_MEM,0,"mem: rd[%06o] = %06o\n", addr, data)); } void alto2_cpu_device::watch_write(UINT32 addr, UINT32 data) { - LOG((LOG_MEM,0,"mem: wr[%06o] = %06o\n", addr, data)); + LOG((this,LOG_MEM,0,"mem: wr[%06o] = %06o\n", addr, data)); } #endif @@ -1389,7 +1389,7 @@ static const char* memory_range_name(offs_t offset) */ READ16_MEMBER( alto2_cpu_device::noop_r ) { - LOG((LOG_CPU,0," MMIO rd %s\n", memory_range_name(offset))); + LOG((this,LOG_CPU,0," MMIO rd %s\n", memory_range_name(offset))); return 0177777; } @@ -1398,7 +1398,7 @@ READ16_MEMBER( alto2_cpu_device::noop_r ) */ WRITE16_MEMBER( alto2_cpu_device::noop_w ) { - LOG((LOG_CPU,0," MMIO wr %s\n", memory_range_name(offset))); + LOG((this,LOG_CPU,0," MMIO wr %s\n", memory_range_name(offset))); } /** @@ -1422,7 +1422,7 @@ WRITE16_MEMBER( alto2_cpu_device::bank_reg_w ) { int task = offset & 017; m_bank_reg[task] = data & 017; - LOG((LOG_CPU,0," write bank[%02o]=%#o normal:%o extended:%o (%s)\n", + LOG((this,LOG_CPU,0," write bank[%02o]=%#o normal:%o extended:%o (%s)\n", task, data, GET_BANK_NORMAL(data), GET_BANK_EXTENDED(data), @@ -1435,7 +1435,7 @@ WRITE16_MEMBER( alto2_cpu_device::bank_reg_w ) void alto2_cpu_device::bs_early_read_r() { UINT16 r = m_r[m_rsel]; - LOG((LOG_CPU,2," <-R%02o; %s (%#o)\n", m_rsel, r_name(m_rsel), r)); + LOG((this,LOG_CPU,2," <-R%02o; %s (%#o)\n", m_rsel, r_name(m_rsel), r)); m_bus &= r; } @@ -1445,7 +1445,7 @@ void alto2_cpu_device::bs_early_read_r() void alto2_cpu_device::bs_early_load_r() { UINT16 r = 0; - LOG((LOG_CPU,2," R%02o<-; %s (BUS&=0)\n", m_rsel, r_name(m_rsel))); + LOG((this,LOG_CPU,2," R%02o<-; %s (BUS&=0)\n", m_rsel, r_name(m_rsel))); m_bus &= r; } @@ -1456,7 +1456,7 @@ void alto2_cpu_device::bs_late_load_r() { if (m_d_f2 != f2_emu_load_dns) { m_r[m_rsel] = m_shifter; - LOG((LOG_CPU,2," R%02o<-; %s = SHIFTER (%#o)\n", m_rsel, r_name(m_rsel), m_shifter)); + LOG((this,LOG_CPU,2," R%02o<-; %s = SHIFTER (%#o)\n", m_rsel, r_name(m_rsel), m_shifter)); #if 0 /* HACK: programs writing r37 with xxx3 make the cursor * display go nuts. Until I found the real reason for this @@ -1480,7 +1480,7 @@ void alto2_cpu_device::bs_early_read_md() UINT32 mar = m_mem.mar; #endif UINT16 md = read_mem(); - LOG((LOG_CPU,2," <-MD; BUS&=MD (%#o=[%#o])\n", md, mar)); + LOG((this,LOG_CPU,2," <-MD; BUS&=MD (%#o=[%#o])\n", md, mar)); m_bus &= md; } @@ -1490,7 +1490,7 @@ void alto2_cpu_device::bs_early_read_md() void alto2_cpu_device::bs_early_mouse() { UINT16 r = mouse_read(); - LOG((LOG_CPU,2," <-MOUSE; BUS&=MOUSE (%#o)\n", r)); + LOG((this,LOG_CPU,2," <-MOUSE; BUS&=MOUSE (%#o)\n", r)); m_bus &= r; } @@ -1500,8 +1500,8 @@ void alto2_cpu_device::bs_early_mouse() void alto2_cpu_device::bs_early_disp() { UINT16 r = 0177777; - LOG((LOG_CPU,0,"BS <-DISP not handled by task %s mpc:%04x\n", task_name(m_task), m_mpc)); - LOG((LOG_CPU,2," <-DISP; BUS&=DISP ?? (%#o)\n", r)); + LOG((this,LOG_CPU,0,"BS <-DISP not handled by task %s mpc:%04x\n", task_name(m_task), m_mpc)); + LOG((this,LOG_CPU,2," <-DISP; BUS&=DISP ?? (%#o)\n", r)); m_bus &= r; } @@ -1517,7 +1517,7 @@ void alto2_cpu_device::f1_late_load_mar() UINT32 msb; if (m_d_f2 == f2_load_md) { msb = GET_BANK_EXTENDED(bank) << 16; - LOG((LOG_CPU,7, " XMAR %#o\n", msb | m_alu)); + LOG((this,LOG_CPU,7, " XMAR %#o\n", msb | m_alu)); } else { msb = GET_BANK_NORMAL(bank) << 16; @@ -1593,60 +1593,60 @@ static __inline f9318_out_t f9318(f9318_in_t in) if (in & PRIO_IN_EI) { out = PRIO_OUT_EO | PRIO_OUT_GS | PRIO_OUT_QZ; - LOG((LOG_CPU,2," f9318 case (a) in:%#o out:%#o\n", in, out)); + LOG((this,LOG_CPU,2," f9318 case (a) in:%#o out:%#o\n", in, out)); return out; } if (0 == (in & PRIO_I7)) { out = PRIO_OUT_EO; - LOG((LOG_CPU,2," f9318 case (c) in:%#o out:%#o\n", in, out)); + LOG((this,LOG_CPU,2," f9318 case (c) in:%#o out:%#o\n", in, out)); return out; } if (PRIO_I7 == (in & PRIO_I6_I7)) { out = PRIO_OUT_EO | PRIO_OUT_Q0; - LOG((LOG_CPU,2," f9318 case (d) in:%#o out:%#o\n", in, out)); + LOG((this,LOG_CPU,2," f9318 case (d) in:%#o out:%#o\n", in, out)); return out; } if (PRIO_I6_I7 == (in & PRIO_I5_I7)) { out = PRIO_OUT_EO | PRIO_OUT_Q1; - LOG((LOG_CPU,2," f9318 case (e) in:%#o out:%#o\n", in, out)); + LOG((this,LOG_CPU,2," f9318 case (e) in:%#o out:%#o\n", in, out)); return out; } if (PRIO_I5_I7 == (in & PRIO_I4_I7)) { out = PRIO_OUT_EO | PRIO_OUT_Q0 | PRIO_OUT_Q1; - LOG((LOG_CPU,2," f9318 case (f) in:%#o out:%#o\n", in, out)); + LOG((this,LOG_CPU,2," f9318 case (f) in:%#o out:%#o\n", in, out)); return out; } if (PRIO_I4_I7 == (in & PRIO_I3_I7)) { out = PRIO_OUT_EO | PRIO_OUT_Q2; - LOG((LOG_CPU,2," f9318 case (g) in:%#o out:%#o\n", in, out)); + LOG((this,LOG_CPU,2," f9318 case (g) in:%#o out:%#o\n", in, out)); return out; } if (PRIO_I3_I7 == (in & PRIO_I2_I7)) { out = PRIO_OUT_EO | PRIO_OUT_Q0 | PRIO_OUT_Q2; - LOG((LOG_CPU,2," f9318 case (h) in:%#o out:%#o\n", in, out)); + LOG((this,LOG_CPU,2," f9318 case (h) in:%#o out:%#o\n", in, out)); return out; } if (PRIO_I2_I7 == (in & PRIO_I1_I7)) { out = PRIO_OUT_EO | PRIO_OUT_Q1 | PRIO_OUT_Q2; - LOG((LOG_CPU,2," f9318 case (i) in:%#o out:%#o\n", in, out)); + LOG((this,LOG_CPU,2," f9318 case (i) in:%#o out:%#o\n", in, out)); return out; } if (PRIO_I1_I7 == (in & PRIO_I0_I7)) { out = PRIO_OUT_EO | PRIO_OUT_Q0 | PRIO_OUT_Q1 | PRIO_OUT_Q2; - LOG((LOG_CPU,2," f9318 case (j) in:%#o out:%#o\n", in, out)); + LOG((this,LOG_CPU,2," f9318 case (j) in:%#o out:%#o\n", in, out)); return out; } out = PRIO_OUT_QZ | PRIO_OUT_GS; - LOG((LOG_CPU,2," f9318 case (b) in:%#o out:%#o\n", in, out)); + LOG((this,LOG_CPU,2," f9318 case (b) in:%#o out:%#o\n", in, out)); return out; } #endif @@ -1734,11 +1734,11 @@ void alto2_cpu_device::f1_early_task() register int ct1, ct2, ct4, ct8; register int wakeup, ct; - LOG((LOG_CPU,2, " TASK %02o:%s\n", m_task, task_name(m_task))); + LOG((this,LOG_CPU,2, " TASK %02o:%s\n", m_task, task_name(m_task))); if (m_task > task_emu && (m_task_wakeup & (1 << m_task))) addr = m_task; - LOG((LOG_CPU,2," ctl2k_u38[%02o] = %04o\n", addr, ctl2k_u38[addr] & 017)); + LOG((this,LOG_CPU,2," ctl2k_u38[%02o] = %04o\n", addr, ctl2k_u38[addr] & 017)); rdct1 = (ctl2k_u38[addr] >> U38_RDCT1) & 1; rdct2 = (ctl2k_u38[addr] >> U38_RDCT2) & 1; @@ -1766,38 +1766,38 @@ void alto2_cpu_device::f1_early_task() /* CT1 = (U1.Q0' & U2.Q0' & RDCT1')' */ ct1 = !((u1 & PRIO_OUT_Q0) && (u2 & PRIO_OUT_Q0) && rdct1); - LOG((LOG_CPU,2," CT1:%o U1.Q0':%o U2.Q0':%o RDCT1':%o\n", + LOG((this,LOG_CPU,2," CT1:%o U1.Q0':%o U2.Q0':%o RDCT1':%o\n", ct1, (u1 & PRIO_OUT_Q0)?1:0, (u2 & PRIO_OUT_Q0)?1:0, rdct1)); /* CT2 = (U1.Q1' & U2.Q1' & RDCT2')' */ ct2 = !((u1 & PRIO_OUT_Q1) && (u2 & PRIO_OUT_Q1) && rdct2); - LOG((LOG_CPU,2," CT2:%o U1.Q1':%o U2.Q1':%o RDCT2':%o\n", + LOG((this,LOG_CPU,2," CT2:%o U1.Q1':%o U2.Q1':%o RDCT2':%o\n", ct2, (u1 & PRIO_OUT_Q1)?1:0, (u2 & PRIO_OUT_Q1)?1:0, rdct2)); /* CT4 = (U1.Q2' & U2.Q2' & RDCT4')' */ ct4 = !((u1 & PRIO_OUT_Q2) && (u2 & PRIO_OUT_Q2) && rdct4); - LOG((LOG_CPU,2," CT4:%o U1.Q2':%o U2.Q2':%o RDCT4':%o\n", + LOG((this,LOG_CPU,2," CT4:%o U1.Q2':%o U2.Q2':%o RDCT4':%o\n", ct4, (u1 & PRIO_OUT_Q2)?1:0, (u2 & PRIO_OUT_Q2)?1:0, rdct4)); /* CT8 */ ct8 = !((u1 & PRIO_OUT_GS) && rdct8); - LOG((LOG_CPU,2," CT8:%o U1.GS':%o RDCT8':%o\n", + LOG((this,LOG_CPU,2," CT8:%o U1.GS':%o RDCT8':%o\n", ct8, (u1 & PRIO_OUT_GS)?1:0, rdct8)); ct = 8*ct8 + 4*ct4 + 2*ct2 + ct1; if (ct != m_next_task) { - LOG((LOG_CPU,2, " switch to %02o\n", ct)); + LOG((this,LOG_CPU,2, " switch to %02o\n", ct)); m_next2_task = ct; } else { - LOG((LOG_CPU,2, " no switch\n")); + LOG((this,LOG_CPU,2, " no switch\n")); } #else /* USE_PRIO_F9318 */ - LOG((LOG_CPU,2, " TASK %02o:%s", m_task, task_name(m_task))); + LOG((this,LOG_CPU,2, " TASK %02o:%s", m_task, task_name(m_task))); for (int i = 15; i >= 0; i--) { if (m_task_wakeup & (1 << i)) { m_next2_task = i; if (m_next2_task != m_next_task) { - LOG((LOG_CPU,2, " switch to %02o:%s\n", m_next2_task, task_name(m_next2_task))); + LOG((this,LOG_CPU,2, " switch to %02o:%s\n", m_next2_task, task_name(m_next2_task))); } else { - LOG((LOG_CPU,2, " no switch\n")); + LOG((this,LOG_CPU,2, " no switch\n")); } return; } @@ -1814,7 +1814,7 @@ void alto2_cpu_device::f1_early_task() void alto2_cpu_device::f1_early_block() { m_task_wakeup &= ~(1 << m_task); - LOG((LOG_CPU,2, " BLOCK %02o:%s\n", m_task, task_name(m_task))); + LOG((this,LOG_CPU,2, " BLOCK %02o:%s\n", m_task, task_name(m_task))); } /** @@ -1823,7 +1823,7 @@ void alto2_cpu_device::f1_early_block() void alto2_cpu_device::f1_late_l_lsh_1() { m_shifter = m_l << 1; - LOG((LOG_CPU,2," SHIFTER <-L LSH 1 (%#o := %#o<<1)\n", m_shifter, m_l)); + LOG((this,LOG_CPU,2," SHIFTER <-L LSH 1 (%#o := %#o<<1)\n", m_shifter, m_l)); } /** @@ -1832,7 +1832,7 @@ void alto2_cpu_device::f1_late_l_lsh_1() void alto2_cpu_device::f1_late_l_rsh_1() { m_shifter = m_l >> 1; - LOG((LOG_CPU,2," SHIFTER <-L RSH 1 (%#o := %#o>>1)\n", m_shifter, m_l)); + LOG((this,LOG_CPU,2," SHIFTER <-L RSH 1 (%#o := %#o>>1)\n", m_shifter, m_l)); } /** @@ -1841,7 +1841,7 @@ void alto2_cpu_device::f1_late_l_rsh_1() void alto2_cpu_device::f1_late_l_lcy_8() { m_shifter = (m_l >> 8) | (m_l << 8); - LOG((LOG_CPU,2," SHIFTER <-L LCY 8 (%#o := bswap %#o)\n", m_shifter, m_l)); + LOG((this,LOG_CPU,2," SHIFTER <-L LCY 8 (%#o := bswap %#o)\n", m_shifter, m_l)); } /** @@ -1850,7 +1850,7 @@ void alto2_cpu_device::f1_late_l_lcy_8() void alto2_cpu_device::f2_late_bus_eq_zero() { UINT16 r = m_bus == 0 ? 1 : 0; - LOG((LOG_CPU,2, " BUS=0; %sbranch (%#o|%#o)\n", r ? "" : "no ", m_next2, r)); + LOG((this,LOG_CPU,2, " BUS=0; %sbranch (%#o|%#o)\n", r ? "" : "no ", m_next2, r)); m_next2 |= r; } @@ -1860,7 +1860,7 @@ void alto2_cpu_device::f2_late_bus_eq_zero() void alto2_cpu_device::f2_late_shifter_lt_zero() { UINT16 r = (m_shifter & 0100000) ? 1 : 0; - LOG((LOG_CPU,2, " SH<0; %sbranch (%#o|%#o)\n", r ? "" : "no ", m_next2, r)); + LOG((this,LOG_CPU,2, " SH<0; %sbranch (%#o|%#o)\n", r ? "" : "no ", m_next2, r)); m_next2 |= r; } @@ -1870,7 +1870,7 @@ void alto2_cpu_device::f2_late_shifter_lt_zero() void alto2_cpu_device::f2_late_shifter_eq_zero() { UINT16 r = m_shifter == 0 ? 1 : 0; - LOG((LOG_CPU,2, " SH=0; %sbranch (%#o|%#o)\n", r ? "" : "no ", m_next2, r)); + LOG((this,LOG_CPU,2, " SH=0; %sbranch (%#o|%#o)\n", r ? "" : "no ", m_next2, r)); m_next2 |= r; } @@ -1880,7 +1880,7 @@ void alto2_cpu_device::f2_late_shifter_eq_zero() void alto2_cpu_device::f2_late_bus() { UINT16 r = X_RDBITS(m_bus,16,6,15); - LOG((LOG_CPU,2, " BUS; %sbranch (%#o|%#o)\n", r ? "" : "no ", m_next2, r)); + LOG((this,LOG_CPU,2, " BUS; %sbranch (%#o|%#o)\n", r ? "" : "no ", m_next2, r)); m_next2 |= r; } @@ -1890,7 +1890,7 @@ void alto2_cpu_device::f2_late_bus() void alto2_cpu_device::f2_late_alucy() { UINT16 r = m_laluc0; - LOG((LOG_CPU,2, " ALUCY; %sbranch (%#o|%#o)\n", r ? "" : "no ", m_next2, r)); + LOG((this,LOG_CPU,2, " ALUCY; %sbranch (%#o|%#o)\n", r ? "" : "no ", m_next2, r)); m_next2 |= r; } @@ -1906,10 +1906,10 @@ void alto2_cpu_device::f2_late_load_md() #endif if (m_d_f1 == f1_load_mar) { /* part of an XMAR */ - LOG((LOG_CPU,2, " XMAR %#o (%#o)\n", mar, m_bus)); + LOG((this,LOG_CPU,2, " XMAR %#o (%#o)\n", mar, m_bus)); } else { write_mem(m_bus); - LOG((LOG_CPU,2, " MD<- BUS ([%#o]=%#o)\n", mar, m_bus)); + LOG((this,LOG_CPU,2, " MD<- BUS ([%#o]=%#o)\n", mar, m_bus)); } } @@ -2320,11 +2320,11 @@ void alto2_cpu_device::execute_run() if (m_d_f1 == f1_load_mar && check_mem_load_mar_stall(m_rsel)) { - LOG((LOG_CPU,3, " MAR<- stall\n")); + LOG((this,LOG_CPU,3, " MAR<- stall\n")); continue; } if (m_d_f2 == f2_load_md && check_mem_write_stall()) { - LOG((LOG_CPU,3, " MD<- stall\n")); + LOG((this,LOG_CPU,3, " MD<- stall\n")); continue; } /* @@ -2334,14 +2334,14 @@ void alto2_cpu_device::execute_run() */ do_bs = !(m_d_f1 == f1_const || m_d_f2 == f2_const); if (do_bs && m_d_bs == bs_read_md && check_mem_read_stall()) { - LOG((LOG_CPU,3, " <-MD stall\n")); + LOG((this,LOG_CPU,3, " <-MD stall\n")); continue; } // now read the next instruction field from the MIR and modify it m_next = X_RDBITS(m_mir, 32, NEXT0, NEXT9) | m_next2; // prefetch the next instruction's next field as next2 m_next2 = X_RDBITS(RD_UCODE(m_next), 32, NEXT0, NEXT9) | (m_next2 & ~ALTO2_UCODE_PAGE_MASK); - LOG((LOG_CPU,2,"%s-%04o: %011o r:%02o aluf:%02o bs:%02o f1:%02o f2:%02o t:%o l:%o next:%05o next2:%05o\n", + LOG((this,LOG_CPU,2,"%s-%04o: %011o r:%02o aluf:%02o bs:%02o f1:%02o f2:%02o t:%o l:%o next:%05o next2:%05o\n", task_name(m_task), m_mpc, m_mir, m_rsel, m_d_aluf, m_d_bs, m_d_f1, m_d_f2, m_d_loadt, m_d_loadl, m_next, m_next2)); // BUS is all ones at the start of each cycle @@ -2356,7 +2356,7 @@ void alto2_cpu_device::execute_run() // FIXME: is the format of m_const_data endian safe? UINT16 data = m_const_data[2*addr] | (m_const_data[2*addr+1] << 8); m_bus &= data; - LOG((LOG_CPU,2," %#o; BUS &= %#o CONST[%03o]\n", m_bus, data, addr)); + LOG((this,LOG_CPU,2," %#o; BUS &= %#o CONST[%03o]\n", m_bus, data, addr)); } /* @@ -2402,7 +2402,7 @@ void alto2_cpu_device::execute_run() alu = m_bus; m_aluc0 = 1; flags = ALUM; - LOG((LOG_CPU,2," ALU<- BUS (%#o := %#o)\n", alu, m_bus)); + LOG((this,LOG_CPU,2," ALU<- BUS (%#o := %#o)\n", alu, m_bus)); break; /** @@ -2415,7 +2415,7 @@ void alto2_cpu_device::execute_run() alu = m_t; m_aluc0 = 1; flags = ALUM; - LOG((LOG_CPU,2," ALU<- T (%#o := %#o)\n", alu, m_t)); + LOG((this,LOG_CPU,2," ALU<- T (%#o := %#o)\n", alu, m_t)); break; /** @@ -2428,7 +2428,7 @@ void alto2_cpu_device::execute_run() alu = m_bus | m_t; m_aluc0 = 1; flags = ALUM | TSELECT; - LOG((LOG_CPU,2," ALU<- BUS OR T (%#o := %#o | %#o)\n", alu, m_bus, m_t)); + LOG((this,LOG_CPU,2," ALU<- BUS OR T (%#o := %#o | %#o)\n", alu, m_bus, m_t)); break; /** @@ -2441,7 +2441,7 @@ void alto2_cpu_device::execute_run() alu = m_bus & m_t; m_aluc0 = 1; flags = ALUM; - LOG((LOG_CPU,2," ALU<- BUS AND T (%#o := %#o & %#o)\n", alu, m_bus, m_t)); + LOG((this,LOG_CPU,2," ALU<- BUS AND T (%#o := %#o & %#o)\n", alu, m_bus, m_t)); break; /** @@ -2454,7 +2454,7 @@ void alto2_cpu_device::execute_run() alu = m_bus ^ m_t; m_aluc0 = 1; flags = ALUM; - LOG((LOG_CPU,2," ALU<- BUS XOR T (%#o := %#o ^ %#o)\n", alu, m_bus, m_t)); + LOG((this,LOG_CPU,2," ALU<- BUS XOR T (%#o := %#o ^ %#o)\n", alu, m_bus, m_t)); break; /** @@ -2467,7 +2467,7 @@ void alto2_cpu_device::execute_run() alu = m_bus + 1; m_aluc0 = (alu >> 16) & 1; flags = TSELECT; - LOG((LOG_CPU,2," ALU<- BUS + 1 (%#o := %#o + 1)\n", alu, m_bus)); + LOG((this,LOG_CPU,2," ALU<- BUS + 1 (%#o := %#o + 1)\n", alu, m_bus)); break; /** @@ -2480,7 +2480,7 @@ void alto2_cpu_device::execute_run() alu = m_bus + 0177777; m_aluc0 = (~alu >> 16) & 1; flags = TSELECT; - LOG((LOG_CPU,2," ALU<- BUS - 1 (%#o := %#o - 1)\n", alu, m_bus)); + LOG((this,LOG_CPU,2," ALU<- BUS - 1 (%#o := %#o - 1)\n", alu, m_bus)); break; /** @@ -2493,7 +2493,7 @@ void alto2_cpu_device::execute_run() alu = m_bus + m_t; m_aluc0 = (alu >> 16) & 1; flags = 0; - LOG((LOG_CPU,2," ALU<- BUS + T (%#o := %#o + %#o)\n", alu, m_bus, m_t)); + LOG((this,LOG_CPU,2," ALU<- BUS + T (%#o := %#o + %#o)\n", alu, m_bus, m_t)); break; /** @@ -2506,7 +2506,7 @@ void alto2_cpu_device::execute_run() alu = m_bus + ~m_t + 1; m_aluc0 = (~alu >> 16) & 1; flags = 0; - LOG((LOG_CPU,2," ALU<- BUS - T (%#o := %#o - %#o)\n", alu, m_bus, m_t)); + LOG((this,LOG_CPU,2," ALU<- BUS - T (%#o := %#o - %#o)\n", alu, m_bus, m_t)); break; /** @@ -2519,7 +2519,7 @@ void alto2_cpu_device::execute_run() alu = m_bus + ~m_t; m_aluc0 = (~alu >> 16) & 1; flags = 0; - LOG((LOG_CPU,2," ALU<- BUS - T - 1 (%#o := %#o - %#o - 1)\n", alu, m_bus, m_t)); + LOG((this,LOG_CPU,2," ALU<- BUS - T - 1 (%#o := %#o - %#o - 1)\n", alu, m_bus, m_t)); break; /** @@ -2532,7 +2532,7 @@ void alto2_cpu_device::execute_run() alu = m_bus + m_t + 1; m_aluc0 = (alu >> 16) & 1; flags = TSELECT; - LOG((LOG_CPU,2," ALU<- BUS + T + 1 (%#o := %#o + %#o + 1)\n", alu, m_bus, m_t)); + LOG((this,LOG_CPU,2," ALU<- BUS + T + 1 (%#o := %#o + %#o + 1)\n", alu, m_bus, m_t)); break; /** @@ -2545,7 +2545,7 @@ void alto2_cpu_device::execute_run() alu = m_bus + m_emu.skip; m_aluc0 = (alu >> 16) & 1; flags = TSELECT; - LOG((LOG_CPU,2," ALU<- BUS + SKIP (%#o := %#o + %#o)\n", alu, m_bus, m_emu.skip)); + LOG((this,LOG_CPU,2," ALU<- BUS + SKIP (%#o := %#o + %#o)\n", alu, m_bus, m_emu.skip)); break; /** @@ -2558,7 +2558,7 @@ void alto2_cpu_device::execute_run() alu = m_bus & m_t; m_aluc0 = 1; flags = ALUM | TSELECT; - LOG((LOG_CPU,2," ALU<- BUS,T (%#o := %#o & %#o)\n", alu, m_bus, m_t)); + LOG((this,LOG_CPU,2," ALU<- BUS,T (%#o := %#o & %#o)\n", alu, m_bus, m_t)); break; /** @@ -2571,7 +2571,7 @@ void alto2_cpu_device::execute_run() alu = m_bus & ~m_t; m_aluc0 = 1; flags = ALUM; - LOG((LOG_CPU,2," ALU<- BUS AND NOT T (%#o := %#o & ~%#o)\n", alu, m_bus, m_t)); + LOG((this,LOG_CPU,2," ALU<- BUS AND NOT T (%#o := %#o & ~%#o)\n", alu, m_bus, m_t)); break; /** @@ -2584,7 +2584,7 @@ void alto2_cpu_device::execute_run() alu = m_bus; m_aluc0 = 1; flags = ALUM | TSELECT; - LOG((LOG_CPU,0," ALU<- 0 (illegal aluf in task %s, mpc:%05o aluf:%02o)\n", task_name(m_task), m_mpc, m_d_aluf)); + LOG((this,LOG_CPU,0," ALU<- 0 (illegal aluf in task %s, mpc:%05o aluf:%02o)\n", task_name(m_task), m_mpc, m_d_aluf)); break; /** @@ -2598,7 +2598,7 @@ void alto2_cpu_device::execute_run() alu = m_bus; m_aluc0 = 1; flags = ALUM | TSELECT; - LOG((LOG_CPU,0," ALU<- 0 (illegal aluf in task %s, mpc:%05o aluf:%02o)\n", task_name(m_task), m_mpc, m_d_aluf)); + LOG((this,LOG_CPU,0," ALU<- 0 (illegal aluf in task %s, mpc:%05o aluf:%02o)\n", task_name(m_task), m_mpc, m_d_aluf)); } m_alu = static_cast<UINT16>(alu); #endif @@ -2625,10 +2625,10 @@ void alto2_cpu_device::execute_run() m_cram_addr = m_alu; // latch CRAM address if (flags & TSELECT) { m_t = m_alu; // T source is ALU - LOG((LOG_CPU,2, " T<- ALU (%#o)\n", m_alu)); + LOG((this,LOG_CPU,2, " T<- ALU (%#o)\n", m_alu)); } else { m_t = m_bus; // T source is BUS - LOG((LOG_CPU,2, " T<- BUS (%#o)\n", m_bus)); + LOG((this,LOG_CPU,2, " T<- BUS (%#o)\n", m_bus)); } } @@ -2637,16 +2637,16 @@ void alto2_cpu_device::execute_run() m_l = m_alu; // load L from ALU if (flags & ALUM) { m_laluc0 = 0; // logic operation - put 0 into latched carry - LOG((LOG_CPU,2, " L<- ALU (%#o); LALUC0<- %o\n", m_alu, 0)); + LOG((this,LOG_CPU,2, " L<- ALU (%#o); LALUC0<- %o\n", m_alu, 0)); } else { m_laluc0 = m_aluc0; // arithmethic operation - put ALU carry into latched carry - LOG((LOG_CPU,2, " L<- ALU (%#o); LALUC0<- ALUC0 (%o)\n", m_alu, m_aluc0)); + LOG((this,LOG_CPU,2, " L<- ALU (%#o); LALUC0<- ALUC0 (%o)\n", m_alu, m_aluc0)); } // update M (MYL) register, if a RAM related task is active if (m_ram_related[m_task]) { m_m = m_alu; // load M from ALU, if 'GOODTASK' m_s[m_s_reg_bank[m_task]][0] = m_alu; // also writes to S[bank][0], which can't be read - LOG((LOG_CPU,2, " M<- ALU (%#o)\n", m_alu)); + LOG((this,LOG_CPU,2, " M<- ALU (%#o)\n", m_alu)); } } @@ -2661,7 +2661,7 @@ void alto2_cpu_device::execute_run() m_task_mpc[m_task] = m_next; m_task_next2[m_task] = m_next2; m_task = m_next_task; - LOG((LOG_CPU,1, "task switch to %02o:%s (cycle %lld)\n", m_task, task_name(m_task), cycle())); + LOG((this,LOG_CPU,1, "task switch to %02o:%s (cycle %lld)\n", m_task, task_name(m_task), cycle())); m_next = m_task_mpc[m_task]; // get new task's mpc m_next2 = m_task_next2[m_task]; // get address modifier after task switch (needed?) diff --git a/src/devices/cpu/alto2/alto2cpu.h b/src/devices/cpu/alto2/alto2cpu.h index 1e2640e6ac0..0fc58112075 100644 --- a/src/devices/cpu/alto2/alto2cpu.h +++ b/src/devices/cpu/alto2/alto2cpu.h @@ -128,7 +128,7 @@ enum { extern int m_log_types; extern int m_log_level; extern bool m_log_newline; - void logprintf(int type, int level, const char* format, ...); + void logprintf(device_t *device, int type, int level, const char* format, ...); # define LOG(x) logprintf x #else # define LOG(x) diff --git a/src/devices/cpu/arcompact/arcompact_execute.c b/src/devices/cpu/arcompact/arcompact_execute.c index ae241987190..ba3c3ea3af4 100644 --- a/src/devices/cpu/arcompact/arcompact_execute.c +++ b/src/devices/cpu/arcompact/arcompact_execute.c @@ -2042,7 +2042,7 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_20_p11_m0(OPS_32) // Jcc { // if F isn't set then the destination can't be ILINK1 or ILINK2 - if ((creg == REG_ILINK1) || (creg == REG_ILINK1)) + if ((creg == REG_ILINK1) || (creg == REG_ILINK2)) { arcompact_fatal ("fatal arcompact_handle04_20_p11_m0 J %08x (F not set but ILINK1 or ILINK2 used as dst)", op); } @@ -2057,7 +2057,7 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_20_p11_m0(OPS_32) // Jcc { // if F is set then the destination MUST be ILINK1 or ILINK2 - if ((creg == REG_ILINK1) || (creg == REG_ILINK1)) + if ((creg == REG_ILINK1) || (creg == REG_ILINK2)) { arcompact_log("unimplemented arcompact_handle04_20_p11_m0 J %08x (F set)", op); } @@ -2163,7 +2163,7 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_21_p11_m0(OPS_32) // Jcc. { // if F isn't set then the destination can't be ILINK1 or ILINK2 - if ((creg == REG_ILINK1) || (creg == REG_ILINK1)) + if ((creg == REG_ILINK1) || (creg == REG_ILINK2)) { arcompact_log("unimplemented Jcc.D (p11_m0 type, illegal) %08x", op); } @@ -2177,7 +2177,7 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_21_p11_m0(OPS_32) // Jcc. { // if F is set then the destination MUST be ILINK1 or ILINK2 - if ((creg == REG_ILINK1) || (creg == REG_ILINK1)) + if ((creg == REG_ILINK1) || (creg == REG_ILINK2)) { arcompact_log("unimplemented Jcc.D.F (p11_m0 type, unimplemented) %08x", op); } diff --git a/src/devices/cpu/arm7/lpc210x.c b/src/devices/cpu/arm7/lpc210x.c new file mode 100644 index 00000000000..72388cf18f6 --- /dev/null +++ b/src/devices/cpu/arm7/lpc210x.c @@ -0,0 +1,285 @@ +// license:BSD-3-Clause +// copyright-holders:David Haywood +/*************************************************************************** + + NXP (Phillips) LPC2103 series + covering LPC2101, LPC2102, LPC2103* + + *currently only LPC2103 + + these are based on an ARM7TDMI-S CPU + internal flash and integrated peripherals + +***************************************************************************/ + +#include "lpc210x.h" + +const device_type LPC2103 = &device_creator<lpc210x_device>; + +static ADDRESS_MAP_START( lpc2103_map, AS_PROGRAM, 32, lpc210x_device ) + AM_RANGE(0x00000000, 0x00007fff) AM_READWRITE(flash_r, flash_w) // 32kb internal FLASH rom + + AM_RANGE(0x3FFFC000, 0x3FFFC01f) AM_READWRITE( fio_r, fio_w ) // GPIO + + + AM_RANGE(0x40000000, 0x40001fff) AM_RAM // 8kb internal SROM (writes should actually latch - see docs) + + AM_RANGE(0xE0004000, 0xE000407f) AM_READWRITE( timer0_r, timer0_w) + + AM_RANGE(0xE0008000, 0xE000807f) AM_READWRITE( timer1_r, timer1_w) + + AM_RANGE(0xE002C000, 0xE002C007) AM_READWRITE( pin_r, pin_w ) + + AM_RANGE(0xE01FC000, 0xE01FC007) AM_READWRITE( mam_r, mam_w ) + AM_RANGE(0xE01FC080, 0xE01FC08f) AM_READWRITE( pll_r, pll_w ) // phase locked loop + AM_RANGE(0xE01FC100, 0xE01FC103) AM_READWRITE( apbdiv_r, apbdiv_w ) + AM_RANGE(0xE01FC1a0, 0xE01FC1a3) AM_READWRITE( scs_r, scs_w ) + + AM_RANGE(0xFFFFF000, 0xFFFFF2ff) AM_READWRITE( vic_r, vic_w ) // interrupt controller +ADDRESS_MAP_END + + +lpc210x_device::lpc210x_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) + : arm7_cpu_device(mconfig, LPC2103, "LPC2103", tag, owner, clock, "lpc2103", __FILE__, 4, eARM_ARCHFLAGS_T, ENDIANNESS_LITTLE), + m_program_config("program", ENDIANNESS_LITTLE, 32, 32, 0, ADDRESS_MAP_NAME(lpc2103_map)) +{ +} + +READ32_MEMBER(lpc210x_device::arm_E01FC088_r) +{ + return 0xffffffff; +} + +READ32_MEMBER(lpc210x_device::flash_r) +{ + UINT32 ret = (m_flash[offset * 4 + 3] << 24) | + (m_flash[offset * 4 + 2] << 16) | + (m_flash[offset * 4 + 1] << 8) | + (m_flash[offset * 4 + 0] << 0); + return ret; +} + +WRITE32_MEMBER(lpc210x_device::flash_w) +{ + // +} + + +const address_space_config *lpc210x_device::memory_space_config(address_spacenum spacenum) const +{ + switch(spacenum) + { + case AS_PROGRAM: return &m_program_config; + default: return NULL; + } +} + + + + +//------------------------------------------------- +// device_start - device-specific startup +//------------------------------------------------- + +void lpc210x_device::device_start() +{ + arm7_cpu_device::device_start(); +} + +//------------------------------------------------- +// device_reset - device-specific reset +//------------------------------------------------- + +void lpc210x_device::device_reset() +{ + arm7_cpu_device::device_reset(); + + m_TxPR[0] = 0; + m_TxPR[1] = 0; +} + +/* VIC (Vectored Interrupt Controller) */ + +READ32_MEMBER( lpc210x_device::vic_r ) +{ + switch (offset*4) + { + default: + logerror("%08x unhandled read from VIC offset %08x mem_mask %08x\n", space.device().safe_pc(), offset * 4, mem_mask); + } + + return 0x00000000; +} + + +WRITE32_MEMBER( lpc210x_device::vic_w ) +{ + switch (offset * 4) + { + default: + logerror("%08x unhandled write VIC offset %02x data %08x mem_mask %08x\n", space.device().safe_pc(), offset * 4, data, mem_mask); + } +} + +/* PIN Select block */ + +READ32_MEMBER( lpc210x_device::pin_r ) +{ + switch (offset*4) + { + default: + logerror("%08x unhandled read from PINSEL offset %08x mem_mask %08x\n",space.device().safe_pc(), offset * 4, mem_mask); + } + + return 0x00000000; +} + + +WRITE32_MEMBER( lpc210x_device::pin_w ) +{ + switch (offset * 4) + { + default: + logerror("%08x unhandled write PINSEL offset %02x data %08x mem_mask %08x\n", space.device().safe_pc(), offset * 4, data, mem_mask); + } +} + +/* MAM block (memory conttroller) */ + +READ32_MEMBER( lpc210x_device::mam_r ) +{ + switch (offset*4) + { + default: + logerror("%08x unhandled read from MAM offset %08x mem_mask %08x\n", space.device().safe_pc(), offset * 4, mem_mask); + } + + return 0x00000000; +} + + +WRITE32_MEMBER( lpc210x_device::mam_w ) +{ + switch (offset * 4) + { + default: + logerror("%08x unhandled write MAM offset %02x data %08x mem_mask %08x\n", space.device().safe_pc(), offset * 4, data, mem_mask); + } +} + +/* FIO block */ + +READ32_MEMBER( lpc210x_device::fio_r ) +{ + switch (offset*4) + { + default: + logerror("%08x unhandled read from FIO offset %08x mem_mask %08x\n", space.device().safe_pc(), offset * 4, mem_mask); + } + + return 0x00000000; +} + + +WRITE32_MEMBER( lpc210x_device::fio_w ) +{ + switch (offset * 4) + { + default: + logerror("%08x unhandled write FIO offset %02x data %08x mem_mask %08x\n", space.device().safe_pc(), offset * 4, data, mem_mask); + } +} + + +/* APB Divider */ + +READ32_MEMBER( lpc210x_device::apbdiv_r ) +{ + logerror("%08x unhandled read from APBDIV offset %08x mem_mask %08x\n", space.device().safe_pc(), offset * 4, mem_mask); + return 0x00000000; +} + + +WRITE32_MEMBER( lpc210x_device::apbdiv_w ) +{ + logerror("%08x unhandled write APBDIV offset %02x data %08x mem_mask %08x\n", space.device().safe_pc(),offset * 4, data, mem_mask); +} + +/* Syscon misc registers */ + +READ32_MEMBER( lpc210x_device::scs_r ) +{ + logerror("%08x unhandled read from SCS offset %08x mem_mask %08x\n", space.device().safe_pc(),offset * 4, mem_mask); + return 0x00000000; +} + + +WRITE32_MEMBER( lpc210x_device::scs_w ) +{ + logerror("%08x unhandled write SCS offset %02x data %08x mem_mask %08x\n", space.device().safe_pc(),offset * 4, data, mem_mask); +} + +/* PLL Phase Locked Loop */ + +READ32_MEMBER( lpc210x_device::pll_r ) +{ + switch (offset*4) + { + default: + logerror("%08x unhandled read from PLL offset %08x mem_mask %08x\n", space.device().safe_pc(),offset * 4, mem_mask); + } + + return 0xffffffff; +} + + +WRITE32_MEMBER( lpc210x_device::pll_w ) +{ + switch (offset * 4) + { + default: + logerror("%08x unhandled write PLL offset %02x data %08x mem_mask %08x\n", space.device().safe_pc(),offset * 4, data, mem_mask); + } +} + + +/* Timers */ + +UINT32 lpc210x_device::read_timer(address_space &space, int timer, int offset, UINT32 mem_mask) +{ + switch (offset*4) + { + case 0x0c: + return m_TxPR[timer]; + + default: + logerror("%08x unhandled read from timer %d offset %02x mem_mask %08x\n", space.device().safe_pc(),timer, offset * 4, mem_mask); + } + + return 0x00000000; +} + + +void lpc210x_device::write_timer(address_space &space, int timer, int offset, UINT32 data, UINT32 mem_mask) +{ + switch (offset * 4) + { + case 0x0c: + COMBINE_DATA(&m_TxPR[timer]); + logerror("%08x Timer %d Prescale Register set to %08x\n", space.device().safe_pc(),timer, m_TxPR[timer]); + break; + + default: + logerror("%08x unhandled write timer %d offset %02x data %08x mem_mask %08x\n", space.device().safe_pc(),timer, offset * 4, data, mem_mask); + } +} + + + +static MACHINE_CONFIG_FRAGMENT( lpc210x ) +MACHINE_CONFIG_END + +machine_config_constructor lpc210x_device::device_mconfig_additions() const +{ + return MACHINE_CONFIG_NAME( lpc210x ); +} diff --git a/src/devices/cpu/arm7/lpc210x.h b/src/devices/cpu/arm7/lpc210x.h new file mode 100644 index 00000000000..0fc502d31bd --- /dev/null +++ b/src/devices/cpu/arm7/lpc210x.h @@ -0,0 +1,104 @@ +// license:BSD-3-Clause +// copyright-holders:David Haywood + +#pragma once + +#ifndef __LPC2103__ +#define __LPC2103__ + +#include "emu.h" +#include "arm7.h" +#include "arm7core.h" + +/*************************************************************************** + DEVICE CONFIGURATION MACROS +***************************************************************************/ + + +/*************************************************************************** + TYPE DEFINITIONS +***************************************************************************/ + +class lpc210x_device : public arm7_cpu_device +{ +public: + lpc210x_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32); + + // static configuration helpers + + // todo, use an appropriate flash type instead + UINT8 m_flash[0x8000]; + + + DECLARE_READ32_MEMBER(arm_E01FC088_r); + DECLARE_READ32_MEMBER(flash_r); + DECLARE_WRITE32_MEMBER(flash_w); + + // timer 0 / 1 + DECLARE_READ32_MEMBER(timer0_r) { return read_timer(space, 0, offset, mem_mask); } + DECLARE_WRITE32_MEMBER(timer0_w) { write_timer(space, 0, offset, data, mem_mask); } + + DECLARE_READ32_MEMBER(timer1_r) { return read_timer(space, 1, offset, mem_mask); } + DECLARE_WRITE32_MEMBER(timer1_w) { write_timer(space, 1, offset, data, mem_mask); } + + void write_timer(address_space &space, int timer, int offset, UINT32 data, UINT32 mem_mask); + UINT32 read_timer(address_space &space, int timer, int offset, UINT32 mem_mask); + + UINT32 m_TxPR[2]; + + // VIC + DECLARE_READ32_MEMBER(vic_r); + DECLARE_WRITE32_MEMBER(vic_w); + + // PIN select block + DECLARE_READ32_MEMBER(pin_r); + DECLARE_WRITE32_MEMBER(pin_w); + + //PLL Phase Locked Loop + DECLARE_READ32_MEMBER(pll_r); + DECLARE_WRITE32_MEMBER(pll_w); + + //MAM memory controller + DECLARE_READ32_MEMBER(mam_r); + DECLARE_WRITE32_MEMBER(mam_w); + + //APB divider + DECLARE_READ32_MEMBER(apbdiv_r); + DECLARE_WRITE32_MEMBER(apbdiv_w); + + //syscon misc + DECLARE_READ32_MEMBER(scs_r); + DECLARE_WRITE32_MEMBER(scs_w); + + // fio + DECLARE_READ32_MEMBER(fio_r); + DECLARE_WRITE32_MEMBER(fio_w); + +protected: + // device-level overrides + virtual machine_config_constructor device_mconfig_additions() const; + virtual void device_start(); + virtual void device_reset(); + + virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const; + + + + + + +private: + address_space_config m_program_config; + + + + + +}; + + +// device type definition +extern const device_type LPC2103; + + +#endif /// __LPC2103__ diff --git a/src/devices/cpu/avr8/avr8.c b/src/devices/cpu/avr8/avr8.c index ebd880af285..063526ff472 100644 --- a/src/devices/cpu/avr8/avr8.c +++ b/src/devices/cpu/avr8/avr8.c @@ -752,7 +752,6 @@ void avr8_device::device_start() m_io = &space(AS_IO); // register our state for the debugger - std::string tempstr; state_add(STATE_GENPC, "GENPC", m_shifted_pc).noshow(); state_add(STATE_GENFLAGS, "GENFLAGS", m_r[AVR8_REGIDX_SREG]).callimport().callexport().formatstr("%8s").noshow(); state_add(AVR8_SREG, "STATUS", m_r[AVR8_REGIDX_SREG]).mask(0xff); diff --git a/src/devices/cpu/dsp56k/dsp56mem.c b/src/devices/cpu/dsp56k/dsp56mem.c index 6ec2251df64..5f8d4e405bd 100644 --- a/src/devices/cpu/dsp56k/dsp56mem.c +++ b/src/devices/cpu/dsp56k/dsp56mem.c @@ -394,7 +394,7 @@ void external_p_wait_states_set(dsp56k_core* cpustate, UINT16 value) void PBC_set(dsp56k_core* cpustate, UINT16 value) { if (value & 0xfffe) - logerror("Dsp56k : Attempting to set reserved bits in the PBC. Ignoring.\n"); + cpustate->device->logerror("Dsp56k : Attempting to set reserved bits in the PBC. Ignoring.\n"); value = value & 0x0001; PBC &= ~(0x0001); @@ -413,7 +413,7 @@ int host_interface_active(dsp56k_core* cpustate) void PBDDR_set(dsp56k_core* cpustate, UINT16 value) { if (value & 0x8000) - logerror("Dsp56k : Attempting to set reserved bits in the PBDDR. Ignoring.\n"); + cpustate->device->logerror("Dsp56k : Attempting to set reserved bits in the PBDDR. Ignoring.\n"); value = value & 0x7fff; PBDDR &= ~(0x7fff); @@ -426,7 +426,7 @@ void PBDDR_set(dsp56k_core* cpustate, UINT16 value) void PBD_set(dsp56k_core* cpustate, UINT16 value) { if (value & 0x8000) - logerror("Dsp56k : Attempting to set reserved bits in the PBD. Ignoring.\n"); + cpustate->device->logerror("Dsp56k : Attempting to set reserved bits in the PBD. Ignoring.\n"); value = value & 0x7fff; PBD &= ~(0x7fff); @@ -439,7 +439,7 @@ void PBD_set(dsp56k_core* cpustate, UINT16 value) void PCC_set(dsp56k_core* cpustate, UINT16 value) { if (value & 0xf000) - logerror("Dsp56k : Attempting to set reserved bits in the PCC. Ignoring.\n"); + cpustate->device->logerror("Dsp56k : Attempting to set reserved bits in the PCC. Ignoring.\n"); value = value & 0x0fff; PCC &= ~(0x0fff); @@ -452,7 +452,7 @@ void PCC_set(dsp56k_core* cpustate, UINT16 value) void PCDDR_set(dsp56k_core* cpustate, UINT16 value) { if (value & 0xf000) - logerror("Dsp56k : Attempting to set reserved bits in the PCDDR. Ignoring.\n"); + cpustate->device->logerror("Dsp56k : Attempting to set reserved bits in the PCDDR. Ignoring.\n"); value = value & 0x0fff; PCDDR &= ~(0x0fff); @@ -465,10 +465,10 @@ void PCDDR_set(dsp56k_core* cpustate, UINT16 value) void PCD_set(dsp56k_core* cpustate, UINT16 value) { if (value & 0xf000) - logerror("Dsp56k : Attempting to set reserved bits in the PCD. Ignoring.\n"); + cpustate->device->logerror("Dsp56k : Attempting to set reserved bits in the PCD. Ignoring.\n"); /* TODO: Temporary */ - logerror("Dsp56k : Setting general output port C data to 0x%04x\n", value); + cpustate->device->logerror("Dsp56k : Setting general output port C data to 0x%04x\n", value); value = value & 0x0fff; PCD &= ~(0x0fff); @@ -492,7 +492,7 @@ void dsp56k_io_reset(dsp56k_core* cpustate) READ16_MEMBER( dsp56k_device::peripheral_register_r ) { dsp56k_core* cpustate = &m_dsp56k_core; - // (printf) logerror("Peripheral read 0x%04x\n", O2A(offset)); + // (printf) cpustate->device->logerror("Peripheral read 0x%04x\n", O2A(offset)); switch (O2A(offset)) { @@ -630,7 +630,7 @@ WRITE16_MEMBER( dsp56k_device::peripheral_register_w ) // Its primary behavior is RAM // COMBINE_DATA(&cpustate->peripheral_ram[offset]); - // (printf) logerror("Peripheral write 0x%04x = %04x\n", O2A(offset), data); + // (printf) cpustate->device->logerror("Peripheral write 0x%04x = %04x\n", O2A(offset), data); // 4-8 switch (O2A(offset)) @@ -665,7 +665,7 @@ WRITE16_MEMBER( dsp56k_device::peripheral_register_w ) // reserved for test case 0xffc9: - logerror("DSP56k : Warning write to 0xffc9 reserved for test.\n"); + cpustate->device->logerror("DSP56k : Warning write to 0xffc9 reserved for test.\n"); break; // CRA-SSI0 Control Register A @@ -685,7 +685,7 @@ WRITE16_MEMBER( dsp56k_device::peripheral_register_w ) // reserved for future use case 0xffdd: - logerror("DSP56k : Warning write to 0xffdd reserved for future use.\n"); + cpustate->device->logerror("DSP56k : Warning write to 0xffdd reserved for future use.\n"); break; // BCR: Bus Control Register @@ -773,7 +773,7 @@ WRITE16_MEMBER( dsp56k_device::peripheral_register_w ) // Reserved for on-chip emulation case 0xffff: - logerror("DSP56k : Warning write to 0xffff reserved for on-chip emulation.\n"); + cpustate->device->logerror("DSP56k : Warning write to 0xffff reserved for on-chip emulation.\n"); break; } } @@ -787,7 +787,7 @@ void dsp56k_device::host_interface_write(UINT8 offset, UINT8 data) /* Not exactly correct since the bootstrap hack doesn't need this to be true */ /* if (!host_interface_active()) - logerror("Dsp56k : Host interface write called without HI being set active by the PBC.\n"); + cpustate->device->logerror("Dsp56k : Host interface write called without HI being set active by the PBC.\n"); */ switch (offset) @@ -817,7 +817,7 @@ void dsp56k_device::host_interface_write(UINT8 offset, UINT8 data) // Interrupt status register (ISR) - Read only! case 0x02: - logerror("DSP56k : Interrupt status register is read only.\n"); + cpustate->device->logerror("DSP56k : Interrupt status register is read only.\n"); break; // Interrupt vector register (IVR) @@ -825,12 +825,12 @@ void dsp56k_device::host_interface_write(UINT8 offset, UINT8 data) // Not used case 0x04: - logerror("DSP56k : Address 0x4 on the host side of the host interface is not used.\n"); + cpustate->device->logerror("DSP56k : Address 0x4 on the host side of the host interface is not used.\n"); break; // Reserved case 0x05: - logerror("DSP56k : Address 0x5 on the host side of the host interface is reserved.\n"); + cpustate->device->logerror("DSP56k : Address 0x5 on the host side of the host interface is reserved.\n"); break; // Transmit byte register - high byte (TXH) @@ -872,7 +872,7 @@ void dsp56k_device::host_interface_write(UINT8 offset, UINT8 data) } break; - default: logerror("DSP56k : dsp56k_host_interface_write called with invalid address 0x%02x.\n", offset); + default: cpustate->device->logerror("DSP56k : dsp56k_host_interface_write called with invalid address 0x%02x.\n", offset); } } @@ -883,7 +883,7 @@ UINT8 dsp56k_device::host_interface_read(UINT8 offset) /* Not exactly correct since the bootstrap hack doesn't need this to be true */ /* if (!host_interface_active()) - logerror("Dsp56k : Host interface write called without HI being set active by the PBC.\n"); + cpustate->device->logerror("Dsp56k : Host interface write called without HI being set active by the PBC.\n"); */ switch (offset) @@ -910,7 +910,7 @@ UINT8 dsp56k_device::host_interface_read(UINT8 offset) // Reserved case 0x05: - logerror("DSP56k : Address 0x5 on the host side of the host interface is reserved.\n"); + cpustate->device->logerror("DSP56k : Address 0x5 on the host side of the host interface is reserved.\n"); break; // Receive byte register - high byte (RXH) @@ -933,7 +933,7 @@ UINT8 dsp56k_device::host_interface_read(UINT8 offset) return value; } - default: logerror("DSP56k : dsp56k_host_interface_read called with invalid address 0x%02x.\n", offset); + default: cpustate->device->logerror("DSP56k : dsp56k_host_interface_read called with invalid address 0x%02x.\n", offset); } /* Shouldn't get here */ diff --git a/src/devices/cpu/dsp56k/dsp56ops.inc b/src/devices/cpu/dsp56k/dsp56ops.inc index f00d1cc84b4..4656fed2c43 100644 --- a/src/devices/cpu/dsp56k/dsp56ops.inc +++ b/src/devices/cpu/dsp56k/dsp56ops.inc @@ -323,7 +323,7 @@ static void execute_one(dsp56k_core* cpustate) /* Now evaluate the parallel data move */ /* TODO // decode_x_memory_data_write_and_register_data_move(op, parallel_move_str, parallel_move_str2); */ - logerror("DSP56k: Unemulated Dual X Memory Data And Register Data Move @ 0x%x\n", PC); + cpustate->device->logerror("DSP56k: Unemulated Dual X Memory Data And Register Data Move @ 0x%x\n", PC); } /* Handle Other parallel types */ @@ -1088,7 +1088,7 @@ static void execute_one(dsp56k_core* cpustate) /* Not recognized? Nudge debugger onto the next word */ if (size == 0x1337) { - logerror("DSP56k: Unimplemented opcode at 0x%04x : %04x\n", PC, op); + cpustate->device->logerror("DSP56k: Unimplemented opcode at 0x%04x : %04x\n", PC, op); size = 1 ; /* Just to get the debugger past the bad opcode */ } @@ -2865,17 +2865,17 @@ static size_t dsp56k_op_do_2(dsp56k_core* cpustate, const UINT16 op, const UINT1 /* HACK */ if (lValue >= 0xfff0) { - logerror("Dsp56k : DO_2 operation changed %04x to 0000.\n", lValue); + cpustate->device->logerror("Dsp56k : DO_2 operation changed %04x to 0000.\n", lValue); lValue = 0x0000; } /* TODO: Fix for special cased SP S */ if (S.addr == &SP) - logerror("DSP56k: do with SP as the source not properly implemented yet.\n"); + cpustate->device->logerror("DSP56k: do with SP as the source not properly implemented yet.\n"); /* TODO: Fix for special cased SSSL S */ if (S.addr == &SSL) - logerror("DSP56k: do with SP as the source not properly implemented yet.\n"); + cpustate->device->logerror("DSP56k: do with SP as the source not properly implemented yet.\n"); /* Don't execute if the loop counter == 0 */ if (lValue != 0x00) @@ -3429,7 +3429,7 @@ static size_t dsp56k_op_movec_3(dsp56k_core* cpustate, const UINT16 op, const UI if (t) { /* 16-bit long data */ - logerror("DSP56k: Movec - I don't think this exists?"); + cpustate->device->logerror("DSP56k: Movec - I don't think this exists?"); } else { @@ -3812,7 +3812,7 @@ static size_t dsp56k_op_rep_2(dsp56k_core* cpustate, const UINT16 op, UINT8* cyc /* TODO: handle special A&B source cases */ if (D.addr == &A || D.addr == &B) - logerror("DSP56k ERROR : Rep with A or B instruction not implemented yet!\n"); + cpustate->device->logerror("DSP56k ERROR : Rep with A or B instruction not implemented yet!\n"); repValue = *((UINT16*)D.addr); diff --git a/src/devices/cpu/dsp56k/dsp56pcu.c b/src/devices/cpu/dsp56k/dsp56pcu.c index 7ec53891e4c..68b35199c73 100644 --- a/src/devices/cpu/dsp56k/dsp56pcu.c +++ b/src/devices/cpu/dsp56k/dsp56pcu.c @@ -127,7 +127,7 @@ void pcu_reset(dsp56k_core* cpustate) switch(dsp56k_operating_mode(cpustate)) { case 0x00: - logerror("Dsp56k in Special Bootstrap Mode 1\n"); + cpustate->device->logerror("Dsp56k in Special Bootstrap Mode 1\n"); /* HACK - We don't need to put the bootstrap mode on here since */ /* we'll simulate it entirely in this function */ @@ -160,7 +160,7 @@ void pcu_reset(dsp56k_core* cpustate) break; case 0x01: - logerror("Dsp56k in Special Bootstrap Mode 2\n"); + cpustate->device->logerror("Dsp56k in Special Bootstrap Mode 2\n"); /* HACK - Turn bootstrap mode on. This hijacks the CPU execute loop and lets */ /* Either the host interface or the SSIO interface suck in all the data */ @@ -170,12 +170,12 @@ void pcu_reset(dsp56k_core* cpustate) if (cpustate->program->read_word(0xc000<<1) & 0x8000) { cpustate->bootstrap_mode = BOOTSTRAP_SSIX; - logerror("DSP56k : Currently in (hacked) bootstrap mode - reading from SSIx.\n"); + cpustate->device->logerror("DSP56k : Currently in (hacked) bootstrap mode - reading from SSIx.\n"); } else { cpustate->bootstrap_mode = BOOTSTRAP_HI; - logerror("DSP56k : Currently in (hacked) bootstrap mode - reading from Host Interface.\n"); + cpustate->device->logerror("DSP56k : Currently in (hacked) bootstrap mode - reading from Host Interface.\n"); } /* HACK - Set the PC to 0x0000 as per the boot ROM. */ @@ -188,13 +188,13 @@ void pcu_reset(dsp56k_core* cpustate) break; case 0x02: - logerror("Dsp56k in Normal Expanded Mode\n"); + cpustate->device->logerror("Dsp56k in Normal Expanded Mode\n"); PC = 0xe000; cpustate->PCU.reset_vector = 0xe000; break; case 0x03: - logerror("Dsp56k in Development Expanded Mode\n"); + cpustate->device->logerror("Dsp56k in Development Expanded Mode\n"); /* TODO: Disable internal ROM, etc. Likely a tricky thing for MAME? */ PC = 0x0000; cpustate->PCU.reset_vector = 0x0000; diff --git a/src/devices/cpu/dsp56k/inst.h b/src/devices/cpu/dsp56k/inst.h index b83508a7df2..be9ab550b8f 100644 --- a/src/devices/cpu/dsp56k/inst.h +++ b/src/devices/cpu/dsp56k/inst.h @@ -2299,7 +2299,7 @@ public: { if (m_t) { - logerror("DSP561xx|Movec_4: This sure seems like it can't happen."); + osd_printf_error("DSP561xx|Movec_4: This sure seems like it can't happen."); } else { diff --git a/src/devices/cpu/dsp56k/pmove.h b/src/devices/cpu/dsp56k/pmove.h index 8e30a534073..cb1bbe0f6f5 100644 --- a/src/devices/cpu/dsp56k/pmove.h +++ b/src/devices/cpu/dsp56k/pmove.h @@ -315,8 +315,6 @@ public: { INT8 b; reg_id SD; - std::string args; - b = (char)(word0 & 0x00ff); decode_HHH_table(BITSn(word1,0x0e00), SD); assemble_reg_from_W_table(BITSn(word1,0x0100), 'X', SD, b, m_source, m_destination); diff --git a/src/devices/cpu/e132xs/32xsdasm.c b/src/devices/cpu/e132xs/32xsdasm.c index f5e9885b220..d165f2fdc42 100644 --- a/src/devices/cpu/e132xs/32xsdasm.c +++ b/src/devices/cpu/e132xs/32xsdasm.c @@ -1646,7 +1646,7 @@ unsigned dasm_hyperstone(char *buffer, unsigned pc, const UINT8 *oprom, unsigned default: sprintf(buffer, "Ext. OP $%X @ %X\n", extended_op, pc); - logerror(buffer, "Illegal Extended Opcode: %X @ %X\n", extended_op, pc); + osd_printf_verbose(buffer, "Illegal Extended Opcode: %X @ %X\n", extended_op, pc); break; } diff --git a/src/devices/cpu/e132xs/e132xs.c b/src/devices/cpu/e132xs/e132xs.c index f714f6f8a6b..deb7eedc587 100644 --- a/src/devices/cpu/e132xs/e132xs.c +++ b/src/devices/cpu/e132xs/e132xs.c @@ -1562,7 +1562,6 @@ void hyperstone_device::init(int scale_mask) m_clock_scale_mask = scale_mask; // register our state for the debugger - std::string tempstr; state_add(STATE_GENPC, "GENPC", m_global_regs[0]).noshow(); state_add(STATE_GENFLAGS, "GENFLAGS", m_global_regs[1]).callimport().callexport().formatstr("%40s").noshow(); state_add(E132XS_PC, "PC", m_global_regs[0]).mask(0xffffffff); diff --git a/src/devices/cpu/esrip/esrip.c b/src/devices/cpu/esrip/esrip.c index fa7ab139b08..07abb25d053 100644 --- a/src/devices/cpu/esrip/esrip.c +++ b/src/devices/cpu/esrip/esrip.c @@ -193,7 +193,6 @@ void esrip_device::device_start() m_direct = &m_program->direct(); // register our state for the debugger - std::string tempstr; state_add(STATE_GENPC, "GENPC", m_rip_pc).noshow(); state_add(STATE_GENFLAGS, "GENFLAGS", m_status).callimport().callexport().formatstr("%8s").noshow(); state_add(ESRIP_PC, "PC:", m_rip_pc).mask(0xffff); diff --git a/src/devices/cpu/hmcs40/hmcs40.c b/src/devices/cpu/hmcs40/hmcs40.c index d76385cf2ba..c9b7220cf2a 100644 --- a/src/devices/cpu/hmcs40/hmcs40.c +++ b/src/devices/cpu/hmcs40/hmcs40.c @@ -178,14 +178,14 @@ void hmcs40_cpu_device::device_start() reset_prescaler(); // resolve callbacks - m_read_r0.resolve_safe(0); - m_read_r1.resolve_safe(0); - m_read_r2.resolve_safe(0); - m_read_r3.resolve_safe(0); - m_read_r4.resolve_safe(0); - m_read_r5.resolve_safe(0); - m_read_r6.resolve_safe(0); - m_read_r7.resolve_safe(0); + m_read_r0.resolve_safe(m_polarity & 0xf); + m_read_r1.resolve_safe(m_polarity & 0xf); + m_read_r2.resolve_safe(m_polarity & 0xf); + m_read_r3.resolve_safe(m_polarity & 0xf); + m_read_r4.resolve_safe(m_polarity & 0xf); + m_read_r5.resolve_safe(m_polarity & 0xf); + m_read_r6.resolve_safe(m_polarity & 0xf); + m_read_r7.resolve_safe(m_polarity & 0xf); m_write_r0.resolve_safe(); m_write_r1.resolve_safe(); @@ -196,7 +196,7 @@ void hmcs40_cpu_device::device_start() m_write_r6.resolve_safe(); m_write_r7.resolve_safe(); - m_read_d.resolve_safe(0); + m_read_d.resolve_safe(m_polarity); m_write_d.resolve_safe(); // zerofill @@ -293,10 +293,10 @@ void hmcs40_cpu_device::device_reset() // clear i/o m_d = m_polarity; for (int i = 0; i < 16; i++) - hmcs40_cpu_device::write_d(i, 0); + hmcs40_cpu_device::write_d(i, m_polarity); for (int i = 0; i < 8; i++) - hmcs40_cpu_device::write_r(i, 0); + hmcs40_cpu_device::write_r(i, m_polarity & 0xf); } @@ -322,13 +322,16 @@ UINT8 hmcs40_cpu_device::read_r(int index) case 7: inp = m_read_r7(index, 0xff); break; } - return ((inp ^ m_polarity) | m_r[index]) & 0xf; + if (m_polarity) + return (inp & m_r[index]) & 0xf; + else + return (inp | m_r[index]) & 0xf; } void hmcs40_cpu_device::write_r(int index, UINT8 data) { index &= 7; - data = (data ^ m_polarity) & 0xf; + data &= 0xf; m_r[index] = data; switch (index) @@ -348,13 +351,16 @@ int hmcs40_cpu_device::read_d(int index) { index &= 15; - return ((m_read_d(index, 0xffff) ^ m_polarity) | m_d) >> index & 1; + if (m_polarity) + return (m_read_d(index, 0xffff) & m_d) >> index & 1; + else + return (m_read_d(index, 0xffff) | m_d) >> index & 1; } void hmcs40_cpu_device::write_d(int index, int state) { index &= 15; - state = (((state) ? 1 : 0) ^ m_polarity) & 1; + state = (state) ? 1 : 0; m_d = (m_d & ~(1 << index)) | state << index; m_write_d(index, m_d, 0xffff); diff --git a/src/devices/cpu/i86/i86.c b/src/devices/cpu/i86/i86.c index 9c8d5a75465..70af764f1a2 100644 --- a/src/devices/cpu/i86/i86.c +++ b/src/devices/cpu/i86/i86.c @@ -1147,9 +1147,10 @@ bool i8086_common_cpu_device::common_op(UINT8 op) CLK(POP_R16); break; -// 8086 'invalid opcodes', as documented at http://www.os2museum.com/wp/?p=2147 -// - 0x60 - 0x6f are an alias to 0x70 - 0x7f. -// - 0xc0, 0xc1, 0xc8, 0xc9 are also aliases where the CPU ignores BIT 1 (*). +// 8086 'invalid opcodes', as documented at http://www.os2museum.com/wp/?p=2147 and tested on real hardware +// - 0x60 - 0x6f are aliases to 0x70 - 0x7f. +// - 0xc0, 0xc1, 0xc8, 0xc9 are also aliases where the CPU ignores BIT 1 (*). +// - 0xf1 is an alias to 0xf0. // // Instructions are used in the boot sector for some versions of // MS-DOS (e.g. the DEC Rainbow-100 version of DOS 2.x) @@ -1692,7 +1693,7 @@ bool i8086_common_cpu_device::common_op(UINT8 op) } break; - case 0xc1: // 0xc1 is 0xc3 - see (*) + case 0xc1: // 0xc1 is 0xc3 - see (*) case 0xc3: // i_ret m_ip = POP(); CLK(RET_NEAR); @@ -1724,7 +1725,7 @@ bool i8086_common_cpu_device::common_op(UINT8 op) CLKM(MOV_RI16,MOV_MI16); break; - case 0xc8: // 0xc8 = 0xca - see (*) + case 0xc8: // 0xc8 = 0xca - see (*) case 0xca: // i_retf_d16 { UINT32 count = fetch_word(); @@ -1735,7 +1736,7 @@ bool i8086_common_cpu_device::common_op(UINT8 op) } break; - case 0xc9: // 0xc9 = 0xcb - see (*) + case 0xc9: // 0xc9 = 0xcb - see (*) case 0xcb: // i_retf m_ip = POP(); m_sregs[CS] = POP(); @@ -2017,6 +2018,7 @@ bool i8086_common_cpu_device::common_op(UINT8 op) case 0xf0: // i_lock + case 0xf1: // 0xf1 is 0xf0; verified on real CPU logerror("%s: %06x: Warning - BUSLOCK\n", tag(), pc()); m_lock = true; m_no_interrupt = 1; diff --git a/src/devices/cpu/m6502/m6507.c b/src/devices/cpu/m6502/m6507.c new file mode 100644 index 00000000000..0f561b17e62 --- /dev/null +++ b/src/devices/cpu/m6502/m6507.c @@ -0,0 +1,61 @@ +// license:BSD-3-Clause +// copyright-holders:Olivier Galibert +/*************************************************************************** + + m6507.c + + Mostek 6502, NMOS variant with reduced address bus + +***************************************************************************/ + +#include "emu.h" +#include "m6507.h" + +const device_type M6507 = &device_creator<m6507_device>; + +m6507_device::m6507_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : + m6502_device(mconfig, M6507, "M6507", tag, owner, clock, "m6507", __FILE__) +{ + program_config.m_addrbus_width = 13; + sprogram_config.m_addrbus_width = 13; +} + +void m6507_device::device_start() +{ + if(direct_disabled) + mintf = new mi_6507_nd; + else + mintf = new mi_6507_normal; + + init(); +} + +UINT8 m6507_device::mi_6507_normal::read(UINT16 adr) +{ + return program->read_byte(adr & 0x1fff); +} + +UINT8 m6507_device::mi_6507_normal::read_sync(UINT16 adr) +{ + return sdirect->read_byte(adr & 0x1fff); +} + +UINT8 m6507_device::mi_6507_normal::read_arg(UINT16 adr) +{ + return direct->read_byte(adr & 0x1fff); +} + +void m6507_device::mi_6507_normal::write(UINT16 adr, UINT8 val) +{ + program->write_byte(adr & 0x1fff, val); +} + +UINT8 m6507_device::mi_6507_nd::read_sync(UINT16 adr) +{ + return sprogram->read_byte(adr & 0x1fff); +} + +UINT8 m6507_device::mi_6507_nd::read_arg(UINT16 adr) +{ + return program->read_byte(adr & 0x1fff); +} diff --git a/src/devices/cpu/m6502/m6507.h b/src/devices/cpu/m6502/m6507.h new file mode 100644 index 00000000000..a83a02cfa16 --- /dev/null +++ b/src/devices/cpu/m6502/m6507.h @@ -0,0 +1,49 @@ +// license:BSD-3-Clause +// copyright-holders:Olivier Galibert +/*************************************************************************** + + m6507.h + + Mostek 6502, NMOS variant with reduced address bus + +***************************************************************************/ + +#ifndef __M6507_H__ +#define __M6507_H__ + +#include "m6502.h" + +class m6507_device : public m6502_device { +public: + m6507_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + +protected: + class mi_6507_normal : public memory_interface { + public: + virtual ~mi_6507_normal() {} + virtual UINT8 read(UINT16 adr); + virtual UINT8 read_sync(UINT16 adr); + virtual UINT8 read_arg(UINT16 adr); + virtual void write(UINT16 adr, UINT8 val); + }; + + class mi_6507_nd : public mi_6507_normal { + public: + virtual ~mi_6507_nd() {} + virtual UINT8 read_sync(UINT16 adr); + virtual UINT8 read_arg(UINT16 adr); + }; + + virtual void device_start(); +}; + + +enum { + M6507_IRQ_LINE = m6502_device::IRQ_LINE, + M6507_NMI_LINE = m6502_device::NMI_LINE, + M6507_SET_OVERFLOW = m6502_device::V_LINE +}; + +extern const device_type M6507; + +#endif diff --git a/src/devices/cpu/m68000/m68kfpu.inc b/src/devices/cpu/m68000/m68kfpu.inc index 32d0179e6c2..d922e774b2f 100644 --- a/src/devices/cpu/m68000/m68kfpu.inc +++ b/src/devices/cpu/m68000/m68kfpu.inc @@ -1681,7 +1681,7 @@ static void fmove_fpcr(m68000_base_device *m68k, UINT16 w2) int rnd = (REG_FPCR(m68k) >> 4) & 3; int prec = (REG_FPCR(m68k) >> 6) & 3; - logerror("m68k_fpsp:fmove_fpcr fpcr=%04x prec=%d rnd=%d\n", REG_FPCR(m68k), prec, rnd); + m68k->logerror("m68k_fpsp:fmove_fpcr fpcr=%04x prec=%d rnd=%d\n", REG_FPCR(m68k), prec, rnd); #ifdef FLOATX80 switch (prec) diff --git a/src/devices/cpu/m68000/m68kops.c b/src/devices/cpu/m68000/m68kops.c index b0eeec4fad3..d64d1c1d300 100644 --- a/src/devices/cpu/m68000/m68kops.c +++ b/src/devices/cpu/m68000/m68kops.c @@ -8676,7 +8676,7 @@ void m68000_base_device_ops::m68k_op_callm_32_ai(m68000_base_device* mc68kcpu) m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */ REG_PC(mc68kcpu) += 2; (void)ea; /* just to avoid an 'unused variable' warning */ - logerror("%s at %08x: called unimplemented instruction %04x (callm)\n", + mc68kcpu->logerror("%s at %08x: called unimplemented instruction %04x (callm)\n", (mc68kcpu)->tag(), REG_PC(mc68kcpu) - 2, (mc68kcpu)->ir); return; } @@ -8694,7 +8694,7 @@ void m68000_base_device_ops::m68k_op_callm_32_di(m68000_base_device* mc68kcpu) m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */ REG_PC(mc68kcpu) += 2; (void)ea; /* just to avoid an 'unused variable' warning */ - logerror("%s at %08x: called unimplemented instruction %04x (callm)\n", + mc68kcpu->logerror("%s at %08x: called unimplemented instruction %04x (callm)\n", (mc68kcpu)->tag(), REG_PC(mc68kcpu) - 2, (mc68kcpu)->ir); return; } @@ -8712,7 +8712,7 @@ void m68000_base_device_ops::m68k_op_callm_32_ix(m68000_base_device* mc68kcpu) m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */ REG_PC(mc68kcpu) += 2; (void)ea; /* just to avoid an 'unused variable' warning */ - logerror("%s at %08x: called unimplemented instruction %04x (callm)\n", + mc68kcpu->logerror("%s at %08x: called unimplemented instruction %04x (callm)\n", (mc68kcpu)->tag(), REG_PC(mc68kcpu) - 2, (mc68kcpu)->ir); return; } @@ -8730,7 +8730,7 @@ void m68000_base_device_ops::m68k_op_callm_32_aw(m68000_base_device* mc68kcpu) m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */ REG_PC(mc68kcpu) += 2; (void)ea; /* just to avoid an 'unused variable' warning */ - logerror("%s at %08x: called unimplemented instruction %04x (callm)\n", + mc68kcpu->logerror("%s at %08x: called unimplemented instruction %04x (callm)\n", (mc68kcpu)->tag(), REG_PC(mc68kcpu) - 2, (mc68kcpu)->ir); return; } @@ -8748,7 +8748,7 @@ void m68000_base_device_ops::m68k_op_callm_32_al(m68000_base_device* mc68kcpu) m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */ REG_PC(mc68kcpu) += 2; (void)ea; /* just to avoid an 'unused variable' warning */ - logerror("%s at %08x: called unimplemented instruction %04x (callm)\n", + mc68kcpu->logerror("%s at %08x: called unimplemented instruction %04x (callm)\n", (mc68kcpu)->tag(), REG_PC(mc68kcpu) - 2, (mc68kcpu)->ir); return; } @@ -8766,7 +8766,7 @@ void m68000_base_device_ops::m68k_op_callm_32_pcdi(m68000_base_device* mc68kcpu) m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */ REG_PC(mc68kcpu) += 2; (void)ea; /* just to avoid an 'unused variable' warning */ - logerror("%s at %08x: called unimplemented instruction %04x (callm)\n", + mc68kcpu->logerror("%s at %08x: called unimplemented instruction %04x (callm)\n", (mc68kcpu)->tag(), REG_PC(mc68kcpu) - 2, (mc68kcpu)->ir); return; } @@ -8784,7 +8784,7 @@ void m68000_base_device_ops::m68k_op_callm_32_pcix(m68000_base_device* mc68kcpu) m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */ REG_PC(mc68kcpu) += 2; (void)ea; /* just to avoid an 'unused variable' warning */ - logerror("%s at %08x: called unimplemented instruction %04x (callm)\n", + mc68kcpu->logerror("%s at %08x: called unimplemented instruction %04x (callm)\n", (mc68kcpu)->tag(), REG_PC(mc68kcpu) - 2, (mc68kcpu)->ir); return; } @@ -12455,7 +12455,7 @@ void m68000_base_device_ops::m68k_op_cpbcc_32(m68000_base_device* mc68kcpu) { if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type)) { - logerror("%s at %08x: called unimplemented instruction %04x (cpbcc)\n", + mc68kcpu->logerror("%s at %08x: called unimplemented instruction %04x (cpbcc)\n", (mc68kcpu)->tag(), REG_PC(mc68kcpu) - 2, (mc68kcpu)->ir); return; } @@ -12467,7 +12467,7 @@ void m68000_base_device_ops::m68k_op_cpdbcc_32(m68000_base_device* mc68kcpu) { if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type)) { - logerror("%s at %08x: called unimplemented instruction %04x (cpdbcc)\n", + mc68kcpu->logerror("%s at %08x: called unimplemented instruction %04x (cpdbcc)\n", (mc68kcpu)->tag(), REG_PC(mc68kcpu) - 2, (mc68kcpu)->ir); return; } @@ -12479,7 +12479,7 @@ void m68000_base_device_ops::m68k_op_cpgen_32(m68000_base_device* mc68kcpu) { if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type) && (mc68kcpu->has_fpu || mc68kcpu->has_pmmu)) { - logerror("%s at %08x: called unimplemented instruction %04x (cpgen)\n", + mc68kcpu->logerror("%s at %08x: called unimplemented instruction %04x (cpgen)\n", (mc68kcpu)->tag(), REG_PC(mc68kcpu) - 2, (mc68kcpu)->ir); return; } @@ -12491,7 +12491,7 @@ void m68000_base_device_ops::m68k_op_cpscc_32(m68000_base_device* mc68kcpu) { if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type)) { - logerror("%s at %08x: called unimplemented instruction %04x (cpscc)\n", + mc68kcpu->logerror("%s at %08x: called unimplemented instruction %04x (cpscc)\n", (mc68kcpu)->tag(), REG_PC(mc68kcpu) - 2, (mc68kcpu)->ir); return; } @@ -12503,7 +12503,7 @@ void m68000_base_device_ops::m68k_op_cptrapcc_32(m68000_base_device* mc68kcpu) { if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type)) { - logerror("%s at %08x: called unimplemented instruction %04x (cptrapcc)\n", + mc68kcpu->logerror("%s at %08x: called unimplemented instruction %04x (cptrapcc)\n", (mc68kcpu)->tag(), REG_PC(mc68kcpu) - 2, (mc68kcpu)->ir); return; } @@ -26508,7 +26508,7 @@ void m68000_base_device_ops::m68k_op_pflusha_32(m68000_base_device* mc68kcpu) { if ((CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type)) && ((mc68kcpu)->has_pmmu)) { - logerror("68040: unhandled PFLUSHA (ir=%04x)\n", mc68kcpu->ir); + mc68kcpu->logerror("68040: unhandled PFLUSHA (ir=%04x)\n", mc68kcpu->ir); return; } m68ki_exception_1111(mc68kcpu); @@ -26519,7 +26519,7 @@ void m68000_base_device_ops::m68k_op_pflushan_32(m68000_base_device* mc68kcpu) { if ((CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type)) && ((mc68kcpu)->has_pmmu)) { - logerror("68040: unhandled PFLUSHAN (ir=%04x)\n", mc68kcpu->ir); + mc68kcpu->logerror("68040: unhandled PFLUSHAN (ir=%04x)\n", mc68kcpu->ir); return; } m68ki_exception_1111(mc68kcpu); @@ -26543,7 +26543,7 @@ void m68000_base_device_ops::m68k_op_ptest_32(m68000_base_device* mc68kcpu) { if ((CPU_TYPE_IS_040_PLUS((mc68kcpu)->cpu_type)) && ((mc68kcpu)->has_pmmu)) { - logerror("68040: unhandled PTEST\n"); + mc68kcpu->logerror("68040: unhandled PTEST\n"); return; } else @@ -27808,7 +27808,7 @@ void m68000_base_device_ops::m68k_op_rtm_32(m68000_base_device* mc68kcpu) if(CPU_TYPE_IS_020_VARIANT((mc68kcpu)->cpu_type)) { m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */ - logerror("%s at %08x: called unimplemented instruction %04x (rtm)\n", + mc68kcpu->logerror("%s at %08x: called unimplemented instruction %04x (rtm)\n", (mc68kcpu)->tag(), REG_PC(mc68kcpu) - 2, (mc68kcpu)->ir); return; } @@ -32746,7 +32746,7 @@ void m68000_base_device_ops::m68k_op_cpush_32(m68000_base_device* mc68kcpu) { if(CPU_TYPE_IS_040_PLUS((mc68kcpu)->cpu_type)) { - logerror("%s at %08x: called unimplemented instruction %04x (cpush)\n", + mc68kcpu->logerror("%s at %08x: called unimplemented instruction %04x (cpush)\n", (mc68kcpu)->tag(), REG_PC(mc68kcpu) - 2, (mc68kcpu)->ir); return; } diff --git a/src/devices/cpu/m6805/m6805.c b/src/devices/cpu/m6805/m6805.c index b7fc47c8dfc..f6de7d06351 100644 --- a/src/devices/cpu/m6805/m6805.c +++ b/src/devices/cpu/m6805/m6805.c @@ -424,7 +424,6 @@ void m6805_base_device::device_start() m_icountptr = &m_icount; // register our state for the debugger - std::string tempstr; state_add(STATE_GENPC, "GENPC", m_pc.w.l).noshow(); state_add(STATE_GENFLAGS, "GENFLAGS", m_cc).callimport().callexport().formatstr("%8s").noshow(); state_add(M6805_A, "A", m_a).mask(0xff); diff --git a/src/devices/cpu/mips/mips3.c b/src/devices/cpu/mips/mips3.c index 907adfb2926..ab210440d9d 100644 --- a/src/devices/cpu/mips/mips3.c +++ b/src/devices/cpu/mips/mips3.c @@ -2701,6 +2701,11 @@ void mips3_device::handle_special(UINT32 op) } } +void mips3_device::burn_cycles(INT32 cycles) +{ + execute_burn(cycles); +} + void mips3_device::execute_run() { if (m_isdrc) diff --git a/src/devices/cpu/mips/mips3.h b/src/devices/cpu/mips/mips3.h index 4ae8398dac0..9cbf28aa8ed 100644 --- a/src/devices/cpu/mips/mips3.h +++ b/src/devices/cpu/mips/mips3.h @@ -300,7 +300,8 @@ public: void clear_fastram(UINT32 select_start); void mips3drc_set_options(UINT32 options); void mips3drc_add_hotspot(offs_t pc, UINT32 opcode, UINT32 cycles); - + void burn_cycles(INT32 cycles); + protected: // device-level overrides virtual void device_start(); @@ -313,6 +314,7 @@ protected: virtual UINT32 execute_input_lines() const { return 6; } virtual void execute_run(); virtual void execute_set_input(int inputnum, int state); + virtual void execute_burn(INT32 cycles) { m_totalcycles += cycles; } // device_memory_interface overrides virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : NULL; } @@ -366,7 +368,7 @@ private: UINT32 m_nextpc; UINT32 m_pcbase; UINT8 m_cf[4][8]; - bool m_delayslot; + bool m_delayslot; int m_op; int m_interrupt_cycles; UINT32 m_ll_value; diff --git a/src/devices/cpu/psx/dma.c b/src/devices/cpu/psx/dma.c index 5f3386a188e..923182decda 100644 --- a/src/devices/cpu/psx/dma.c +++ b/src/devices/cpu/psx/dma.c @@ -12,7 +12,7 @@ #define VERBOSE_LEVEL ( 0 ) -INLINE void ATTR_PRINTF(3,4) verboselog( running_machine& machine, int n_level, const char *s_fmt, ... ) +INLINE void ATTR_PRINTF(3,4) verboselog( device_t& device, int n_level, const char *s_fmt, ... ) { if( VERBOSE_LEVEL >= n_level ) { @@ -21,7 +21,7 @@ INLINE void ATTR_PRINTF(3,4) verboselog( running_machine& machine, int n_level, va_start( v, s_fmt ); vsprintf( buf, s_fmt, v ); va_end( v ); - logerror( "%s: %s", machine.describe_context(), buf ); + device.logerror( "%s: %s", device.machine().describe_context(), buf ); } } @@ -118,13 +118,13 @@ void psxdma_device::dma_interrupt_update() if( ( n_mask & 0x80 ) != 0 && ( n_int & n_mask ) != 0 ) { - verboselog( machine(), 2, "dma_interrupt_update( %02x, %02x ) interrupt triggered\n", n_int, n_mask ); + verboselog( *this, 2, "dma_interrupt_update( %02x, %02x ) interrupt triggered\n", n_int, n_mask ); m_dicr |= 0x80000000; m_irq_handler(1); } else if( n_int != 0 ) { - verboselog( machine(), 2, "dma_interrupt_update( %02x, %02x ) interrupt not enabled\n", n_int, n_mask ); + verboselog( *this, 2, "dma_interrupt_update( %02x, %02x ) interrupt not enabled\n", n_int, n_mask ); } m_dicr &= 0x00ffffff | ( m_dicr << 8 ); } @@ -221,15 +221,15 @@ WRITE32_MEMBER( psxdma_device::write ) switch( offset % 4 ) { case 0: - verboselog( machine(), 2, "dmabase( %d ) = %08x\n", index, data ); + verboselog( *this, 2, "dmabase( %d ) = %08x\n", index, data ); dma->n_base = data; break; case 1: - verboselog( machine(), 2, "dmablockcontrol( %d ) = %08x\n", index, data ); + verboselog( *this, 2, "dmablockcontrol( %d ) = %08x\n", index, data ); dma->n_blockcontrol = data; break; case 2: - verboselog( machine(), 2, "dmachannelcontrol( %d ) = %08x\n", index, data ); + verboselog( *this, 2, "dmachannelcontrol( %d ) = %08x\n", index, data ); dma->n_channelcontrol = data; if( ( dma->n_channelcontrol & ( 1L << 0x18 ) ) != 0 && ( m_dpcp & ( 1 << ( 3 + ( index * 4 ) ) ) ) != 0 ) { @@ -256,14 +256,14 @@ WRITE32_MEMBER( psxdma_device::write ) if( dma->n_channelcontrol == 0x01000000 && !dma->fn_read.isnull() ) { - verboselog( machine(), 1, "dma %d read block %08x %08x\n", index, n_address, n_size ); + verboselog( *this, 1, "dma %d read block %08x %08x\n", index, n_address, n_size ); dma->fn_read( m_ram, n_address, n_size ); dma_finished( index ); } else if ((dma->n_channelcontrol & 0xffbffeff) == 0x11000000 && // CD DMA !dma->fn_read.isnull() ) { - verboselog( machine(), 1, "dma %d read block %08x %08x\n", index, n_address, n_size ); + verboselog( *this, 1, "dma %d read block %08x %08x\n", index, n_address, n_size ); // pSX's CD DMA size calc formula int oursize = (dma->n_blockcontrol>>16); @@ -276,7 +276,7 @@ WRITE32_MEMBER( psxdma_device::write ) else if( dma->n_channelcontrol == 0x01000200 && !dma->fn_read.isnull() ) { - verboselog( machine(), 1, "dma %d read block %08x %08x\n", index, n_address, n_size ); + verboselog( *this, 1, "dma %d read block %08x %08x\n", index, n_address, n_size ); dma->fn_read( m_ram, n_address, n_size ); if( index == 1 ) { @@ -290,7 +290,7 @@ WRITE32_MEMBER( psxdma_device::write ) else if( dma->n_channelcontrol == 0x01000201 && !dma->fn_write.isnull() ) { - verboselog( machine(), 1, "dma %d write block %08x %08x\n", index, n_address, n_size ); + verboselog( *this, 1, "dma %d write block %08x %08x\n", index, n_address, n_size ); dma->fn_write( m_ram, n_address, n_size ); dma_finished( index ); } @@ -298,7 +298,7 @@ WRITE32_MEMBER( psxdma_device::write ) !dma->fn_write.isnull() ) { /* todo: check this is a write not a read... */ - verboselog( machine(), 1, "dma %d write block %08x %08x\n", index, n_address, n_size ); + verboselog( *this, 1, "dma %d write block %08x %08x\n", index, n_address, n_size ); dma->fn_write( m_ram, n_address, n_size ); dma_finished( index ); } @@ -306,7 +306,7 @@ WRITE32_MEMBER( psxdma_device::write ) !dma->fn_write.isnull() ) { /* todo: check this is a write not a read... */ - verboselog( machine(), 1, "dma %d write block %08x %08x\n", index, n_address, n_size ); + verboselog( *this, 1, "dma %d write block %08x %08x\n", index, n_address, n_size ); dma->fn_write( m_ram, n_address, n_size ); dma_finished( index ); } @@ -314,7 +314,7 @@ WRITE32_MEMBER( psxdma_device::write ) index == 2 && !dma->fn_write.isnull() ) { - verboselog( machine(), 1, "dma %d write linked list %08x\n", + verboselog( *this, 1, "dma %d write linked list %08x\n", index, dma->n_base ); dma_finished( index ); @@ -322,7 +322,7 @@ WRITE32_MEMBER( psxdma_device::write ) else if( dma->n_channelcontrol == 0x11000002 && index == 6 ) { - verboselog( machine(), 1, "dma 6 reverse clear %08x %08x\n", + verboselog( *this, 1, "dma 6 reverse clear %08x %08x\n", dma->n_base, dma->n_blockcontrol ); if( n_size > 0 ) { @@ -340,16 +340,16 @@ WRITE32_MEMBER( psxdma_device::write ) } else { - verboselog( machine(), 1, "dma %d unknown mode %08x\n", index, dma->n_channelcontrol ); + verboselog( *this, 1, "dma %d unknown mode %08x\n", index, dma->n_channelcontrol ); } } else if( dma->n_channelcontrol != 0 ) { - verboselog( machine(), 1, "psx_dma_w( %04x, %08x, %08x ) channel not enabled\n", offset, dma->n_channelcontrol, mem_mask ); + verboselog( *this, 1, "psx_dma_w( %04x, %08x, %08x ) channel not enabled\n", offset, dma->n_channelcontrol, mem_mask ); } break; default: - verboselog( machine(), 1, "psx_dma_w( %04x, %08x, %08x ) Unknown dma channel register\n", offset, data, mem_mask ); + verboselog( *this, 1, "psx_dma_w( %04x, %08x, %08x ) Unknown dma channel register\n", offset, data, mem_mask ); break; } } @@ -358,7 +358,7 @@ WRITE32_MEMBER( psxdma_device::write ) switch( offset % 4 ) { case 0x0: - verboselog( machine(), 1, "psx_dma_w( %04x, %08x, %08x ) dpcp\n", offset, data, mem_mask ); + verboselog( *this, 1, "psx_dma_w( %04x, %08x, %08x ) dpcp\n", offset, data, mem_mask ); m_dpcp = ( m_dpcp & ~mem_mask ) | data; break; case 0x1: @@ -369,14 +369,14 @@ WRITE32_MEMBER( psxdma_device::write ) if( ( m_dicr & 0x80000000 ) != 0 && ( m_dicr & 0x7f000000 ) == 0 ) { - verboselog( machine(), 2, "dma interrupt cleared\n" ); + verboselog( *this, 2, "dma interrupt cleared\n" ); m_dicr &= ~0x80000000; } - verboselog( machine(), 1, "psx_dma_w( %04x, %08x, %08x ) dicr -> %08x\n", offset, data, mem_mask, m_dicr ); + verboselog( *this, 1, "psx_dma_w( %04x, %08x, %08x ) dicr -> %08x\n", offset, data, mem_mask, m_dicr ); break; default: - verboselog( machine(), 0, "psx_dma_w( %04x, %08x, %08x ) Unknown dma control register\n", offset, data, mem_mask ); + verboselog( *this, 0, "psx_dma_w( %04x, %08x, %08x ) Unknown dma control register\n", offset, data, mem_mask ); break; } } @@ -392,16 +392,16 @@ READ32_MEMBER( psxdma_device::read ) switch( offset % 4 ) { case 0: - verboselog( machine(), 1, "psx_dma_r dmabase[ %d ] ( %08x )\n", index, dma->n_base ); + verboselog( *this, 1, "psx_dma_r dmabase[ %d ] ( %08x )\n", index, dma->n_base ); return dma->n_base; case 1: - verboselog( machine(), 1, "psx_dma_r dmablockcontrol[ %d ] ( %08x )\n", index, dma->n_blockcontrol ); + verboselog( *this, 1, "psx_dma_r dmablockcontrol[ %d ] ( %08x )\n", index, dma->n_blockcontrol ); return dma->n_blockcontrol; case 2: - verboselog( machine(), 1, "psx_dma_r dmachannelcontrol[ %d ] ( %08x )\n", index, dma->n_channelcontrol ); + verboselog( *this, 1, "psx_dma_r dmachannelcontrol[ %d ] ( %08x )\n", index, dma->n_channelcontrol ); return dma->n_channelcontrol; default: - verboselog( machine(), 0, "psx_dma_r( %08x, %08x ) Unknown dma channel register\n", offset, mem_mask ); + verboselog( *this, 0, "psx_dma_r( %08x, %08x ) Unknown dma channel register\n", offset, mem_mask ); break; } } @@ -410,13 +410,13 @@ READ32_MEMBER( psxdma_device::read ) switch( offset % 4 ) { case 0x0: - verboselog( machine(), 1, "psx_dma_r dpcp ( %08x )\n", m_dpcp ); + verboselog( *this, 1, "psx_dma_r dpcp ( %08x )\n", m_dpcp ); return m_dpcp; case 0x1: - verboselog( machine(), 1, "psx_dma_r dicr ( %08x )\n", m_dicr ); + verboselog( *this, 1, "psx_dma_r dicr ( %08x )\n", m_dicr ); return m_dicr; default: - verboselog( machine(), 0, "psx_dma_r( %08x, %08x ) Unknown dma control register\n", offset, mem_mask ); + verboselog( *this, 0, "psx_dma_r( %08x, %08x ) Unknown dma control register\n", offset, mem_mask ); break; } } diff --git a/src/devices/cpu/psx/gte.c b/src/devices/cpu/psx/gte.c index ce50afba6a4..7b33804b289 100644 --- a/src/devices/cpu/psx/gte.c +++ b/src/devices/cpu/psx/gte.c @@ -939,8 +939,8 @@ int gte::docop2( UINT32 pc, int gteop ) return 1; } - popmessage( "unknown GTE op %08x", gteop ); - logerror( "%08x: unknown GTE op %08x\n", pc, gteop ); + //popmessage( "unknown GTE op %08x", gteop ); + //logerror( "%08x: unknown GTE op %08x\n", pc, gteop ); return 0; } diff --git a/src/devices/cpu/psx/irq.c b/src/devices/cpu/psx/irq.c index 51b55cd2639..d8ba3383214 100644 --- a/src/devices/cpu/psx/irq.c +++ b/src/devices/cpu/psx/irq.c @@ -14,7 +14,7 @@ #define PSX_IRQ_MASK ( 0x7fd ) -INLINE void ATTR_PRINTF(3,4) verboselog( running_machine& machine, int n_level, const char *s_fmt, ... ) +INLINE void ATTR_PRINTF(3,4) verboselog( device_t& device, int n_level, const char *s_fmt, ... ) { if( VERBOSE_LEVEL >= n_level ) { @@ -23,7 +23,7 @@ INLINE void ATTR_PRINTF(3,4) verboselog( running_machine& machine, int n_level, va_start( v, s_fmt ); vsprintf( buf, s_fmt, v ); va_end( v ); - logerror( "%s: %s", machine.describe_context(), buf ); + device.logerror( "%s: %s", device.machine().describe_context(), buf ); } } @@ -58,7 +58,7 @@ void psxirq_device::device_start() void psxirq_device::set( UINT32 bitmask ) { - verboselog( machine(), 2, "psx_irq_set %08x\n", bitmask ); + verboselog( *this, 2, "psx_irq_set %08x\n", bitmask ); n_irqdata |= bitmask; psx_irq_update(); } @@ -67,12 +67,12 @@ void psxirq_device::psx_irq_update( void ) { if( ( n_irqdata & n_irqmask ) != 0 ) { - verboselog( machine(), 2, "psx irq assert\n" ); + verboselog( *this, 2, "psx irq assert\n" ); m_irq_handler( ASSERT_LINE ); } else { - verboselog( machine(), 2, "psx irq clear\n" ); + verboselog( *this, 2, "psx irq clear\n" ); m_irq_handler( CLEAR_LINE ); } } @@ -82,21 +82,21 @@ WRITE32_MEMBER( psxirq_device::write ) switch( offset ) { case 0x00: - verboselog( machine(), 2, "psx irq data ( %08x, %08x ) %08x -> %08x\n", data, mem_mask, n_irqdata, ( n_irqdata & ~mem_mask ) | ( n_irqdata & n_irqmask & data ) ); + verboselog( *this, 2, "psx irq data ( %08x, %08x ) %08x -> %08x\n", data, mem_mask, n_irqdata, ( n_irqdata & ~mem_mask ) | ( n_irqdata & n_irqmask & data ) ); n_irqdata = ( n_irqdata & ~mem_mask ) | ( n_irqdata & n_irqmask & data ); psx_irq_update(); break; case 0x01: - verboselog( machine(), 2, "psx irq mask ( %08x, %08x ) %08x -> %08x\n", data, mem_mask, n_irqmask, ( n_irqmask & ~mem_mask ) | data ); + verboselog( *this, 2, "psx irq mask ( %08x, %08x ) %08x -> %08x\n", data, mem_mask, n_irqmask, ( n_irqmask & ~mem_mask ) | data ); n_irqmask = ( n_irqmask & ~mem_mask ) | data; if( ( n_irqmask &~ PSX_IRQ_MASK ) != 0 ) { - verboselog( machine(), 0, "psx_irq_w( %08x, %08x, %08x ) unknown irq\n", offset, data, mem_mask ); + verboselog( *this, 0, "psx_irq_w( %08x, %08x, %08x ) unknown irq\n", offset, data, mem_mask ); } psx_irq_update(); break; default: - verboselog( machine(), 0, "psx_irq_w( %08x, %08x, %08x ) unknown register\n", offset, data, mem_mask ); + verboselog( *this, 0, "psx_irq_w( %08x, %08x, %08x ) unknown register\n", offset, data, mem_mask ); break; } } @@ -106,13 +106,13 @@ READ32_MEMBER( psxirq_device::read ) switch( offset ) { case 0x00: - verboselog( machine(), 1, "psx_irq_r irq data %08x\n", n_irqdata ); + verboselog( *this, 1, "psx_irq_r irq data %08x\n", n_irqdata ); return n_irqdata; case 0x01: - verboselog( machine(), 1, "psx_irq_r irq mask %08x\n", n_irqmask ); + verboselog( *this, 1, "psx_irq_r irq mask %08x\n", n_irqmask ); return n_irqmask; default: - verboselog( machine(), 0, "psx_irq_r unknown register %d\n", offset ); + verboselog( *this, 0, "psx_irq_r unknown register %d\n", offset ); break; } return 0; diff --git a/src/devices/cpu/psx/mdec.c b/src/devices/cpu/psx/mdec.c index 57c6b3393b4..716102d1324 100644 --- a/src/devices/cpu/psx/mdec.c +++ b/src/devices/cpu/psx/mdec.c @@ -15,7 +15,7 @@ #define VERBOSE_LEVEL ( 0 ) -INLINE void ATTR_PRINTF(3,4) verboselog( running_machine& machine, int n_level, const char *s_fmt, ... ) +INLINE void ATTR_PRINTF(3,4) verboselog( device_t& device, int n_level, const char *s_fmt, ... ) { if( VERBOSE_LEVEL >= n_level ) { @@ -24,7 +24,7 @@ INLINE void ATTR_PRINTF(3,4) verboselog( running_machine& machine, int n_level, va_start( v, s_fmt ); vsprintf( buf, s_fmt, v ); va_end( v ); - logerror( "%s: %s", machine.describe_context(), buf ); + device.logerror( "%s: %s", device.machine().describe_context(), buf ); } } @@ -424,18 +424,18 @@ void psxmdec_device::dma_write( UINT32 *p_n_psxram, UINT32 n_address, INT32 n_si { int n_index; - verboselog( machine(), 2, "mdec0_write( %08x, %08x )\n", n_address, n_size ); + verboselog( *this, 2, "mdec0_write( %08x, %08x )\n", n_address, n_size ); switch( n_0_command >> 28 ) { case 0x3: - verboselog( machine(), 1, "mdec decode %08x %08x %08x\n", n_0_command, n_address, n_size ); + verboselog( *this, 1, "mdec decode %08x %08x %08x\n", n_0_command, n_address, n_size ); n_0_address = n_address; n_0_size = n_size * 4; n_1_status |= ( 1L << 29 ); break; case 0x4: - verboselog( machine(), 1, "mdec quantize table %08x %08x %08x\n", n_0_command, n_address, n_size ); + verboselog( *this, 1, "mdec quantize table %08x %08x %08x\n", n_0_command, n_address, n_size ); n_index = 0; while( n_size > 0 ) { @@ -459,7 +459,7 @@ void psxmdec_device::dma_write( UINT32 *p_n_psxram, UINT32 n_address, INT32 n_si } break; case 0x6: - verboselog( machine(), 1, "mdec cosine table %08x %08x %08x\n", n_0_command, n_address, n_size ); + verboselog( *this, 1, "mdec cosine table %08x %08x %08x\n", n_0_command, n_address, n_size ); n_index = 0; while( n_size > 0 ) { @@ -472,7 +472,7 @@ void psxmdec_device::dma_write( UINT32 *p_n_psxram, UINT32 n_address, INT32 n_si mdec_cos_precalc(); break; default: - verboselog( machine(), 0, "mdec unknown command %08x %08x %08x\n", n_0_command, n_address, n_size ); + verboselog( *this, 0, "mdec unknown command %08x %08x %08x\n", n_0_command, n_address, n_size ); break; } } @@ -482,7 +482,7 @@ void psxmdec_device::dma_read( UINT32 *p_n_psxram, UINT32 n_address, INT32 n_siz UINT32 n_this; UINT32 n_nextaddress; - verboselog( machine(), 2, "mdec1_read( %08x, %08x )\n", n_address, n_size ); + verboselog( *this, 2, "mdec1_read( %08x, %08x )\n", n_address, n_size ); if( ( n_0_command & ( 1L << 29 ) ) != 0 && n_0_size != 0 ) { while( n_size > 0 ) @@ -547,11 +547,11 @@ WRITE32_MEMBER( psxmdec_device::write ) switch( offset ) { case 0: - verboselog( machine(), 2, "mdec 0 command %08x\n", data ); + verboselog( *this, 2, "mdec 0 command %08x\n", data ); n_0_command = data; break; case 1: - verboselog( machine(), 2, "mdec 1 command %08x\n", data ); + verboselog( *this, 2, "mdec 1 command %08x\n", data ); n_1_command = data; break; } @@ -562,10 +562,10 @@ READ32_MEMBER( psxmdec_device::read ) switch( offset ) { case 0: - verboselog( machine(), 2, "mdec 0 status %08x\n", 0 ); + verboselog( *this, 2, "mdec 0 status %08x\n", 0 ); return 0; case 1: - verboselog( machine(), 2, "mdec 1 status %08x\n", n_1_status ); + verboselog( *this, 2, "mdec 1 status %08x\n", n_1_status ); return n_1_status; } return 0; diff --git a/src/devices/cpu/psx/rcnt.c b/src/devices/cpu/psx/rcnt.c index 31d3eb468e9..fa7473e0453 100644 --- a/src/devices/cpu/psx/rcnt.c +++ b/src/devices/cpu/psx/rcnt.c @@ -11,7 +11,7 @@ #define VERBOSE_LEVEL ( 0 ) -INLINE void ATTR_PRINTF(3,4) verboselog( running_machine& machine, int n_level, const char *s_fmt, ... ) +INLINE void ATTR_PRINTF(3,4) verboselog( device_t& device, int n_level, const char *s_fmt, ... ) { if( VERBOSE_LEVEL >= n_level ) { @@ -20,7 +20,7 @@ INLINE void ATTR_PRINTF(3,4) verboselog( running_machine& machine, int n_level, va_start( v, s_fmt ); vsprintf( buf, s_fmt, v ); va_end( v ); - logerror( "%s: %s", machine.describe_context(), buf ); + device.logerror( "%s: %s", device.machine().describe_context(), buf ); } } @@ -74,7 +74,7 @@ WRITE32_MEMBER( psxrcnt_device::write ) int n_counter = offset / 4; psx_root *root = &root_counter[ n_counter ]; - verboselog( machine(), 1, "psx_counter_w ( %08x, %08x, %08x )\n", offset, data, mem_mask ); + verboselog( *this, 1, "psx_counter_w ( %08x, %08x, %08x )\n", offset, data, mem_mask ); switch( offset % 4 ) { @@ -107,7 +107,7 @@ WRITE32_MEMBER( psxrcnt_device::write ) root->n_target = data; break; default: - verboselog( machine(), 0, "psx_counter_w( %08x, %08x, %08x ) unknown register\n", offset, mem_mask, data ); + verboselog( *this, 0, "psx_counter_w( %08x, %08x, %08x ) unknown register\n", offset, mem_mask, data ); return; } @@ -132,10 +132,10 @@ READ32_MEMBER( psxrcnt_device::read ) data = root->n_target; break; default: - verboselog( machine(), 0, "psx_counter_r( %08x, %08x ) unknown register\n", offset, mem_mask ); + verboselog( *this, 0, "psx_counter_r( %08x, %08x ) unknown register\n", offset, mem_mask ); return 0; } - verboselog( machine(), 1, "psx_counter_r ( %08x, %08x ) %08x\n", offset, mem_mask, data ); + verboselog( *this, 1, "psx_counter_r ( %08x, %08x ) %08x\n", offset, mem_mask, data ); return data; } @@ -231,7 +231,7 @@ void psxrcnt_device::device_timer(emu_timer &timer, device_timer_id id, int para int n_counter = id; psx_root *root = &root_counter[ n_counter ]; - verboselog( machine(), 2, "root_finished( %d ) %04x\n", n_counter, root_current( n_counter ) ); + verboselog( *this, 2, "root_finished( %d ) %04x\n", n_counter, root_current( n_counter ) ); //if( ( root->n_mode & PSX_RC_COUNTTARGET ) != 0 ) { /* TODO: wrap should be handled differently as PSX_RC_COUNTTARGET & PSX_RC_IRQTARGET don't have to be the same. */ diff --git a/src/devices/cpu/psx/sio.c b/src/devices/cpu/psx/sio.c index abf3c4b8bf1..09333a283bb 100644 --- a/src/devices/cpu/psx/sio.c +++ b/src/devices/cpu/psx/sio.c @@ -11,7 +11,7 @@ #define VERBOSE_LEVEL ( 0 ) -INLINE void ATTR_PRINTF(3,4) verboselog( running_machine& machine, int n_level, const char *s_fmt, ... ) +INLINE void ATTR_PRINTF(3,4) verboselog( device_t& device, int n_level, const char *s_fmt, ... ) { if( VERBOSE_LEVEL >= n_level ) { @@ -20,7 +20,7 @@ INLINE void ATTR_PRINTF(3,4) verboselog( running_machine& machine, int n_level, va_start( v, s_fmt ); vsprintf( buf, s_fmt, v ); va_end( v ); - logerror( "%s: %s", machine.describe_context(), buf ); + device.logerror( "%s: %s", device.machine().describe_context(), buf ); } } @@ -88,7 +88,7 @@ void psxsio_device::device_start() void psxsio_device::sio_interrupt() { - verboselog( machine(), 1, "sio_interrupt( %s )\n", tag() ); + verboselog( *this, 1, "sio_interrupt( %s )\n", tag() ); m_status |= SIO_STATUS_IRQ; m_irq_handler(1); } @@ -120,18 +120,18 @@ void psxsio_device::sio_timer_adjust() if( m_baud != 0 && n_prescaler != 0 ) { n_time = attotime::from_hz(33868800) * (n_prescaler * m_baud); - verboselog( machine(), 2, "sio_timer_adjust( %s ) = %s ( %d x %d )\n", tag(), n_time.as_string(), n_prescaler, m_baud ); + verboselog( *this, 2, "sio_timer_adjust( %s ) = %s ( %d x %d )\n", tag(), n_time.as_string(), n_prescaler, m_baud ); } else { n_time = attotime::never; - verboselog( machine(), 0, "sio_timer_adjust( %s ) invalid baud rate ( %d x %d )\n", tag(), n_prescaler, m_baud ); + verboselog( *this, 0, "sio_timer_adjust( %s ) invalid baud rate ( %d x %d )\n", tag(), n_prescaler, m_baud ); } } else { n_time = attotime::never; - verboselog( machine(), 2, "sio_timer_adjust( %s ) finished\n", tag() ); + verboselog( *this, 2, "sio_timer_adjust( %s ) finished\n", tag() ); } m_timer->adjust( n_time ); @@ -139,7 +139,7 @@ void psxsio_device::sio_timer_adjust() void psxsio_device::device_timer(emu_timer &timer, device_timer_id tid, int param, void *ptr) { - verboselog( machine(), 2, "sio tick\n" ); + verboselog( *this, 2, "sio tick\n" ); if( m_tx_bits == 0 && ( m_control & SIO_CONTROL_TX_ENA ) != 0 && @@ -213,29 +213,29 @@ WRITE32_MEMBER( psxsio_device::write ) switch( offset % 4 ) { case 0: - verboselog( machine(), 1, "psx_sio_w %s data %02x (%08x)\n", tag(), data, mem_mask ); + verboselog( *this, 1, "psx_sio_w %s data %02x (%08x)\n", tag(), data, mem_mask ); m_tx_data = data; m_status &= ~( SIO_STATUS_TX_RDY ); m_status &= ~( SIO_STATUS_TX_EMPTY ); sio_timer_adjust(); break; case 1: - verboselog( machine(), 0, "psx_sio_w( %08x, %08x, %08x )\n", offset, data, mem_mask ); + verboselog( *this, 0, "psx_sio_w( %08x, %08x, %08x )\n", offset, data, mem_mask ); break; case 2: if( ACCESSING_BITS_0_15 ) { m_mode = data & 0xffff; - verboselog( machine(), 1, "psx_sio_w %s mode %04x\n", tag(), data & 0xffff ); + verboselog( *this, 1, "psx_sio_w %s mode %04x\n", tag(), data & 0xffff ); } if( ACCESSING_BITS_16_31 ) { - verboselog( machine(), 1, "psx_sio_w %s control %04x\n", tag(), data >> 16 ); + verboselog( *this, 1, "psx_sio_w %s control %04x\n", tag(), data >> 16 ); m_control = data >> 16; if( ( m_control & SIO_CONTROL_RESET ) != 0 ) { - verboselog( machine(), 1, "psx_sio_w reset\n" ); + verboselog( *this, 1, "psx_sio_w reset\n" ); m_status |= SIO_STATUS_TX_EMPTY | SIO_STATUS_TX_RDY; m_status &= ~( SIO_STATUS_RX_RDY | SIO_STATUS_OVERRUN | SIO_STATUS_IRQ ); m_irq_handler(0); @@ -252,7 +252,7 @@ WRITE32_MEMBER( psxsio_device::write ) } if( ( m_control & SIO_CONTROL_IACK ) != 0 ) { - verboselog( machine(), 1, "psx_sio_w iack\n" ); + verboselog( *this, 1, "psx_sio_w iack\n" ); m_status &= ~( SIO_STATUS_IRQ ); m_control &= ~( SIO_CONTROL_IACK ); m_irq_handler(0); @@ -270,16 +270,16 @@ WRITE32_MEMBER( psxsio_device::write ) case 3: if( ACCESSING_BITS_0_15 ) { - verboselog( machine(), 0, "psx_sio_w( %08x, %08x, %08x )\n", offset, data, mem_mask ); + verboselog( *this, 0, "psx_sio_w( %08x, %08x, %08x )\n", offset, data, mem_mask ); } if( ACCESSING_BITS_16_31 ) { m_baud = data >> 16; - verboselog( machine(), 1, "psx_sio_w %s baud %04x\n", tag(), data >> 16 ); + verboselog( *this, 1, "psx_sio_w %s baud %04x\n", tag(), data >> 16 ); } break; default: - verboselog( machine(), 0, "psx_sio_w( %08x, %08x, %08x )\n", offset, data, mem_mask ); + verboselog( *this, 0, "psx_sio_w( %08x, %08x, %08x )\n", offset, data, mem_mask ); break; } } @@ -294,44 +294,44 @@ READ32_MEMBER( psxsio_device::read ) data = m_rx_data; m_status &= ~( SIO_STATUS_RX_RDY ); m_rx_data = 0xff; - verboselog( machine(), 1, "psx_sio_r %s data %02x (%08x)\n", tag(), data, mem_mask ); + verboselog( *this, 1, "psx_sio_r %s data %02x (%08x)\n", tag(), data, mem_mask ); break; case 1: data = m_status; if( ACCESSING_BITS_0_15 ) { - verboselog( machine(), 1, "psx_sio_r %s status %04x\n", tag(), data & 0xffff ); + verboselog( *this, 1, "psx_sio_r %s status %04x\n", tag(), data & 0xffff ); } if( ACCESSING_BITS_16_31 ) { - verboselog( machine(), 0, "psx_sio_r( %08x, %08x ) %08x\n", offset, mem_mask, data ); + verboselog( *this, 0, "psx_sio_r( %08x, %08x ) %08x\n", offset, mem_mask, data ); } break; case 2: data = ( m_control << 16 ) | m_mode; if( ACCESSING_BITS_0_15 ) { - verboselog( machine(), 1, "psx_sio_r %s mode %04x\n", tag(), data & 0xffff ); + verboselog( *this, 1, "psx_sio_r %s mode %04x\n", tag(), data & 0xffff ); } if( ACCESSING_BITS_16_31 ) { - verboselog( machine(), 1, "psx_sio_r %s control %04x\n", tag(), data >> 16 ); + verboselog( *this, 1, "psx_sio_r %s control %04x\n", tag(), data >> 16 ); } break; case 3: data = m_baud << 16; if( ACCESSING_BITS_0_15 ) { - verboselog( machine(), 0, "psx_sio_r( %08x, %08x ) %08x\n", offset, mem_mask, data ); + verboselog( *this, 0, "psx_sio_r( %08x, %08x ) %08x\n", offset, mem_mask, data ); } if( ACCESSING_BITS_16_31 ) { - verboselog( machine(), 1, "psx_sio_r %s baud %04x\n", tag(), data >> 16 ); + verboselog( *this, 1, "psx_sio_r %s baud %04x\n", tag(), data >> 16 ); } break; default: data = 0; - verboselog( machine(), 0, "psx_sio_r( %08x, %08x ) %08x\n", offset, mem_mask, data ); + verboselog( *this, 0, "psx_sio_r( %08x, %08x ) %08x\n", offset, mem_mask, data ); break; } return data; diff --git a/src/devices/cpu/ssem/ssem.c b/src/devices/cpu/ssem/ssem.c index aae760aa26d..0b2af498b95 100644 --- a/src/devices/cpu/ssem/ssem.c +++ b/src/devices/cpu/ssem/ssem.c @@ -100,7 +100,6 @@ void ssem_device::device_start() m_program = &space(AS_PROGRAM); // register our state for the debugger - std::string tempstr; state_add(STATE_GENPC, "GENPC", m_pc).noshow(); state_add(STATE_GENFLAGS, "GENFLAGS", m_halt).callimport().callexport().formatstr("%1s").noshow(); state_add(SSEM_PC, "PC", m_shifted_pc).mask(0xffff); diff --git a/src/devices/cpu/tms32082/tms32082.c b/src/devices/cpu/tms32082/tms32082.c index 6ce5a2e2c80..c3c95f9305f 100644 --- a/src/devices/cpu/tms32082/tms32082.c +++ b/src/devices/cpu/tms32082/tms32082.c @@ -512,12 +512,15 @@ void tms32082_mp_device::execute_run() m_ir = fetch(); execute(); - m_tcount--; - if (m_tcount < 0) + if (m_tcount == 0) { // TODO: timer interrupt m_tcount = m_tscale; } + else + { + m_tcount--; + } m_icount--; }; diff --git a/src/devices/cpu/tms9900/9900dasm.c b/src/devices/cpu/tms9900/9900dasm.c index 7b3153e6c4c..5daf4a88310 100644 --- a/src/devices/cpu/tms9900/9900dasm.c +++ b/src/devices/cpu/tms9900/9900dasm.c @@ -787,7 +787,7 @@ unsigned Dasm9900 (char *buffer, unsigned pc, int model_id, const UINT8 *oprom, } default: - logerror("debbugger internal error, file %s, line %d\n", __FILE__, __LINE__); + osd_printf_error("debbugger internal error, file %s, line %d\n", __FILE__, __LINE__); case illegal: sprintf (buffer, "data >%04x", OP); break; diff --git a/src/devices/cpu/upd7725/upd7725.c b/src/devices/cpu/upd7725/upd7725.c index d422eae21b0..ce78b447f59 100644 --- a/src/devices/cpu/upd7725/upd7725.c +++ b/src/devices/cpu/upd7725/upd7725.c @@ -69,7 +69,6 @@ void necdsp_device::device_start() m_direct = &m_program->direct(); // register our state for the debugger - std::string tempstr; state_add(STATE_GENPC, "GENPC", regs.pc).noshow(); state_add(UPD7725_PC, "PC", regs.pc); state_add(UPD7725_RP, "RP", regs.rp); diff --git a/src/devices/cpu/z80/z80.c b/src/devices/cpu/z80/z80.c index 2b5e2e877f7..ee58f870578 100644 --- a/src/devices/cpu/z80/z80.c +++ b/src/devices/cpu/z80/z80.c @@ -473,7 +473,11 @@ inline UINT8 z80_device::rop() { unsigned pc = PCD; PC++; - return m_decrypted_opcodes_direct->read_byte(pc); + UINT8 res = m_decrypted_opcodes_direct->read_byte(pc); + m_icount -= 2; + m_refresh_cb((m_i << 8) | (m_r2 & 0x80) | ((m_r-1) & 0x7f)); + m_icount += 2; + return res; } /**************************************************************** @@ -3141,6 +3145,9 @@ void z80_device::take_interrupt() else irq_vector = m_irq_callback(*this, 0); + /* Say hi */ + m_irqack_cb(true); + LOG(("Z80 '%s' single int. irq_vector $%02x\n", tag(), irq_vector)); /* Interrupt mode 2. Call [i:databyte] */ @@ -3429,6 +3436,9 @@ void z80_device::device_start() m_cc_xy = cc_xy; m_cc_xycb = cc_xycb; m_cc_ex = cc_ex; + + m_irqack_cb.resolve_safe(); + m_refresh_cb.resolve_safe(); } void nsc800_device::device_start() @@ -3705,7 +3715,9 @@ z80_device::z80_device(const machine_config &mconfig, const char *tag, device_t cpu_device(mconfig, Z80, "Z80", tag, owner, clock, "z80", __FILE__), m_program_config("program", ENDIANNESS_LITTLE, 8, 16, 0), m_decrypted_opcodes_config("decrypted_opcodes", ENDIANNESS_LITTLE, 8, 16, 0), - m_io_config("io", ENDIANNESS_LITTLE, 8, 16, 0) + m_io_config("io", ENDIANNESS_LITTLE, 8, 16, 0), + m_irqack_cb(*this), + m_refresh_cb(*this) { } @@ -3713,7 +3725,9 @@ z80_device::z80_device(const machine_config &mconfig, device_type type, const ch cpu_device(mconfig, type, name, tag, owner, clock, shortname, source), m_program_config("program", ENDIANNESS_LITTLE, 8, 16, 0), m_decrypted_opcodes_config("decrypted_opcodes", ENDIANNESS_LITTLE, 8, 16, 0), - m_io_config("io", ENDIANNESS_LITTLE, 8, 16, 0) + m_io_config("io", ENDIANNESS_LITTLE, 8, 16, 0), + m_irqack_cb(*this), + m_refresh_cb(*this) { } diff --git a/src/devices/cpu/z80/z80.h b/src/devices/cpu/z80/z80.h index e424c4f9937..40cc67222dd 100644 --- a/src/devices/cpu/z80/z80.h +++ b/src/devices/cpu/z80/z80.h @@ -7,6 +7,12 @@ #include "z80daisy.h" +#define MCFG_Z80_SET_IRQACK_CALLBACK(_devcb) \ + devcb = &z80_device::set_irqack_cb(*device, DEVCB_##_devcb); + +#define MCFG_Z80_SET_REFRESH_CALLBACK(_devcb) \ + devcb = &z80_device::set_refresh_cb(*device, DEVCB_##_devcb); + enum { NSC800_RSTA = INPUT_LINE_IRQ0 + 1, @@ -38,6 +44,8 @@ public: DECLARE_WRITE_LINE_MEMBER( irq_line ); void z80_set_cycle_tables(const UINT8 *op, const UINT8 *cb, const UINT8 *ed, const UINT8 *xy, const UINT8 *xycb, const UINT8 *ex); + template<class _Object> static devcb_base &set_irqack_cb(device_t &device, _Object object) { return downcast<z80_device &>(device).m_irqack_cb.set_callback(object); } + template<class _Object> static devcb_base &set_refresh_cb(device_t &device, _Object object) { return downcast<z80_device &>(device).m_refresh_cb.set_callback(object); } protected: z80_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source); @@ -240,6 +248,8 @@ protected: address_space *m_io; direct_read_data *m_direct; direct_read_data *m_decrypted_opcodes_direct; + devcb_write_line m_irqack_cb; + devcb_write16 m_refresh_cb; PAIR m_prvpc; PAIR m_pc; diff --git a/src/devices/cpu/z8000/z8000tbl.inc b/src/devices/cpu/z8000/z8000tbl.inc index e4959706858..3b9d696b210 100644 --- a/src/devices/cpu/z8000/z8000tbl.inc +++ b/src/devices/cpu/z8000/z8000tbl.inc @@ -561,7 +561,7 @@ void z8000_init_tables(void) for (i = init->beg; i <= init->end; i += init->step) { if (z8000_exec[i].opcode != &z8002_device::zinvalid) - logerror("Z8000 opcode %04x clash '%s'\n", i, z8000_exec[i].dasm); + osd_printf_error("Z8000 opcode %04x clash '%s'\n", i, z8000_exec[i].dasm); z8000_exec[i].opcode = init->opcode; z8000_exec[i].cycles = init->cycles; diff --git a/src/devices/imagedev/floppy.c b/src/devices/imagedev/floppy.c index 384f050e4f6..ae17d0ed34e 100644 --- a/src/devices/imagedev/floppy.c +++ b/src/devices/imagedev/floppy.c @@ -415,7 +415,10 @@ bool floppy_image_device::call_load() if (!cur_load_cb.isnull()) return cur_load_cb(this); - if(!mon) + if (motor_always_on) { + // When disk is inserted, start motor + mon_w(0); + } else if(!mon) ready_counter = 2; return IMAGE_INIT_PASS; @@ -442,7 +445,11 @@ void floppy_image_device::call_unload() if (!cur_unload_cb.isnull()) cur_unload_cb(this); - if(!ready) { + + if (motor_always_on) { + // When disk is removed, stop motor + mon_w(1); + } else if(!ready) { ready = true; if(!cur_ready_cb.isnull()) cur_ready_cb(this, ready); @@ -490,7 +497,15 @@ void floppy_image_device::mon_w(int state) if (!mon && image) { revolution_start_time = machine().time(); - ready_counter = 2; + if (motor_always_on) { + // Drives with motor that is always spinning are immediately ready when a disk is loaded + // because there is no spin-up time + ready = false; + if(!cur_ready_cb.isnull()) + cur_ready_cb(this, ready); + } else { + ready_counter = 2; + } index_resync(); } @@ -927,7 +942,7 @@ void ui_menu_control_floppy_image::do_load_create() if(input_filename.compare("")==0) { int err = fd->create(output_filename.c_str(), 0, NULL); if (err != 0) { - popmessage("Error: %s", fd->error()); + machine().popmessage("Error: %s", fd->error()); return; } fd->setup_write(output_format); @@ -936,7 +951,7 @@ void ui_menu_control_floppy_image::do_load_create() if (!err && output_filename.compare("") != 0) err = fd->reopen_for_write(output_filename.c_str()); if(err != 0) { - popmessage("Error: %s", fd->error()); + machine().popmessage("Error: %s", fd->error()); return; } if(output_format) @@ -948,7 +963,7 @@ void ui_menu_control_floppy_image::hook_load(std::string filename, bool softlist { if (softlist) { - popmessage("When loaded from software list, the disk is Read-only.\n"); + machine().popmessage("When loaded from software list, the disk is Read-only.\n"); image->load(filename.c_str()); ui_menu::stack_pop(machine()); return; @@ -959,7 +974,7 @@ void ui_menu_control_floppy_image::hook_load(std::string filename, bool softlist if (!input_format) { - popmessage("Error: %s\n", image->error()); + machine().popmessage("Error: %s\n", image->error()); ui_menu::stack_pop(machine()); return; } @@ -1034,7 +1049,7 @@ void ui_menu_control_floppy_image::handle() break; case ui_menu_select_rw::WRITE_DIFF: - popmessage("Sorry, diffs are not supported yet\n"); + machine().popmessage("Sorry, diffs are not supported yet\n"); ui_menu::stack_pop(machine()); break; diff --git a/src/devices/imagedev/floppy.h b/src/devices/imagedev/floppy.h index a57b2c7b72e..5968ed6eeb8 100644 --- a/src/devices/imagedev/floppy.h +++ b/src/devices/imagedev/floppy.h @@ -290,11 +290,11 @@ private: sound_stream* m_sound; bool m_loaded; - bool m_is525; // true if this is a 5.25" floppy drive + bool m_is525; // true if this is a 5.25" floppy drive - int m_sampleindex_motor_start; - int m_sampleindex_motor_loop; - int m_sampleindex_motor_end; + int m_sampleindex_motor_start; + int m_sampleindex_motor_loop; + int m_sampleindex_motor_end; int m_samplesize_motor_start; int m_samplesize_motor_loop; int m_samplesize_motor_end; @@ -302,8 +302,8 @@ private: int m_motor_playback_state; bool m_motor_on; - int m_step_samples; - int m_sampleindex_step1; + int m_step_samples; + int m_sampleindex_step1; int m_samplesize_step[MAX_STEP_SAMPLES]; int m_samplepos_step; int m_step_playback_state; diff --git a/src/devices/imagedev/mfmhd.c b/src/devices/imagedev/mfmhd.c index cfcdbed0353..2a3099fbcde 100644 --- a/src/devices/imagedev/mfmhd.c +++ b/src/devices/imagedev/mfmhd.c @@ -346,7 +346,7 @@ void mfm_harddisk_device::device_start() m_current_cylinder = m_landing_zone; // Park position m_spinup_timer->adjust(attotime::from_msec(m_spinupms)); - m_cache = global_alloc(mfmhd_trackimage_cache); + m_cache = global_alloc(mfmhd_trackimage_cache(machine())); // In 5 second periods, check whether the cache has dirty lines m_cache_timer->adjust(attotime::from_msec(5000), 0, attotime::from_msec(5000)); @@ -952,15 +952,16 @@ const device_type MFMHD_ST251 = &device_creator<mfm_hd_st251_device>; // This is a write-back LRU cache. // =========================================================== -mfmhd_trackimage_cache::mfmhd_trackimage_cache(): - m_tracks(NULL) +mfmhd_trackimage_cache::mfmhd_trackimage_cache(running_machine &machine): + m_tracks(NULL), + m_machine(machine) { } mfmhd_trackimage_cache::~mfmhd_trackimage_cache() { mfmhd_trackimage* current = m_tracks; - if (TRACE_CACHE) logerror("%s: MFM HD cache destroy\n", m_mfmhd->tag()); + if (TRACE_CACHE) m_machine.logerror("%s: MFM HD cache destroy\n", m_mfmhd->tag()); while (current != NULL) { @@ -991,12 +992,12 @@ void mfmhd_trackimage_cache::write_back_one() void mfmhd_trackimage_cache::cleanup() { mfmhd_trackimage* current = m_tracks; - if (TRACE_CACHE) logerror("%s: MFM HD cache cleanup\n", m_mfmhd->tag()); + if (TRACE_CACHE) m_machine.logerror("%s: MFM HD cache cleanup\n", m_mfmhd->tag()); // Still dirty? while (current != NULL) { - if (TRACE_CACHE) logerror("%s: MFM HD cache: evict line cylinder=%d head=%d\n", m_mfmhd->tag(), current->cylinder, current->head); + if (TRACE_CACHE) m_machine.logerror("%s: MFM HD cache: evict line cylinder=%d head=%d\n", m_mfmhd->tag(), current->cylinder, current->head); if (current->dirty) { m_mfmhd->write_track(current->encdata, current->cylinder, current->head); @@ -1023,7 +1024,7 @@ const char *encnames[] = { "MFM_BITS","MFM_BYTE","SEPARATE","SSIMPLE " }; */ void mfmhd_trackimage_cache::init(mfm_harddisk_device* mfmhd, int tracksize, int trackslots) { - if (TRACE_CACHE) logerror("%s: MFM HD cache init; cache size is %d tracks\n", mfmhd->tag(), trackslots); + if (TRACE_CACHE) m_machine.logerror("%s: MFM HD cache init; cache size is %d tracks\n", mfmhd->tag(), trackslots); chd_error state = CHDERR_NONE; @@ -1039,7 +1040,7 @@ void mfmhd_trackimage_cache::init(mfm_harddisk_device* mfmhd, int tracksize, int while (track < trackslots) { - if (TRACE_CACHE && TRACE_DETAIL) logerror("%s: MFM HD allocate cache slot\n", mfmhd->tag()); + if (TRACE_CACHE && TRACE_DETAIL) m_machine.logerror("%s: MFM HD allocate cache slot\n", mfmhd->tag()); previous = current; current = global_alloc(mfmhd_trackimage); current->encdata = global_alloc_array(UINT16, tracksize); @@ -1118,7 +1119,7 @@ UINT16* mfmhd_trackimage_cache::get_trackimage(int cylinder, int head) // previous points to the second to last element current = previous->next; - if (TRACE_CACHE) logerror("%s: MFM HD cache: evict line (c=%d,h=%d)\n", m_mfmhd->tag(), current->cylinder, current->head); + if (TRACE_CACHE) m_machine.logerror("%s: MFM HD cache: evict line (c=%d,h=%d)\n", m_mfmhd->tag(), current->cylinder, current->head); if (current->dirty) { diff --git a/src/devices/imagedev/mfmhd.h b/src/devices/imagedev/mfmhd.h index c15b892423d..85450f23bbb 100644 --- a/src/devices/imagedev/mfmhd.h +++ b/src/devices/imagedev/mfmhd.h @@ -33,7 +33,7 @@ public: class mfmhd_trackimage_cache { public: - mfmhd_trackimage_cache(); + mfmhd_trackimage_cache(running_machine &machine); ~mfmhd_trackimage_cache(); void init(mfm_harddisk_device* mfmhd, int tracksize, int trackslots); UINT16* get_trackimage(int cylinder, int head); @@ -44,6 +44,7 @@ public: private: mfm_harddisk_device* m_mfmhd; mfmhd_trackimage* m_tracks; + running_machine & m_machine; }; class mfm_harddisk_device : public harddisk_image_device, diff --git a/src/devices/machine/68307sim.c b/src/devices/machine/68307sim.c index 3709c346fbf..873d065b385 100644 --- a/src/devices/machine/68307sim.c +++ b/src/devices/machine/68307sim.c @@ -86,22 +86,22 @@ WRITE16_MEMBER( m68307cpu_device::m68307_internal_sim_w ) case m68307SIM_LICR1: logerror("%08x m68307_internal_sim_w %08x, %04x (%04x) (Latched Interrupt Control Register 1 - LICR1)\n", pc, offset*2,data,mem_mask); - sim->write_licr1(data,mem_mask); + sim->write_licr1(this,data,mem_mask); break; case m68307SIM_LICR2: logerror("%08x m68307_internal_sim_w %08x, %04x (%04x) (Latched Interrupt Control Register 2 - LICR2)\n", pc, offset*2,data,mem_mask); - sim->write_licr2(data,mem_mask); + sim->write_licr2(this,data,mem_mask); break; case m68307SIM_PICR: logerror("%08x m68307_internal_sim_w %08x, %04x (%04x) (Peripheral Interrupt Control Register - PICR)\n", pc, offset*2,data,mem_mask); - sim->write_picr(data,mem_mask); + sim->write_picr(this,data,mem_mask); break; case m68307SIM_PIVR: logerror("%08x m68307_internal_sim_w %08x, %04x (%04x) (Peripheral Interrupt Vector Register - PIVR)\n", pc, offset*2,data,mem_mask); - sim->write_pivr(data,mem_mask); + sim->write_pivr(this,data,mem_mask); break; case m68307SIM_BR0: @@ -171,7 +171,7 @@ UINT16 m68307_sim::read_padat(m68307cpu_device* m68k, address_space &space, UINT } else { - logerror("%08x m68307_internal_sim_r (%04x) (Port A (8-bit) Data Register - PADAT)\n", pc, mem_mask); + m68k->logerror("%08x m68307_internal_sim_r (%04x) (Port A (8-bit) Data Register - PADAT)\n", pc, mem_mask); } return 0xffff; } @@ -188,7 +188,7 @@ void m68307_sim::write_padat(m68307cpu_device* m68k, address_space &space, UINT1 } else { - logerror("%08x m68307_internal_sim_w %04x (%04x) (Port A (8-bit) Data Register - PADAT)\n", pc, data,mem_mask); + m68k->logerror("%08x m68307_internal_sim_w %04x (%04x) (Port A (8-bit) Data Register - PADAT)\n", pc, data,mem_mask); } } @@ -222,7 +222,7 @@ UINT16 m68307_sim::read_pbdat(m68307cpu_device* m68k, address_space &space, UINT } else { - logerror("%08x m68307_internal_sim_r (%04x) (Port B (16-bit) Data Register - PBDAT)\n", pc, mem_mask); + m68k->logerror("%08x m68307_internal_sim_r (%04x) (Port B (16-bit) Data Register - PBDAT)\n", pc, mem_mask); } return 0xffff; } @@ -239,40 +239,40 @@ void m68307_sim::write_pbdat(m68307cpu_device* m68k, address_space &space, UINT1 } else { - logerror("%08x m68307_internal_sim_w %04x (%04x) (Port B (16-bit) Data Register - PBDAT)\n", pc, data,mem_mask); + m68k->logerror("%08x m68307_internal_sim_w %04x (%04x) (Port B (16-bit) Data Register - PBDAT)\n", pc, data,mem_mask); } } -void m68307_sim::write_licr1(UINT16 data, UINT16 mem_mask) +void m68307_sim::write_licr1(m68307cpu_device* m68k, UINT16 data, UINT16 mem_mask) { COMBINE_DATA(&m_licr1); data = m_licr1; - logerror("m_licr1 value %04x : Details :\n", data); - logerror("int4ipl %01x\n", (data>>0)&7); - logerror("pir4 %01x\n", (data>>3)&1); - logerror("int3ipl %01x\n", (data>>4)&7); - logerror("pir3 %01x\n", (data>>7)&1); - logerror("int2ipl %01x\n", (data>>8)&7); - logerror("pir2 %01x\n", (data>>11)&1); - logerror("int1ipl %01x\n", (data>>12)&7); - logerror("pir1 %01x\n", (data>>15)&1); - logerror("\n"); + m68k->logerror("m_licr1 value %04x : Details :\n", data); + m68k->logerror("int4ipl %01x\n", (data>>0)&7); + m68k->logerror("pir4 %01x\n", (data>>3)&1); + m68k->logerror("int3ipl %01x\n", (data>>4)&7); + m68k->logerror("pir3 %01x\n", (data>>7)&1); + m68k->logerror("int2ipl %01x\n", (data>>8)&7); + m68k->logerror("pir2 %01x\n", (data>>11)&1); + m68k->logerror("int1ipl %01x\n", (data>>12)&7); + m68k->logerror("pir1 %01x\n", (data>>15)&1); + m68k->logerror("\n"); } -void m68307_sim::write_licr2(UINT16 data, UINT16 mem_mask) +void m68307_sim::write_licr2(m68307cpu_device* m68k, UINT16 data, UINT16 mem_mask) { COMBINE_DATA(&m_licr2); UINT16 newdata = m_licr2; - logerror("m_licr2 value %04x : Details :\n", newdata); - logerror("int8ipl %01x\n", (newdata>>0)&7); - logerror("pir8 %01x\n", (newdata>>3)&1); - logerror("int7ipl %01x\n", (newdata>>4)&7); - logerror("pir7 %01x\n", (newdata>>7)&1); - logerror("int6ipl %01x\n", (newdata>>8)&7); - logerror("pir6 %01x\n", (newdata>>11)&1); - logerror("int5ipl %01x\n", (newdata>>12)&7); - logerror("pir5 %01x\n", (newdata>>15)&1); - logerror("\n"); + m68k->logerror("m_licr2 value %04x : Details :\n", newdata); + m68k->logerror("int8ipl %01x\n", (newdata>>0)&7); + m68k->logerror("pir8 %01x\n", (newdata>>3)&1); + m68k->logerror("int7ipl %01x\n", (newdata>>4)&7); + m68k->logerror("pir7 %01x\n", (newdata>>7)&1); + m68k->logerror("int6ipl %01x\n", (newdata>>8)&7); + m68k->logerror("pir6 %01x\n", (newdata>>11)&1); + m68k->logerror("int5ipl %01x\n", (newdata>>12)&7); + m68k->logerror("pir5 %01x\n", (newdata>>15)&1); + m68k->logerror("\n"); if (data & 0x0008) m_licr2 = m_licr2 & ~0x0008; if (data & 0x0080) m_licr2 = m_licr2 & ~0x0080; @@ -283,25 +283,25 @@ void m68307_sim::write_licr2(UINT16 data, UINT16 mem_mask) } -void m68307_sim::write_picr(UINT16 data, UINT16 mem_mask) +void m68307_sim::write_picr(m68307cpu_device* m68k, UINT16 data, UINT16 mem_mask) { COMBINE_DATA(&m_picr); data = m_picr; - logerror("picr value %04x : Details :\n", data); - logerror("mbipl %01x\n", (data>>0)&7); - logerror("uaipl %01x\n", (data>>4)&7); - logerror("t2ipl %01x\n", (data>>8)&7); - logerror("t1ipl %01x\n", (data>>12)&7); - logerror("\n"); + m68k->logerror("picr value %04x : Details :\n", data); + m68k->logerror("mbipl %01x\n", (data>>0)&7); + m68k->logerror("uaipl %01x\n", (data>>4)&7); + m68k->logerror("t2ipl %01x\n", (data>>8)&7); + m68k->logerror("t1ipl %01x\n", (data>>12)&7); + m68k->logerror("\n"); } -void m68307_sim::write_pivr(UINT16 data, UINT16 mem_mask) +void m68307_sim::write_pivr(m68307cpu_device* m68k, UINT16 data, UINT16 mem_mask) { COMBINE_DATA(&m_pivr); data = m_pivr; - logerror("pivr value %04x : Details :\n", data); - logerror("unused %01x\n", (data>>0)&0xf); - logerror("high vector %01x\n", (data>>4)&0xf); + m68k->logerror("pivr value %04x : Details :\n", data); + m68k->logerror("unused %01x\n", (data>>0)&0xf); + m68k->logerror("high vector %01x\n", (data>>4)&0xf); } void m68307_sim::reset(void) diff --git a/src/devices/machine/68307sim.h b/src/devices/machine/68307sim.h index 59b33bee1e7..2198e19d956 100644 --- a/src/devices/machine/68307sim.h +++ b/src/devices/machine/68307sim.h @@ -65,10 +65,10 @@ class m68307_sim - void write_licr1(UINT16 data, UINT16 mem_mask); - void write_licr2(UINT16 data, UINT16 mem_mask); - void write_picr(UINT16 data, UINT16 mem_mask); - void write_pivr(UINT16 data, UINT16 mem_mask); + void write_licr1(m68307cpu_device* m68k, UINT16 data, UINT16 mem_mask); + void write_licr2(m68307cpu_device* m68k, UINT16 data, UINT16 mem_mask); + void write_picr(m68307cpu_device* m68k, UINT16 data, UINT16 mem_mask); + void write_pivr(m68307cpu_device* m68k, UINT16 data, UINT16 mem_mask); void reset(void); }; diff --git a/src/devices/machine/68307tmu.c b/src/devices/machine/68307tmu.c index 23a67ada9ad..9077468f55d 100644 --- a/src/devices/machine/68307tmu.c +++ b/src/devices/machine/68307tmu.c @@ -179,35 +179,35 @@ void m68307_timer::write_tmr(UINT16 data, UINT16 mem_mask, int which) int rst = data & (0x0001)>>0; - logerror("tmr value %04x : Details :\n", data); - logerror("prescale %d\n", ps); - logerror("(clock divided by %d)\n", ps+1); - logerror("capture edge / enable interrupt %d\n", ce); - if (ce==0x0) logerror("(disable interrupt on capture event)\n"); - if (ce==0x1) logerror("(capture on rising edge only + enable capture interrupt)\n"); - if (ce==0x2) logerror("(capture on falling edge only + enable capture interrupt)\n"); - if (ce==0x3) logerror("(capture on any edge + enable capture interrupt)\n"); - logerror("output mode %d\n", om); - if (om==0x0) logerror("(active-low pulse for one cycle))\n"); - if (om==0x1) logerror("(toggle output)\n"); - logerror("output reference interrupt %d\n", ori); - if (ori==0x0) logerror("(disable reference interrupt)\n"); - if (ori==0x1) logerror("(enable interrupt on reaching reference value))\n"); - logerror("free running %d\n", frr); - if (frr==0x0) logerror("(free running mode, counter continues after value reached)\n"); - if (frr==0x1) logerror("(restart mode, counter resets after value reached)\n"); - logerror("interrupt clock source %d\n", iclk); - if (iclk==0x0) logerror("(stop count)\n"); - if (iclk==0x1) logerror("(master system clock)\n"); - if (iclk==0x2) logerror("(master system clock divided by 16)\n"); - if (iclk==0x3) logerror("(TIN Pin)\n"); - logerror("reset %d\n", rst); - if (rst==0x0) logerror("(timer is reset)\n"); - if (rst==0x1) logerror("(timer is running)\n"); + m68k->logerror("tmr value %04x : Details :\n", data); + m68k->logerror("prescale %d\n", ps); + m68k->logerror("(clock divided by %d)\n", ps+1); + m68k->logerror("capture edge / enable interrupt %d\n", ce); + if (ce==0x0) m68k->logerror("(disable interrupt on capture event)\n"); + if (ce==0x1) m68k->logerror("(capture on rising edge only + enable capture interrupt)\n"); + if (ce==0x2) m68k->logerror("(capture on falling edge only + enable capture interrupt)\n"); + if (ce==0x3) m68k->logerror("(capture on any edge + enable capture interrupt)\n"); + m68k->logerror("output mode %d\n", om); + if (om==0x0) m68k->logerror("(active-low pulse for one cycle))\n"); + if (om==0x1) m68k->logerror("(toggle output)\n"); + m68k->logerror("output reference interrupt %d\n", ori); + if (ori==0x0) m68k->logerror("(disable reference interrupt)\n"); + if (ori==0x1) m68k->logerror("(enable interrupt on reaching reference value))\n"); + m68k->logerror("free running %d\n", frr); + if (frr==0x0) m68k->logerror("(free running mode, counter continues after value reached)\n"); + if (frr==0x1) m68k->logerror("(restart mode, counter resets after value reached)\n"); + m68k->logerror("interrupt clock source %d\n", iclk); + if (iclk==0x0) m68k->logerror("(stop count)\n"); + if (iclk==0x1) m68k->logerror("(master system clock)\n"); + if (iclk==0x2) m68k->logerror("(master system clock divided by 16)\n"); + if (iclk==0x3) m68k->logerror("(TIN Pin)\n"); + m68k->logerror("reset %d\n", rst); + if (rst==0x0) m68k->logerror("(timer is reset)\n"); + if (rst==0x1) m68k->logerror("(timer is running)\n"); tptr->mametimer->adjust(m68k->cycles_to_attotime(100000)); - logerror("\n"); + m68k->logerror("\n"); } diff --git a/src/devices/machine/adc083x.c b/src/devices/machine/adc083x.c index 4f1b11cebf0..40259e595f1 100644 --- a/src/devices/machine/adc083x.c +++ b/src/devices/machine/adc083x.c @@ -13,7 +13,7 @@ #define VERBOSE_LEVEL ( 0 ) -INLINE void ATTR_PRINTF( 3, 4 ) verboselog( int n_level, running_machine &machine, const char *s_fmt, ... ) +INLINE void ATTR_PRINTF( 3, 4 ) verboselog( int n_level, device_t &device, const char *s_fmt, ... ) { if( VERBOSE_LEVEL >= n_level ) { @@ -22,7 +22,7 @@ INLINE void ATTR_PRINTF( 3, 4 ) verboselog( int n_level, running_machine &machin va_start( v, s_fmt ); vsprintf( buf, s_fmt, v ); va_end( v ); - logerror( "%s: %s", machine.describe_context( ), buf ); + device.logerror( "%s: %s", device.machine().describe_context( ), buf ); } } @@ -144,7 +144,7 @@ WRITE_LINE_MEMBER( adc083x_device::cs_write ) { if( m_cs != state ) { - verboselog( 2, machine(), "adc083x_cs_write( %s, %d )\n", tag(), state ); + verboselog( 2, *this, "adc083x_cs_write( %s, %d )\n", tag(), state ); } if( m_cs == 0 && state != 0 ) @@ -259,7 +259,7 @@ WRITE_LINE_MEMBER( adc083x_device::clk_write ) { if( m_clk != state ) { - verboselog( 2, machine(), "adc083x_clk_write( %s, %d )\n", tag(), state ); + verboselog( 2, *this, "adc083x_clk_write( %s, %d )\n", tag(), state ); } if( m_cs == 0 ) @@ -271,7 +271,7 @@ WRITE_LINE_MEMBER( adc083x_device::clk_write ) case STATE_WAIT_FOR_START: if( m_di != 0 ) { - verboselog( 1, machine(), "adc083x %s got start bit\n", tag() ); + verboselog( 1, *this, "adc083x %s got start bit\n", tag() ); m_state = STATE_SHIFT_MUX; m_sars = 0; m_sgl = 0; @@ -282,7 +282,7 @@ WRITE_LINE_MEMBER( adc083x_device::clk_write ) } else { - verboselog( 1, machine(), "adc083x %s not start bit\n", tag() ); + verboselog( 1, *this, "adc083x %s not start bit\n", tag() ); } break; @@ -294,7 +294,7 @@ WRITE_LINE_MEMBER( adc083x_device::clk_write ) { m_sgl = 1; } - verboselog( 1, machine(), "adc083x %s sgl <- %d\n", tag(), m_sgl ); + verboselog( 1, *this, "adc083x %s sgl <- %d\n", tag(), m_sgl ); break; case 1: @@ -302,7 +302,7 @@ WRITE_LINE_MEMBER( adc083x_device::clk_write ) { m_odd = 1; } - verboselog( 1, machine(), "adc083x %s odd <- %d\n", tag(), m_odd ); + verboselog( 1, *this, "adc083x %s odd <- %d\n", tag(), m_odd ); break; case 2: @@ -310,7 +310,7 @@ WRITE_LINE_MEMBER( adc083x_device::clk_write ) { m_sel1 = 1; } - verboselog( 1, machine(), "adc083x %s sel1 <- %d\n", tag(), m_sel1 ); + verboselog( 1, *this, "adc083x %s sel1 <- %d\n", tag(), m_sel1 ); break; case 3: @@ -318,7 +318,7 @@ WRITE_LINE_MEMBER( adc083x_device::clk_write ) { m_sel0 = 1; } - verboselog( 1, machine(), "adc083x %s sel0 <- %d\n", tag(), m_sel0 ); + verboselog( 1, *this, "adc083x %s sel0 <- %d\n", tag(), m_sel0 ); break; } @@ -334,11 +334,11 @@ WRITE_LINE_MEMBER( adc083x_device::clk_write ) m_sars = 0; if( type() == ADC0838 && m_se != 0 ) { - verboselog( 1, machine(), "adc083x %s not se\n", tag() ); + verboselog( 1, *this, "adc083x %s not se\n", tag() ); } else { - verboselog( 1, machine(), "adc083x %s got se\n", tag() ); + verboselog( 1, *this, "adc083x %s got se\n", tag() ); m_state = STATE_OUTPUT_LSB_FIRST; m_bit = 1; } @@ -351,7 +351,7 @@ WRITE_LINE_MEMBER( adc083x_device::clk_write ) switch( m_state ) { case STATE_MUX_SETTLE: - verboselog( 1, machine(), "adc083x %s mux settle\n", tag() ); + verboselog( 1, *this, "adc083x %s mux settle\n", tag() ); m_output = conversion(); m_state = STATE_OUTPUT_MSB_FIRST; m_bit = 7; @@ -361,7 +361,7 @@ WRITE_LINE_MEMBER( adc083x_device::clk_write ) case STATE_OUTPUT_MSB_FIRST: m_do = ( m_output >> m_bit ) & 1; - verboselog( 1, machine(), "adc083x %s msb %d -> %d\n", tag(), m_bit, m_do ); + verboselog( 1, *this, "adc083x %s msb %d -> %d\n", tag(), m_bit, m_do ); m_bit--; if( m_bit < 0 ) @@ -379,7 +379,7 @@ WRITE_LINE_MEMBER( adc083x_device::clk_write ) case STATE_OUTPUT_LSB_FIRST: m_do = ( m_output >> m_bit ) & 1; - verboselog( 1, machine(), "adc083x %s lsb %d -> %d\n", tag(), m_bit, m_do ); + verboselog( 1, *this, "adc083x %s lsb %d -> %d\n", tag(), m_bit, m_do ); m_bit++; if( m_bit == 8 ) @@ -407,7 +407,7 @@ WRITE_LINE_MEMBER( adc083x_device::di_write ) { if( m_di != state ) { - verboselog( 2, machine(), "adc083x_di_write( %s, %d )\n", tag(), state ); + verboselog( 2, *this, "adc083x_di_write( %s, %d )\n", tag(), state ); } m_di = state; @@ -421,7 +421,7 @@ WRITE_LINE_MEMBER( adc083x_device::se_write ) { if( m_se != state ) { - verboselog( 2, machine(), "adc083x_se_write( %s, %d )\n", tag(), state ); + verboselog( 2, *this, "adc083x_se_write( %s, %d )\n", tag(), state ); } m_se = state; @@ -433,7 +433,7 @@ WRITE_LINE_MEMBER( adc083x_device::se_write ) READ_LINE_MEMBER( adc083x_device::sars_read ) { - verboselog( 1, machine(), "adc083x_sars_read( %s ) %d\n", tag(), m_sars ); + verboselog( 1, *this, "adc083x_sars_read( %s ) %d\n", tag(), m_sars ); return m_sars; } @@ -443,6 +443,6 @@ READ_LINE_MEMBER( adc083x_device::sars_read ) READ_LINE_MEMBER( adc083x_device::do_read ) { - verboselog( 1, machine(), "adc083x_do_read( %s ) %d\n", tag(), m_do ); + verboselog( 1, *this, "adc083x_do_read( %s ) %d\n", tag(), m_do ); return m_do; } diff --git a/src/devices/machine/atahle.c b/src/devices/machine/atahle.c index 850ab39d34f..4bab8c790f5 100644 --- a/src/devices/machine/atahle.c +++ b/src/devices/machine/atahle.c @@ -470,8 +470,12 @@ void ata_hle_device::read_buffer_empty() if ((multi_word_dma_mode() >= 0) || (ultra_dma_mode() >= 0)) set_dmarq(CLEAR_LINE); - m_buffer_empty_timer->enable(true); - m_buffer_empty_timer->adjust(attotime::zero); + if (ultra_dma_mode() >= 0) { + m_buffer_empty_timer->enable(true); + m_buffer_empty_timer->adjust(attotime::zero); + } + else + fill_buffer(); } void ata_hle_device::write_buffer_full() diff --git a/src/devices/machine/autoconfig.c b/src/devices/machine/autoconfig.c index 84b51cd8c24..02afb595985 100644 --- a/src/devices/machine/autoconfig.c +++ b/src/devices/machine/autoconfig.c @@ -124,7 +124,7 @@ READ16_MEMBER( amiga_autoconfig::autoconfig_read ) UINT16 data = m_cfg[offset] | 0x0fff; if (VERBOSE && !space.debugger_access()) - logerror("autoconfig_read %04x @ %02x [mask = %04x]\n", data, offset, mem_mask); + space.device().logerror("autoconfig_read %04x @ %02x [mask = %04x]\n", data, offset, mem_mask); return data; } @@ -132,7 +132,7 @@ READ16_MEMBER( amiga_autoconfig::autoconfig_read ) WRITE16_MEMBER( amiga_autoconfig::autoconfig_write ) { if (VERBOSE && !space.debugger_access()) - logerror("autoconfig_write %04x @ %02x [mask = %04x]\n", data, offset, mem_mask); + space.device().logerror("autoconfig_write %04x @ %02x [mask = %04x]\n", data, offset, mem_mask); switch (offset) { diff --git a/src/devices/machine/i2cmem.c b/src/devices/machine/i2cmem.c index 5e714c0b129..7b6869e2cb7 100644 --- a/src/devices/machine/i2cmem.c +++ b/src/devices/machine/i2cmem.c @@ -49,7 +49,7 @@ INLINE void ATTR_PRINTF( 3, 4 ) verboselog( device_t *device, int n_level, const va_start( v, s_fmt ); vsprintf( buf, s_fmt, v ); va_end( v ); - logerror( "%s: I2CMEM(%s) %s", device->machine().describe_context( ), device->tag(), buf ); + device->logerror( "%s: I2CMEM(%s) %s", device->machine().describe_context( ), device->tag(), buf ); } } diff --git a/src/devices/machine/i8251.c b/src/devices/machine/i8251.c index 7008fe394a3..6e45d13a1ea 100644 --- a/src/devices/machine/i8251.c +++ b/src/devices/machine/i8251.c @@ -109,8 +109,6 @@ void i8251_device::device_start() save_item(NAME(m_br_factor)); save_item(NAME(m_rx_data)); save_item(NAME(m_tx_data)); - save_item(NAME(m_tx_busy)); - save_item(NAME(m_disable_tx_pending)); device_serial_interface::register_save_state(machine().save(), this); } @@ -166,7 +164,33 @@ void i8251_device::receive_clock() } } +/*------------------------------------------------- + is_tx_enabled +-------------------------------------------------*/ +bool i8251_device::is_tx_enabled(void) const +{ + return BIT(m_command , 0) != 0 && m_cts == 0; +} +/*------------------------------------------------- + check_for_tx_start +-------------------------------------------------*/ +void i8251_device::check_for_tx_start(void) +{ + if (is_tx_enabled() && (m_status & (I8251_STATUS_TX_EMPTY | I8251_STATUS_TX_READY)) == I8251_STATUS_TX_EMPTY) { + start_tx(); + } +} + +/*------------------------------------------------- + start_tx +-------------------------------------------------*/ +void i8251_device::start_tx(void) +{ + transmit_register_setup(m_tx_data); + m_status &= ~I8251_STATUS_TX_EMPTY; + m_status |= I8251_STATUS_TX_READY; +} /*------------------------------------------------- transmit_clock @@ -181,50 +205,21 @@ void i8251_device::transmit_clock() else return; - /* transmit enabled? */ - if (m_command & (1<<0)) - { - /* do we have a character to send? */ - if ((m_status & I8251_STATUS_TX_READY)==0) - { - /* is diserial ready for it? */ - if (is_transmit_register_empty()) - { - /* set it up */ - transmit_register_setup(m_tx_data); - /* i8251 transmit reg now empty */ - m_status |=I8251_STATUS_TX_EMPTY; - /* ready for next transmit */ - m_status |=I8251_STATUS_TX_READY; - - update_tx_empty(); - update_tx_ready(); - } - } - - /* if diserial has bits to send, make them so */ - if (!is_transmit_register_empty()) - { - UINT8 data = transmit_register_get_data_bit(); - m_tx_busy = true; - m_txd_handler(data); - } - - // is transmitter totally done? - if ((m_status & I8251_STATUS_TX_READY) && is_transmit_register_empty()) - { - m_tx_busy = false; - - if (m_disable_tx_pending) - { - LOG(("Applying pending disable\n")); - m_disable_tx_pending = false; - m_command &= ~(1<<0); - m_txd_handler(1); - update_tx_ready(); - } - } - } + if (is_transmit_register_empty()) { + if ((m_status & I8251_STATUS_TX_READY) == 0 && (is_tx_enabled() || (m_flags & I8251_DELAYED_TX_EN) != 0)) { + start_tx(); + } else { + m_status |= I8251_STATUS_TX_EMPTY; + } + update_tx_ready(); + update_tx_empty(); + } + /* if diserial has bits to send, make them so */ + if (!is_transmit_register_empty()) + { + UINT8 data = transmit_register_get_data_bit(); + m_txd_handler(data); + } #if 0 /* hunt mode? */ @@ -271,21 +266,7 @@ void i8251_device::update_tx_ready() Transmit enable is 1 */ - tx_ready = 0; - - /* transmit enable? */ - if ((m_command & (1<<0))!=0) - { - /* other side has rts set (comes in as CTS at this side) */ - if (!m_cts) - { - if (m_status & I8251_STATUS_TX_EMPTY) - { - /* enable transfer */ - tx_ready = 1; - } - } - } + tx_ready = is_tx_enabled() && (m_status & I8251_STATUS_TX_READY) != 0; m_txrdy_handler(tx_ready); } @@ -344,7 +325,6 @@ void i8251_device::device_reset() m_tx_data = 0; m_rxc_count = m_txc_count = 0; m_br_factor = 1; - m_tx_busy = m_disable_tx_pending = false; /* update tx empty pin output */ update_tx_empty(); @@ -404,30 +384,10 @@ WRITE8_MEMBER(i8251_device::command_w) if (data & (1<<0)) { LOG(("transmit enable\n")); - - /* if we get a tx enable with a disable pending, cancel the disable */ - m_disable_tx_pending = false; } else { - if (m_tx_busy) - { - if (!m_disable_tx_pending) - { - LOG(("Tx busy, set pending disable\n")); - } - m_disable_tx_pending = true; - m_command |= (1<<0); - } - else - { - LOG(("transmit disable\n")); - if ((data & (1<<0))==0) - { - /* held in high state when transmit disable */ - m_txd_handler(1); - } - } + LOG(("transmit disable\n")); } @@ -473,8 +433,10 @@ WRITE8_MEMBER(i8251_device::command_w) m_flags |= I8251_EXPECTING_MODE; } + check_for_tx_start(); update_rx_ready(); update_tx_ready(); + update_tx_empty(); } WRITE8_MEMBER(i8251_device::mode_w) @@ -692,12 +654,20 @@ WRITE8_MEMBER(i8251_device::data_w) { m_tx_data = data; - LOG(("data_w %02x\n" , data)); -// printf("i8251 transmit char: %02x\n",data); + LOG(("data_w %02x\n" , data)); /* writing clears */ m_status &=~I8251_STATUS_TX_READY; - m_status &=~I8251_STATUS_TX_EMPTY; + update_tx_ready(); + + // Store state of tx enable when writing to DB buffer + if (is_tx_enabled()) { + m_flags |= I8251_DELAYED_TX_EN; + } else { + m_flags &= ~I8251_DELAYED_TX_EN; + } + + check_for_tx_start(); /* if transmitter is active, then tx empty will be signalled */ @@ -758,6 +728,10 @@ WRITE_LINE_MEMBER(i8251_device::write_rxd) WRITE_LINE_MEMBER(i8251_device::write_cts) { m_cts = state; + + check_for_tx_start(); + update_tx_ready(); + update_tx_empty(); } WRITE_LINE_MEMBER(i8251_device::write_dsr) diff --git a/src/devices/machine/i8251.h b/src/devices/machine/i8251.h index 2825faf1ed1..46103368676 100644 --- a/src/devices/machine/i8251.h +++ b/src/devices/machine/i8251.h @@ -92,11 +92,16 @@ protected: void update_tx_empty(); void transmit_clock(); void receive_clock(); + bool is_tx_enabled(void) const; + void check_for_tx_start(void); + void start_tx(void); + enum { I8251_EXPECTING_MODE = 0x01, - I8251_EXPECTING_SYNC_BYTE = 0x02 + I8251_EXPECTING_SYNC_BYTE = 0x02, + I8251_DELAYED_TX_EN = 0x04 }; private: @@ -133,9 +138,8 @@ private: /* data being received */ UINT8 m_rx_data; - UINT8 m_tx_data; - bool m_tx_busy; - bool m_disable_tx_pending; + /* tx buffer */ + UINT8 m_tx_data; }; class v53_scu_device : public i8251_device diff --git a/src/devices/machine/matsucd.c b/src/devices/machine/matsucd.c index 6c12c5950d1..94512e65b39 100644 --- a/src/devices/machine/matsucd.c +++ b/src/devices/machine/matsucd.c @@ -94,7 +94,7 @@ void matsucd_set_subcode_ready_callback( void (*scor_cb)( running_machine &machi cd.scor_cb = scor_cb; } -static int matsucd_getsector_type( void ) +static int matsucd_getsector_type( running_machine &machine ) { switch( cd.sector_size ) { @@ -103,13 +103,13 @@ static int matsucd_getsector_type( void ) case 2336: return CD_TRACK_MODE2; case 2352: return CD_TRACK_MODE2_RAW; - default: logerror( "MATSUCD: Sector size %d unsupported!\n", cd.sector_size ); break; + default: machine.logerror( "MATSUCD: Sector size %d unsupported!\n", cd.sector_size ); break; } return CD_TRACK_RAW_DONTCARE; } -void matsucd_read_next_block( void ) +void matsucd_read_next_block( running_machine &machine ) { cd.xfer_offset = 0; @@ -118,9 +118,9 @@ void matsucd_read_next_block( void ) cd.lba++; cd.num_blocks--; - if (!cdrom_read_data(cd.cdrom, cd.lba, cd.sector_buffer, matsucd_getsector_type())) + if (!cdrom_read_data(cd.cdrom, cd.lba, cd.sector_buffer, matsucd_getsector_type(machine))) { - logerror( "MATSUCD - Warning: Read error on CD!\n" ); + machine.logerror( "MATSUCD - Warning: Read error on CD!\n" ); } } } @@ -409,9 +409,9 @@ void matsucd_command_w( running_machine &machine, UINT8 data ) cd.xfer_offset = 0; /* go ahead and cache the first block */ - if (!cdrom_read_data(cd.cdrom, cd.lba, cd.sector_buffer, matsucd_getsector_type())) + if (!cdrom_read_data(cd.cdrom, cd.lba, cd.sector_buffer, matsucd_getsector_type(machine))) { - logerror( "MATSUCD - Warning: Read error on CD!\n" ); + machine.logerror( "MATSUCD - Warning: Read error on CD!\n" ); matsucd_command_error( machine ); return; } @@ -696,14 +696,14 @@ void matsucd_command_w( running_machine &machine, UINT8 data ) if ( cd.cdrom == NULL ) { - logerror( "MATSUCD - Warning: Reading TOC without a CD!\n" ); + machine.logerror( "MATSUCD - Warning: Reading TOC without a CD!\n" ); matsucd_command_error( machine ); return; } if ( track > cdrom_get_last_track(cd.cdrom) ) { - logerror( "MATSUCD - Warning: Reading invalid track entry from TOC!\n" ); + machine.logerror( "MATSUCD - Warning: Reading invalid track entry from TOC!\n" ); matsucd_command_error( machine ); return; } @@ -751,7 +751,7 @@ void matsucd_command_w( running_machine &machine, UINT8 data ) break; default: - logerror( "MATSUCD: Unknown/inimplemented command %08x\n", cmd ); + machine.logerror( "MATSUCD: Unknown/inimplemented command %08x\n", cmd ); break; } } diff --git a/src/devices/machine/mc146818.c b/src/devices/machine/mc146818.c index 1509e7586e9..bf124031a5c 100644 --- a/src/devices/machine/mc146818.c +++ b/src/devices/machine/mc146818.c @@ -40,7 +40,8 @@ mc146818_device::mc146818_device(const machine_config &mconfig, const char *tag, m_epoch(0), m_use_utc(false), m_binary(false), - m_hour(false) + m_hour(false), + m_binyear(false) { } @@ -54,7 +55,8 @@ mc146818_device::mc146818_device(const machine_config &mconfig, device_type type m_epoch(0), m_use_utc(false), m_binary(false), - m_hour(false) + m_hour(false), + m_binyear(false) { } @@ -206,9 +208,9 @@ void mc146818_device::nvram_default() } if(m_binary) - m_data[0x0b] |= REG_B_DM; + m_data[REG_B] |= REG_B_DM; if(m_hour) - m_data[0x0b] |= REG_B_24_12; + m_data[REG_B] |= REG_B_24_12; set_base_datetime(); update_timer(); @@ -402,7 +404,11 @@ void mc146818_device::set_base_datetime() set_dayofweek(current_time.weekday + 1); set_dayofmonth(current_time.mday); set_month(current_time.month + 1); - set_year((current_time.year - m_epoch) % (m_data[0x0b] & REG_B_DM ? 0x100 : 100)); + + if(m_binyear) + set_year((current_time.year - m_epoch) % (m_data[REG_B] & REG_B_DM ? 0x100 : 100)); // pcd actually depends on this + else + set_year((current_time.year - m_epoch) % 100); if (m_century_index >= 0) m_data[m_century_index] = to_ram(current_time.year / 100); diff --git a/src/devices/machine/mc146818.h b/src/devices/machine/mc146818.h index 1793402fb64..341bd1d2f8d 100644 --- a/src/devices/machine/mc146818.h +++ b/src/devices/machine/mc146818.h @@ -43,6 +43,9 @@ #define MCFG_MC146818_EPOCH(_epoch) \ downcast<mc146818_device *>(device)->set_epoch(_epoch); +#define MCFG_MC146818_BINARY_YEAR(_bin) \ + downcast<mc146818_device *>(device)->set_binary_year(_bin); + //************************************************************************** // TYPE DEFINITIONS //************************************************************************** @@ -64,6 +67,7 @@ public: void set_binary(bool binary) { m_binary = binary; } void set_hour(bool hour) { m_hour = hour; } void set_epoch(int epoch) { m_epoch = epoch; } + void set_binary_year(int bin) { m_binyear = bin; } // read/write access DECLARE_READ8_MEMBER( read ); @@ -178,7 +182,7 @@ private: devcb_write_line m_write_irq; int m_century_index, m_epoch; - bool m_use_utc, m_binary, m_hour; + bool m_use_utc, m_binary, m_hour, m_binyear; }; diff --git a/src/devices/machine/mc68328.c b/src/devices/machine/mc68328.c index 9c270004ab5..a5945a6e611 100644 --- a/src/devices/machine/mc68328.c +++ b/src/devices/machine/mc68328.c @@ -15,7 +15,7 @@ #define VERBOSE_LEVEL (0) -INLINE void ATTR_PRINTF(3,4) verboselog(running_machine &machine, int n_level, const char *s_fmt, ...) +INLINE void ATTR_PRINTF(3,4) verboselog(device_t &device, int n_level, const char *s_fmt, ...) { if (VERBOSE_LEVEL >= n_level) { @@ -24,7 +24,7 @@ INLINE void ATTR_PRINTF(3,4) verboselog(running_machine &machine, int n_level, c va_start(v, s_fmt); vsprintf(buf, s_fmt, v); va_end(v); - logerror("%s: %s", machine.describe_context(), buf); + device.logerror("%s: %s", device.machine().describe_context(), buf); } } @@ -609,287 +609,287 @@ WRITE16_MEMBER( mc68328_device::write ) case 0x000: if (mem_mask & 0x00ff) { - verboselog(machine(), 2, "mc68328_w: Unknown address (0xfff001) = %02x\n", data & 0x00ff); + verboselog( *this, 2, "mc68328_w: Unknown address (0xfff001) = %02x\n", data & 0x00ff); } else { - verboselog(machine(), 2, "mc68328_w: SCR = %02x\n", (data >> 8) & 0x00ff); + verboselog( *this, 2, "mc68328_w: SCR = %02x\n", (data >> 8) & 0x00ff); } break; case 0x100: - verboselog(machine(), 2, "mc68328_w: GRPBASEA = %04x\n", data); + verboselog( *this, 2, "mc68328_w: GRPBASEA = %04x\n", data); m_regs.grpbasea = data; break; case 0x102: - verboselog(machine(), 2, "mc68328_w: GRPBASEB = %04x\n", data); + verboselog( *this, 2, "mc68328_w: GRPBASEB = %04x\n", data); m_regs.grpbaseb = data; break; case 0x104: - verboselog(machine(), 2, "mc68328_w: GRPBASEC = %04x\n", data); + verboselog( *this, 2, "mc68328_w: GRPBASEC = %04x\n", data); m_regs.grpbasec = data; break; case 0x106: - verboselog(machine(), 2, "mc68328_w: GRPBASED = %04x\n", data); + verboselog( *this, 2, "mc68328_w: GRPBASED = %04x\n", data); m_regs.grpbased = data; break; case 0x108: - verboselog(machine(), 2, "mc68328_w: GRPMASKA = %04x\n", data); + verboselog( *this, 2, "mc68328_w: GRPMASKA = %04x\n", data); m_regs.grpmaska = data; break; case 0x10a: - verboselog(machine(), 2, "mc68328_w: GRPMASKB = %04x\n", data); + verboselog( *this, 2, "mc68328_w: GRPMASKB = %04x\n", data); m_regs.grpmaskb = data; break; case 0x10c: - verboselog(machine(), 2, "mc68328_w: GRPMASKC = %04x\n", data); + verboselog( *this, 2, "mc68328_w: GRPMASKC = %04x\n", data); m_regs.grpmaskc = data; break; case 0x10e: - verboselog(machine(), 2, "mc68328_w: GRPMASKD = %04x\n", data); + verboselog( *this, 2, "mc68328_w: GRPMASKD = %04x\n", data); m_regs.grpmaskd = data; break; case 0x110: - verboselog(machine(), 5, "mc68328_w: CSA0(0) = %04x\n", data); + verboselog( *this, 5, "mc68328_w: CSA0(0) = %04x\n", data); m_regs.csa0 &= 0xffff0000 | (~mem_mask); m_regs.csa0 |= data & mem_mask; break; case 0x112: - verboselog(machine(), 5, "mc68328_w: CSA0(16) = %04x\n", data); + verboselog( *this, 5, "mc68328_w: CSA0(16) = %04x\n", data); m_regs.csa0 &= ~(mem_mask << 16); m_regs.csa0 |= (data & mem_mask) << 16; break; case 0x114: - verboselog(machine(), 5, "mc68328_w: CSA1(0) = %04x\n", data); + verboselog( *this, 5, "mc68328_w: CSA1(0) = %04x\n", data); m_regs.csa1 &= 0xffff0000 | (~mem_mask); m_regs.csa1 |= data & mem_mask; break; case 0x116: - verboselog(machine(), 5, "mc68328_w: CSA1(16) = %04x\n", data); + verboselog( *this, 5, "mc68328_w: CSA1(16) = %04x\n", data); m_regs.csa1 &= ~(mem_mask << 16); m_regs.csa1 |= (data & mem_mask) << 16; break; case 0x118: - verboselog(machine(), 5, "mc68328_w: CSA2(0) = %04x\n", data); + verboselog( *this, 5, "mc68328_w: CSA2(0) = %04x\n", data); m_regs.csa2 &= 0xffff0000 | (~mem_mask); m_regs.csa2 |= data & mem_mask; break; case 0x11a: - verboselog(machine(), 5, "mc68328_w: CSA2(16) = %04x\n", data); + verboselog( *this, 5, "mc68328_w: CSA2(16) = %04x\n", data); m_regs.csa2 &= ~(mem_mask << 16); m_regs.csa2 |= (data & mem_mask) << 16; break; case 0x11c: - verboselog(machine(), 5, "mc68328_w: CSA3(0) = %04x\n", data); + verboselog( *this, 5, "mc68328_w: CSA3(0) = %04x\n", data); m_regs.csa3 &= 0xffff0000 | (~mem_mask); m_regs.csa3 |= data & mem_mask; break; case 0x11e: - verboselog(machine(), 5, "mc68328_w: CSA3(16) = %04x\n", data); + verboselog( *this, 5, "mc68328_w: CSA3(16) = %04x\n", data); m_regs.csa3 &= ~(mem_mask << 16); m_regs.csa3 |= (data & mem_mask) << 16; break; case 0x120: - verboselog(machine(), 5, "mc68328_w: CSB0(0) = %04x\n", data); + verboselog( *this, 5, "mc68328_w: CSB0(0) = %04x\n", data); m_regs.csb0 &= 0xffff0000 | (~mem_mask); m_regs.csb0 |= data & mem_mask; break; case 0x122: - verboselog(machine(), 5, "mc68328_w: CSB0(16) = %04x\n", data); + verboselog( *this, 5, "mc68328_w: CSB0(16) = %04x\n", data); m_regs.csb0 &= ~(mem_mask << 16); m_regs.csb0 |= (data & mem_mask) << 16; break; case 0x124: - verboselog(machine(), 5, "mc68328_w: CSB1(0) = %04x\n", data); + verboselog( *this, 5, "mc68328_w: CSB1(0) = %04x\n", data); m_regs.csb1 &= 0xffff0000 | (~mem_mask); m_regs.csb1 |= data & mem_mask; break; case 0x126: - verboselog(machine(), 5, "mc68328_w: CSB1(16) = %04x\n", data); + verboselog( *this, 5, "mc68328_w: CSB1(16) = %04x\n", data); m_regs.csb1 &= ~(mem_mask << 16); m_regs.csb1 |= (data & mem_mask) << 16; break; case 0x128: - verboselog(machine(), 5, "mc68328_w: CSB2(0) = %04x\n", data); + verboselog( *this, 5, "mc68328_w: CSB2(0) = %04x\n", data); m_regs.csb2 &= 0xffff0000 | (~mem_mask); m_regs.csb2 |= data & mem_mask; break; case 0x12a: - verboselog(machine(), 5, "mc68328_w: CSB2(16) = %04x\n", data); + verboselog( *this, 5, "mc68328_w: CSB2(16) = %04x\n", data); m_regs.csb2 &= ~(mem_mask << 16); m_regs.csb2 |= (data & mem_mask) << 16; break; case 0x12c: - verboselog(machine(), 5, "mc68328_w: CSB3(0) = %04x\n", data); + verboselog( *this, 5, "mc68328_w: CSB3(0) = %04x\n", data); m_regs.csb3 &= 0xffff0000 | (~mem_mask); m_regs.csb3 |= data & mem_mask; break; case 0x12e: - verboselog(machine(), 5, "mc68328_w: CSB3(16) = %04x\n", data); + verboselog( *this, 5, "mc68328_w: CSB3(16) = %04x\n", data); m_regs.csb3 &= ~(mem_mask << 16); m_regs.csb3 |= (data & mem_mask) << 16; break; case 0x130: - verboselog(machine(), 5, "mc68328_w: CSC0(0) = %04x\n", data); + verboselog( *this, 5, "mc68328_w: CSC0(0) = %04x\n", data); m_regs.csc0 &= 0xffff0000 | (~mem_mask); m_regs.csc0 |= data & mem_mask; break; case 0x132: - verboselog(machine(), 5, "mc68328_w: CSC0(16) = %04x\n", data); + verboselog( *this, 5, "mc68328_w: CSC0(16) = %04x\n", data); m_regs.csc0 &= ~(mem_mask << 16); m_regs.csc0 |= (data & mem_mask) << 16; break; case 0x134: - verboselog(machine(), 5, "mc68328_w: CSC1(0) = %04x\n", data); + verboselog( *this, 5, "mc68328_w: CSC1(0) = %04x\n", data); m_regs.csc1 &= 0xffff0000 | (~mem_mask); m_regs.csc1 |= data & mem_mask; break; case 0x136: - verboselog(machine(), 5, "mc68328_w: CSC1(16) = %04x\n", data); + verboselog( *this, 5, "mc68328_w: CSC1(16) = %04x\n", data); m_regs.csc1 &= ~(mem_mask << 16); m_regs.csc1 |= (data & mem_mask) << 16; break; case 0x138: - verboselog(machine(), 5, "mc68328_w: CSC2(0) = %04x\n", data); + verboselog( *this, 5, "mc68328_w: CSC2(0) = %04x\n", data); m_regs.csc2 &= 0xffff0000 | (~mem_mask); m_regs.csc2 |= data & mem_mask; break; case 0x13a: - verboselog(machine(), 5, "mc68328_w: CSC2(16) = %04x\n", data); + verboselog( *this, 5, "mc68328_w: CSC2(16) = %04x\n", data); m_regs.csc2 &= ~(mem_mask << 16); m_regs.csc2 |= (data & mem_mask) << 16; break; case 0x13c: - verboselog(machine(), 5, "mc68328_w: CSC3(0) = %04x\n", data); + verboselog( *this, 5, "mc68328_w: CSC3(0) = %04x\n", data); m_regs.csc3 &= 0xffff0000 | (~mem_mask); m_regs.csc3 |= data & mem_mask; break; case 0x13e: - verboselog(machine(), 5, "mc68328_w: CSC3(16) = %04x\n", data); + verboselog( *this, 5, "mc68328_w: CSC3(16) = %04x\n", data); m_regs.csc3 &= ~(mem_mask << 16); m_regs.csc3 |= (data & mem_mask) << 16; break; case 0x140: - verboselog(machine(), 5, "mc68328_w: CSD0(0) = %04x\n", data); + verboselog( *this, 5, "mc68328_w: CSD0(0) = %04x\n", data); m_regs.csd0 &= 0xffff0000 | (~mem_mask); m_regs.csd0 |= data & mem_mask; break; case 0x142: - verboselog(machine(), 5, "mc68328_w: CSD0(16) = %04x\n", data); + verboselog( *this, 5, "mc68328_w: CSD0(16) = %04x\n", data); m_regs.csd0 &= ~(mem_mask << 16); m_regs.csd0 |= (data & mem_mask) << 16; break; case 0x144: - verboselog(machine(), 5, "mc68328_w: CSD1(0) = %04x\n", data); + verboselog( *this, 5, "mc68328_w: CSD1(0) = %04x\n", data); m_regs.csd1 &= 0xffff0000 | (~mem_mask); m_regs.csd1 |= data & mem_mask; break; case 0x146: - verboselog(machine(), 5, "mc68328_w: CSD1(16) = %04x\n", data); + verboselog( *this, 5, "mc68328_w: CSD1(16) = %04x\n", data); m_regs.csd1 &= ~(mem_mask << 16); m_regs.csd1 |= (data & mem_mask) << 16; break; case 0x148: - verboselog(machine(), 5, "mc68328_w: CSD2(0) = %04x\n", data); + verboselog( *this, 5, "mc68328_w: CSD2(0) = %04x\n", data); m_regs.csd2 &= 0xffff0000 | (~mem_mask); m_regs.csd2 |= data & mem_mask; break; case 0x14a: - verboselog(machine(), 5, "mc68328_w: CSD2(16) = %04x\n", data); + verboselog( *this, 5, "mc68328_w: CSD2(16) = %04x\n", data); m_regs.csd2 &= ~(mem_mask << 16); m_regs.csd2 |= (data & mem_mask) << 16; break; case 0x14c: - verboselog(machine(), 5, "mc68328_w: CSD3(0) = %04x\n", data); + verboselog( *this, 5, "mc68328_w: CSD3(0) = %04x\n", data); m_regs.csd3 &= 0xffff0000 | (~mem_mask); m_regs.csd3 |= data & mem_mask; break; case 0x14e: - verboselog(machine(), 5, "mc68328_w: CSD3(16) = %04x\n", data); + verboselog( *this, 5, "mc68328_w: CSD3(16) = %04x\n", data); m_regs.csd3 &= ~(mem_mask << 16); m_regs.csd3 |= (data & mem_mask) << 16; break; case 0x200: - verboselog(machine(), 2, "mc68328_w: PLLCR = %04x\n", data); + verboselog( *this, 2, "mc68328_w: PLLCR = %04x\n", data); m_regs.pllcr = data; break; case 0x202: - verboselog(machine(), 2, "mc68328_w: PLLFSR = %04x\n", data); + verboselog( *this, 2, "mc68328_w: PLLFSR = %04x\n", data); m_regs.pllfsr = data; break; case 0x206: if (mem_mask & 0x00ff) { - verboselog(machine(), 2, "mc68328_w: PCTLR = %02x\n", data & 0x00ff); + verboselog( *this, 2, "mc68328_w: PCTLR = %02x\n", data & 0x00ff); m_regs.pctlr = data & 0x00ff; } else { - verboselog(machine(), 2, "mc68328_w: Unknown address (0xfff206) = %02x\n", (data >> 8) & 0x00ff); + verboselog( *this, 2, "mc68328_w: Unknown address (0xfff206) = %02x\n", (data >> 8) & 0x00ff); } break; case 0x300: if (mem_mask & 0x00ff) { - verboselog(machine(), 2, "mc68328_w: Unknown address (0xfff301) = %02x\n", data & 0x00ff); + verboselog( *this, 2, "mc68328_w: Unknown address (0xfff301) = %02x\n", data & 0x00ff); } else { - verboselog(machine(), 2, "mc68328_w: IVR = %02x\n", (data >> 8) & 0x00ff); + verboselog( *this, 2, "mc68328_w: IVR = %02x\n", (data >> 8) & 0x00ff); m_regs.ivr = (data >> 8) & 0x00ff; } break; case 0x302: - verboselog(machine(), 2, "mc68328_w: ICR = %04x\n", data); + verboselog( *this, 2, "mc68328_w: ICR = %04x\n", data); m_regs.icr = data; break; case 0x304: - verboselog(machine(), 2, "mc68328_w: IMR(16) = %04x\n", data); + verboselog( *this, 2, "mc68328_w: IMR(16) = %04x\n", data); m_regs.imr &= ~(mem_mask << 16); m_regs.imr |= (data & mem_mask) << 16; m_regs.isr &= ~((data & mem_mask) << 16); @@ -899,7 +899,7 @@ WRITE16_MEMBER( mc68328_device::write ) break; case 0x306: - verboselog(machine(), 2, "mc68328_w: IMR(0) = %04x\n", data); + verboselog( *this, 2, "mc68328_w: IMR(0) = %04x\n", data); m_regs.imr &= 0xffff0000 | (~mem_mask); m_regs.imr |= data & mem_mask; m_regs.isr &= ~(data & mem_mask); @@ -909,19 +909,19 @@ WRITE16_MEMBER( mc68328_device::write ) break; case 0x308: - verboselog(machine(), 2, "mc68328_w: IWR(16) = %04x\n", data); + verboselog( *this, 2, "mc68328_w: IWR(16) = %04x\n", data); m_regs.iwr &= ~(mem_mask << 16); m_regs.iwr |= (data & mem_mask) << 16; break; case 0x30a: - verboselog(machine(), 2, "mc68328_w: IWR(0) = %04x\n", data); + verboselog( *this, 2, "mc68328_w: IWR(0) = %04x\n", data); m_regs.iwr &= 0xffff0000 | (~mem_mask); m_regs.iwr |= data & mem_mask; break; case 0x30c: - verboselog(machine(), 2, "mc68328_w: ISR(16) = %04x\n", data); + verboselog( *this, 2, "mc68328_w: ISR(16) = %04x\n", data); // Clear edge-triggered IRQ1 if ((m_regs.icr & ICR_ET1) == ICR_ET1 && (data & INT_IRQ1_SHIFT) == INT_IRQ1_SHIFT) { @@ -954,21 +954,21 @@ WRITE16_MEMBER( mc68328_device::write ) break; case 0x30e: - verboselog(machine(), 2, "mc68328_w: ISR(0) = %04x (Ignored)\n", data); + verboselog( *this, 2, "mc68328_w: ISR(0) = %04x (Ignored)\n", data); break; case 0x310: - verboselog(machine(), 2, "mc68328_w: IPR(16) = %04x (Ignored)\n", data); + verboselog( *this, 2, "mc68328_w: IPR(16) = %04x (Ignored)\n", data); break; case 0x312: - verboselog(machine(), 2, "mc68328_w: IPR(0) = %04x (Ignored)\n", data); + verboselog( *this, 2, "mc68328_w: IPR(0) = %04x (Ignored)\n", data); break; case 0x400: if (mem_mask & 0x00ff) { - verboselog(machine(), 2, "mc68328_w: PADATA = %02x\n", data & 0x00ff); + verboselog( *this, 2, "mc68328_w: PADATA = %02x\n", data & 0x00ff); m_regs.padata = data & 0x00ff; if (!m_out_port_a_cb.isnull()) { @@ -977,7 +977,7 @@ WRITE16_MEMBER( mc68328_device::write ) } else { - verboselog(machine(), 2, "mc68328_w: PADIR = %02x\n", (data >> 8) & 0x00ff); + verboselog( *this, 2, "mc68328_w: PADIR = %02x\n", (data >> 8) & 0x00ff); m_regs.padir = (data >> 8) & 0x00ff; } break; @@ -985,19 +985,19 @@ WRITE16_MEMBER( mc68328_device::write ) case 0x402: if (mem_mask & 0x00ff) { - verboselog(machine(), 2, "mc68328_w: PASEL = %02x\n", data & 0x00ff); + verboselog( *this, 2, "mc68328_w: PASEL = %02x\n", data & 0x00ff); m_regs.pasel = data & 0x00ff; } else { - verboselog(machine(), 2, "mc68328_w: Unknown address (0xfff402) = %02x\n", (data >> 8) & 0x00ff); + verboselog( *this, 2, "mc68328_w: Unknown address (0xfff402) = %02x\n", (data >> 8) & 0x00ff); } break; case 0x408: if (mem_mask & 0x00ff) { - verboselog(machine(), 2, "mc68328_w: PBDATA = %02x\n", data & 0x00ff); + verboselog( *this, 2, "mc68328_w: PBDATA = %02x\n", data & 0x00ff); m_regs.pbdata = data & 0x00ff; if (!m_out_port_b_cb.isnull()) { @@ -1006,7 +1006,7 @@ WRITE16_MEMBER( mc68328_device::write ) } else { - verboselog(machine(), 2, "mc68328_w: PBDIR = %02x\n", (data >> 8) & 0x00ff); + verboselog( *this, 2, "mc68328_w: PBDIR = %02x\n", (data >> 8) & 0x00ff); m_regs.pbdir = (data >> 8) & 0x00ff; } break; @@ -1014,19 +1014,19 @@ WRITE16_MEMBER( mc68328_device::write ) case 0x40a: if (mem_mask & 0x00ff) { - verboselog(machine(), 2, "mc68328_w: PBSEL = %02x\n", data & 0x00ff); + verboselog( *this, 2, "mc68328_w: PBSEL = %02x\n", data & 0x00ff); m_regs.pbsel = data & 0x00ff; } else { - verboselog(machine(), 2, "mc68328_w: Unknown address (0xfff40a) = %02x\n", (data >> 8) & 0x00ff); + verboselog( *this, 2, "mc68328_w: Unknown address (0xfff40a) = %02x\n", (data >> 8) & 0x00ff); } break; case 0x410: if (mem_mask & 0x00ff) { - verboselog(machine(), 2, "mc68328_w: PCDATA = %02x\n", data & 0x00ff); + verboselog( *this, 2, "mc68328_w: PCDATA = %02x\n", data & 0x00ff); m_regs.pcdata = data & 0x00ff; if (!m_out_port_c_cb.isnull()) { @@ -1035,7 +1035,7 @@ WRITE16_MEMBER( mc68328_device::write ) } else { - verboselog(machine(), 2, "mc68328_w: PCDIR = %02x\n", (data >> 8) & 0x00ff); + verboselog( *this, 2, "mc68328_w: PCDIR = %02x\n", (data >> 8) & 0x00ff); m_regs.pcdir = (data >> 8) & 0x00ff; } break; @@ -1043,26 +1043,26 @@ WRITE16_MEMBER( mc68328_device::write ) case 0x412: if (mem_mask & 0x00ff) { - verboselog(machine(), 2, "mc68328_w: PCSEL = %02x\n", data & 0x00ff); + verboselog( *this, 2, "mc68328_w: PCSEL = %02x\n", data & 0x00ff); m_regs.pcsel = data & 0x00ff; } else { - verboselog(machine(), 2, "mc68328_w: Unknown address (0xfff412) = %02x\n", (data >> 8) & 0x00ff); + verboselog( *this, 2, "mc68328_w: Unknown address (0xfff412) = %02x\n", (data >> 8) & 0x00ff); } break; case 0x418: if (mem_mask & 0x00ff) { - verboselog(machine(), 2, "mc68328_w: PDDATA = %02x\n", data & 0x00ff); + verboselog( *this, 2, "mc68328_w: PDDATA = %02x\n", data & 0x00ff); m_regs.pddataedge &= ~(data & 0x00ff); poll_port_d_interrupts(); } else { - verboselog(machine(), 2, "mc68328_w: PDDIR = %02x\n", (data >> 8) & 0x00ff); + verboselog( *this, 2, "mc68328_w: PDDIR = %02x\n", (data >> 8) & 0x00ff); m_regs.pddir = (data >> 8) & 0x00ff; } break; @@ -1070,11 +1070,11 @@ WRITE16_MEMBER( mc68328_device::write ) case 0x41a: if (mem_mask & 0x00ff) { - verboselog(machine(), 2, "mc68328_w: Unknown address (0xfff41b) = %02x\n", data & 0x00ff); + verboselog( *this, 2, "mc68328_w: Unknown address (0xfff41b) = %02x\n", data & 0x00ff); } else { - verboselog(machine(), 2, "mc68328_w: PDPUEN = %02x\n", (data >> 8) & 0x00ff); + verboselog( *this, 2, "mc68328_w: PDPUEN = %02x\n", (data >> 8) & 0x00ff); m_regs.pdpuen = (data >> 8) & 0x00ff; } break; @@ -1082,14 +1082,14 @@ WRITE16_MEMBER( mc68328_device::write ) case 0x41c: if (mem_mask & 0x00ff) { - verboselog(machine(), 2, "mc68328_w: PDIRQEN = %02x\n", data & 0x00ff); + verboselog( *this, 2, "mc68328_w: PDIRQEN = %02x\n", data & 0x00ff); m_regs.pdirqen = data & 0x00ff; poll_port_d_interrupts(); } else { - verboselog(machine(), 2, "mc68328_w: PDPOL = %02x\n", (data >> 8) & 0x00ff); + verboselog( *this, 2, "mc68328_w: PDPOL = %02x\n", (data >> 8) & 0x00ff); m_regs.pdpol = (data >> 8) & 0x00ff; } break; @@ -1097,19 +1097,19 @@ WRITE16_MEMBER( mc68328_device::write ) case 0x41e: if (mem_mask & 0x00ff) { - verboselog(machine(), 2, "mc68328_w: PDIRQEDGE = %02x\n", data & 0x00ff); + verboselog( *this, 2, "mc68328_w: PDIRQEDGE = %02x\n", data & 0x00ff); m_regs.pdirqedge = data & 0x00ff; } else { - verboselog(machine(), 2, "mc68328_w: Unknown address (0xfff41e) = %02x\n", (data >> 8) & 0x00ff); + verboselog( *this, 2, "mc68328_w: Unknown address (0xfff41e) = %02x\n", (data >> 8) & 0x00ff); } break; case 0x420: if (mem_mask & 0x00ff) { - verboselog(machine(), 2, "mc68328_w: PEDATA = %02x\n", data & 0x00ff); + verboselog( *this, 2, "mc68328_w: PEDATA = %02x\n", data & 0x00ff); m_regs.pedata = data & 0x00ff; if (!m_out_port_e_cb.isnull()) { @@ -1118,7 +1118,7 @@ WRITE16_MEMBER( mc68328_device::write ) } else { - verboselog(machine(), 2, "mc68328_w: PEDIR = %02x\n", (data >> 8) & 0x00ff); + verboselog( *this, 2, "mc68328_w: PEDIR = %02x\n", (data >> 8) & 0x00ff); m_regs.pedir = (data >> 8) & 0x00ff; } break; @@ -1126,12 +1126,12 @@ WRITE16_MEMBER( mc68328_device::write ) case 0x422: if (mem_mask & 0x00ff) { - verboselog(machine(), 2, "mc68328_w: PESEL = %02x\n", data & 0x00ff); + verboselog( *this, 2, "mc68328_w: PESEL = %02x\n", data & 0x00ff); m_regs.pesel = data & 0x00ff; } else { - verboselog(machine(), 2, "mc68328_w: PEPUEN = %02x\n", (data >> 8) & 0x00ff); + verboselog( *this, 2, "mc68328_w: PEPUEN = %02x\n", (data >> 8) & 0x00ff); m_regs.pepuen = (data >> 8) & 0x00ff; m_regs.pedata |= m_regs.pepuen; } @@ -1140,7 +1140,7 @@ WRITE16_MEMBER( mc68328_device::write ) case 0x428: if (mem_mask & 0x00ff) { - verboselog(machine(), 2, "mc68328_w: PFDATA = %02x\n", data & 0x00ff); + verboselog( *this, 2, "mc68328_w: PFDATA = %02x\n", data & 0x00ff); m_regs.pfdata = data & 0x00ff; if (!m_out_port_f_cb.isnull()) { @@ -1149,7 +1149,7 @@ WRITE16_MEMBER( mc68328_device::write ) } else { - verboselog(machine(), 2, "mc68328_w: PFDIR = %02x\n", (data >> 8) & 0x00ff); + verboselog( *this, 2, "mc68328_w: PFDIR = %02x\n", (data >> 8) & 0x00ff); m_regs.pfdir = (data >> 8) & 0x00ff; } break; @@ -1157,12 +1157,12 @@ WRITE16_MEMBER( mc68328_device::write ) case 0x42a: if (mem_mask & 0x00ff) { - verboselog(machine(), 2, "mc68328_w: PFSEL = %02x\n", data & 0x00ff); + verboselog( *this, 2, "mc68328_w: PFSEL = %02x\n", data & 0x00ff); m_regs.pfsel = data & 0x00ff; } else { - verboselog(machine(), 2, "mc68328_w: PFPUEN = %02x\n", (data >> 8) & 0x00ff); + verboselog( *this, 2, "mc68328_w: PFPUEN = %02x\n", (data >> 8) & 0x00ff); m_regs.pfpuen = (data >> 8) & 0x00ff; } break; @@ -1170,7 +1170,7 @@ WRITE16_MEMBER( mc68328_device::write ) case 0x430: if (mem_mask & 0x00ff) { - verboselog(machine(), 2, "mc68328_w: PGDATA = %02x\n", data & 0x00ff); + verboselog( *this, 2, "mc68328_w: PGDATA = %02x\n", data & 0x00ff); m_regs.pgdata = data & 0x00ff; if (!m_out_port_g_cb.isnull()) { @@ -1179,7 +1179,7 @@ WRITE16_MEMBER( mc68328_device::write ) } else { - verboselog(machine(), 2, "mc68328_w: PGDIR = %02x\n", (data >> 8) & 0x00ff); + verboselog( *this, 2, "mc68328_w: PGDIR = %02x\n", (data >> 8) & 0x00ff); m_regs.pgdir = (data >> 8) & 0x00ff; } break; @@ -1187,12 +1187,12 @@ WRITE16_MEMBER( mc68328_device::write ) case 0x432: if (mem_mask & 0x00ff) { - verboselog(machine(), 2, "mc68328_w: PGSEL = %02x\n", data & 0x00ff); + verboselog( *this, 2, "mc68328_w: PGSEL = %02x\n", data & 0x00ff); m_regs.pgsel = data & 0x00ff; } else { - verboselog(machine(), 2, "mc68328_w: PGPUEN = %02x\n", (data >> 8) & 0x00ff); + verboselog( *this, 2, "mc68328_w: PGPUEN = %02x\n", (data >> 8) & 0x00ff); m_regs.pgpuen = (data >> 8) & 0x00ff; } break; @@ -1200,7 +1200,7 @@ WRITE16_MEMBER( mc68328_device::write ) case 0x438: if (mem_mask & 0x00ff) { - verboselog(machine(), 2, "mc68328_w: PJDATA = %02x\n", data & 0x00ff); + verboselog( *this, 2, "mc68328_w: PJDATA = %02x\n", data & 0x00ff); m_regs.pjdata = data & 0x00ff; if (!m_out_port_j_cb.isnull()) { @@ -1209,7 +1209,7 @@ WRITE16_MEMBER( mc68328_device::write ) } else { - verboselog(machine(), 2, "mc68328_w: PJDIR = %02x\n", (data >> 8) & 0x00ff); + verboselog( *this, 2, "mc68328_w: PJDIR = %02x\n", (data >> 8) & 0x00ff); m_regs.pjdir = (data >> 8) & 0x00ff; } break; @@ -1217,19 +1217,19 @@ WRITE16_MEMBER( mc68328_device::write ) case 0x43a: if (mem_mask & 0x00ff) { - verboselog(machine(), 2, "mc68328_w: PJSEL = %02x\n", data & 0x00ff); + verboselog( *this, 2, "mc68328_w: PJSEL = %02x\n", data & 0x00ff); m_regs.pjsel = data & 0x00ff; } else { - verboselog(machine(), 2, "mc68328_w: Unknown address (0xfff43a) = %02x\n", (data >> 8) & 0x00ff); + verboselog( *this, 2, "mc68328_w: Unknown address (0xfff43a) = %02x\n", (data >> 8) & 0x00ff); } break; case 0x440: if (mem_mask & 0x00ff) { - verboselog(machine(), 2, "mc68328_w: PKDATA = %02x\n", data & 0x00ff); + verboselog( *this, 2, "mc68328_w: PKDATA = %02x\n", data & 0x00ff); m_regs.pkdata = data & 0x00ff; if (!m_out_port_k_cb.isnull()) { @@ -1238,7 +1238,7 @@ WRITE16_MEMBER( mc68328_device::write ) } else { - verboselog(machine(), 2, "mc68328_w: PKDIR = %02x\n", (data >> 8) & 0x00ff); + verboselog( *this, 2, "mc68328_w: PKDIR = %02x\n", (data >> 8) & 0x00ff); m_regs.pkdir = (data >> 8) & 0x00ff; } break; @@ -1246,12 +1246,12 @@ WRITE16_MEMBER( mc68328_device::write ) case 0x442: if (mem_mask & 0x00ff) { - verboselog(machine(), 2, "mc68328_w: PKSEL = %02x\n", data & 0x00ff); + verboselog( *this, 2, "mc68328_w: PKSEL = %02x\n", data & 0x00ff); m_regs.pksel = data & 0x00ff; } else { - verboselog(machine(), 2, "mc68328_w: PKPUEN = %02x\n", (data >> 8) & 0x00ff); + verboselog( *this, 2, "mc68328_w: PKPUEN = %02x\n", (data >> 8) & 0x00ff); m_regs.pgpuen = (data >> 8) & 0x00ff; } break; @@ -1259,7 +1259,7 @@ WRITE16_MEMBER( mc68328_device::write ) case 0x448: if (mem_mask & 0x00ff) { - verboselog(machine(), 2, "mc68328_w: PMDATA = %02x\n", data & 0x00ff); + verboselog( *this, 2, "mc68328_w: PMDATA = %02x\n", data & 0x00ff); m_regs.pmdata = data & 0x00ff; if (!m_out_port_m_cb.isnull()) { @@ -1268,7 +1268,7 @@ WRITE16_MEMBER( mc68328_device::write ) } else { - verboselog(machine(), 2, "mc68328_w: PMDIR = %02x\n", (data >> 8) & 0x00ff); + verboselog( *this, 2, "mc68328_w: PMDIR = %02x\n", (data >> 8) & 0x00ff); m_regs.pmdir = (data >> 8) & 0x00ff; } break; @@ -1276,18 +1276,18 @@ WRITE16_MEMBER( mc68328_device::write ) case 0x44a: if (mem_mask & 0x00ff) { - verboselog(machine(), 2, "mc68328_w: PMSEL = %02x\n", data & 0x00ff); + verboselog( *this, 2, "mc68328_w: PMSEL = %02x\n", data & 0x00ff); m_regs.pmsel = data & 0x00ff; } else { - verboselog(machine(), 2, "mc68328_w: PMPUEN = %02x\n", (data >> 8) & 0x00ff); + verboselog( *this, 2, "mc68328_w: PMPUEN = %02x\n", (data >> 8) & 0x00ff); m_regs.pmpuen = (data >> 8) & 0x00ff; } break; case 0x500: - verboselog(machine(), 2, "mc68328_w: PWMC = %04x\n", data); + verboselog( *this, 2, "mc68328_w: PWMC = %04x\n", data); m_regs.pwmc = data; @@ -1319,22 +1319,22 @@ WRITE16_MEMBER( mc68328_device::write ) break; case 0x502: - verboselog(machine(), 2, "mc68328_w: PWMP = %04x\n", data); + verboselog( *this, 2, "mc68328_w: PWMP = %04x\n", data); m_regs.pwmp = data; break; case 0x504: - verboselog(machine(), 2, "mc68328_w: PWMW = %04x\n", data); + verboselog( *this, 2, "mc68328_w: PWMW = %04x\n", data); m_regs.pwmw = data; break; case 0x506: - verboselog(machine(), 2, "mc68328_w: PWMCNT = %04x\n", data); + verboselog( *this, 2, "mc68328_w: PWMCNT = %04x\n", data); m_regs.pwmcnt = 0; break; case 0x600: - verboselog(machine(), 2, "mc68328_w: TCTL1 = %04x\n", data); + verboselog( *this, 2, "mc68328_w: TCTL1 = %04x\n", data); temp16[0] = m_regs.tctl[0]; m_regs.tctl[0] = data; if ((temp16[0] & TCTL_TEN) == (m_regs.tctl[0] & TCTL_TEN)) @@ -1348,27 +1348,27 @@ WRITE16_MEMBER( mc68328_device::write ) break; case 0x602: - verboselog(machine(), 2, "mc68328_w: TPRER1 = %04x\n", data); + verboselog( *this, 2, "mc68328_w: TPRER1 = %04x\n", data); m_regs.tprer[0] = data; maybe_start_timer(0, 0); break; case 0x604: - verboselog(machine(), 2, "mc68328_w: TCMP1 = %04x\n", data); + verboselog( *this, 2, "mc68328_w: TCMP1 = %04x\n", data); m_regs.tcmp[0] = data; maybe_start_timer(0, 0); break; case 0x606: - verboselog(machine(), 2, "mc68328_w: TCR1 = %04x (Ignored)\n", data); + verboselog( *this, 2, "mc68328_w: TCR1 = %04x (Ignored)\n", data); break; case 0x608: - verboselog(machine(), 2, "mc68328_w: TCN1 = %04x (Ignored)\n", data); + verboselog( *this, 2, "mc68328_w: TCN1 = %04x (Ignored)\n", data); break; case 0x60a: - verboselog(machine(), 5, "mc68328_w: TSTAT1 = %04x\n", data); + verboselog( *this, 5, "mc68328_w: TSTAT1 = %04x\n", data); m_regs.tstat[0] &= ~m_regs.tclear[0]; if (!(m_regs.tstat[0] & TSTAT_COMP)) { @@ -1377,7 +1377,7 @@ WRITE16_MEMBER( mc68328_device::write ) break; case 0x60c: - verboselog(machine(), 2, "mc68328_w: TCTL2 = %04x\n", data); + verboselog( *this, 2, "mc68328_w: TCTL2 = %04x\n", data); temp16[0] = m_regs.tctl[1]; m_regs.tctl[1] = data; if ((temp16[0] & TCTL_TEN) == (m_regs.tctl[1] & TCTL_TEN)) @@ -1391,27 +1391,27 @@ WRITE16_MEMBER( mc68328_device::write ) break; case 0x60e: - verboselog(machine(), 2, "mc68328_w: TPRER2 = %04x\n", data); + verboselog( *this, 2, "mc68328_w: TPRER2 = %04x\n", data); m_regs.tprer[1] = data; maybe_start_timer(1, 0); break; case 0x610: - verboselog(machine(), 2, "mc68328_w: TCMP2 = %04x\n", data); + verboselog( *this, 2, "mc68328_w: TCMP2 = %04x\n", data); m_regs.tcmp[1] = data; maybe_start_timer(1, 0); break; case 0x612: - verboselog(machine(), 2, "mc68328_w: TCR2 = %04x (Ignored)\n", data); + verboselog( *this, 2, "mc68328_w: TCR2 = %04x (Ignored)\n", data); break; case 0x614: - verboselog(machine(), 2, "mc68328_w: TCN2 = %04x (Ignored)\n", data); + verboselog( *this, 2, "mc68328_w: TCN2 = %04x (Ignored)\n", data); break; case 0x616: - verboselog(machine(), 2, "mc68328_w: TSTAT2 = %04x\n", data); + verboselog( *this, 2, "mc68328_w: TSTAT2 = %04x\n", data); m_regs.tstat[1] &= ~m_regs.tclear[1]; if (!(m_regs.tstat[1] & TSTAT_COMP)) { @@ -1420,26 +1420,26 @@ WRITE16_MEMBER( mc68328_device::write ) break; case 0x618: - verboselog(machine(), 2, "mc68328_w: WCTLR = %04x\n", data); + verboselog( *this, 2, "mc68328_w: WCTLR = %04x\n", data); m_regs.wctlr = data; break; case 0x61a: - verboselog(machine(), 2, "mc68328_w: WCMPR = %04x\n", data); + verboselog( *this, 2, "mc68328_w: WCMPR = %04x\n", data); m_regs.wcmpr = data; break; case 0x61c: - verboselog(machine(), 2, "mc68328_w: WCN = %04x (Ignored)\n", data); + verboselog( *this, 2, "mc68328_w: WCN = %04x (Ignored)\n", data); break; case 0x700: - verboselog(machine(), 2, "mc68328_w: SPISR = %04x\n", data); + verboselog( *this, 2, "mc68328_w: SPISR = %04x\n", data); m_regs.spisr = data; break; case 0x800: - verboselog(machine(), 2, "mc68328_w: SPIMDATA = %04x\n", data); + verboselog( *this, 2, "mc68328_w: SPIMDATA = %04x\n", data); if (!m_out_spim_cb.isnull()) { m_out_spim_cb(0, data, 0xffff); @@ -1451,15 +1451,15 @@ WRITE16_MEMBER( mc68328_device::write ) break; case 0x802: - verboselog(machine(), 2, "mc68328_w: SPIMCONT = %04x\n", data); - verboselog(machine(), 3, " Count = %d\n", data & SPIM_CLOCK_COUNT); - verboselog(machine(), 3, " Polarity = %s\n", (data & SPIM_POL) ? "Inverted" : "Active-high"); - verboselog(machine(), 3, " Phase = %s\n", (data & SPIM_PHA) ? "Opposite" : "Normal"); - verboselog(machine(), 3, " IRQ Enable = %s\n", (data & SPIM_IRQEN) ? "Enable" : "Disable"); - verboselog(machine(), 3, " IRQ Pending = %s\n", (data & SPIM_SPIMIRQ) ? "Yes" : "No"); - verboselog(machine(), 3, " Exchange = %s\n", (data & SPIM_XCH) ? "Initiate" : "Idle"); - verboselog(machine(), 3, " SPIM Enable = %s\n", (data & SPIM_SPMEN) ? "Enable" : "Disable"); - verboselog(machine(), 3, " Data Rate = Divide By %d\n", 1 << ((((data & SPIM_RATE) >> 13) & 0x0007) + 2) ); + verboselog( *this, 2, "mc68328_w: SPIMCONT = %04x\n", data); + verboselog( *this, 3, " Count = %d\n", data & SPIM_CLOCK_COUNT); + verboselog( *this, 3, " Polarity = %s\n", (data & SPIM_POL) ? "Inverted" : "Active-high"); + verboselog( *this, 3, " Phase = %s\n", (data & SPIM_PHA) ? "Opposite" : "Normal"); + verboselog( *this, 3, " IRQ Enable = %s\n", (data & SPIM_IRQEN) ? "Enable" : "Disable"); + verboselog( *this, 3, " IRQ Pending = %s\n", (data & SPIM_SPIMIRQ) ? "Yes" : "No"); + verboselog( *this, 3, " Exchange = %s\n", (data & SPIM_XCH) ? "Initiate" : "Idle"); + verboselog( *this, 3, " SPIM Enable = %s\n", (data & SPIM_SPMEN) ? "Enable" : "Disable"); + verboselog( *this, 3, " Data Rate = Divide By %d\n", 1 << ((((data & SPIM_RATE) >> 13) & 0x0007) + 2) ); m_regs.spimcont = data; // $$HACK$$ We should probably emulate the ADS7843 A/D device properly. if (data & SPIM_XCH) @@ -1472,7 +1472,7 @@ WRITE16_MEMBER( mc68328_device::write ) if (data & SPIM_IRQEN) { m_regs.spimcont |= SPIM_SPIMIRQ; - verboselog(machine(), 3, "Triggering SPIM Interrupt\n" ); + verboselog( *this, 3, "Triggering SPIM Interrupt\n" ); set_interrupt_line(INT_SPIM, 1); } } @@ -1483,292 +1483,292 @@ WRITE16_MEMBER( mc68328_device::write ) break; case 0x900: - verboselog(machine(), 2, "mc68328_w: USTCNT = %04x\n", data); + verboselog( *this, 2, "mc68328_w: USTCNT = %04x\n", data); m_regs.ustcnt = data; break; case 0x902: - verboselog(machine(), 2, "mc68328_w: UBAUD = %04x\n", data); + verboselog( *this, 2, "mc68328_w: UBAUD = %04x\n", data); m_regs.ubaud = data; break; case 0x904: - verboselog(machine(), 2, "mc68328_w: URX = %04x\n", data); + verboselog( *this, 2, "mc68328_w: URX = %04x\n", data); break; case 0x906: - verboselog(machine(), 2, "mc68328_w: UTX = %04x\n", data); + verboselog( *this, 2, "mc68328_w: UTX = %04x\n", data); break; case 0x908: - verboselog(machine(), 2, "mc68328_w: UMISC = %04x\n", data); + verboselog( *this, 2, "mc68328_w: UMISC = %04x\n", data); m_regs.umisc = data; break; case 0xa00: - verboselog(machine(), 2, "mc68328_w: LSSA(16) = %04x\n", data); + verboselog( *this, 2, "mc68328_w: LSSA(16) = %04x\n", data); m_regs.lssa &= ~(mem_mask << 16); m_regs.lssa |= (data & mem_mask) << 16; - verboselog(machine(), 3, " Address: %08x\n", m_regs.lssa); + verboselog( *this, 3, " Address: %08x\n", m_regs.lssa); break; case 0xa02: - verboselog(machine(), 2, "mc68328_w: LSSA(0) = %04x\n", data); + verboselog( *this, 2, "mc68328_w: LSSA(0) = %04x\n", data); m_regs.lssa &= 0xffff0000 | (~mem_mask); m_regs.lssa |= data & mem_mask; - verboselog(machine(), 3, " Address: %08x\n", m_regs.lssa); + verboselog( *this, 3, " Address: %08x\n", m_regs.lssa); break; case 0xa04: if (mem_mask & 0x00ff) { - verboselog(machine(), 2, "mc68328_w: LVPW = %02x\n", data & 0x00ff); + verboselog( *this, 2, "mc68328_w: LVPW = %02x\n", data & 0x00ff); m_regs.lvpw = data & 0x00ff; - verboselog(machine(), 3, " Page Width: %d\n", (m_regs.lvpw + 1) * ((m_regs.lpicf & 0x01) ? 8 : 16)); + verboselog( *this, 3, " Page Width: %d\n", (m_regs.lvpw + 1) * ((m_regs.lpicf & 0x01) ? 8 : 16)); } else { - verboselog(machine(), 2, "mc68328_w: Unknown address (0xfffa04) = %02x\n", (data >> 8) & 0x00ff); + verboselog( *this, 2, "mc68328_w: Unknown address (0xfffa04) = %02x\n", (data >> 8) & 0x00ff); } break; case 0xa08: - verboselog(machine(), 2, "mc68328_w: LXMAX = %04x\n", data); + verboselog( *this, 2, "mc68328_w: LXMAX = %04x\n", data); m_regs.lxmax = data; - verboselog(machine(), 3, " Width: %d\n", (data & 0x03ff) + 1); + verboselog( *this, 3, " Width: %d\n", (data & 0x03ff) + 1); break; case 0xa0a: - verboselog(machine(), 2, "mc68328_w: LYMAX = %04x\n", data); + verboselog( *this, 2, "mc68328_w: LYMAX = %04x\n", data); m_regs.lymax = data; - verboselog(machine(), 3, " Height: %d\n", (data & 0x03ff) + 1); + verboselog( *this, 3, " Height: %d\n", (data & 0x03ff) + 1); break; case 0xa18: - verboselog(machine(), 2, "mc68328_w: LCXP = %04x\n", data); + verboselog( *this, 2, "mc68328_w: LCXP = %04x\n", data); m_regs.lcxp = data; - verboselog(machine(), 3, " X Position: %d\n", data & 0x03ff); + verboselog( *this, 3, " X Position: %d\n", data & 0x03ff); switch (m_regs.lcxp >> 14) { case 0: - verboselog(machine(), 3, " Cursor Control: Transparent\n"); + verboselog( *this, 3, " Cursor Control: Transparent\n"); break; case 1: - verboselog(machine(), 3, " Cursor Control: Black\n"); + verboselog( *this, 3, " Cursor Control: Black\n"); break; case 2: - verboselog(machine(), 3, " Cursor Control: Reverse\n"); + verboselog( *this, 3, " Cursor Control: Reverse\n"); break; case 3: - verboselog(machine(), 3, " Cursor Control: Invalid\n"); + verboselog( *this, 3, " Cursor Control: Invalid\n"); break; } break; case 0xa1a: - verboselog(machine(), 2, "mc68328_w: LCYP = %04x\n", data); + verboselog( *this, 2, "mc68328_w: LCYP = %04x\n", data); m_regs.lcyp = data; - verboselog(machine(), 3, " Y Position: %d\n", data & 0x01ff); + verboselog( *this, 3, " Y Position: %d\n", data & 0x01ff); break; case 0xa1c: - verboselog(machine(), 2, "mc68328_w: LCWCH = %04x\n", data); + verboselog( *this, 2, "mc68328_w: LCWCH = %04x\n", data); m_regs.lcwch = data; - verboselog(machine(), 3, " Width: %d\n", (data >> 8) & 0x1f); - verboselog(machine(), 3, " Height: %d\n", data & 0x1f); + verboselog( *this, 3, " Width: %d\n", (data >> 8) & 0x1f); + verboselog( *this, 3, " Height: %d\n", data & 0x1f); break; case 0xa1e: if (mem_mask & 0x00ff) { - verboselog(machine(), 2, "mc68328_w: LBLKC = %02x\n", data & 0x00ff); + verboselog( *this, 2, "mc68328_w: LBLKC = %02x\n", data & 0x00ff); m_regs.lblkc = data & 0x00ff; - verboselog(machine(), 3, " Blink Enable: %d\n", m_regs.lblkc >> 7); - verboselog(machine(), 3, " Blink Divisor: %d\n", m_regs.lblkc & 0x7f); + verboselog( *this, 3, " Blink Enable: %d\n", m_regs.lblkc >> 7); + verboselog( *this, 3, " Blink Divisor: %d\n", m_regs.lblkc & 0x7f); } else { - verboselog(machine(), 2, "mc68328_w: Unknown address (0xfffa1e) = %02x\n", (data >> 8) & 0x00ff); + verboselog( *this, 2, "mc68328_w: Unknown address (0xfffa1e) = %02x\n", (data >> 8) & 0x00ff); } break; case 0xa20: if (mem_mask & 0x00ff) { - verboselog(machine(), 2, "mc68328_w: LPOLCF = %02x\n", data & 0x00ff); + verboselog( *this, 2, "mc68328_w: LPOLCF = %02x\n", data & 0x00ff); m_regs.lpolcf = data & 0x00ff; - verboselog(machine(), 3, " LCD Shift Clock Polarity: %s\n", (m_regs.lpicf & 0x08) ? "Active positive edge of LCLK" : "Active negative edge of LCLK"); - verboselog(machine(), 3, " First-line marker polarity: %s\n", (m_regs.lpicf & 0x04) ? "Active Low" : "Active High"); - verboselog(machine(), 3, " Line-pulse polarity: %s\n", (m_regs.lpicf & 0x02) ? "Active Low" : "Active High"); - verboselog(machine(), 3, " Pixel polarity: %s\n", (m_regs.lpicf & 0x01) ? "Active Low" : "Active High"); + verboselog( *this, 3, " LCD Shift Clock Polarity: %s\n", (m_regs.lpicf & 0x08) ? "Active positive edge of LCLK" : "Active negative edge of LCLK"); + verboselog( *this, 3, " First-line marker polarity: %s\n", (m_regs.lpicf & 0x04) ? "Active Low" : "Active High"); + verboselog( *this, 3, " Line-pulse polarity: %s\n", (m_regs.lpicf & 0x02) ? "Active Low" : "Active High"); + verboselog( *this, 3, " Pixel polarity: %s\n", (m_regs.lpicf & 0x01) ? "Active Low" : "Active High"); } else { - verboselog(machine(), 2, "mc68328_w: LPICF = %02x\n", (data >> 8) & 0x00ff); + verboselog( *this, 2, "mc68328_w: LPICF = %02x\n", (data >> 8) & 0x00ff); m_regs.lpicf = (data >> 8) & 0x00ff; switch((m_regs.lpicf >> 1) & 0x03) { case 0: - verboselog(machine(), 3, " Bus Size: 1-bit\n"); + verboselog( *this, 3, " Bus Size: 1-bit\n"); break; case 1: - verboselog(machine(), 3, " Bus Size: 2-bit\n"); + verboselog( *this, 3, " Bus Size: 2-bit\n"); break; case 2: - verboselog(machine(), 3, " Bus Size: 4-bit\n"); + verboselog( *this, 3, " Bus Size: 4-bit\n"); break; case 3: - verboselog(machine(), 3, " Bus Size: unused\n"); + verboselog( *this, 3, " Bus Size: unused\n"); break; } - verboselog(machine(), 3, " Gray scale enable: %d\n", m_regs.lpicf & 0x01); + verboselog( *this, 3, " Gray scale enable: %d\n", m_regs.lpicf & 0x01); } break; case 0xa22: if (mem_mask & 0x00ff) { - verboselog(machine(), 2, "mc68328_w: LACDRC = %02x\n", data & 0x00ff); + verboselog( *this, 2, "mc68328_w: LACDRC = %02x\n", data & 0x00ff); m_regs.lacdrc = data & 0x00ff; } else { - verboselog(machine(), 2, "mc68328_w: Unknown address (0xfffa22) = %02x\n", (data >> 8) & 0x00ff); + verboselog( *this, 2, "mc68328_w: Unknown address (0xfffa22) = %02x\n", (data >> 8) & 0x00ff); } break; case 0xa24: if (mem_mask & 0x00ff) { - verboselog(machine(), 2, "mc68328_w: LPXCD = %02x\n", data & 0x00ff); + verboselog( *this, 2, "mc68328_w: LPXCD = %02x\n", data & 0x00ff); m_regs.lpxcd = data & 0x00ff; - verboselog(machine(), 3, " Clock Divisor: %d\n", m_regs.lpxcd + 1); + verboselog( *this, 3, " Clock Divisor: %d\n", m_regs.lpxcd + 1); } else { - verboselog(machine(), 2, "mc68328_w: Unknown address (0xfffa24) = %02x\n", (data >> 8) & 0x00ff); + verboselog( *this, 2, "mc68328_w: Unknown address (0xfffa24) = %02x\n", (data >> 8) & 0x00ff); } break; case 0xa26: if (mem_mask & 0x00ff) { - verboselog(machine(), 2, "mc68328_w: LCKCON = %02x\n", data & 0x00ff); + verboselog( *this, 2, "mc68328_w: LCKCON = %02x\n", data & 0x00ff); m_regs.lckcon = data & 0x00ff; - verboselog(machine(), 3, " LCDC Enable: %d\n", (m_regs.lckcon >> 7) & 0x01); - verboselog(machine(), 3, " DMA Burst Length: %d\n", ((m_regs.lckcon >> 6) & 0x01) ? 16 : 8); - verboselog(machine(), 3, " DMA Bursting Clock Control: %d\n", ((m_regs.lckcon >> 4) & 0x03) + 1); - verboselog(machine(), 3, " Bus Width: %d\n", ((m_regs.lckcon >> 1) & 0x01) ? 8 : 16); - verboselog(machine(), 3, " Pixel Clock Divider Source: %s\n", (m_regs.lckcon & 0x01) ? "PIX" : "SYS"); + verboselog( *this, 3, " LCDC Enable: %d\n", (m_regs.lckcon >> 7) & 0x01); + verboselog( *this, 3, " DMA Burst Length: %d\n", ((m_regs.lckcon >> 6) & 0x01) ? 16 : 8); + verboselog( *this, 3, " DMA Bursting Clock Control: %d\n", ((m_regs.lckcon >> 4) & 0x03) + 1); + verboselog( *this, 3, " Bus Width: %d\n", ((m_regs.lckcon >> 1) & 0x01) ? 8 : 16); + verboselog( *this, 3, " Pixel Clock Divider Source: %s\n", (m_regs.lckcon & 0x01) ? "PIX" : "SYS"); } else { - verboselog(machine(), 2, "mc68328_w: Unknown address (0xfffa26) = %02x\n", (data >> 8) & 0x00ff); + verboselog( *this, 2, "mc68328_w: Unknown address (0xfffa26) = %02x\n", (data >> 8) & 0x00ff); } break; case 0xa28: if (mem_mask & 0x00ff) { - verboselog(machine(), 2, "mc68328_w: LLBAR = %02x\n", data & 0x00ff); + verboselog( *this, 2, "mc68328_w: LLBAR = %02x\n", data & 0x00ff); m_regs.llbar = data & 0x00ff; - verboselog(machine(), 3, " Address: %d\n", (m_regs.llbar & 0x7f) * ((m_regs.lpicf & 0x01) ? 8 : 16)); + verboselog( *this, 3, " Address: %d\n", (m_regs.llbar & 0x7f) * ((m_regs.lpicf & 0x01) ? 8 : 16)); } else { - verboselog(machine(), 2, "mc68328_w: Unknown address (0xfffa28) = %02x\n", (data >> 8) & 0x00ff); + verboselog( *this, 2, "mc68328_w: Unknown address (0xfffa28) = %02x\n", (data >> 8) & 0x00ff); } break; case 0xa2a: if (mem_mask & 0x00ff) { - verboselog(machine(), 2, "mc68328_w: LOTCR = %02x\n", data & 0x00ff); + verboselog( *this, 2, "mc68328_w: LOTCR = %02x\n", data & 0x00ff); } else { - verboselog(machine(), 2, "mc68328_w: Unknown address (0xfffa2a) = %02x\n", (data >> 8) & 0x00ff); + verboselog( *this, 2, "mc68328_w: Unknown address (0xfffa2a) = %02x\n", (data >> 8) & 0x00ff); } break; case 0xa2c: if (mem_mask & 0x00ff) { - verboselog(machine(), 2, "mc68328_w: LPOSR = %02x\n", data & 0x00ff); + verboselog( *this, 2, "mc68328_w: LPOSR = %02x\n", data & 0x00ff); m_regs.lposr = data & 0x00ff; - verboselog(machine(), 3, " Byte Offset: %d\n", (m_regs.lposr >> 3) & 0x01); - verboselog(machine(), 3, " Pixel Offset: %d\n", m_regs.lposr & 0x07); + verboselog( *this, 3, " Byte Offset: %d\n", (m_regs.lposr >> 3) & 0x01); + verboselog( *this, 3, " Pixel Offset: %d\n", m_regs.lposr & 0x07); } else { - verboselog(machine(), 2, "mc68328_w: Unknown address (0xfffa2c) = %02x\n", (data >> 8) & 0x00ff); + verboselog( *this, 2, "mc68328_w: Unknown address (0xfffa2c) = %02x\n", (data >> 8) & 0x00ff); } break; case 0xa30: if (mem_mask & 0x00ff) { - verboselog(machine(), 2, "mc68328_w: LFRCM = %02x\n", data & 0x00ff); + verboselog( *this, 2, "mc68328_w: LFRCM = %02x\n", data & 0x00ff); m_regs.lfrcm = data & 0x00ff; - verboselog(machine(), 3, " X Modulation: %d\n", (m_regs.lfrcm >> 4) & 0x0f); - verboselog(machine(), 3, " Y Modulation: %d\n", m_regs.lfrcm & 0x0f); + verboselog( *this, 3, " X Modulation: %d\n", (m_regs.lfrcm >> 4) & 0x0f); + verboselog( *this, 3, " Y Modulation: %d\n", m_regs.lfrcm & 0x0f); } else { - verboselog(machine(), 2, "mc68328_w: Unknown address (0xfffa30) = %02x\n", (data >> 8) & 0x00ff); + verboselog( *this, 2, "mc68328_w: Unknown address (0xfffa30) = %02x\n", (data >> 8) & 0x00ff); } break; case 0xa32: - verboselog(machine(), 2, "mc68328_w: LGPMR = %04x\n", data); + verboselog( *this, 2, "mc68328_w: LGPMR = %04x\n", data); m_regs.lgpmr = data; - verboselog(machine(), 3, " Palette 0: %d\n", (m_regs.lgpmr >> 8) & 0x07); - verboselog(machine(), 3, " Palette 1: %d\n", (m_regs.lgpmr >> 12) & 0x07); - verboselog(machine(), 3, " Palette 2: %d\n", (m_regs.lgpmr >> 0) & 0x07); - verboselog(machine(), 3, " Palette 3: %d\n", (m_regs.lgpmr >> 4) & 0x07); + verboselog( *this, 3, " Palette 0: %d\n", (m_regs.lgpmr >> 8) & 0x07); + verboselog( *this, 3, " Palette 1: %d\n", (m_regs.lgpmr >> 12) & 0x07); + verboselog( *this, 3, " Palette 2: %d\n", (m_regs.lgpmr >> 0) & 0x07); + verboselog( *this, 3, " Palette 3: %d\n", (m_regs.lgpmr >> 4) & 0x07); break; case 0xb00: - verboselog(machine(), 2, "mc68328_w: HMSR(0) = %04x\n", data); + verboselog( *this, 2, "mc68328_w: HMSR(0) = %04x\n", data); m_regs.hmsr &= ~(mem_mask << 16); m_regs.hmsr |= (data & mem_mask) << 16; m_regs.hmsr &= 0x1f3f003f; break; case 0xb02: - verboselog(machine(), 2, "mc68328_w: HMSR(16) = %04x\n", data); + verboselog( *this, 2, "mc68328_w: HMSR(16) = %04x\n", data); m_regs.hmsr &= 0xffff0000 | (~mem_mask); m_regs.hmsr |= data & mem_mask; m_regs.hmsr &= 0x1f3f003f; break; case 0xb04: - verboselog(machine(), 2, "mc68328_w: ALARM(0) = %04x\n", data); + verboselog( *this, 2, "mc68328_w: ALARM(0) = %04x\n", data); m_regs.alarm &= ~(mem_mask << 16); m_regs.alarm |= (data & mem_mask) << 16; m_regs.alarm &= 0x1f3f003f; break; case 0xb06: - verboselog(machine(), 2, "mc68328_w: ALARM(16) = %04x\n", data); + verboselog( *this, 2, "mc68328_w: ALARM(16) = %04x\n", data); m_regs.alarm &= 0xffff0000 | (~mem_mask); m_regs.alarm |= data & mem_mask; m_regs.alarm &= 0x1f3f003f; break; case 0xb0c: - verboselog(machine(), 2, "mc68328_w: RTCCTL = %04x\n", data); + verboselog( *this, 2, "mc68328_w: RTCCTL = %04x\n", data); m_regs.rtcctl = data & 0x00a0; break; case 0xb0e: - verboselog(machine(), 2, "mc68328_w: RTCISR = %04x\n", data); + verboselog( *this, 2, "mc68328_w: RTCISR = %04x\n", data); m_regs.rtcisr &= ~data; if (m_regs.rtcisr == 0) { @@ -1777,17 +1777,17 @@ WRITE16_MEMBER( mc68328_device::write ) break; case 0xb10: - verboselog(machine(), 2, "mc68328_w: RTCIENR = %04x\n", data); + verboselog( *this, 2, "mc68328_w: RTCIENR = %04x\n", data); m_regs.rtcienr = data & 0x001f; break; case 0xb12: - verboselog(machine(), 2, "mc68328_w: STPWTCH = %04x\n", data); + verboselog( *this, 2, "mc68328_w: STPWTCH = %04x\n", data); m_regs.stpwtch = data & 0x003f; break; default: - verboselog(machine(), 0, "mc68328_w: Unknown address (0x%06x) = %04x (%04x)\n", 0xfff000 + address, data, mem_mask); + verboselog( *this, 0, "mc68328_w: Unknown address (0x%06x) = %04x (%04x)\n", 0xfff000 + address, data, mem_mask); break; } } @@ -1802,192 +1802,192 @@ READ16_MEMBER( mc68328_device::read ) case 0x000: if (mem_mask & 0x00ff) { - verboselog(machine(), 2, "mc68328_r (%04x): Unknown address (0xfff001)\n", mem_mask); + verboselog( *this, 2, "mc68328_r (%04x): Unknown address (0xfff001)\n", mem_mask); } else { - verboselog(machine(), 2, "mc68328_r (%04x): SCR = %02x\n", mem_mask, m_regs.scr); + verboselog( *this, 2, "mc68328_r (%04x): SCR = %02x\n", mem_mask, m_regs.scr); return m_regs.scr << 8; } break; case 0x100: - verboselog(machine(), 2, "mc68328_r (%04x): GRPBASEA = %04x\n", mem_mask, m_regs.grpbasea); + verboselog( *this, 2, "mc68328_r (%04x): GRPBASEA = %04x\n", mem_mask, m_regs.grpbasea); return m_regs.grpbasea; case 0x102: - verboselog(machine(), 2, "mc68328_r (%04x): GRPBASEB = %04x\n", mem_mask, m_regs.grpbaseb); + verboselog( *this, 2, "mc68328_r (%04x): GRPBASEB = %04x\n", mem_mask, m_regs.grpbaseb); return m_regs.grpbaseb; case 0x104: - verboselog(machine(), 2, "mc68328_r (%04x): GRPBASEC = %04x\n", mem_mask, m_regs.grpbasec); + verboselog( *this, 2, "mc68328_r (%04x): GRPBASEC = %04x\n", mem_mask, m_regs.grpbasec); return m_regs.grpbasec; case 0x106: - verboselog(machine(), 2, "mc68328_r (%04x): GRPBASED = %04x\n", mem_mask, m_regs.grpbased); + verboselog( *this, 2, "mc68328_r (%04x): GRPBASED = %04x\n", mem_mask, m_regs.grpbased); return m_regs.grpbased; case 0x108: - verboselog(machine(), 2, "mc68328_r (%04x): GRPMASKA = %04x\n", mem_mask, m_regs.grpmaska); + verboselog( *this, 2, "mc68328_r (%04x): GRPMASKA = %04x\n", mem_mask, m_regs.grpmaska); return m_regs.grpmaska; case 0x10a: - verboselog(machine(), 2, "mc68328_r (%04x): GRPMASKB = %04x\n", mem_mask, m_regs.grpmaskb); + verboselog( *this, 2, "mc68328_r (%04x): GRPMASKB = %04x\n", mem_mask, m_regs.grpmaskb); return m_regs.grpmaskb; case 0x10c: - verboselog(machine(), 2, "mc68328_r (%04x): GRPMASKC = %04x\n", mem_mask, m_regs.grpmaskc); + verboselog( *this, 2, "mc68328_r (%04x): GRPMASKC = %04x\n", mem_mask, m_regs.grpmaskc); return m_regs.grpmaskc; case 0x10e: - verboselog(machine(), 2, "mc68328_r (%04x): GRPMASKD = %04x\n", mem_mask, m_regs.grpmaskd); + verboselog( *this, 2, "mc68328_r (%04x): GRPMASKD = %04x\n", mem_mask, m_regs.grpmaskd); return m_regs.grpmaskd; case 0x110: - verboselog(machine(), 5, "mc68328_r (%04x): CSA0(0) = %04x\n", mem_mask, m_regs.csa0 & 0x0000ffff); + verboselog( *this, 5, "mc68328_r (%04x): CSA0(0) = %04x\n", mem_mask, m_regs.csa0 & 0x0000ffff); return m_regs.csa0 & 0x0000ffff; case 0x112: - verboselog(machine(), 5, "mc68328_r (%04x): CSA0(16) = %04x\n", mem_mask, m_regs.csa0 >> 16); + verboselog( *this, 5, "mc68328_r (%04x): CSA0(16) = %04x\n", mem_mask, m_regs.csa0 >> 16); return m_regs.csa0 >> 16; case 0x114: - verboselog(machine(), 5, "mc68328_r (%04x): CSA1(0) = %04x\n", mem_mask, m_regs.csa1 & 0x0000ffff); + verboselog( *this, 5, "mc68328_r (%04x): CSA1(0) = %04x\n", mem_mask, m_regs.csa1 & 0x0000ffff); return m_regs.csa1 & 0x0000ffff; case 0x116: - verboselog(machine(), 5, "mc68328_r (%04x): CSA1(16) = %04x\n", mem_mask, m_regs.csa1 >> 16); + verboselog( *this, 5, "mc68328_r (%04x): CSA1(16) = %04x\n", mem_mask, m_regs.csa1 >> 16); return m_regs.csa1 >> 16; case 0x118: - verboselog(machine(), 5, "mc68328_r (%04x): CSA2(0) = %04x\n", mem_mask, m_regs.csa2 & 0x0000ffff); + verboselog( *this, 5, "mc68328_r (%04x): CSA2(0) = %04x\n", mem_mask, m_regs.csa2 & 0x0000ffff); return m_regs.csa2 & 0x0000ffff; case 0x11a: - verboselog(machine(), 5, "mc68328_r (%04x): CSA2(16) = %04x\n", mem_mask, m_regs.csa2 >> 16); + verboselog( *this, 5, "mc68328_r (%04x): CSA2(16) = %04x\n", mem_mask, m_regs.csa2 >> 16); return m_regs.csa2 >> 16; case 0x11c: - verboselog(machine(), 5, "mc68328_r (%04x): CSA3(0) = %04x\n", mem_mask, m_regs.csa3 & 0x0000ffff); + verboselog( *this, 5, "mc68328_r (%04x): CSA3(0) = %04x\n", mem_mask, m_regs.csa3 & 0x0000ffff); return m_regs.csa3 & 0x0000ffff; case 0x11e: - verboselog(machine(), 5, "mc68328_r (%04x): CSA3(16) = %04x\n", mem_mask, m_regs.csa3 >> 16); + verboselog( *this, 5, "mc68328_r (%04x): CSA3(16) = %04x\n", mem_mask, m_regs.csa3 >> 16); return m_regs.csa3 >> 16; case 0x120: - verboselog(machine(), 5, "mc68328_r (%04x): CSB0(0) = %04x\n", mem_mask, m_regs.csb0 & 0x0000ffff); + verboselog( *this, 5, "mc68328_r (%04x): CSB0(0) = %04x\n", mem_mask, m_regs.csb0 & 0x0000ffff); return m_regs.csb0 & 0x0000ffff; case 0x122: - verboselog(machine(), 5, "mc68328_r (%04x): CSB0(16) = %04x\n", mem_mask, m_regs.csb0 >> 16); + verboselog( *this, 5, "mc68328_r (%04x): CSB0(16) = %04x\n", mem_mask, m_regs.csb0 >> 16); return m_regs.csb0 >> 16; case 0x124: - verboselog(machine(), 5, "mc68328_r (%04x): CSB1(0) = %04x\n", mem_mask, m_regs.csb1 & 0x0000ffff); + verboselog( *this, 5, "mc68328_r (%04x): CSB1(0) = %04x\n", mem_mask, m_regs.csb1 & 0x0000ffff); return m_regs.csb1 & 0x0000ffff; case 0x126: - verboselog(machine(), 5, "mc68328_r (%04x): CSB1(16) = %04x\n", mem_mask, m_regs.csb1 >> 16); + verboselog( *this, 5, "mc68328_r (%04x): CSB1(16) = %04x\n", mem_mask, m_regs.csb1 >> 16); return m_regs.csb1 >> 16; case 0x128: - verboselog(machine(), 5, "mc68328_r (%04x): CSB2(0) = %04x\n", mem_mask, m_regs.csb2 & 0x0000ffff); + verboselog( *this, 5, "mc68328_r (%04x): CSB2(0) = %04x\n", mem_mask, m_regs.csb2 & 0x0000ffff); return m_regs.csb2 & 0x0000ffff; case 0x12a: - verboselog(machine(), 5, "mc68328_r (%04x): CSB2(16) = %04x\n", mem_mask, m_regs.csb2 >> 16); + verboselog( *this, 5, "mc68328_r (%04x): CSB2(16) = %04x\n", mem_mask, m_regs.csb2 >> 16); return m_regs.csb2 >> 16; case 0x12c: - verboselog(machine(), 5, "mc68328_r (%04x): CSB3(0) = %04x\n", mem_mask, m_regs.csb3 & 0x0000ffff); + verboselog( *this, 5, "mc68328_r (%04x): CSB3(0) = %04x\n", mem_mask, m_regs.csb3 & 0x0000ffff); return m_regs.csb3 & 0x0000ffff; case 0x12e: - verboselog(machine(), 5, "mc68328_r (%04x): CSB3(16) = %04x\n", mem_mask, m_regs.csb3 >> 16); + verboselog( *this, 5, "mc68328_r (%04x): CSB3(16) = %04x\n", mem_mask, m_regs.csb3 >> 16); return m_regs.csb3 >> 16; case 0x130: - verboselog(machine(), 5, "mc68328_r (%04x): CSC0(0) = %04x\n", mem_mask, m_regs.csc0 & 0x0000ffff); + verboselog( *this, 5, "mc68328_r (%04x): CSC0(0) = %04x\n", mem_mask, m_regs.csc0 & 0x0000ffff); return m_regs.csc0 & 0x0000ffff; case 0x132: - verboselog(machine(), 5, "mc68328_r (%04x): CSC0(16) = %04x\n", mem_mask, m_regs.csc0 >> 16); + verboselog( *this, 5, "mc68328_r (%04x): CSC0(16) = %04x\n", mem_mask, m_regs.csc0 >> 16); return m_regs.csc0 >> 16; case 0x134: - verboselog(machine(), 5, "mc68328_r (%04x): CSC1(0) = %04x\n", mem_mask, m_regs.csc1 & 0x0000ffff); + verboselog( *this, 5, "mc68328_r (%04x): CSC1(0) = %04x\n", mem_mask, m_regs.csc1 & 0x0000ffff); return m_regs.csc1 & 0x0000ffff; case 0x136: - verboselog(machine(), 5, "mc68328_r (%04x): CSC1(16) = %04x\n", mem_mask, m_regs.csc1 >> 16); + verboselog( *this, 5, "mc68328_r (%04x): CSC1(16) = %04x\n", mem_mask, m_regs.csc1 >> 16); return m_regs.csc1 >> 16; case 0x138: - verboselog(machine(), 5, "mc68328_r (%04x): CSC2(0) = %04x\n", mem_mask, m_regs.csc2 & 0x0000ffff); + verboselog( *this, 5, "mc68328_r (%04x): CSC2(0) = %04x\n", mem_mask, m_regs.csc2 & 0x0000ffff); return m_regs.csc2 & 0x0000ffff; case 0x13a: - verboselog(machine(), 5, "mc68328_r (%04x): CSC2(16) = %04x\n", mem_mask, m_regs.csc2 >> 16); + verboselog( *this, 5, "mc68328_r (%04x): CSC2(16) = %04x\n", mem_mask, m_regs.csc2 >> 16); return m_regs.csc2 >> 16; case 0x13c: - verboselog(machine(), 5, "mc68328_r (%04x): CSC3(0) = %04x\n", mem_mask, m_regs.csc3 & 0x0000ffff); + verboselog( *this, 5, "mc68328_r (%04x): CSC3(0) = %04x\n", mem_mask, m_regs.csc3 & 0x0000ffff); return m_regs.csc3 & 0x0000ffff; case 0x13e: - verboselog(machine(), 5, "mc68328_r (%04x): CSC3(16) = %04x\n", mem_mask, m_regs.csc3 >> 16); + verboselog( *this, 5, "mc68328_r (%04x): CSC3(16) = %04x\n", mem_mask, m_regs.csc3 >> 16); return m_regs.csc3 >> 16; case 0x140: - verboselog(machine(), 5, "mc68328_r (%04x): CSD0(0) = %04x\n", mem_mask, m_regs.csd0 & 0x0000ffff); + verboselog( *this, 5, "mc68328_r (%04x): CSD0(0) = %04x\n", mem_mask, m_regs.csd0 & 0x0000ffff); return m_regs.csd0 & 0x0000ffff; case 0x142: - verboselog(machine(), 5, "mc68328_r (%04x): CSD0(16) = %04x\n", mem_mask, m_regs.csd0 >> 16); + verboselog( *this, 5, "mc68328_r (%04x): CSD0(16) = %04x\n", mem_mask, m_regs.csd0 >> 16); return m_regs.csd0 >> 16; case 0x144: - verboselog(machine(), 5, "mc68328_r (%04x): CSD1(0) = %04x\n", mem_mask, m_regs.csd1 & 0x0000ffff); + verboselog( *this, 5, "mc68328_r (%04x): CSD1(0) = %04x\n", mem_mask, m_regs.csd1 & 0x0000ffff); return m_regs.csd1 & 0x0000ffff; case 0x146: - verboselog(machine(), 5, "mc68328_r (%04x): CSD1(16) = %04x\n", mem_mask, m_regs.csd1 >> 16); + verboselog( *this, 5, "mc68328_r (%04x): CSD1(16) = %04x\n", mem_mask, m_regs.csd1 >> 16); return m_regs.csd1 >> 16; case 0x148: - verboselog(machine(), 5, "mc68328_r (%04x): CSD2(0) = %04x\n", mem_mask, m_regs.csd2 & 0x0000ffff); + verboselog( *this, 5, "mc68328_r (%04x): CSD2(0) = %04x\n", mem_mask, m_regs.csd2 & 0x0000ffff); return m_regs.csd2 & 0x0000ffff; case 0x14a: - verboselog(machine(), 5, "mc68328_r (%04x): CSD2(16) = %04x\n", mem_mask, m_regs.csd2 >> 16); + verboselog( *this, 5, "mc68328_r (%04x): CSD2(16) = %04x\n", mem_mask, m_regs.csd2 >> 16); return m_regs.csd2 >> 16; case 0x14c: - verboselog(machine(), 5, "mc68328_r (%04x): CSD3(0) = %04x\n", mem_mask, m_regs.csd3 & 0x0000ffff); + verboselog( *this, 5, "mc68328_r (%04x): CSD3(0) = %04x\n", mem_mask, m_regs.csd3 & 0x0000ffff); return m_regs.csd3 & 0x0000ffff; case 0x14e: - verboselog(machine(), 5, "mc68328_r (%04x): CSD3(16) = %04x\n", mem_mask, m_regs.csd3 >> 16); + verboselog( *this, 5, "mc68328_r (%04x): CSD3(16) = %04x\n", mem_mask, m_regs.csd3 >> 16); return m_regs.csd3 >> 16; case 0x200: - verboselog(machine(), 2, "mc68328_r (%04x): PLLCR = %04x\n", mem_mask, m_regs.pllcr); + verboselog( *this, 2, "mc68328_r (%04x): PLLCR = %04x\n", mem_mask, m_regs.pllcr); return m_regs.pllcr; case 0x202: - verboselog(machine(), 2, "mc68328_r (%04x): PLLFSR = %04x\n", mem_mask, m_regs.pllfsr); + verboselog( *this, 2, "mc68328_r (%04x): PLLFSR = %04x\n", mem_mask, m_regs.pllfsr); m_regs.pllfsr ^= 0x8000; return m_regs.pllfsr; case 0x206: if (mem_mask & 0x00ff) { - verboselog(machine(), 2, "mc68328_r (%04x): Unknown address (0xfff206)\n", mem_mask); + verboselog( *this, 2, "mc68328_r (%04x): Unknown address (0xfff206)\n", mem_mask); } else { - verboselog(machine(), 2, "mc68328_r (%04x): PCTLR = %02x\n", mem_mask, m_regs.pctlr); + verboselog( *this, 2, "mc68328_r (%04x): PCTLR = %02x\n", mem_mask, m_regs.pctlr); return m_regs.pctlr << 8; } break; @@ -1995,55 +1995,55 @@ READ16_MEMBER( mc68328_device::read ) case 0x300: if (mem_mask & 0x00ff) { - verboselog(machine(), 2, "mc68328_r (%04x): Unknown address (0xfff301)\n", mem_mask); + verboselog( *this, 2, "mc68328_r (%04x): Unknown address (0xfff301)\n", mem_mask); } else { - verboselog(machine(), 2, "mc68328_r (%04x): IVR = %02x\n", mem_mask, m_regs.ivr); + verboselog( *this, 2, "mc68328_r (%04x): IVR = %02x\n", mem_mask, m_regs.ivr); return m_regs.ivr << 8; } break; case 0x302: - verboselog(machine(), 2, "mc68328_r (%04x): ICR = %04x\n", mem_mask, m_regs.icr); + verboselog( *this, 2, "mc68328_r (%04x): ICR = %04x\n", mem_mask, m_regs.icr); return m_regs.icr; case 0x304: - verboselog(machine(), 2, "mc68328_r (%04x): IMR(16) = %04x\n", mem_mask, m_regs.imr >> 16); + verboselog( *this, 2, "mc68328_r (%04x): IMR(16) = %04x\n", mem_mask, m_regs.imr >> 16); return m_regs.imr >> 16; case 0x306: - verboselog(machine(), 2, "mc68328_r (%04x): IMR(0) = %04x\n", mem_mask, m_regs.imr & 0x0000ffff); + verboselog( *this, 2, "mc68328_r (%04x): IMR(0) = %04x\n", mem_mask, m_regs.imr & 0x0000ffff); return m_regs.imr & 0x0000ffff; case 0x308: - verboselog(machine(), 2, "mc68328_r (%04x): IWR(16) = %04x\n", mem_mask, m_regs.iwr >> 16); + verboselog( *this, 2, "mc68328_r (%04x): IWR(16) = %04x\n", mem_mask, m_regs.iwr >> 16); return m_regs.iwr >> 16; case 0x30a: - verboselog(machine(), 2, "mc68328_r (%04x): IWR(0) = %04x\n", mem_mask, m_regs.iwr & 0x0000ffff); + verboselog( *this, 2, "mc68328_r (%04x): IWR(0) = %04x\n", mem_mask, m_regs.iwr & 0x0000ffff); return m_regs.iwr & 0x0000ffff; case 0x30c: - verboselog(machine(), 2, "mc68328_r (%04x): ISR(16) = %04x\n", mem_mask, m_regs.isr >> 16); + verboselog( *this, 2, "mc68328_r (%04x): ISR(16) = %04x\n", mem_mask, m_regs.isr >> 16); return m_regs.isr >> 16; case 0x30e: - verboselog(machine(), 2, "mc68328_r (%04x): ISR(0) = %04x\n", mem_mask, m_regs.isr & 0x0000ffff); + verboselog( *this, 2, "mc68328_r (%04x): ISR(0) = %04x\n", mem_mask, m_regs.isr & 0x0000ffff); return m_regs.isr & 0x0000ffff; case 0x310: - verboselog(machine(), 2, "mc68328_r (%04x): IPR(16) = %04x\n", mem_mask, m_regs.ipr >> 16); + verboselog( *this, 2, "mc68328_r (%04x): IPR(16) = %04x\n", mem_mask, m_regs.ipr >> 16); return m_regs.ipr >> 16; case 0x312: - verboselog(machine(), 2, "mc68328_r (%04x): IPR(0) = %04x\n", mem_mask, m_regs.ipr & 0x0000ffff); + verboselog( *this, 2, "mc68328_r (%04x): IPR(0) = %04x\n", mem_mask, m_regs.ipr & 0x0000ffff); return m_regs.ipr & 0x0000ffff; case 0x400: if (mem_mask & 0x00ff) { - verboselog(machine(), 2, "mc68328_r (%04x): PADATA = %02x\n", mem_mask, m_regs.padata); + verboselog( *this, 2, "mc68328_r (%04x): PADATA = %02x\n", mem_mask, m_regs.padata); if (!m_in_port_a_cb.isnull()) { return m_in_port_a_cb(0); @@ -2055,26 +2055,26 @@ READ16_MEMBER( mc68328_device::read ) } else { - verboselog(machine(), 2, "mc68328_r (%04x): PADIR = %02x\n", mem_mask, m_regs.padir); + verboselog( *this, 2, "mc68328_r (%04x): PADIR = %02x\n", mem_mask, m_regs.padir); return m_regs.padir << 8; } case 0x402: if (mem_mask & 0x00ff) { - verboselog(machine(), 2, "mc68328_r (%04x): PASEL = %02x\n", mem_mask, m_regs.pasel); + verboselog( *this, 2, "mc68328_r (%04x): PASEL = %02x\n", mem_mask, m_regs.pasel); return m_regs.pasel; } else { - verboselog(machine(), 2, "mc68328_r (%04x): Unknown address (0xfff402)\n", mem_mask); + verboselog( *this, 2, "mc68328_r (%04x): Unknown address (0xfff402)\n", mem_mask); } break; case 0x408: if (mem_mask & 0x00ff) { - verboselog(machine(), 2, "mc68328_r (%04x): PBDATA = %02x\n", mem_mask, m_regs.pbdata); + verboselog( *this, 2, "mc68328_r (%04x): PBDATA = %02x\n", mem_mask, m_regs.pbdata); if (!m_in_port_b_cb.isnull()) { return m_in_port_b_cb(0); @@ -2086,26 +2086,26 @@ READ16_MEMBER( mc68328_device::read ) } else { - verboselog(machine(), 2, "mc68328_r (%04x): PBDIR = %02x\n", mem_mask, m_regs.pbdir); + verboselog( *this, 2, "mc68328_r (%04x): PBDIR = %02x\n", mem_mask, m_regs.pbdir); return m_regs.pbdir << 8; } case 0x40a: if (mem_mask & 0x00ff) { - verboselog(machine(), 2, "mc68328_r (%04x): PBSEL = %02x\n", mem_mask, m_regs.pbsel); + verboselog( *this, 2, "mc68328_r (%04x): PBSEL = %02x\n", mem_mask, m_regs.pbsel); return m_regs.pbsel; } else { - verboselog(machine(), 2, "mc68328_r (%04x): Unknown address (0xfff40a)\n", mem_mask); + verboselog( *this, 2, "mc68328_r (%04x): Unknown address (0xfff40a)\n", mem_mask); } break; case 0x410: if (mem_mask & 0x00ff) { - verboselog(machine(), 2, "mc68328_r (%04x): PCDATA = %02x\n", mem_mask, m_regs.pcdata); + verboselog( *this, 2, "mc68328_r (%04x): PCDATA = %02x\n", mem_mask, m_regs.pcdata); if (!m_in_port_c_cb.isnull()) { return m_in_port_c_cb(0); @@ -2117,26 +2117,26 @@ READ16_MEMBER( mc68328_device::read ) } else { - verboselog(machine(), 2, "mc68328_r (%04x): PCDIR = %02x\n", mem_mask, m_regs.pcdir); + verboselog( *this, 2, "mc68328_r (%04x): PCDIR = %02x\n", mem_mask, m_regs.pcdir); return m_regs.pcdir << 8; } case 0x412: if (mem_mask & 0x00ff) { - verboselog(machine(), 2, "mc68328_r (%04x): PCSEL = %02x\n", mem_mask, m_regs.pcsel); + verboselog( *this, 2, "mc68328_r (%04x): PCSEL = %02x\n", mem_mask, m_regs.pcsel); return m_regs.pcsel; } else { - verboselog(machine(), 2, "mc68328_r (%04x): Unknown address (0xfff412)\n", mem_mask); + verboselog( *this, 2, "mc68328_r (%04x): Unknown address (0xfff412)\n", mem_mask); } break; case 0x418: if (mem_mask & 0x00ff) { - verboselog(machine(), 2, "mc68328_r (%04x): PDDATA = %02x\n", mem_mask, m_regs.pddata); + verboselog( *this, 2, "mc68328_r (%04x): PDDATA = %02x\n", mem_mask, m_regs.pddata); if (!m_in_port_d_cb.isnull()) { return m_in_port_d_cb(0); @@ -2148,18 +2148,18 @@ READ16_MEMBER( mc68328_device::read ) } else { - verboselog(machine(), 2, "mc68328_r (%04x): PDDIR = %02x\n", mem_mask, m_regs.pddir); + verboselog( *this, 2, "mc68328_r (%04x): PDDIR = %02x\n", mem_mask, m_regs.pddir); return m_regs.pddir << 8; } case 0x41a: if (mem_mask & 0x00ff) { - verboselog(machine(), 2, "mc68328_r (%04x): Unknown address (0xfff41b)\n", mem_mask); + verboselog( *this, 2, "mc68328_r (%04x): Unknown address (0xfff41b)\n", mem_mask); } else { - verboselog(machine(), 2, "mc68328_r (%04x): PDPUEN = %02x\n", mem_mask, m_regs.pdpuen); + verboselog( *this, 2, "mc68328_r (%04x): PDPUEN = %02x\n", mem_mask, m_regs.pdpuen); return m_regs.pdpuen << 8; } break; @@ -2167,31 +2167,31 @@ READ16_MEMBER( mc68328_device::read ) case 0x41c: if (mem_mask & 0x00ff) { - verboselog(machine(), 2, "mc68328_r (%04x): PDIRQEN = %02x\n", mem_mask, m_regs.pdirqen); + verboselog( *this, 2, "mc68328_r (%04x): PDIRQEN = %02x\n", mem_mask, m_regs.pdirqen); return m_regs.pdirqen; } else { - verboselog(machine(), 2, "mc68328_r (%04x): PDPOL = %02x\n", mem_mask, m_regs.pdpol); + verboselog( *this, 2, "mc68328_r (%04x): PDPOL = %02x\n", mem_mask, m_regs.pdpol); return m_regs.pdpol << 8; } case 0x41e: if (mem_mask & 0x00ff) { - verboselog(machine(), 2, "mc68328_r (%04x): PDIRQEDGE = %02x\n", mem_mask, m_regs.pdirqedge); + verboselog( *this, 2, "mc68328_r (%04x): PDIRQEDGE = %02x\n", mem_mask, m_regs.pdirqedge); return m_regs.pdirqedge; } else { - verboselog(machine(), 2, "mc68328_r (%04x): Unknown address (0xfff41e)\n", mem_mask); + verboselog( *this, 2, "mc68328_r (%04x): Unknown address (0xfff41e)\n", mem_mask); } break; case 0x420: if (mem_mask & 0x00ff) { - verboselog(machine(), 2, "mc68328_r (%04x): PEDATA = %02x\n", mem_mask, m_regs.pedata); + verboselog( *this, 2, "mc68328_r (%04x): PEDATA = %02x\n", mem_mask, m_regs.pedata); if (!m_in_port_e_cb.isnull()) { return m_in_port_e_cb(0); @@ -2203,26 +2203,26 @@ READ16_MEMBER( mc68328_device::read ) } else { - verboselog(machine(), 2, "mc68328_r (%04x): PEDIR = %02x\n", mem_mask, m_regs.pedir); + verboselog( *this, 2, "mc68328_r (%04x): PEDIR = %02x\n", mem_mask, m_regs.pedir); return m_regs.pedir << 8; } case 0x422: if (mem_mask & 0x00ff) { - verboselog(machine(), 2, "mc68328_r (%04x): PESEL = %02x\n", mem_mask, m_regs.pesel); + verboselog( *this, 2, "mc68328_r (%04x): PESEL = %02x\n", mem_mask, m_regs.pesel); return m_regs.pesel; } else { - verboselog(machine(), 2, "mc68328_r (%04x): PEPUEN = %02x\n", mem_mask, m_regs.pepuen); + verboselog( *this, 2, "mc68328_r (%04x): PEPUEN = %02x\n", mem_mask, m_regs.pepuen); return m_regs.pepuen << 8; } case 0x428: if (mem_mask & 0x00ff) { - verboselog(machine(), 2, "mc68328_r (%04x): PFDATA = %02x\n", mem_mask, m_regs.pfdata); + verboselog( *this, 2, "mc68328_r (%04x): PFDATA = %02x\n", mem_mask, m_regs.pfdata); if (!m_in_port_f_cb.isnull()) { return m_in_port_f_cb(0); @@ -2234,26 +2234,26 @@ READ16_MEMBER( mc68328_device::read ) } else { - verboselog(machine(), 2, "mc68328_r (%04x): PFDIR = %02x\n", mem_mask, m_regs.pfdir); + verboselog( *this, 2, "mc68328_r (%04x): PFDIR = %02x\n", mem_mask, m_regs.pfdir); return m_regs.pfdir << 8; } case 0x42a: if (mem_mask & 0x00ff) { - verboselog(machine(), 2, "mc68328_r (%04x): PFSEL = %02x\n", mem_mask, m_regs.pfsel); + verboselog( *this, 2, "mc68328_r (%04x): PFSEL = %02x\n", mem_mask, m_regs.pfsel); return m_regs.pfsel; } else { - verboselog(machine(), 2, "mc68328_r (%04x): PFPUEN = %02x\n", mem_mask, m_regs.pfpuen); + verboselog( *this, 2, "mc68328_r (%04x): PFPUEN = %02x\n", mem_mask, m_regs.pfpuen); return m_regs.pfpuen << 8; } case 0x430: if (mem_mask & 0x00ff) { - verboselog(machine(), 2, "mc68328_r (%04x): PGDATA = %02x\n", mem_mask, m_regs.pgdata); + verboselog( *this, 2, "mc68328_r (%04x): PGDATA = %02x\n", mem_mask, m_regs.pgdata); if (!m_in_port_g_cb.isnull()) { return m_in_port_g_cb(0); @@ -2265,26 +2265,26 @@ READ16_MEMBER( mc68328_device::read ) } else { - verboselog(machine(), 2, "mc68328_r (%04x): PGDIR = %02x\n", mem_mask, m_regs.pgdir); + verboselog( *this, 2, "mc68328_r (%04x): PGDIR = %02x\n", mem_mask, m_regs.pgdir); return m_regs.pgdir << 8; } case 0x432: if (mem_mask & 0x00ff) { - verboselog(machine(), 2, "mc68328_r (%04x): PGSEL = %02x\n", mem_mask, m_regs.pgsel); + verboselog( *this, 2, "mc68328_r (%04x): PGSEL = %02x\n", mem_mask, m_regs.pgsel); return m_regs.pgsel; } else { - verboselog(machine(), 2, "mc68328_r (%04x): PGPUEN = %02x\n", mem_mask, m_regs.pgpuen); + verboselog( *this, 2, "mc68328_r (%04x): PGPUEN = %02x\n", mem_mask, m_regs.pgpuen); return m_regs.pgpuen << 8; } case 0x438: if (mem_mask & 0x00ff) { - verboselog(machine(), 2, "mc68328_r (%04x): PJDATA = %02x\n", mem_mask, m_regs.pjdata); + verboselog( *this, 2, "mc68328_r (%04x): PJDATA = %02x\n", mem_mask, m_regs.pjdata); if (!m_in_port_j_cb.isnull()) { return m_in_port_j_cb(0); @@ -2296,26 +2296,26 @@ READ16_MEMBER( mc68328_device::read ) } else { - verboselog(machine(), 2, "mc68328_r (%04x): PJDIR = %02x\n", mem_mask, m_regs.pjdir); + verboselog( *this, 2, "mc68328_r (%04x): PJDIR = %02x\n", mem_mask, m_regs.pjdir); return m_regs.pjdir << 8; } case 0x43a: if (mem_mask & 0x00ff) { - verboselog(machine(), 2, "mc68328_r (%04x): PJSEL = %02x\n", mem_mask, m_regs.pjsel); + verboselog( *this, 2, "mc68328_r (%04x): PJSEL = %02x\n", mem_mask, m_regs.pjsel); return m_regs.pjsel; } else { - verboselog(machine(), 2, "mc68328_r (%04x): Unknown address (0xfff43a)\n", mem_mask); + verboselog( *this, 2, "mc68328_r (%04x): Unknown address (0xfff43a)\n", mem_mask); } break; case 0x440: if (mem_mask & 0x00ff) { - verboselog(machine(), 2, "mc68328_r (%04x): PKDATA = %02x\n", mem_mask, m_regs.pkdata); + verboselog( *this, 2, "mc68328_r (%04x): PKDATA = %02x\n", mem_mask, m_regs.pkdata); if (!m_in_port_k_cb.isnull()) { return m_in_port_k_cb(0); @@ -2327,26 +2327,26 @@ READ16_MEMBER( mc68328_device::read ) } else { - verboselog(machine(), 2, "mc68328_r (%04x): PKDIR = %02x\n", mem_mask, m_regs.pkdir); + verboselog( *this, 2, "mc68328_r (%04x): PKDIR = %02x\n", mem_mask, m_regs.pkdir); return m_regs.pkdir << 8; } case 0x442: if (mem_mask & 0x00ff) { - verboselog(machine(), 2, "mc68328_r (%04x): PKSEL = %02x\n", mem_mask, m_regs.pksel); + verboselog( *this, 2, "mc68328_r (%04x): PKSEL = %02x\n", mem_mask, m_regs.pksel); return m_regs.pksel; } else { - verboselog(machine(), 2, "mc68328_r (%04x): PKPUEN = %02x\n", mem_mask, m_regs.pkpuen); + verboselog( *this, 2, "mc68328_r (%04x): PKPUEN = %02x\n", mem_mask, m_regs.pkpuen); return m_regs.pkpuen << 8; } case 0x448: if (mem_mask & 0x00ff) { - verboselog(machine(), 2, "mc68328_r (%04x): PMDATA = %02x\n", mem_mask, m_regs.pmdata); + verboselog( *this, 2, "mc68328_r (%04x): PMDATA = %02x\n", mem_mask, m_regs.pmdata); if (!m_in_port_m_cb.isnull()) { return m_in_port_m_cb(0); @@ -2358,24 +2358,24 @@ READ16_MEMBER( mc68328_device::read ) } else { - verboselog(machine(), 2, "mc68328_r (%04x): PMDIR = %02x\n", mem_mask, m_regs.pmdir); + verboselog( *this, 2, "mc68328_r (%04x): PMDIR = %02x\n", mem_mask, m_regs.pmdir); return m_regs.pmdir << 8; } case 0x44a: if (mem_mask & 0x00ff) { - verboselog(machine(), 2, "mc68328_r (%04x): PMSEL = %02x\n", mem_mask, m_regs.pmsel); + verboselog( *this, 2, "mc68328_r (%04x): PMSEL = %02x\n", mem_mask, m_regs.pmsel); return m_regs.pmsel; } else { - verboselog(machine(), 2, "mc68328_r (%04x): PMPUEN = %02x\n", mem_mask, m_regs.pmpuen); + verboselog( *this, 2, "mc68328_r (%04x): PMPUEN = %02x\n", mem_mask, m_regs.pmpuen); return m_regs.pmpuen << 8; } case 0x500: - verboselog(machine(), 2, "mc68328_r (%04x): PWMC = %04x\n", mem_mask, m_regs.pwmc); + verboselog( *this, 2, "mc68328_r (%04x): PWMC = %04x\n", mem_mask, m_regs.pwmc); temp16 = m_regs.pwmc; if (m_regs.pwmc & PWMC_PWMIRQ) { @@ -2385,85 +2385,85 @@ READ16_MEMBER( mc68328_device::read ) return temp16; case 0x502: - verboselog(machine(), 2, "mc68328_r (%04x): PWMP = %04x\n", mem_mask, m_regs.pwmp); + verboselog( *this, 2, "mc68328_r (%04x): PWMP = %04x\n", mem_mask, m_regs.pwmp); return m_regs.pwmp; case 0x504: - verboselog(machine(), 2, "mc68328_r (%04x): PWMW = %04x\n", mem_mask, m_regs.pwmw); + verboselog( *this, 2, "mc68328_r (%04x): PWMW = %04x\n", mem_mask, m_regs.pwmw); return m_regs.pwmw; case 0x506: - verboselog(machine(), 2, "mc68328_r (%04x): PWMCNT = %04x\n", mem_mask, m_regs.pwmcnt); + verboselog( *this, 2, "mc68328_r (%04x): PWMCNT = %04x\n", mem_mask, m_regs.pwmcnt); return m_regs.pwmcnt; case 0x600: - verboselog(machine(), 2, "mc68328_r (%04x): TCTL1 = %04x\n", mem_mask, m_regs.tctl[0]); + verboselog( *this, 2, "mc68328_r (%04x): TCTL1 = %04x\n", mem_mask, m_regs.tctl[0]); return m_regs.tctl[0]; case 0x602: - verboselog(machine(), 2, "mc68328_r (%04x): TPRER1 = %04x\n", mem_mask, m_regs.tprer[0]); + verboselog( *this, 2, "mc68328_r (%04x): TPRER1 = %04x\n", mem_mask, m_regs.tprer[0]); return m_regs.tprer[0]; case 0x604: - verboselog(machine(), 2, "mc68328_r (%04x): TCMP1 = %04x\n", mem_mask, m_regs.tcmp[0]); + verboselog( *this, 2, "mc68328_r (%04x): TCMP1 = %04x\n", mem_mask, m_regs.tcmp[0]); return m_regs.tcmp[0]; case 0x606: - verboselog(machine(), 2, "mc68328_r (%04x): TCR1 = %04x\n", mem_mask, m_regs.tcr[0]); + verboselog( *this, 2, "mc68328_r (%04x): TCR1 = %04x\n", mem_mask, m_regs.tcr[0]); return m_regs.tcr[0]; case 0x608: - verboselog(machine(), 2, "mc68328_r (%04x): TCN1 = %04x\n", mem_mask, m_regs.tcn[0]); + verboselog( *this, 2, "mc68328_r (%04x): TCN1 = %04x\n", mem_mask, m_regs.tcn[0]); return m_regs.tcn[0]; case 0x60a: - verboselog(machine(), 5, "mc68328_r (%04x): TSTAT1 = %04x\n", mem_mask, m_regs.tstat[0]); + verboselog( *this, 5, "mc68328_r (%04x): TSTAT1 = %04x\n", mem_mask, m_regs.tstat[0]); m_regs.tclear[0] |= m_regs.tstat[0]; return m_regs.tstat[0]; case 0x60c: - verboselog(machine(), 2, "mc68328_r (%04x): TCTL2 = %04x\n", mem_mask, m_regs.tctl[1]); + verboselog( *this, 2, "mc68328_r (%04x): TCTL2 = %04x\n", mem_mask, m_regs.tctl[1]); return m_regs.tctl[1]; case 0x60e: - verboselog(machine(), 2, "mc68328_r (%04x): TPREP2 = %04x\n", mem_mask, m_regs.tprer[1]); + verboselog( *this, 2, "mc68328_r (%04x): TPREP2 = %04x\n", mem_mask, m_regs.tprer[1]); return m_regs.tprer[1]; case 0x610: - verboselog(machine(), 2, "mc68328_r (%04x): TCMP2 = %04x\n", mem_mask, m_regs.tcmp[1]); + verboselog( *this, 2, "mc68328_r (%04x): TCMP2 = %04x\n", mem_mask, m_regs.tcmp[1]); return m_regs.tcmp[1]; case 0x612: - verboselog(machine(), 2, "mc68328_r (%04x): TCR2 = %04x\n", mem_mask, m_regs.tcr[1]); + verboselog( *this, 2, "mc68328_r (%04x): TCR2 = %04x\n", mem_mask, m_regs.tcr[1]); return m_regs.tcr[1]; case 0x614: - verboselog(machine(), 2, "mc68328_r (%04x): TCN2 = %04x\n", mem_mask, m_regs.tcn[1]); + verboselog( *this, 2, "mc68328_r (%04x): TCN2 = %04x\n", mem_mask, m_regs.tcn[1]); return m_regs.tcn[1]; case 0x616: - verboselog(machine(), 2, "mc68328_r (%04x): TSTAT2 = %04x\n", mem_mask, m_regs.tstat[1]); + verboselog( *this, 2, "mc68328_r (%04x): TSTAT2 = %04x\n", mem_mask, m_regs.tstat[1]); m_regs.tclear[1] |= m_regs.tstat[1]; return m_regs.tstat[1]; case 0x618: - verboselog(machine(), 2, "mc68328_r (%04x): WCTLR = %04x\n", mem_mask, m_regs.wctlr); + verboselog( *this, 2, "mc68328_r (%04x): WCTLR = %04x\n", mem_mask, m_regs.wctlr); return m_regs.wctlr; case 0x61a: - verboselog(machine(), 2, "mc68328_r (%04x): WCMPR = %04x\n", mem_mask, m_regs.wcmpr); + verboselog( *this, 2, "mc68328_r (%04x): WCMPR = %04x\n", mem_mask, m_regs.wcmpr); return m_regs.wcmpr; case 0x61c: - verboselog(machine(), 2, "mc68328_r (%04x): WCN = %04x\n", mem_mask, m_regs.wcn); + verboselog( *this, 2, "mc68328_r (%04x): WCN = %04x\n", mem_mask, m_regs.wcn); return m_regs.wcn; case 0x700: - verboselog(machine(), 2, "mc68328_r (%04x): SPISR = %04x\n", mem_mask, m_regs.spisr); + verboselog( *this, 2, "mc68328_r (%04x): SPISR = %04x\n", mem_mask, m_regs.spisr); return m_regs.spisr; case 0x800: - verboselog(machine(), 2, "mc68328_r (%04x): SPIMDATA = %04x\n", mem_mask, m_regs.spimdata); + verboselog( *this, 2, "mc68328_r (%04x): SPIMDATA = %04x\n", mem_mask, m_regs.spimdata); if (!m_in_spim_cb.isnull()) { return m_in_spim_cb(0, 0xffff); @@ -2471,7 +2471,7 @@ READ16_MEMBER( mc68328_device::read ) return m_regs.spimdata; case 0x802: - verboselog(machine(), 2, "mc68328_r (%04x): SPIMCONT = %04x\n", mem_mask, m_regs.spimcont); + verboselog( *this, 2, "mc68328_r (%04x): SPIMCONT = %04x\n", mem_mask, m_regs.spimcont); if (m_regs.spimcont & SPIM_XCH) { m_regs.spimcont &= ~SPIM_XCH; @@ -2481,211 +2481,211 @@ READ16_MEMBER( mc68328_device::read ) return m_regs.spimcont; case 0x900: - verboselog(machine(), 2, "mc68328_r (%04x): USTCNT = %04x\n", mem_mask, m_regs.ustcnt); + verboselog( *this, 2, "mc68328_r (%04x): USTCNT = %04x\n", mem_mask, m_regs.ustcnt); return m_regs.ustcnt; case 0x902: - verboselog(machine(), 2, "mc68328_r (%04x): UBAUD = %04x\n", mem_mask, m_regs.ubaud); + verboselog( *this, 2, "mc68328_r (%04x): UBAUD = %04x\n", mem_mask, m_regs.ubaud); return m_regs.ubaud; case 0x904: - verboselog(machine(), 5, "mc68328_r (%04x): URX = %04x\n", mem_mask, m_regs.urx); + verboselog( *this, 5, "mc68328_r (%04x): URX = %04x\n", mem_mask, m_regs.urx); return m_regs.urx; case 0x906: - verboselog(machine(), 5, "mc68328_r (%04x): UTX = %04x\n", mem_mask, m_regs.utx); + verboselog( *this, 5, "mc68328_r (%04x): UTX = %04x\n", mem_mask, m_regs.utx); return m_regs.utx | UTX_FIFO_EMPTY | UTX_FIFO_HALF | UTX_TX_AVAIL; case 0x908: - verboselog(machine(), 2, "mc68328_r (%04x): UMISC = %04x\n", mem_mask, m_regs.umisc); + verboselog( *this, 2, "mc68328_r (%04x): UMISC = %04x\n", mem_mask, m_regs.umisc); return m_regs.umisc; case 0xa00: - verboselog(machine(), 2, "mc68328_r (%04x): LSSA(16) = %04x\n", mem_mask, m_regs.lssa >> 16); + verboselog( *this, 2, "mc68328_r (%04x): LSSA(16) = %04x\n", mem_mask, m_regs.lssa >> 16); return m_regs.lssa >> 16; case 0xa02: - verboselog(machine(), 2, "mc68328_r (%04x): LSSA(0) = %04x\n", mem_mask, m_regs.lssa & 0x0000ffff); + verboselog( *this, 2, "mc68328_r (%04x): LSSA(0) = %04x\n", mem_mask, m_regs.lssa & 0x0000ffff); return m_regs.lssa & 0x0000ffff; case 0xa04: if (mem_mask & 0x00ff) { - verboselog(machine(), 2, "mc68328_r (%04x): LVPW = %02x\n", mem_mask, m_regs.lvpw); + verboselog( *this, 2, "mc68328_r (%04x): LVPW = %02x\n", mem_mask, m_regs.lvpw); return m_regs.lvpw; } else { - verboselog(machine(), 2, "mc68328_r (%04x): Unknown address (0xfffa04)\n", mem_mask); + verboselog( *this, 2, "mc68328_r (%04x): Unknown address (0xfffa04)\n", mem_mask); } break; case 0xa08: - verboselog(machine(), 2, "mc68328_r (%04x): LXMAX = %04x\n", mem_mask, m_regs.lxmax); + verboselog( *this, 2, "mc68328_r (%04x): LXMAX = %04x\n", mem_mask, m_regs.lxmax); return m_regs.lxmax; case 0xa0a: - verboselog(machine(), 2, "mc68328_r (%04x): LYMAX = %04x\n", mem_mask, m_regs.lymax); + verboselog( *this, 2, "mc68328_r (%04x): LYMAX = %04x\n", mem_mask, m_regs.lymax); return m_regs.lymax; case 0xa18: - verboselog(machine(), 2, "mc68328_r (%04x): LCXP = %04x\n", mem_mask, m_regs.lcxp); + verboselog( *this, 2, "mc68328_r (%04x): LCXP = %04x\n", mem_mask, m_regs.lcxp); return m_regs.lcxp; case 0xa1a: - verboselog(machine(), 2, "mc68328_r (%04x): LCYP = %04x\n", mem_mask, m_regs.lcyp); + verboselog( *this, 2, "mc68328_r (%04x): LCYP = %04x\n", mem_mask, m_regs.lcyp); return m_regs.lcyp; case 0xa1c: - verboselog(machine(), 2, "mc68328_r (%04x): LCWCH = %04x\n", mem_mask, m_regs.lcwch); + verboselog( *this, 2, "mc68328_r (%04x): LCWCH = %04x\n", mem_mask, m_regs.lcwch); return m_regs.lcwch; case 0xa1e: if (mem_mask & 0x00ff) { - verboselog(machine(), 2, "mc68328_r (%04x): LBLKC = %02x\n", mem_mask, m_regs.lblkc); + verboselog( *this, 2, "mc68328_r (%04x): LBLKC = %02x\n", mem_mask, m_regs.lblkc); return m_regs.lblkc; } else { - verboselog(machine(), 2, "mc68328_r (%04x): Unknown address (0xfffa1e)\n", mem_mask); + verboselog( *this, 2, "mc68328_r (%04x): Unknown address (0xfffa1e)\n", mem_mask); } break; case 0xa20: if (mem_mask & 0x00ff) { - verboselog(machine(), 2, "mc68328_r (%04x): LPOLCF = %02x\n", mem_mask, m_regs.lpolcf); + verboselog( *this, 2, "mc68328_r (%04x): LPOLCF = %02x\n", mem_mask, m_regs.lpolcf); return m_regs.lpolcf; } else { - verboselog(machine(), 2, "mc68328_r (%04x): LPICF = %02x\n", mem_mask, m_regs.lpicf); + verboselog( *this, 2, "mc68328_r (%04x): LPICF = %02x\n", mem_mask, m_regs.lpicf); return m_regs.lpicf << 8; } case 0xa22: if (mem_mask & 0x00ff) { - verboselog(machine(), 2, "mc68328_r (%04x): LACDRC = %02x\n", mem_mask, m_regs.lacdrc); + verboselog( *this, 2, "mc68328_r (%04x): LACDRC = %02x\n", mem_mask, m_regs.lacdrc); return m_regs.lacdrc; } else { - verboselog(machine(), 2, "mc68328_r (%04x): Unknown address (0xfffa22)\n", mem_mask); + verboselog( *this, 2, "mc68328_r (%04x): Unknown address (0xfffa22)\n", mem_mask); } break; case 0xa24: if (mem_mask & 0x00ff) { - verboselog(machine(), 2, "mc68328_r (%04x): LPXCD = %02x\n", mem_mask, m_regs.lpxcd); + verboselog( *this, 2, "mc68328_r (%04x): LPXCD = %02x\n", mem_mask, m_regs.lpxcd); return m_regs.lpxcd; } else { - verboselog(machine(), 2, "mc68328_r (%04x): Unknown address (0xfffa24)\n", mem_mask); + verboselog( *this, 2, "mc68328_r (%04x): Unknown address (0xfffa24)\n", mem_mask); } break; case 0xa26: if (mem_mask & 0x00ff) { - verboselog(machine(), 2, "mc68328_r (%04x): LCKCON = %02x\n", mem_mask, m_regs.lckcon); + verboselog( *this, 2, "mc68328_r (%04x): LCKCON = %02x\n", mem_mask, m_regs.lckcon); return m_regs.lckcon; } else { - verboselog(machine(), 2, "mc68328_r (%04x): Unknown address (0xfffa26)\n", mem_mask); + verboselog( *this, 2, "mc68328_r (%04x): Unknown address (0xfffa26)\n", mem_mask); } break; case 0xa28: if (mem_mask & 0x00ff) { - verboselog(machine(), 2, "mc68328_r (%04x): LLBAR = %02x\n", mem_mask, m_regs.llbar); + verboselog( *this, 2, "mc68328_r (%04x): LLBAR = %02x\n", mem_mask, m_regs.llbar); return m_regs.llbar; } else { - verboselog(machine(), 2, "mc68328_r (%04x): Unknown address (0xfffa28)\n", mem_mask); + verboselog( *this, 2, "mc68328_r (%04x): Unknown address (0xfffa28)\n", mem_mask); } break; case 0xa2a: if (mem_mask & 0x00ff) { - verboselog(machine(), 2, "mc68328_r (%04x): LOTCR = %02x\n", mem_mask, m_regs.lotcr); + verboselog( *this, 2, "mc68328_r (%04x): LOTCR = %02x\n", mem_mask, m_regs.lotcr); return m_regs.lotcr; } else { - verboselog(machine(), 2, "mc68328_r (%04x): Unknown address (0xfffa2a)\n", mem_mask); + verboselog( *this, 2, "mc68328_r (%04x): Unknown address (0xfffa2a)\n", mem_mask); } break; case 0xa2c: if (mem_mask & 0x00ff) { - verboselog(machine(), 2, "mc68328_r (%04x): LPOSR = %02x\n", mem_mask, m_regs.lposr); + verboselog( *this, 2, "mc68328_r (%04x): LPOSR = %02x\n", mem_mask, m_regs.lposr); return m_regs.lposr; } else { - verboselog(machine(), 2, "mc68328_r (%04x): Unknown address (0xfffa2c)\n", mem_mask); + verboselog( *this, 2, "mc68328_r (%04x): Unknown address (0xfffa2c)\n", mem_mask); } break; case 0xa30: if (mem_mask & 0x00ff) { - verboselog(machine(), 2, "mc68328_r (%04x): LFRCM = %02x\n", mem_mask, m_regs.lfrcm); + verboselog( *this, 2, "mc68328_r (%04x): LFRCM = %02x\n", mem_mask, m_regs.lfrcm); return m_regs.lfrcm; } else { - verboselog(machine(), 2, "mc68328_r (%04x): Unknown address (0xfffa30)\n", mem_mask); + verboselog( *this, 2, "mc68328_r (%04x): Unknown address (0xfffa30)\n", mem_mask); } break; case 0xa32: - verboselog(machine(), 2, "mc68328_r (%04x): LGPMR = %04x\n", mem_mask, m_regs.lgpmr); + verboselog( *this, 2, "mc68328_r (%04x): LGPMR = %04x\n", mem_mask, m_regs.lgpmr); return m_regs.lgpmr; case 0xb00: - verboselog(machine(), 2, "mc68328_r (%04x): HMSR(0) = %04x\n", mem_mask, m_regs.hmsr & 0x0000ffff); + verboselog( *this, 2, "mc68328_r (%04x): HMSR(0) = %04x\n", mem_mask, m_regs.hmsr & 0x0000ffff); return m_regs.hmsr & 0x0000ffff; case 0xb02: - verboselog(machine(), 2, "mc68328_r (%04x): HMSR(16) = %04x\n", mem_mask, m_regs.hmsr >> 16); + verboselog( *this, 2, "mc68328_r (%04x): HMSR(16) = %04x\n", mem_mask, m_regs.hmsr >> 16); return m_regs.hmsr >> 16; case 0xb04: - verboselog(machine(), 2, "mc68328_r (%04x): ALARM(0) = %04x\n", mem_mask, m_regs.alarm & 0x0000ffff); + verboselog( *this, 2, "mc68328_r (%04x): ALARM(0) = %04x\n", mem_mask, m_regs.alarm & 0x0000ffff); return m_regs.alarm & 0x0000ffff; case 0xb06: - verboselog(machine(), 2, "mc68328_r (%04x): ALARM(16) = %04x\n", mem_mask, m_regs.alarm >> 16); + verboselog( *this, 2, "mc68328_r (%04x): ALARM(16) = %04x\n", mem_mask, m_regs.alarm >> 16); return m_regs.alarm >> 16; case 0xb0c: - verboselog(machine(), 2, "mc68328_r (%04x): RTCCTL = %04x\n", mem_mask, m_regs.rtcctl); + verboselog( *this, 2, "mc68328_r (%04x): RTCCTL = %04x\n", mem_mask, m_regs.rtcctl); return m_regs.rtcctl; case 0xb0e: - verboselog(machine(), 2, "mc68328_r (%04x): RTCISR = %04x\n", mem_mask, m_regs.rtcisr); + verboselog( *this, 2, "mc68328_r (%04x): RTCISR = %04x\n", mem_mask, m_regs.rtcisr); return m_regs.rtcisr; case 0xb10: - verboselog(machine(), 2, "mc68328_r (%04x): RTCIENR = %04x\n", mem_mask, m_regs.rtcienr); + verboselog( *this, 2, "mc68328_r (%04x): RTCIENR = %04x\n", mem_mask, m_regs.rtcienr); return m_regs.rtcienr; case 0xb12: - verboselog(machine(), 2, "mc68328_r (%04x): STPWTCH = %04x\n", mem_mask, m_regs.stpwtch); + verboselog( *this, 2, "mc68328_r (%04x): STPWTCH = %04x\n", mem_mask, m_regs.stpwtch); return m_regs.stpwtch; default: - verboselog(machine(), 0, "mc68328_r (%04x): Unknown address (0x%06x)\n", mem_mask, 0xfff000 + address); + verboselog( *this, 0, "mc68328_r (%04x): Unknown address (0x%06x)\n", mem_mask, 0xfff000 + address); break; } return 0; diff --git a/src/devices/machine/mos6530n.c b/src/devices/machine/mos6530n.c index 58f279f5437..24d3aa85acf 100644 --- a/src/devices/machine/mos6530n.c +++ b/src/devices/machine/mos6530n.c @@ -70,6 +70,39 @@ DEVICE_ADDRESS_MAP_START( io_map, 8, mos6532_t ) AM_RANGE(0x04, 0x07) AM_MIRROR(0x8) AM_WRITE(edge_w) ADDRESS_MAP_END +READ8_MEMBER(mos6532_t::io_r) +{ + offset &= 0x1f; + UINT8 ret = 0; + + if (offset == 0x00 || offset == 0x08 || offset == 0x10 || offset == 0x18) ret = pa_data_r(space, 0); + if (offset == 0x01 || offset == 0x09 || offset == 0x11 || offset == 0x19) ret = pa_ddr_r(space, 0); + if (offset == 0x02 || offset == 0x0a || offset == 0x12 || offset == 0x1a) ret = pb_data_r(space, 0); + if (offset == 0x03 || offset == 0x0b || offset == 0x13 || offset == 0x1b) ret = pb_ddr_r(space, 0); + + if (offset == 0x04 || offset == 0x06 || offset == 0x14 || offset == 0x16) ret = timer_off_r(space, 0); + if (offset == 0x0c || offset == 0x0e || offset == 0x1c || offset == 0x1e) ret = timer_on_r(space, 0); + + if (offset == 0x05 || offset == 0x07 || offset == 0x0d || offset == 0x0f) ret = irq_r(space, 0); + if (offset == 0x15 || offset == 0x17 || offset == 0x1d || offset == 0x1f) ret = irq_r(space, 0); + + return ret; +} + +WRITE8_MEMBER(mos6532_t::io_w) +{ + offset &= 0x1f; + + if (offset == 0x00 || offset == 0x08 || offset == 0x10 || offset == 0x18) pa_data_w(space, 0, data); + if (offset == 0x01 || offset == 0x09 || offset == 0x11 || offset == 0x19) pa_ddr_w(space, 0, data); + if (offset == 0x02 || offset == 0x0a || offset == 0x12 || offset == 0x1a) pb_data_w(space, 0, data); + if (offset == 0x03 || offset == 0x0b || offset == 0x13 || offset == 0x1b) pb_ddr_w(space, 0, data); + if (offset == 0x14 || offset == 0x15 || offset == 0x16 || offset == 0x17) timer_off_w(space, offset&3, data); + if (offset == 0x1c || offset == 0x1d || offset == 0x1e || offset == 0x1f) timer_on_w(space, offset&3, data); + + if (offset == 0x04 || offset == 0x05 || offset == 0x06 || offset == 0x07) edge_w(space, offset&3, data); + if (offset == 0x0c || offset == 0x0d || offset == 0xea || offset == 0x0f) edge_w(space, offset&3, data); +} //************************************************************************** diff --git a/src/devices/machine/mos6530n.h b/src/devices/machine/mos6530n.h index 01044ac7c7b..c19d8d2eb2d 100644 --- a/src/devices/machine/mos6530n.h +++ b/src/devices/machine/mos6530n.h @@ -400,6 +400,10 @@ public: virtual DECLARE_ADDRESS_MAP(ram_map, 8); virtual DECLARE_ADDRESS_MAP(io_map, 8); + // is there a better way to access the memory map when not using AM_DEVICE? + DECLARE_READ8_MEMBER(io_r); + DECLARE_WRITE8_MEMBER(io_w); + protected: // device-level overrides virtual void device_start(); diff --git a/src/devices/machine/netlist.c b/src/devices/machine/netlist.c index bf6ad42f88c..f935def30af 100644 --- a/src/devices/machine/netlist.c +++ b/src/devices/machine/netlist.c @@ -234,19 +234,19 @@ void netlist_mame_t::vlog(const plog_level &l, const pstring &ls) const switch (l) { case plog_level::DEBUG: - logerror("netlist DEBUG: %s\n", errstr.cstr()); + m_parent.logerror("netlist DEBUG: %s\n", errstr.cstr()); break; case plog_level::INFO: - logerror("netlist INFO: %s\n", errstr.cstr()); + m_parent.logerror("netlist INFO: %s\n", errstr.cstr()); break; case plog_level::VERBOSE: - logerror("netlist VERBOSE: %s\n", errstr.cstr()); + m_parent.logerror("netlist VERBOSE: %s\n", errstr.cstr()); break; case plog_level::WARNING: - logerror("netlist WARNING: %s\n", errstr.cstr()); + m_parent.logerror("netlist WARNING: %s\n", errstr.cstr()); break; case plog_level::ERROR: - logerror("netlist ERROR: %s\n", errstr.cstr()); + m_parent.logerror("netlist ERROR: %s\n", errstr.cstr()); break; case plog_level::FATAL: emu_fatalerror error("netlist ERROR: %s\n", errstr.cstr()); diff --git a/src/devices/machine/r10696.c b/src/devices/machine/r10696.c index ab20caed731..819d31084e9 100644 --- a/src/devices/machine/r10696.c +++ b/src/devices/machine/r10696.c @@ -154,7 +154,7 @@ READ8_MEMBER( r10696_device::io_r ) io_a = m_iord(0); io_b = m_iord(1); io_c = m_iord(2); - data = (io_a | io_b | io_a) & 0x0f; + data = (io_a | io_b | io_c) & 0x0f; break; case 0x01: // Read Groups B | C io_b = m_iord(1); diff --git a/src/devices/machine/s3c2400.c b/src/devices/machine/s3c2400.c index d47e81b08ce..d1b185d453e 100644 --- a/src/devices/machine/s3c2400.c +++ b/src/devices/machine/s3c2400.c @@ -16,7 +16,7 @@ #define VERBOSE_LEVEL ( 0 ) -INLINE void ATTR_PRINTF(3,4) verboselog( running_machine &machine, int n_level, const char *s_fmt, ...) +INLINE void ATTR_PRINTF(3,4) verboselog( device_t &device, int n_level, const char *s_fmt, ...) { if (VERBOSE_LEVEL >= n_level) { @@ -25,7 +25,7 @@ INLINE void ATTR_PRINTF(3,4) verboselog( running_machine &machine, int n_level, va_start( v, s_fmt); vsprintf( buf, s_fmt, v); va_end( v); - logerror( "%s: %s", machine.describe_context( ), buf); + device.logerror( "%s: %s", device.machine().describe_context( ), buf); } } diff --git a/src/devices/machine/s3c2410.c b/src/devices/machine/s3c2410.c index ac5bec78180..8c2ba31049e 100644 --- a/src/devices/machine/s3c2410.c +++ b/src/devices/machine/s3c2410.c @@ -16,7 +16,7 @@ #define VERBOSE_LEVEL ( 0 ) -INLINE void ATTR_PRINTF(3,4) verboselog( running_machine &machine, int n_level, const char *s_fmt, ...) +INLINE void ATTR_PRINTF(3,4) verboselog( device_t &device, int n_level, const char *s_fmt, ...) { if (VERBOSE_LEVEL >= n_level) { @@ -25,7 +25,7 @@ INLINE void ATTR_PRINTF(3,4) verboselog( running_machine &machine, int n_level, va_start( v, s_fmt); vsprintf( buf, s_fmt, v); va_end( v); - logerror( "%s: %s", machine.describe_context( ), buf); + device.logerror( "%s: %s", device.machine().describe_context( ), buf); } } diff --git a/src/devices/machine/s3c2440.c b/src/devices/machine/s3c2440.c index eaa0301d157..15795ef3448 100644 --- a/src/devices/machine/s3c2440.c +++ b/src/devices/machine/s3c2440.c @@ -16,7 +16,7 @@ #define VERBOSE_LEVEL ( 0 ) -INLINE void ATTR_PRINTF(3,4) verboselog( running_machine &machine, int n_level, const char *s_fmt, ...) +INLINE void ATTR_PRINTF(3,4) verboselog( device_t &device, int n_level, const char *s_fmt, ...) { if (VERBOSE_LEVEL >= n_level) { @@ -25,7 +25,7 @@ INLINE void ATTR_PRINTF(3,4) verboselog( running_machine &machine, int n_level, va_start( v, s_fmt); vsprintf( buf, s_fmt, v); va_end( v); - logerror( "%s: %s", machine.describe_context( ), buf); + device.logerror( "%s: %s", device.machine().describe_context( ), buf); } } diff --git a/src/devices/machine/s3c24xx.inc b/src/devices/machine/s3c24xx.inc index d90f105b7bb..6bf7a49f71c 100644 --- a/src/devices/machine/s3c24xx.inc +++ b/src/devices/machine/s3c24xx.inc @@ -87,7 +87,7 @@ void S3C24_CLASS_NAME::s3c24xx_reset() { - verboselog( machine(), 1, "reset\n"); + verboselog( *this, 1, "reset\n"); m_cpu->reset(); this->reset(); } @@ -231,7 +231,7 @@ void S3C24_CLASS_NAME::s3c24xx_lcd_dma_reload() m_lcd.pagewidth_max = (m_lcd.hpos_max - m_lcd.hpos_min + 1) / 16 * 12; } } - verboselog( machine(), 3, "LCD - vramaddr %08X %08X offsize %08X pagewidth %08X\n", m_lcd.vramaddr_cur, m_lcd.vramaddr_max, m_lcd.offsize, m_lcd.pagewidth_max); + verboselog( *this, 3, "LCD - vramaddr %08X %08X offsize %08X pagewidth %08X\n", m_lcd.vramaddr_cur, m_lcd.vramaddr_max, m_lcd.offsize, m_lcd.pagewidth_max); m_lcd.dma_data = 0; m_lcd.dma_bits = 0; } @@ -243,7 +243,7 @@ void S3C24_CLASS_NAME::s3c24xx_lcd_dma_init() m_lcd.bswp = BIT( m_lcd.regs.lcdcon5, 1); m_lcd.hwswp = BIT( m_lcd.regs.lcdcon5, 0); m_lcd.tpal = m_lcd.regs.tpal; - verboselog( machine(), 3, "LCD - bppmode %d hwswp %d bswp %d\n", m_lcd.bppmode, m_lcd.hwswp, m_lcd.bswp); + verboselog( *this, 3, "LCD - bppmode %d hwswp %d bswp %d\n", m_lcd.bppmode, m_lcd.hwswp, m_lcd.bswp); m_lcd.dma_data = 0; m_lcd.dma_bits = 0; } @@ -674,10 +674,10 @@ TIMER_CALLBACK_MEMBER( S3C24_CLASS_NAME::s3c24xx_lcd_timer_exp ) { screen_device *screen = machine().first_screen(); UINT32 tpalen; - verboselog( machine(), 2, "LCD timer callback\n"); + verboselog( *this, 2, "LCD timer callback\n"); m_lcd.vpos = screen->vpos(); m_lcd.hpos = screen->hpos(); - verboselog( machine(), 3, "LCD - vpos %d hpos %d\n", m_lcd.vpos, m_lcd.hpos); + verboselog( *this, 3, "LCD - vpos %d hpos %d\n", m_lcd.vpos, m_lcd.hpos); tpalen = S3C24XX_TPAL_GET_TPALEN( m_lcd.tpal); if (tpalen == 0) { @@ -685,7 +685,7 @@ TIMER_CALLBACK_MEMBER( S3C24_CLASS_NAME::s3c24xx_lcd_timer_exp ) { s3c24xx_lcd_dma_reload(); } - verboselog( machine(), 3, "LCD - vramaddr %08X\n", m_lcd.vramaddr_cur); + verboselog( *this, 3, "LCD - vramaddr %08X\n", m_lcd.vramaddr_cur); while (m_lcd.vramaddr_cur < m_lcd.vramaddr_max) { switch (m_lcd.bppmode) @@ -701,7 +701,7 @@ TIMER_CALLBACK_MEMBER( S3C24_CLASS_NAME::s3c24xx_lcd_timer_exp ) case S3C24XX_BPPMODE_TFT_04 : s3c24xx_lcd_render_tft_04(); break; case S3C24XX_BPPMODE_TFT_08 : s3c24xx_lcd_render_tft_08(); break; case S3C24XX_BPPMODE_TFT_16 : s3c24xx_lcd_render_tft_16(); break; - default : verboselog( machine(), 0, "s3c24xx_lcd_timer_exp: bppmode %d not supported\n", m_lcd.bppmode); break; + default : verboselog( *this, 0, "s3c24xx_lcd_timer_exp: bppmode %d not supported\n", m_lcd.bppmode); break; } if ((m_lcd.vpos == m_lcd.vpos_min) && (m_lcd.hpos == m_lcd.hpos_min)) break; } @@ -788,7 +788,7 @@ READ32_MEMBER( S3C24_CLASS_NAME::s3c24xx_lcd_r ) } break; } - verboselog( machine(), 9, "(LCD) %08X -> %08X\n", S3C24XX_BASE_LCD + (offset << 2), data); + verboselog( *this, 9, "(LCD) %08X -> %08X\n", S3C24XX_BASE_LCD + (offset << 2), data); return data; } @@ -799,7 +799,7 @@ int S3C24_CLASS_NAME::s3c24xx_lcd_configure_tft() double framerate, vclk; UINT32 width, height; rectangle visarea; - verboselog( machine(), 5, "s3c24xx_lcd_configure_tft\n"); + verboselog( *this, 5, "s3c24xx_lcd_configure_tft\n"); vspw = BITS( m_lcd.regs.lcdcon2, 5, 0); vbpd = BITS( m_lcd.regs.lcdcon2, 31, 24); lineval = BITS( m_lcd.regs.lcdcon2, 23, 14); @@ -810,11 +810,11 @@ int S3C24_CLASS_NAME::s3c24xx_lcd_configure_tft() hozval = BITS( m_lcd.regs.lcdcon3, 18, 8); clkval = BITS( m_lcd.regs.lcdcon1, 17, 8); hclk = s3c24xx_get_hclk(); - verboselog( machine(), 3, "LCD - vspw %d vbpd %d lineval %d vfpd %d hspw %d hbpd %d hfpd %d hozval %d clkval %d hclk %d\n", vspw, vbpd, lineval, vfpd, hspw, hbpd, hfpd, hozval, clkval, hclk); + verboselog( *this, 3, "LCD - vspw %d vbpd %d lineval %d vfpd %d hspw %d hbpd %d hfpd %d hozval %d clkval %d hclk %d\n", vspw, vbpd, lineval, vfpd, hspw, hbpd, hfpd, hozval, clkval, hclk); vclk = (double)(hclk / ((clkval + 1) * 2)); - verboselog( machine(), 3, "LCD - vclk %f\n", vclk); + verboselog( *this, 3, "LCD - vclk %f\n", vclk); framerate = vclk / (((vspw + 1) + (vbpd + 1) + (lineval + 1) + (vfpd + 1)) * ((hspw + 1) + (hbpd + 1) + (hozval + 1) + (hfpd + 1))); - verboselog( machine(), 3, "LCD - framerate %f\n", framerate); + verboselog( *this, 3, "LCD - framerate %f\n", framerate); m_lcd.framerate = framerate; width = (hspw + 1) + (hbpd + 1) + (hozval + 1) + (hfpd + 1); height = (vspw + 1) + (vbpd + 1) + (lineval + 1) + (vfpd + 1); @@ -822,8 +822,8 @@ int S3C24_CLASS_NAME::s3c24xx_lcd_configure_tft() visarea.min_y = (vspw + 1) + (vbpd + 1); visarea.max_x = visarea.min_x + (hozval + 1) - 1; visarea.max_y = visarea.min_y + (lineval + 1) - 1; - verboselog( machine(), 3, "LCD - visarea min_x %d min_y %d max_x %d max_y %d\n", visarea.min_x, visarea.min_y, visarea.max_x, visarea.max_y); - verboselog( machine(), 3, "video_screen_configure %d %d %f\n", width, height, m_lcd.framerate); + verboselog( *this, 3, "LCD - visarea min_x %d min_y %d max_x %d max_y %d\n", visarea.min_x, visarea.min_y, visarea.max_x, visarea.max_y); + verboselog( *this, 3, "video_screen_configure %d %d %f\n", width, height, m_lcd.framerate); m_lcd.hpos_min = (hspw + 1) + (hbpd + 1); m_lcd.hpos_max = m_lcd.hpos_min + (hozval + 1) - 1; m_lcd.vpos_min = (vspw + 1) + (vbpd + 1); @@ -839,7 +839,7 @@ int S3C24_CLASS_NAME::s3c24xx_lcd_configure_stn() double vclk, framerate; UINT32 width, height; rectangle visarea; - verboselog( machine(), 5, "s3c24xx_lcd_configure_stn\n"); + verboselog( *this, 5, "s3c24xx_lcd_configure_stn\n"); pnrmode = BITS( m_lcd.regs.lcdcon1, 6, 5); bppmode = BITS( m_lcd.regs.lcdcon1, 4, 1); clkval = BITS( m_lcd.regs.lcdcon1, 17, 8); @@ -849,15 +849,15 @@ int S3C24_CLASS_NAME::s3c24xx_lcd_configure_stn() lineblank = BITS( m_lcd.regs.lcdcon3, 7, 0); wlh = BITS( m_lcd.regs.lcdcon4, 1, 0); hclk = s3c24xx_get_hclk(); - verboselog( machine(), 3, "LCD - pnrmode %d bppmode %d clkval %d lineval %d wdly %d hozval %d lineblank %d wlh %d hclk %d\n", pnrmode, bppmode, clkval, lineval, wdly, hozval, lineblank, wlh, hclk); + verboselog( *this, 3, "LCD - pnrmode %d bppmode %d clkval %d lineval %d wdly %d hozval %d lineblank %d wlh %d hclk %d\n", pnrmode, bppmode, clkval, lineval, wdly, hozval, lineblank, wlh, hclk); if (clkval == 0) { return FALSE; } vclk = (double)(hclk / ((clkval + 0) * 2)); - verboselog( machine(), 3, "LCD - vclk %f\n", vclk); + verboselog( *this, 3, "LCD - vclk %f\n", vclk); framerate = 1 / (((1 / vclk) * (hozval + 1) + (1 / hclk) * ((1 << (4 + wlh)) + (1 << (4 + wdly)) + (lineblank * 8))) * (lineval + 1)); - verboselog( machine(), 3, "LCD - framerate %f\n", framerate); + verboselog( *this, 3, "LCD - framerate %f\n", framerate); switch (pnrmode) { case S3C24XX_PNRMODE_STN_04_SS : width = ((hozval + 1) * 4); break; @@ -868,8 +868,8 @@ int S3C24_CLASS_NAME::s3c24xx_lcd_configure_stn() height = lineval + 1; m_lcd.framerate = framerate; visarea.set(0, width - 1, 0, height - 1); - verboselog( machine(), 3, "LCD - visarea min_x %d min_y %d max_x %d max_y %d\n", visarea.min_x, visarea.min_y, visarea.max_x, visarea.max_y); - verboselog( machine(), 3, "video_screen_configure %d %d %f\n", width, height, m_lcd.framerate); + verboselog( *this, 3, "LCD - visarea min_x %d min_y %d max_x %d max_y %d\n", visarea.min_x, visarea.min_y, visarea.max_x, visarea.max_y); + verboselog( *this, 3, "video_screen_configure %d %d %f\n", width, height, m_lcd.framerate); m_lcd.hpos_min = 0; m_lcd.hpos_max = width - 1; m_lcd.vpos_min = 0; @@ -881,7 +881,7 @@ int S3C24_CLASS_NAME::s3c24xx_lcd_configure_stn() int S3C24_CLASS_NAME::s3c24xx_lcd_configure() { UINT32 bppmode; - verboselog( machine(), 5, "s3c24xx_lcd_configure\n"); + verboselog( *this, 5, "s3c24xx_lcd_configure\n"); bppmode = BITS( m_lcd.regs.lcdcon1, 4, 1); if ((bppmode & (1 << 3)) == 0) { @@ -896,7 +896,7 @@ int S3C24_CLASS_NAME::s3c24xx_lcd_configure() void S3C24_CLASS_NAME::s3c24xx_lcd_start() { screen_device *screen = machine().first_screen(); - verboselog( machine(), 1, "LCD start\n"); + verboselog( *this, 1, "LCD start\n"); if (s3c24xx_lcd_configure()) { s3c24xx_lcd_dma_init(); @@ -906,7 +906,7 @@ void S3C24_CLASS_NAME::s3c24xx_lcd_start() void S3C24_CLASS_NAME::s3c24xx_lcd_stop() { - verboselog( machine(), 1, "LCD stop\n"); + verboselog( *this, 1, "LCD stop\n"); m_lcd.timer->adjust( attotime::never); } @@ -925,7 +925,7 @@ void S3C24_CLASS_NAME::s3c24xx_lcd_recalc() WRITE32_MEMBER( S3C24_CLASS_NAME::s3c24xx_lcd_w ) { UINT32 old_value = ((UINT32*)&m_lcd.regs)[offset]; - verboselog( machine(), 9, "(LCD) %08X <- %08X\n", S3C24XX_BASE_LCD + (offset << 2), data); + verboselog( *this, 9, "(LCD) %08X <- %08X\n", S3C24XX_BASE_LCD + (offset << 2), data); COMBINE_DATA(&((UINT32*)&m_lcd.regs)[offset]); switch (offset) { @@ -945,17 +945,17 @@ WRITE32_MEMBER( S3C24_CLASS_NAME::s3c24xx_lcd_w ) READ32_MEMBER( S3C24_CLASS_NAME::s3c24xx_lcd_palette_r ) { UINT32 data = m_lcdpal.regs.data[offset]; - verboselog( machine(), 9, "(LCD) %08X -> %08X\n", S3C24XX_BASE_LCDPAL + (offset << 2), data); + verboselog( *this, 9, "(LCD) %08X -> %08X\n", S3C24XX_BASE_LCDPAL + (offset << 2), data); return data; } WRITE32_MEMBER( S3C24_CLASS_NAME::s3c24xx_lcd_palette_w ) { - verboselog( machine(), 9, "(LCD) %08X <- %08X\n", S3C24XX_BASE_LCDPAL + (offset << 2), data); + verboselog( *this, 9, "(LCD) %08X <- %08X\n", S3C24XX_BASE_LCDPAL + (offset << 2), data); COMBINE_DATA(&m_lcdpal.regs.data[offset]); if (mem_mask != 0xffffffff) { - verboselog( machine(), 0, "s3c24xx_lcd_palette_w: unknown mask %08x\n", mem_mask); + verboselog( *this, 0, "s3c24xx_lcd_palette_w: unknown mask %08x\n", mem_mask); } m_palette->set_pen_color( offset, s3c24xx_get_color_tft_16(data & 0xFFFF)); } @@ -1036,25 +1036,25 @@ UINT32 S3C24_CLASS_NAME::s3c24xx_get_pclk() READ32_MEMBER( S3C24_CLASS_NAME::s3c24xx_clkpow_r ) { UINT32 data = ((UINT32*)&m_clkpow.regs)[offset]; - verboselog(machine(), 9, "(CLKPOW) %08X -> %08X\n", S3C24XX_BASE_CLKPOW + (offset << 2), data); + verboselog( *this, 9, "(CLKPOW) %08X -> %08X\n", S3C24XX_BASE_CLKPOW + (offset << 2), data); return data; } WRITE32_MEMBER( S3C24_CLASS_NAME::s3c24xx_clkpow_w ) { - verboselog( machine(), 9, "(CLKPOW) %08X <- %08X\n", S3C24XX_BASE_CLKPOW + (offset << 2), data); + verboselog( *this, 9, "(CLKPOW) %08X <- %08X\n", S3C24XX_BASE_CLKPOW + (offset << 2), data); COMBINE_DATA(&((UINT32*)&m_clkpow.regs)[offset]); switch (offset) { case S3C24XX_MPLLCON : { - verboselog( machine(), 5, "CLKPOW - fclk %d hclk %d pclk %d\n", s3c24xx_get_fclk(), s3c24xx_get_hclk(), s3c24xx_get_pclk()); + verboselog( *this, 5, "CLKPOW - fclk %d hclk %d pclk %d\n", s3c24xx_get_fclk(), s3c24xx_get_hclk(), s3c24xx_get_pclk()); m_cpu->set_unscaled_clock(s3c24xx_get_fclk() * CLOCK_MULTIPLIER); } break; case S3C24XX_CLKSLOW : { - verboselog( machine(), 5, "CLKPOW - fclk %d hclk %d pclk %d\n", s3c24xx_get_fclk(), s3c24xx_get_hclk(), s3c24xx_get_pclk()); + verboselog( *this, 5, "CLKPOW - fclk %d hclk %d pclk %d\n", s3c24xx_get_fclk(), s3c24xx_get_hclk(), s3c24xx_get_pclk()); m_cpu->set_unscaled_clock(s3c24xx_get_fclk() * CLOCK_MULTIPLIER); } break; @@ -1088,18 +1088,18 @@ void S3C24_CLASS_NAME::s3c24xx_check_pending_irq() if (temp != 0) { UINT32 int_type = 0; - verboselog( machine(), 5, "srcpnd %08X intmsk %08X intmod %08X\n", m_irq.regs.srcpnd, m_irq.regs.intmsk, m_irq.regs.intmod); + verboselog( *this, 5, "srcpnd %08X intmsk %08X intmod %08X\n", m_irq.regs.srcpnd, m_irq.regs.intmsk, m_irq.regs.intmod); while ((temp & 1) == 0) { int_type++; temp = temp >> 1; } - verboselog( machine(), 5, "intpnd set bit %d\n", int_type); + verboselog( *this, 5, "intpnd set bit %d\n", int_type); m_irq.regs.intpnd |= (1 << int_type); m_irq.regs.intoffset = int_type; if (m_irq.line_irq != ASSERT_LINE) { - verboselog( machine(), 5, "ARM7_IRQ_LINE -> ASSERT_LINE\n"); + verboselog( *this, 5, "ARM7_IRQ_LINE -> ASSERT_LINE\n"); m_cpu->execute().set_input_line(ARM7_IRQ_LINE, ASSERT_LINE); m_irq.line_irq = ASSERT_LINE; } @@ -1108,8 +1108,8 @@ void S3C24_CLASS_NAME::s3c24xx_check_pending_irq() { if (m_irq.line_irq != CLEAR_LINE) { - verboselog( machine(), 5, "srcpnd %08X intmsk %08X intmod %08X\n", m_irq.regs.srcpnd, m_irq.regs.intmsk, m_irq.regs.intmod); - verboselog( machine(), 5, "ARM7_IRQ_LINE -> CLEAR_LINE\n"); + verboselog( *this, 5, "srcpnd %08X intmsk %08X intmod %08X\n", m_irq.regs.srcpnd, m_irq.regs.intmsk, m_irq.regs.intmod); + verboselog( *this, 5, "ARM7_IRQ_LINE -> CLEAR_LINE\n"); m_cpu->execute().set_input_line(ARM7_IRQ_LINE, CLEAR_LINE); m_irq.line_irq = CLEAR_LINE; } @@ -1128,7 +1128,7 @@ void S3C24_CLASS_NAME::s3c24xx_check_pending_irq() } if (m_irq.line_fiq != ASSERT_LINE) { - verboselog( machine(), 5, "ARM7_FIRQ_LINE -> ASSERT_LINE\n"); + verboselog( *this, 5, "ARM7_FIRQ_LINE -> ASSERT_LINE\n"); m_cpu->execute().set_input_line(ARM7_FIRQ_LINE, ASSERT_LINE); m_irq.line_fiq = ASSERT_LINE; } @@ -1137,7 +1137,7 @@ void S3C24_CLASS_NAME::s3c24xx_check_pending_irq() { if (m_irq.line_fiq != CLEAR_LINE) { - verboselog( machine(), 5, "ARM7_FIRQ_LINE -> CLEAR_LINE\n"); + verboselog( *this, 5, "ARM7_FIRQ_LINE -> CLEAR_LINE\n"); m_cpu->execute().set_input_line(ARM7_FIRQ_LINE, CLEAR_LINE); m_irq.line_fiq = CLEAR_LINE; } @@ -1146,7 +1146,7 @@ void S3C24_CLASS_NAME::s3c24xx_check_pending_irq() void S3C24_CLASS_NAME::s3c24xx_request_irq(UINT32 int_type) { - verboselog( machine(), 5, "request irq %d\n", int_type); + verboselog( *this, 5, "request irq %d\n", int_type); m_irq.regs.srcpnd |= (1 << int_type); s3c24xx_check_pending_irq(); } @@ -1170,7 +1170,7 @@ void S3C24_CLASS_NAME::s3c24xx_check_pending_subirq() ATTR_UNUSED void S3C24_CLASS_NAME::s3c24xx_request_subirq( UINT32 int_type) { - verboselog( machine(), 5, "request subirq %d\n", int_type); + verboselog( *this, 5, "request subirq %d\n", int_type); m_irq.regs.subsrcpnd |= (1 << int_type); s3c24xx_check_pending_subirq(); } @@ -1199,7 +1199,7 @@ void S3C24_CLASS_NAME::s3c24xx_check_pending_eint() ATTR_UNUSED void S3C24_CLASS_NAME::s3c24xx_request_eint(UINT32 number) { - verboselog( machine(), 5, "request external interrupt %d\n", number); + verboselog( *this, 5, "request external interrupt %d\n", number); if (number < 4) { s3c24xx_request_irq( S3C24XX_INT_EINT0 + number); @@ -1216,14 +1216,14 @@ ATTR_UNUSED void S3C24_CLASS_NAME::s3c24xx_request_eint(UINT32 number) READ32_MEMBER( S3C24_CLASS_NAME::s3c24xx_irq_r ) { UINT32 data = ((UINT32*)&m_irq.regs)[offset]; - verboselog( machine(), 9, "(IRQ) %08X -> %08X\n", S3C24XX_BASE_INT + (offset << 2), data); + verboselog( *this, 9, "(IRQ) %08X -> %08X\n", S3C24XX_BASE_INT + (offset << 2), data); return data; } WRITE32_MEMBER( S3C24_CLASS_NAME::s3c24xx_irq_w ) { UINT32 old_value = ((UINT32*)&m_irq.regs)[offset]; - verboselog( machine(), 9, "(IRQ) %08X <- %08X\n", S3C24XX_BASE_INT + (offset << 2), data); + verboselog( *this, 9, "(IRQ) %08X <- %08X\n", S3C24XX_BASE_INT + (offset << 2), data); COMBINE_DATA(&((UINT32*)&m_irq.regs)[offset]); switch (offset) { @@ -1319,7 +1319,7 @@ READ32_MEMBER( S3C24_CLASS_NAME::s3c24xx_pwm_r ) } break; } - verboselog( machine(), 9, "(PWM) %08X -> %08X\n", S3C24XX_BASE_PWM + (offset << 2), data); + verboselog( *this, 9, "(PWM) %08X -> %08X\n", S3C24XX_BASE_PWM + (offset << 2), data); return data; } @@ -1330,7 +1330,7 @@ void S3C24_CLASS_NAME::s3c24xx_pwm_start(int timer) const int mux_shift[] = { 0, 4, 8, 12, 16}; UINT32 pclk, prescaler, mux, cnt, cmp, auto_reload; double freq, hz; - verboselog( machine(), 1, "PWM %d start\n", timer); + verboselog( *this, 1, "PWM %d start\n", timer); pclk = s3c24xx_get_pclk(); prescaler = (m_pwm.regs.tcfg0 >> prescaler_shift[timer]) & 0xFF; mux = (m_pwm.regs.tcfg1 >> mux_shift[timer]) & 0x0F; @@ -1395,7 +1395,7 @@ void S3C24_CLASS_NAME::s3c24xx_pwm_start(int timer) { hz = freq / cnt; } - verboselog( machine(), 5, "PWM %d - pclk=%d prescaler=%d div=%d freq=%f cnt=%d cmp=%d auto_reload=%d hz=%f\n", timer, pclk, prescaler, mux_table[mux], freq, cnt, cmp, auto_reload, hz); + verboselog( *this, 5, "PWM %d - pclk=%d prescaler=%d div=%d freq=%f cnt=%d cmp=%d auto_reload=%d hz=%f\n", timer, pclk, prescaler, mux_table[mux], freq, cnt, cmp, auto_reload, hz); m_pwm.cnt[timer] = cnt; m_pwm.cmp[timer] = cmp; m_pwm.freq[timer] = freq; @@ -1411,7 +1411,7 @@ void S3C24_CLASS_NAME::s3c24xx_pwm_start(int timer) void S3C24_CLASS_NAME::s3c24xx_pwm_stop(int timer) { - verboselog( machine(), 1, "PWM %d stop\n", timer); + verboselog( *this, 1, "PWM %d stop\n", timer); m_pwm.timer[timer]->adjust( attotime::never); } @@ -1431,7 +1431,7 @@ void S3C24_CLASS_NAME::s3c24xx_pwm_recalc(int timer) WRITE32_MEMBER( S3C24_CLASS_NAME::s3c24xx_pwm_w ) { UINT32 old_value = ((UINT32*)&m_pwm.regs)[offset]; - verboselog( machine(), 9, "(PWM) %08X <- %08X\n", S3C24XX_BASE_PWM + (offset << 2), data); + verboselog( *this, 9, "(PWM) %08X <- %08X\n", S3C24XX_BASE_PWM + (offset << 2), data); COMBINE_DATA(&((UINT32*)&m_pwm.regs)[offset]); switch (offset) { @@ -1466,7 +1466,7 @@ TIMER_CALLBACK_MEMBER( S3C24_CLASS_NAME::s3c24xx_pwm_timer_exp ) { int ch = param; const int ch_int[] = { S3C24XX_INT_TIMER0, S3C24XX_INT_TIMER1, S3C24XX_INT_TIMER2, S3C24XX_INT_TIMER3, S3C24XX_INT_TIMER4 }; - verboselog( machine(), 2, "PWM %d timer callback\n", ch); + verboselog( *this, 2, "PWM %d timer callback\n", ch); if (BITS( m_pwm.regs.tcfg1, 23, 20) == (ch + 1)) { s3c24xx_dma_request_pwm(); @@ -1504,7 +1504,7 @@ void S3C24_CLASS_NAME::s3c24xx_dma_trigger(int ch) address_space &space = m_cpu->memory().space( AS_PROGRAM); int dsz, inc_src, inc_dst, servmode, tsz; const UINT32 ch_int[] = { S3C24XX_INT_DMA0, S3C24XX_INT_DMA1, S3C24XX_INT_DMA2, S3C24XX_INT_DMA3}; - verboselog( machine(), 5, "DMA %d trigger\n", ch); + verboselog( *this, 5, "DMA %d trigger\n", ch); curr_tc = S3C24XX_DSTAT_GET_CURR_TC( regs->dstat); dsz = S3C24XX_DCON_GET_DSZ( regs->dcon); curr_src = S3C24XX_DCSRC_GET_CURR_SRC( regs->dcsrc); @@ -1518,7 +1518,7 @@ void S3C24_CLASS_NAME::s3c24xx_dma_trigger(int ch) inc_src = BIT( regs->disrcc, 0); inc_dst = BIT( regs->didstc, 0); #endif - verboselog( machine(), 5, "DMA %d - curr_src %08X curr_dst %08X curr_tc %d dsz %d\n", ch, curr_src, curr_dst, curr_tc, dsz); + verboselog( *this, 5, "DMA %d - curr_src %08X curr_dst %08X curr_tc %d dsz %d\n", ch, curr_src, curr_dst, curr_tc, dsz); while (curr_tc > 0) { curr_tc--; @@ -1558,7 +1558,7 @@ void S3C24_CLASS_NAME::s3c24xx_dma_trigger(int ch) void S3C24_CLASS_NAME::s3c24xx_dma_request_iis() { s3c24xx_dma_regs_t *regs = &m_dma[2].regs; - verboselog( machine(), 5, "s3c24xx_dma_request_iis\n"); + verboselog( *this, 5, "s3c24xx_dma_request_iis\n"); if ((S3C24XX_DMASKTRIG_GET_ON_OFF( regs->dmasktrig) != 0) && (S3C24XX_DCON_GET_SWHWSEL( regs->dcon) != 0) && (S3C24XX_DCON_GET_HWSRCSEL( regs->dcon) == 0)) { s3c24xx_dma_trigger(2); @@ -1567,7 +1567,7 @@ void S3C24_CLASS_NAME::s3c24xx_dma_request_iis() void S3C24_CLASS_NAME::s3c24xx_dma_request_pwm() { - verboselog( machine(), 5, "s3c24xx_dma_request_pwm\n"); + verboselog( *this, 5, "s3c24xx_dma_request_pwm\n"); for (int i = 0; i < 4; i++) { if (i != 1) @@ -1587,7 +1587,7 @@ void S3C24_CLASS_NAME::s3c24xx_dma_start(int ch) s3c24xx_dma_regs_t *regs = &m_dma[ch].regs; UINT32 dsz, tsz, reload; int inc_src, inc_dst, _int, servmode, swhwsel, hwsrcsel; - verboselog( machine(), 1, "DMA %d start\n", ch); + verboselog( *this, 1, "DMA %d start\n", ch); addr_src = S3C24XX_DISRC_GET_SADDR( regs->disrc); addr_dst = S3C24XX_DIDST_GET_DADDR( regs->didst); tc = S3C24XX_DCON_GET_TC( regs->dcon); @@ -1605,8 +1605,8 @@ void S3C24_CLASS_NAME::s3c24xx_dma_start(int ch) inc_src = BIT( regs->disrcc, 0); inc_dst = BIT( regs->didstc, 0); #endif - verboselog( machine(), 5, "DMA %d - addr_src %08X inc_src %d addr_dst %08X inc_dst %d int %d tsz %d servmode %d hwsrcsel %d swhwsel %d reload %d dsz %d tc %d\n", ch, addr_src, inc_src, addr_dst, inc_dst, _int, tsz, servmode, hwsrcsel, swhwsel, reload, dsz, tc); - verboselog( machine(), 5, "DMA %d - copy %08X bytes from %08X (%s) to %08X (%s)\n", ch, (tc << dsz) << (tsz << 1), addr_src, inc_src ? "fix" : "inc", addr_dst, inc_dst ? "fix" : "inc"); + verboselog( *this, 5, "DMA %d - addr_src %08X inc_src %d addr_dst %08X inc_dst %d int %d tsz %d servmode %d hwsrcsel %d swhwsel %d reload %d dsz %d tc %d\n", ch, addr_src, inc_src, addr_dst, inc_dst, _int, tsz, servmode, hwsrcsel, swhwsel, reload, dsz, tc); + verboselog( *this, 5, "DMA %d - copy %08X bytes from %08X (%s) to %08X (%s)\n", ch, (tc << dsz) << (tsz << 1), addr_src, inc_src ? "fix" : "inc", addr_dst, inc_dst ? "fix" : "inc"); s3c24xx_dma_reload(ch); if (swhwsel == 0) { @@ -1616,7 +1616,7 @@ void S3C24_CLASS_NAME::s3c24xx_dma_start(int ch) void S3C24_CLASS_NAME::s3c24xx_dma_stop(int ch) { - verboselog( machine(), 1, "DMA %d stop\n", ch); + verboselog( *this, 1, "DMA %d stop\n", ch); } void S3C24_CLASS_NAME::s3c24xx_dma_recalc(int ch) @@ -1667,59 +1667,59 @@ void S3C24_CLASS_NAME::s3c24xx_dma_w(UINT32 ch, UINT32 offset, UINT32 data, UINT READ32_MEMBER( S3C24_CLASS_NAME::s3c24xx_dma_0_r ) { UINT32 data = s3c24xx_dma_r( 0, offset); - verboselog( machine(), 9, "(DMA 0) %08X -> %08X\n", S3C24XX_BASE_DMA_0 + (offset << 2), data); + verboselog( *this, 9, "(DMA 0) %08X -> %08X\n", S3C24XX_BASE_DMA_0 + (offset << 2), data); return data; } READ32_MEMBER( S3C24_CLASS_NAME::s3c24xx_dma_1_r ) { UINT32 data = s3c24xx_dma_r( 1, offset); - verboselog( machine(), 9, "(DMA 1) %08X -> %08X\n", S3C24XX_BASE_DMA_1 + (offset << 2), data); + verboselog( *this, 9, "(DMA 1) %08X -> %08X\n", S3C24XX_BASE_DMA_1 + (offset << 2), data); return data; } READ32_MEMBER( S3C24_CLASS_NAME::s3c24xx_dma_2_r ) { UINT32 data = s3c24xx_dma_r( 2, offset); - verboselog( machine(), 9, "(DMA 2) %08X -> %08X\n", S3C24XX_BASE_DMA_2 + (offset << 2), data); + verboselog( *this, 9, "(DMA 2) %08X -> %08X\n", S3C24XX_BASE_DMA_2 + (offset << 2), data); return data; } READ32_MEMBER( S3C24_CLASS_NAME::s3c24xx_dma_3_r ) { UINT32 data = s3c24xx_dma_r( 3, offset); - verboselog( machine(), 9, "(DMA 3) %08X -> %08X\n", S3C24XX_BASE_DMA_3 + (offset << 2), data); + verboselog( *this, 9, "(DMA 3) %08X -> %08X\n", S3C24XX_BASE_DMA_3 + (offset << 2), data); return data; } WRITE32_MEMBER( S3C24_CLASS_NAME::s3c24xx_dma_0_w ) { - verboselog( machine(), 9, "(DMA 0) %08X <- %08X\n", S3C24XX_BASE_DMA_0 + (offset << 2), data); + verboselog( *this, 9, "(DMA 0) %08X <- %08X\n", S3C24XX_BASE_DMA_0 + (offset << 2), data); s3c24xx_dma_w( 0, offset, data, mem_mask); } WRITE32_MEMBER( S3C24_CLASS_NAME::s3c24xx_dma_1_w ) { - verboselog( machine(), 9, "(DMA 1) %08X <- %08X\n", S3C24XX_BASE_DMA_1 + (offset << 2), data); + verboselog( *this, 9, "(DMA 1) %08X <- %08X\n", S3C24XX_BASE_DMA_1 + (offset << 2), data); s3c24xx_dma_w( 1, offset, data, mem_mask); } WRITE32_MEMBER( S3C24_CLASS_NAME::s3c24xx_dma_2_w ) { - verboselog( machine(), 9, "(DMA 2) %08X <- %08X\n", S3C24XX_BASE_DMA_2 + (offset << 2), data); + verboselog( *this, 9, "(DMA 2) %08X <- %08X\n", S3C24XX_BASE_DMA_2 + (offset << 2), data); s3c24xx_dma_w( 2, offset, data, mem_mask); } WRITE32_MEMBER( S3C24_CLASS_NAME::s3c24xx_dma_3_w ) { - verboselog( machine(), 9, "(DMA 3) %08X <- %08X\n", S3C24XX_BASE_DMA_3 + (offset << 2), data); + verboselog( *this, 9, "(DMA 3) %08X <- %08X\n", S3C24XX_BASE_DMA_3 + (offset << 2), data); s3c24xx_dma_w( 3, offset, data, mem_mask); } TIMER_CALLBACK_MEMBER( S3C24_CLASS_NAME::s3c24xx_dma_timer_exp ) { int ch = param; - verboselog( machine(), 2, "DMA %d timer callback\n", ch); + verboselog( *this, 2, "DMA %d timer callback\n", ch); } /* I/O Port */ @@ -1844,7 +1844,7 @@ READ32_MEMBER( S3C24_CLASS_NAME::s3c24xx_gpio_r ) break; #endif } - verboselog( machine(), 9, "(GPIO) %08X -> %08X\n", S3C24XX_BASE_GPIO + (offset << 2), data); + verboselog( *this, 9, "(GPIO) %08X -> %08X\n", S3C24XX_BASE_GPIO + (offset << 2), data); return data; } @@ -1854,7 +1854,7 @@ WRITE32_MEMBER( S3C24_CLASS_NAME::s3c24xx_gpio_w ) #if defined(DEVICE_S3C2410) || defined(DEVICE_S3C2440) UINT32 old_value = ((UINT32*)&m_gpio.regs)[offset]; #endif - verboselog( machine(), 9, "(GPIO) %08X <- %08X\n", S3C24XX_BASE_GPIO + (offset << 2), data); + verboselog( *this, 9, "(GPIO) %08X <- %08X\n", S3C24XX_BASE_GPIO + (offset << 2), data); COMBINE_DATA(&((UINT32*)&m_gpio.regs)[offset]); switch (offset) { @@ -1947,13 +1947,13 @@ READ32_MEMBER( S3C24_CLASS_NAME::s3c24xx_memcon_r ) { assert(offset < ARRAY_LENGTH(m_memcon.regs.data)); UINT32 data = m_memcon.regs.data[offset]; - verboselog( machine(), 9, "(MEMCON) %08X -> %08X\n", S3C24XX_BASE_MEMCON + (offset << 2), data); + verboselog( *this, 9, "(MEMCON) %08X -> %08X\n", S3C24XX_BASE_MEMCON + (offset << 2), data); return data; } WRITE32_MEMBER( S3C24_CLASS_NAME::s3c24xx_memcon_w ) { - verboselog( machine(), 9, "(MEMCON) %08X <- %08X\n", S3C24XX_BASE_MEMCON + (offset << 2), data); + verboselog( *this, 9, "(MEMCON) %08X <- %08X\n", S3C24XX_BASE_MEMCON + (offset << 2), data); COMBINE_DATA(&m_memcon.regs.data[offset]); } @@ -1998,13 +1998,13 @@ READ32_MEMBER( S3C24_CLASS_NAME::s3c24xx_usb_host_r ) } break; } - verboselog( machine(), 9, "(USB H) %08X -> %08X\n", S3C24XX_BASE_USBHOST + (offset << 2), data); + verboselog( *this, 9, "(USB H) %08X -> %08X\n", S3C24XX_BASE_USBHOST + (offset << 2), data); return data; } WRITE32_MEMBER( S3C24_CLASS_NAME::s3c24xx_usb_host_w ) { - verboselog( machine(), 9, "(USB H) %08X <- %08X\n", S3C24XX_BASE_USBHOST + (offset << 2), data); + verboselog( *this, 9, "(USB H) %08X <- %08X\n", S3C24XX_BASE_USBHOST + (offset << 2), data); COMBINE_DATA(&m_usbhost.regs.data[offset]); } @@ -2033,7 +2033,7 @@ UINT32 S3C24_CLASS_NAME::s3c24xx_uart_r(UINT32 ch, UINT32 offset) case S3C24XX_URXH : { UINT8 rxdata = data & 0xFF; - verboselog( machine(), 5, "UART %d read %02X (%c)\n", ch, rxdata, ((rxdata >= 32) && (rxdata < 128)) ? (char)rxdata : '?'); + verboselog( *this, 5, "UART %d read %02X (%c)\n", ch, rxdata, ((rxdata >= 32) && (rxdata < 128)) ? (char)rxdata : '?'); m_uart[ch].regs.utrstat &= ~1; // [bit 0] Receive buffer data ready } break; @@ -2054,7 +2054,7 @@ void S3C24_CLASS_NAME::s3c24xx_uart_w(UINT32 ch, UINT32 offset, UINT32 data, UIN case S3C24XX_UTXH : { UINT8 txdata = data & 0xFF; - verboselog( machine(), 5, "UART %d write %02X (%c)\n", ch, txdata, ((txdata >= 32) && (txdata < 128)) ? (char)txdata : '?'); + verboselog( *this, 5, "UART %d write %02X (%c)\n", ch, txdata, ((txdata >= 32) && (txdata < 128)) ? (char)txdata : '?'); #ifdef UART_PRINTF printf( "%c", ((txdata >= 32) && (txdata < 128)) ? (char)txdata : '?'); #endif @@ -2066,14 +2066,14 @@ void S3C24_CLASS_NAME::s3c24xx_uart_w(UINT32 ch, UINT32 offset, UINT32 data, UIN READ32_MEMBER( S3C24_CLASS_NAME::s3c24xx_uart_0_r ) { UINT32 data = s3c24xx_uart_r( 0, offset); -// verboselog( machine(), 9, "(UART 0) %08X -> %08X\n", S3C24XX_BASE_UART_0 + (offset << 2), data); +// verboselog( *this, 9, "(UART 0) %08X -> %08X\n", S3C24XX_BASE_UART_0 + (offset << 2), data); return data; } READ32_MEMBER( S3C24_CLASS_NAME::s3c24xx_uart_1_r ) { UINT32 data = s3c24xx_uart_r( 1, offset); -// verboselog( machine(), 9, "(UART 1) %08X -> %08X\n", S3C24XX_BASE_UART_1 + (offset << 2), data); +// verboselog( *this, 9, "(UART 1) %08X -> %08X\n", S3C24XX_BASE_UART_1 + (offset << 2), data); return data; } @@ -2082,7 +2082,7 @@ READ32_MEMBER( S3C24_CLASS_NAME::s3c24xx_uart_1_r ) READ32_MEMBER( S3C24_CLASS_NAME::s3c24xx_uart_2_r ) { UINT32 data = s3c24xx_uart_r( 2, offset); -// verboselog( machine(), 9, "(UART 2) %08X -> %08X\n", S3C24XX_BASE_UART_2 + (offset << 2), data); +// verboselog( *this, 9, "(UART 2) %08X -> %08X\n", S3C24XX_BASE_UART_2 + (offset << 2), data); return data; } @@ -2090,13 +2090,13 @@ READ32_MEMBER( S3C24_CLASS_NAME::s3c24xx_uart_2_r ) WRITE32_MEMBER( S3C24_CLASS_NAME::s3c24xx_uart_0_w ) { -// verboselog( machine(), 9, "(UART 0) %08X <- %08X\n", S3C24XX_BASE_UART_0 + (offset << 2), data); +// verboselog( *this, 9, "(UART 0) %08X <- %08X\n", S3C24XX_BASE_UART_0 + (offset << 2), data); s3c24xx_uart_w( 0, offset, data, mem_mask); } WRITE32_MEMBER( S3C24_CLASS_NAME::s3c24xx_uart_1_w ) { -// verboselog( machine(), 9, "(UART 1) %08X <- %08X\n", S3C24XX_BASE_UART_1 + (offset << 2), data); +// verboselog( *this, 9, "(UART 1) %08X <- %08X\n", S3C24XX_BASE_UART_1 + (offset << 2), data); s3c24xx_uart_w( 1, offset, data, mem_mask); } @@ -2104,7 +2104,7 @@ WRITE32_MEMBER( S3C24_CLASS_NAME::s3c24xx_uart_1_w ) WRITE32_MEMBER( S3C24_CLASS_NAME::s3c24xx_uart_2_w ) { -// verboselog( machine(), 9, "(UART 2) %08X <- %08X\n", S3C24XX_BASE_UART_2 + (offset << 2), data); +// verboselog( *this, 9, "(UART 2) %08X <- %08X\n", S3C24XX_BASE_UART_2 + (offset << 2), data); s3c24xx_uart_w( 2, offset, data, mem_mask); } @@ -2143,13 +2143,13 @@ void S3C24_CLASS_NAME::s3c24xx_usb_device_reset() READ32_MEMBER( S3C24_CLASS_NAME::s3c24xx_usb_device_r ) { UINT32 data = m_usbdev.regs.data[offset]; - verboselog( machine(), 9, "(USB D) %08X -> %08X\n", S3C24XX_BASE_USBDEV + (offset << 2), data); + verboselog( *this, 9, "(USB D) %08X -> %08X\n", S3C24XX_BASE_USBDEV + (offset << 2), data); return data; } WRITE32_MEMBER( S3C24_CLASS_NAME::s3c24xx_usb_device_w ) { - verboselog( machine(), 9, "(USB D) %08X <- %08X\n", S3C24XX_BASE_USBDEV + (offset << 2), data); + verboselog( *this, 9, "(USB D) %08X <- %08X\n", S3C24XX_BASE_USBDEV + (offset << 2), data); COMBINE_DATA(&m_usbdev.regs.data[offset]); } @@ -2205,7 +2205,7 @@ READ32_MEMBER( S3C24_CLASS_NAME::s3c24xx_wdt_r ) } break; } - verboselog( machine(), 9, "(WDT) %08X -> %08X\n", S3C24XX_BASE_WDT + (offset << 2), data); + verboselog( *this, 9, "(WDT) %08X -> %08X\n", S3C24XX_BASE_WDT + (offset << 2), data); return data; } @@ -2213,13 +2213,13 @@ void S3C24_CLASS_NAME::s3c24xx_wdt_start() { UINT32 pclk, prescaler, clock; double freq, hz; - verboselog( machine(), 1, "WDT start\n"); + verboselog( *this, 1, "WDT start\n"); pclk = s3c24xx_get_pclk(); prescaler = BITS( m_wdt.regs.wtcon, 15, 8); clock = 16 << BITS( m_wdt.regs.wtcon, 4, 3); freq = (double)pclk / (prescaler + 1) / clock; hz = freq / m_wdt.regs.wtcnt; - verboselog( machine(), 5, "WDT pclk %d prescaler %d clock %d freq %f hz %f\n", pclk, prescaler, clock, freq, hz); + verboselog( *this, 5, "WDT pclk %d prescaler %d clock %d freq %f hz %f\n", pclk, prescaler, clock, freq, hz); m_wdt.timer->adjust( attotime::from_hz( hz), 0, attotime::from_hz( hz)); #if defined(DEVICE_S3C2410) m_wdt.freq = freq; @@ -2229,7 +2229,7 @@ void S3C24_CLASS_NAME::s3c24xx_wdt_start() void S3C24_CLASS_NAME::s3c24xx_wdt_stop() { - verboselog( machine(), 1, "WDT stop\n"); + verboselog( *this, 1, "WDT stop\n"); m_wdt.regs.wtcnt = s3c24xx_wdt_calc_current_count(); m_wdt.timer->adjust( attotime::never); } @@ -2249,7 +2249,7 @@ void S3C24_CLASS_NAME::s3c24xx_wdt_recalc() WRITE32_MEMBER( S3C24_CLASS_NAME::s3c24xx_wdt_w ) { UINT32 old_value = ((UINT32*)&m_wdt.regs)[offset]; - verboselog( machine(), 9, "(WDT) %08X <- %08X\n", S3C24XX_BASE_WDT + (offset << 2), data); + verboselog( *this, 9, "(WDT) %08X <- %08X\n", S3C24XX_BASE_WDT + (offset << 2), data); COMBINE_DATA(&((UINT32*)&m_wdt.regs)[offset]); switch (offset) { @@ -2266,7 +2266,7 @@ WRITE32_MEMBER( S3C24_CLASS_NAME::s3c24xx_wdt_w ) TIMER_CALLBACK_MEMBER( S3C24_CLASS_NAME::s3c24xx_wdt_timer_exp ) { - verboselog( machine(), 2, "WDT timer callback\n"); + verboselog( *this, 2, "WDT timer callback\n"); if ((m_wdt.regs.wtcon & (1 << 2)) != 0) { #if defined(DEVICE_S3C2400) || defined(DEVICE_S3C2410) @@ -2324,7 +2324,7 @@ int S3C24_CLASS_NAME::iface_i2c_sda_r() void S3C24_CLASS_NAME::i2c_send_start() { - verboselog( machine(), 5, "i2c_send_start\n"); + verboselog( *this, 5, "i2c_send_start\n"); iface_i2c_sda_w( 1); iface_i2c_scl_w( 1); iface_i2c_sda_w( 0); @@ -2333,7 +2333,7 @@ void S3C24_CLASS_NAME::i2c_send_start() void S3C24_CLASS_NAME::i2c_send_stop() { - verboselog( machine(), 5, "i2c_send_stop\n"); + verboselog( *this, 5, "i2c_send_stop\n"); iface_i2c_sda_w( 0); iface_i2c_scl_w( 1); iface_i2c_sda_w( 1); @@ -2343,7 +2343,7 @@ void S3C24_CLASS_NAME::i2c_send_stop() UINT8 S3C24_CLASS_NAME::i2c_receive_byte(int ack) { UINT8 data = 0; - verboselog( machine(), 5, "i2c_receive_byte ...\n"); + verboselog( *this, 5, "i2c_receive_byte ...\n"); iface_i2c_sda_w( 1); for (int i = 0; i < 8; i++) { @@ -2351,8 +2351,8 @@ UINT8 S3C24_CLASS_NAME::i2c_receive_byte(int ack) data = (data << 1) + (iface_i2c_sda_r() ? 1 : 0); iface_i2c_scl_w( 0); } - verboselog( machine(), 5, "recv data %02X\n", data); - verboselog( machine(), 5, "send ack %d\n", ack); + verboselog( *this, 5, "recv data %02X\n", data); + verboselog( *this, 5, "send ack %d\n", ack); iface_i2c_sda_w( ack ? 0 : 1); iface_i2c_scl_w( 1); iface_i2c_scl_w( 0); @@ -2362,8 +2362,8 @@ UINT8 S3C24_CLASS_NAME::i2c_receive_byte(int ack) int S3C24_CLASS_NAME::i2c_send_byte(UINT8 data) { int ack; - verboselog( machine(), 5, "i2c_send_byte ...\n"); - verboselog( machine(), 5, "send data %02X\n", data); + verboselog( *this, 5, "i2c_send_byte ...\n"); + verboselog( *this, 5, "send data %02X\n", data); for (int i = 0; i < 8; i++) { iface_i2c_sda_w( (data & 0x80) ? 1 : 0); @@ -2374,7 +2374,7 @@ int S3C24_CLASS_NAME::i2c_send_byte(UINT8 data) iface_i2c_sda_w( 1); // ack bit iface_i2c_scl_w( 1); ack = iface_i2c_sda_r(); - verboselog( machine(), 5, "recv ack %d\n", ack); + verboselog( *this, 5, "recv ack %d\n", ack); iface_i2c_scl_w( 0); return ack; } @@ -2382,7 +2382,7 @@ int S3C24_CLASS_NAME::i2c_send_byte(UINT8 data) void S3C24_CLASS_NAME::iic_start() { int mode_selection; - verboselog( machine(), 1, "IIC start\n"); + verboselog( *this, 1, "IIC start\n"); i2c_send_start(); mode_selection = BITS( m_iic.regs.iicstat, 7, 6); switch (mode_selection) @@ -2395,7 +2395,7 @@ void S3C24_CLASS_NAME::iic_start() void S3C24_CLASS_NAME::iic_stop() { - verboselog( machine(), 1, "IIC stop\n"); + verboselog( *this, 1, "IIC stop\n"); i2c_send_stop(); m_iic.timer->adjust( attotime::never); } @@ -2403,7 +2403,7 @@ void S3C24_CLASS_NAME::iic_stop() void S3C24_CLASS_NAME::iic_resume() { int mode_selection; - verboselog(machine(), 1, "IIC resume\n"); + verboselog( *this, 1, "IIC resume\n"); mode_selection = BITS( m_iic.regs.iicstat, 7, 6); switch (mode_selection) { @@ -2424,14 +2424,14 @@ READ32_MEMBER( S3C24_CLASS_NAME::s3c24xx_iic_r ) } break; } - verboselog( machine(), 9, "(IIC) %08X -> %08X\n", S3C24XX_BASE_IIC + (offset << 2), data); + verboselog( *this, 9, "(IIC) %08X -> %08X\n", S3C24XX_BASE_IIC + (offset << 2), data); return data; } WRITE32_MEMBER( S3C24_CLASS_NAME::s3c24xx_iic_w ) { UINT32 old_value = ((UINT32*)&m_iic.regs)[offset]; - verboselog( machine(), 9, "(IIC) %08X <- %08X\n", S3C24XX_BASE_IIC + (offset << 2), data); + verboselog( *this, 9, "(IIC) %08X <- %08X\n", S3C24XX_BASE_IIC + (offset << 2), data); COMBINE_DATA(&((UINT32*)&m_iic.regs)[offset]); switch (offset) { @@ -2509,7 +2509,7 @@ WRITE32_MEMBER( S3C24_CLASS_NAME::s3c24xx_iic_w ) TIMER_CALLBACK_MEMBER( S3C24_CLASS_NAME::s3c24xx_iic_timer_exp ) { int enable_interrupt; - verboselog( machine(), 2, "IIC timer callback\n"); + verboselog( *this, 2, "IIC timer callback\n"); m_iic.count++; enable_interrupt = BIT( m_iic.regs.iiccon, 5); if (enable_interrupt) @@ -2543,20 +2543,20 @@ void S3C24_CLASS_NAME::s3c24xx_iis_start() const UINT32 codeclk_table[] = { 256, 384}; double freq; int pclk, prescaler_enable, prescaler_control_a, prescaler_control_b, codeclk; - verboselog( machine(), 1, "IIS start\n"); + verboselog( *this, 1, "IIS start\n"); prescaler_enable = BIT( m_iis.regs.iiscon, 1); prescaler_control_a = BITS( m_iis.regs.iispsr, 9, 5); prescaler_control_b = BITS( m_iis.regs.iispsr, 4, 0); codeclk = BIT( m_iis.regs.iismod, 2); pclk = s3c24xx_get_pclk(); freq = ((double)pclk / (prescaler_control_a + 1) / codeclk_table[codeclk]) * 2; // why do I have to multiply by two? - verboselog( machine(), 5, "IIS - pclk %d psc_enable %d psc_a %d psc_b %d codeclk %d freq %f\n", pclk, prescaler_enable, prescaler_control_a, prescaler_control_b, codeclk_table[codeclk], freq); + verboselog( *this, 5, "IIS - pclk %d psc_enable %d psc_a %d psc_b %d codeclk %d freq %f\n", pclk, prescaler_enable, prescaler_control_a, prescaler_control_b, codeclk_table[codeclk], freq); m_iis.timer->adjust( attotime::from_hz( freq), 0, attotime::from_hz( freq)); } void S3C24_CLASS_NAME::s3c24xx_iis_stop() { - verboselog( machine(), 1, "IIS stop\n"); + verboselog( *this, 1, "IIS stop\n"); m_iis.timer->adjust( attotime::never); } @@ -2585,14 +2585,14 @@ READ32_MEMBER( S3C24_CLASS_NAME::s3c24xx_iis_r ) break; } #endif - verboselog( machine(), 9, "(IIS) %08X -> %08X\n", S3C24XX_BASE_IIS + (offset << 2), data); + verboselog( *this, 9, "(IIS) %08X -> %08X\n", S3C24XX_BASE_IIS + (offset << 2), data); return data; } WRITE32_MEMBER( S3C24_CLASS_NAME::s3c24xx_iis_w ) { UINT32 old_value = ((UINT32*)&m_iis.regs)[offset]; - verboselog( machine(), 9, "(IIS) %08X <- %08X\n", S3C24XX_BASE_IIS + (offset << 2), data); + verboselog( *this, 9, "(IIS) %08X <- %08X\n", S3C24XX_BASE_IIS + (offset << 2), data); COMBINE_DATA(&((UINT32*)&m_iis.regs)[offset]); switch (offset) { @@ -2627,7 +2627,7 @@ WRITE32_MEMBER( S3C24_CLASS_NAME::s3c24xx_iis_w ) TIMER_CALLBACK_MEMBER( S3C24_CLASS_NAME::s3c24xx_iis_timer_exp ) { - verboselog( machine(), 2, "IIS timer callback\n"); + verboselog( *this, 2, "IIS timer callback\n"); s3c24xx_dma_request_iis(); } @@ -2646,7 +2646,7 @@ void S3C24_CLASS_NAME::s3c24xx_rtc_reset() READ32_MEMBER( S3C24_CLASS_NAME::s3c24xx_rtc_r ) { UINT32 data = ((UINT32*)&m_rtc.regs)[offset]; - verboselog( machine(), 9, "(RTC) %08X -> %08X\n", S3C24XX_BASE_RTC + (offset << 2), data); + verboselog( *this, 9, "(RTC) %08X -> %08X\n", S3C24XX_BASE_RTC + (offset << 2), data); return data; } @@ -2669,7 +2669,7 @@ void S3C24_CLASS_NAME::s3c24xx_rtc_recalc() WRITE32_MEMBER( S3C24_CLASS_NAME::s3c24xx_rtc_w ) { - verboselog( machine(), 9, "(RTC) %08X <- %08X\n", S3C24XX_BASE_RTC + (offset << 2), data); + verboselog( *this, 9, "(RTC) %08X <- %08X\n", S3C24XX_BASE_RTC + (offset << 2), data); COMBINE_DATA(&((UINT32*)&m_rtc.regs)[offset]); switch (offset) { @@ -2683,7 +2683,7 @@ WRITE32_MEMBER( S3C24_CLASS_NAME::s3c24xx_rtc_w ) TIMER_CALLBACK_MEMBER( S3C24_CLASS_NAME::s3c24xx_rtc_timer_tick_count_exp ) { - verboselog( machine(), 2, "RTC timer callback (tick count)\n"); + verboselog( *this, 2, "RTC timer callback (tick count)\n"); s3c24xx_request_irq( S3C24XX_INT_TICK); } @@ -2729,7 +2729,7 @@ void S3C24_CLASS_NAME::s3c24xx_rtc_update() } } } - verboselog( machine(), 5, "RTC - %04d/%02d/%02d %02d:%02d:%02d\n", bcd_2_dec( m_rtc.regs.bcdyear) + 2000, bcd_2_dec( m_rtc.regs.bcdmon), bcd_2_dec( m_rtc.regs.bcdday), bcd_2_dec( m_rtc.regs.bcdhour), bcd_2_dec( m_rtc.regs.bcdmin), bcd_2_dec( m_rtc.regs.bcdsec)); + verboselog( *this, 5, "RTC - %04d/%02d/%02d %02d:%02d:%02d\n", bcd_2_dec( m_rtc.regs.bcdyear) + 2000, bcd_2_dec( m_rtc.regs.bcdmon), bcd_2_dec( m_rtc.regs.bcdday), bcd_2_dec( m_rtc.regs.bcdhour), bcd_2_dec( m_rtc.regs.bcdmin), bcd_2_dec( m_rtc.regs.bcdsec)); } void S3C24_CLASS_NAME::s3c24xx_rtc_check_alarm() @@ -2752,7 +2752,7 @@ void S3C24_CLASS_NAME::s3c24xx_rtc_check_alarm() TIMER_CALLBACK_MEMBER( S3C24_CLASS_NAME::s3c24xx_rtc_timer_update_exp ) { - verboselog( machine(), 2, "RTC timer callback (update)\n"); + verboselog( *this, 2, "RTC timer callback (update)\n"); s3c24xx_rtc_update(); s3c24xx_rtc_check_alarm(); } @@ -2813,13 +2813,13 @@ READ32_MEMBER( S3C24_CLASS_NAME::s3c24xx_adc_r ) break; #endif } - verboselog( machine(), 9, "(ADC) %08X -> %08X\n", S3C24XX_BASE_ADC + (offset << 2), data); + verboselog( *this, 9, "(ADC) %08X -> %08X\n", S3C24XX_BASE_ADC + (offset << 2), data); return data; } void S3C24_CLASS_NAME::s3c24xx_adc_start() { - verboselog( machine(), 1, "ADC start\n"); + verboselog( *this, 1, "ADC start\n"); m_adc.regs.adccon &= ~(1 << 0); // A/D conversion is completed m_adc.regs.adccon |= (1 << 15); // End of A/D conversion #if defined(DEVICE_S3C2410) || defined(DEVICE_S3C2440) @@ -2830,7 +2830,7 @@ void S3C24_CLASS_NAME::s3c24xx_adc_start() WRITE32_MEMBER( S3C24_CLASS_NAME::s3c24xx_adc_w ) { UINT32 old_value = ((UINT32*)&m_adc.regs)[offset]; - verboselog( machine(), 9, "(ADC) %08X <- %08X\n", S3C24XX_BASE_ADC + (offset << 2), data); + verboselog( *this, 9, "(ADC) %08X <- %08X\n", S3C24XX_BASE_ADC + (offset << 2), data); COMBINE_DATA(&((UINT32*)&m_adc.regs)[offset]); switch (offset) { @@ -2893,7 +2893,7 @@ void S3C24_CLASS_NAME::s3c24xx_spi_w(UINT32 ch, UINT32 offset, UINT32 data, UINT READ32_MEMBER( S3C24_CLASS_NAME::s3c24xx_spi_0_r ) { UINT32 data = s3c24xx_spi_r( 0, offset); - verboselog( machine(), 9, "(SPI 0) %08X -> %08X\n", S3C24XX_BASE_SPI_0 + (offset << 2), data); + verboselog( *this, 9, "(SPI 0) %08X -> %08X\n", S3C24XX_BASE_SPI_0 + (offset << 2), data); return data; } @@ -2902,7 +2902,7 @@ READ32_MEMBER( S3C24_CLASS_NAME::s3c24xx_spi_0_r ) READ32_MEMBER( S3C24_CLASS_NAME::s3c24xx_spi_1_r ) { UINT32 data = s3c24xx_spi_r( 1, offset); - verboselog( machine(), 9, "(SPI 1) %08X -> %08X\n", S3C24XX_BASE_SPI_1 + (offset << 2), data); + verboselog( *this, 9, "(SPI 1) %08X -> %08X\n", S3C24XX_BASE_SPI_1 + (offset << 2), data); return data; } @@ -2910,7 +2910,7 @@ READ32_MEMBER( S3C24_CLASS_NAME::s3c24xx_spi_1_r ) WRITE32_MEMBER( S3C24_CLASS_NAME::s3c24xx_spi_0_w ) { - verboselog( machine(), 9, "(SPI 0) %08X <- %08X\n", S3C24XX_BASE_SPI_0 + (offset << 2), data); + verboselog( *this, 9, "(SPI 0) %08X <- %08X\n", S3C24XX_BASE_SPI_0 + (offset << 2), data); s3c24xx_spi_w( 0, offset, data, mem_mask); } @@ -2918,7 +2918,7 @@ WRITE32_MEMBER( S3C24_CLASS_NAME::s3c24xx_spi_0_w ) WRITE32_MEMBER( S3C24_CLASS_NAME::s3c24xx_spi_1_w ) { - verboselog( machine(), 9, "(SPI 1) %08X <- %08X\n", S3C24XX_BASE_SPI_1 + (offset << 2), data); + verboselog( *this, 9, "(SPI 1) %08X <- %08X\n", S3C24XX_BASE_SPI_1 + (offset << 2), data); s3c24xx_spi_w( 1, offset, data, mem_mask); } @@ -2937,13 +2937,13 @@ void S3C24_CLASS_NAME::s3c24xx_mmc_reset() READ32_MEMBER( S3C24_CLASS_NAME::s3c24xx_mmc_r ) { UINT32 data = m_mmc.regs.data[offset]; - verboselog( machine(), 9, "(MMC) %08X -> %08X\n", S3C24XX_BASE_MMC + (offset << 2), data); + verboselog( *this, 9, "(MMC) %08X -> %08X\n", S3C24XX_BASE_MMC + (offset << 2), data); return data; } WRITE32_MEMBER( S3C24_CLASS_NAME::s3c24xx_mmc_w ) { - verboselog( machine(), 9, "(MMC) %08X <- %08X\n", S3C24XX_BASE_MMC + (offset << 2), data); + verboselog( *this, 9, "(MMC) %08X <- %08X\n", S3C24XX_BASE_MMC + (offset << 2), data); COMBINE_DATA(&m_mmc.regs.data[offset]); } @@ -2968,13 +2968,13 @@ void S3C24_CLASS_NAME::s3c24xx_sdi_reset() READ32_MEMBER( S3C24_CLASS_NAME::s3c24xx_sdi_r ) { UINT32 data = m_sdi.regs.data[offset]; - verboselog( machine(), 9, "(SDI) %08X -> %08X\n", S3C24XX_BASE_SDI + (offset << 2), data); + verboselog( *this, 9, "(SDI) %08X -> %08X\n", S3C24XX_BASE_SDI + (offset << 2), data); return data; } WRITE32_MEMBER( S3C24_CLASS_NAME::s3c24xx_sdi_w ) { - verboselog( machine(), 9, "(SDI) %08X <- %08X\n", S3C24XX_BASE_SDI + (offset << 2), data); + verboselog( *this, 9, "(SDI) %08X <- %08X\n", S3C24XX_BASE_SDI + (offset << 2), data); COMBINE_DATA(&m_sdi.regs.data[offset]); } @@ -3104,7 +3104,7 @@ void S3C24_CLASS_NAME::s3c24xx_nand_update_ecc(UINT8 data) temp[1] = nand->mecc[1]; temp[2] = nand->mecc[2]; nand_update_mecc( nand->mecc, nand->ecc_pos++, data); - verboselog( machine(), 5, "NAND - MECC %03X - %02X %02X %02X -> %02X %02X %02X\n", nand->ecc_pos - 1, temp[0], temp[1], temp[2], nand->mecc[0], nand->mecc[1], nand->mecc[2]); + verboselog( *this, 5, "NAND - MECC %03X - %02X %02X %02X -> %02X %02X %02X\n", nand->ecc_pos - 1, temp[0], temp[1], temp[2], nand->mecc[0], nand->mecc[1], nand->mecc[2]); if (nand->ecc_pos == 512) nand->ecc_pos = 0; #else if ((nand->regs.nfcont & (1 << 5)) == 0) @@ -3114,7 +3114,7 @@ void S3C24_CLASS_NAME::s3c24xx_nand_update_ecc(UINT8 data) temp[2] = nand->mecc[2]; temp[3] = nand->mecc[3]; nand_update_mecc( nand->mecc, nand->ecc_pos++, data); - verboselog( machine(), 5, "NAND - MECC %03X - %02X %02X %02X %02X -> %02X %02X %02X %02X\n", nand->ecc_pos - 1, temp[0], temp[1], temp[2], temp[3], nand->mecc[0], nand->mecc[1], nand->mecc[2], nand->mecc[3]); + verboselog( *this, 5, "NAND - MECC %03X - %02X %02X %02X %02X -> %02X %02X %02X %02X\n", nand->ecc_pos - 1, temp[0], temp[1], temp[2], temp[3], nand->mecc[0], nand->mecc[1], nand->mecc[2], nand->mecc[3]); if (nand->ecc_pos == 2048) nand->ecc_pos = 0; } if ((nand->regs.nfcont & (1 << 6)) == 0) @@ -3122,7 +3122,7 @@ void S3C24_CLASS_NAME::s3c24xx_nand_update_ecc(UINT8 data) temp[0] = nand->secc[0]; temp[1] = nand->secc[1]; nand_update_secc( nand->secc, nand->ecc_pos++, data); - verboselog( machine(), 5, "NAND - SECC %02X - %02X %02X -> %02X %02X\n", nand->ecc_pos - 1, temp[0], temp[1], nand->secc[0], nand->secc[1]); + verboselog( *this, 5, "NAND - SECC %02X - %02X %02X -> %02X %02X\n", nand->ecc_pos - 1, temp[0], temp[1], nand->secc[0], nand->secc[1]); if (nand->ecc_pos == 16) nand->ecc_pos = 0; } #endif @@ -3130,14 +3130,14 @@ void S3C24_CLASS_NAME::s3c24xx_nand_update_ecc(UINT8 data) void S3C24_CLASS_NAME::s3c24xx_nand_command_w(UINT8 data) { - verboselog( machine(), 5, "NAND write command %02X\n", data); + verboselog( *this, 5, "NAND write command %02X\n", data); m_nand.data_count = 0; iface_nand_command_w( data); } void S3C24_CLASS_NAME::s3c24xx_nand_address_w(UINT8 data) { - verboselog( machine(), 5, "NAND write address %02X\n", data); + verboselog( *this, 5, "NAND write address %02X\n", data); m_nand.data_count = 0; iface_nand_address_w( data); } @@ -3145,14 +3145,14 @@ void S3C24_CLASS_NAME::s3c24xx_nand_address_w(UINT8 data) UINT8 S3C24_CLASS_NAME::s3c24xx_nand_data_r() { UINT8 data = iface_nand_data_r(); - verboselog( machine(), 5, "NAND read data %02X [%04X]\n", data, m_nand.data_count++); + verboselog( *this, 5, "NAND read data %02X [%04X]\n", data, m_nand.data_count++); s3c24xx_nand_update_ecc( data); return data; } void S3C24_CLASS_NAME::s3c24xx_nand_data_w(UINT8 data) { - verboselog( machine(), 5, "NAND write data %02X [%04X]\n", data, m_nand.data_count++); + verboselog( *this, 5, "NAND write data %02X [%04X]\n", data, m_nand.data_count++); iface_nand_data_w( data); s3c24xx_nand_update_ecc( data); } @@ -3205,13 +3205,13 @@ READ32_MEMBER( S3C24_CLASS_NAME::s3c24xx_nand_r ) break; #endif } - verboselog( machine(), 9, "(NAND) %08X -> %08X (%08X)\n", S3C24XX_BASE_NAND + (offset << 2), data, mem_mask); + verboselog( *this, 9, "(NAND) %08X -> %08X (%08X)\n", S3C24XX_BASE_NAND + (offset << 2), data, mem_mask); return data; } void S3C24_CLASS_NAME::s3c24xx_nand_init_ecc() { - verboselog( machine(), 5, "NAND - init ecc\n"); + verboselog( *this, 5, "NAND - init ecc\n"); m_nand.mecc[0] = 0xFF; m_nand.mecc[1] = 0xFF; m_nand.mecc[2] = 0xFF; @@ -3226,7 +3226,7 @@ void S3C24_CLASS_NAME::s3c24xx_nand_init_ecc() WRITE32_MEMBER( S3C24_CLASS_NAME::s3c24xx_nand_w ) { UINT32 old_value = ((UINT32*)&m_nand.regs)[offset]; - verboselog( machine(), 9, "(NAND) %08X <- %08X (%08X)\n", S3C24XX_BASE_NAND + (offset << 2), data, mem_mask); + verboselog( *this, 9, "(NAND) %08X <- %08X (%08X)\n", S3C24XX_BASE_NAND + (offset << 2), data, mem_mask); COMBINE_DATA(&((UINT32*)&m_nand.regs)[offset]); switch (offset) { @@ -3288,7 +3288,7 @@ WRITE32_MEMBER( S3C24_CLASS_NAME::s3c24xx_nand_w ) ATTR_UNUSED WRITE_LINE_MEMBER( S3C24_CLASS_NAME::s3c24xx_pin_frnb_w ) { - verboselog( machine(), 9, "s3c24xx_pin_frnb_w (%d)\n", state); + verboselog( *this, 9, "s3c24xx_pin_frnb_w (%d)\n", state); #if defined(DEVICE_S3C2440) if ((BIT( m_nand.regs.nfstat, 0) == 0) && (state != 0)) { @@ -3324,13 +3324,13 @@ void S3C24_CLASS_NAME::s3c24xx_cam_reset() READ32_MEMBER( S3C24_CLASS_NAME::s3c24xx_cam_r ) { UINT32 data = m_cam.regs.data[offset]; - verboselog( machine(), 9, "(CAM) %08X -> %08X\n", S3C24XX_BASE_CAM + (offset << 2), data); + verboselog( *this, 9, "(CAM) %08X -> %08X\n", S3C24XX_BASE_CAM + (offset << 2), data); return data; } WRITE32_MEMBER( S3C24_CLASS_NAME::s3c24xx_cam_w ) { - verboselog( machine(), 9, "(CAM) %08X <- %08X\n", S3C24XX_BASE_CAM + (offset << 2), data); + verboselog( *this, 9, "(CAM) %08X <- %08X\n", S3C24XX_BASE_CAM + (offset << 2), data); COMBINE_DATA(&m_cam.regs.data[offset]); } @@ -3349,13 +3349,13 @@ void S3C24_CLASS_NAME::s3c24xx_ac97_reset() READ32_MEMBER( S3C24_CLASS_NAME::s3c24xx_ac97_r ) { UINT32 data = m_ac97.regs.data[offset]; - verboselog( machine(), 9, "(AC97) %08X -> %08X\n", S3C24XX_BASE_AC97 + (offset << 2), data); + verboselog( *this, 9, "(AC97) %08X -> %08X\n", S3C24XX_BASE_AC97 + (offset << 2), data); return data; } WRITE32_MEMBER( S3C24_CLASS_NAME::s3c24xx_ac97_w ) { - verboselog( machine(), 9, "(AC97) %08X <- %08X\n", S3C24XX_BASE_AC97 + (offset << 2), data); + verboselog( *this, 9, "(AC97) %08X <- %08X\n", S3C24XX_BASE_AC97 + (offset << 2), data); COMBINE_DATA(&m_ac97.regs.data[offset]); } @@ -3441,7 +3441,7 @@ void S3C24_CLASS_NAME::s3c24xx_nand_auto_boot() void S3C24_CLASS_NAME::s3c24xx_device_reset() { - verboselog( machine(), 1, "s3c24xx device reset\n"); + verboselog( *this, 1, "s3c24xx device reset\n"); s3c24xx_uart_reset( ); s3c24xx_pwm_reset(); s3c24xx_dma_reset(); @@ -3476,7 +3476,7 @@ void S3C24_CLASS_NAME::s3c24xx_device_reset() void S3C24_CLASS_NAME::s3c24xx_device_start() { - verboselog( machine(), 1, "s3c24xx device start\n"); + verboselog( *this, 1, "s3c24xx device start\n"); m_pin_r_cb.resolve(); m_pin_w_cb.resolve_safe(); m_port_r_cb.resolve(); diff --git a/src/devices/machine/s3c44b0.c b/src/devices/machine/s3c44b0.c index fb9d3f15036..9796c90d3a9 100644 --- a/src/devices/machine/s3c44b0.c +++ b/src/devices/machine/s3c44b0.c @@ -17,16 +17,16 @@ #define VERBOSE_LEVEL ( 0 ) -INLINE void ATTR_PRINTF(3,4) verboselog( running_machine &machine, int n_level, const char *s_fmt, ...) +INLINE void ATTR_PRINTF(3,4) verboselog( device_t &device, int n_level, const char *s_fmt, ...) { if (VERBOSE_LEVEL >= n_level) { va_list v; char buf[32768]; - va_start(v, s_fmt); - vsprintf(buf, s_fmt, v); - va_end(v); - logerror("%s: %s", machine.describe_context(), buf); + va_start( v, s_fmt); + vsprintf( buf, s_fmt, v); + va_end( v); + device.logerror( "%s: %s", device.machine().describe_context( ), buf); } } @@ -331,13 +331,13 @@ void s3c44b0_device::lcd_dma_reload() m_lcd.pagewidth_cur = 0; m_lcd.pagewidth_max = BITS(m_lcd.regs.lcdsaddr3, 8, 0); m_lcd.bswp = BIT(m_lcd.regs.lcdsaddr2, 29); // note: juicebox changes bswp when video playback starts -// verboselog(machine(), 3, "LCD - vramaddr %08X %08X offsize %08X pagewidth %08X\n", m_lcd.vramaddr_cur, m_lcd.vramaddr_max, m_lcd.offsize, m_lcd.pagewidth_max); +// verboselog( *this, 3, "LCD - vramaddr %08X %08X offsize %08X pagewidth %08X\n", m_lcd.vramaddr_cur, m_lcd.vramaddr_max, m_lcd.offsize, m_lcd.pagewidth_max); } void s3c44b0_device::lcd_dma_init() { m_lcd.modesel = BITS(m_lcd.regs.lcdsaddr1, 28, 27); -// verboselog(machine(), 3, "LCD - modesel %d bswp %d\n", m_lcd.modesel, m_lcd.bswp); +// verboselog( *this, 3, "LCD - modesel %d bswp %d\n", m_lcd.modesel, m_lcd.bswp); lcd_dma_reload(); } @@ -444,13 +444,13 @@ attotime s3c44b0_device::time_until_pos(int vpos, int hpos) { attoseconds_t time1, time2; attotime retval; - verboselog(machine(), 3, "s3c44b0_time_until_pos - vpos %d hpos %d\n", vpos, hpos); + verboselog( *this, 3, "s3c44b0_time_until_pos - vpos %d hpos %d\n", vpos, hpos); time1 = (attoseconds_t)vpos * m_lcd.scantime + (attoseconds_t)hpos * m_lcd.pixeltime; time2 = (machine().time() - m_lcd.frame_time).as_attoseconds(); - verboselog(machine(), 3, "machine %f frametime %f time1 %f time2 %f\n", machine().time().as_double(), m_lcd.frame_time.as_double(), attotime(0, time1).as_double(), attotime(0, time2).as_double()); + verboselog( *this, 3, "machine %f frametime %f time1 %f time2 %f\n", machine().time().as_double(), m_lcd.frame_time.as_double(), attotime(0, time1).as_double(), attotime(0, time2).as_double()); while (time1 <= time2) time1 += m_lcd.frame_period; retval = attotime( 0, time1 - time2); - verboselog(machine(), 3, "result %f\n", retval.as_double()); + verboselog( *this, 3, "result %f\n", retval.as_double()); return retval; } @@ -478,20 +478,20 @@ int s3c44b0_device::lcd_get_hpos() TIMER_CALLBACK_MEMBER( s3c44b0_device::lcd_timer_exp ) { int vpos = m_lcd.vpos; - verboselog(machine(), 2, "LCD timer callback (%f)\n", machine().time().as_double()); - verboselog(machine(), 3, "LCD - (1) vramaddr %08X vpos %d hpos %d\n", m_lcd.vramaddr_cur, m_lcd.vpos, m_lcd.hpos); + verboselog( *this, 2, "LCD timer callback (%f)\n", machine().time().as_double()); + verboselog( *this, 3, "LCD - (1) vramaddr %08X vpos %d hpos %d\n", m_lcd.vramaddr_cur, m_lcd.vpos, m_lcd.hpos); switch (m_lcd.modesel) { case S3C44B0_MODESEL_04 : lcd_render_stn_04(); break; case S3C44B0_MODESEL_08 : lcd_render_stn_08(); break; - default : verboselog(machine(), 0, "s3c44b0_lcd_timer_exp: modesel %d not supported\n", m_lcd.modesel); break; + default : verboselog( *this, 0, "s3c44b0_lcd_timer_exp: modesel %d not supported\n", m_lcd.modesel); break; } - verboselog(machine(), 3, "LCD - (2) vramaddr %08X vpos %d hpos %d\n", m_lcd.vramaddr_cur, m_lcd.vpos, m_lcd.hpos); + verboselog( *this, 3, "LCD - (2) vramaddr %08X vpos %d hpos %d\n", m_lcd.vramaddr_cur, m_lcd.vpos, m_lcd.hpos); if (m_lcd.vpos < vpos) { -// verboselog(machine(), 3, "LCD - (1) frame_time %f\n", attotime_to_double(m_lcd.frame_time)); +// verboselog( *this, 3, "LCD - (1) frame_time %f\n", attotime_to_double(m_lcd.frame_time)); m_lcd.frame_time = machine().time() + time_until_pos(m_lcd.vpos_min, m_lcd.hpos_min); -// verboselog(machine(), 3, "LCD - (2) frame_time %f\n", attotime_to_double(m_lcd.frame_time)); +// verboselog( *this, 3, "LCD - (2) frame_time %f\n", attotime_to_double(m_lcd.frame_time)); } m_lcd.timer->adjust(time_until_pos(m_lcd.vpos, m_lcd.hpos), 0); } @@ -551,7 +551,7 @@ READ32_MEMBER( s3c44b0_device::lcd_r ) } break; } -// verboselog(machine(), 9, "(LCD) %08X -> %08X\n", S3C44B0_BASE_LCD + (offset << 2), data); +// verboselog( *this, 9, "(LCD) %08X -> %08X\n", S3C44B0_BASE_LCD + (offset << 2), data); return data; } @@ -561,7 +561,7 @@ void s3c44b0_device::lcd_configure() int dismode, clkval, lineval, wdly, hozval, lineblank, wlh, mclk; double vclk, framerate; int width, height; - verboselog(machine(), 5, "s3c44b0_lcd_configure\n"); + verboselog( *this, 5, "s3c44b0_lcd_configure\n"); dismode = BITS(m_lcd.regs.lcdcon1, 6, 5); clkval = BITS(m_lcd.regs.lcdcon1, 21, 12); lineval = BITS(m_lcd.regs.lcdcon2, 9, 0); @@ -570,12 +570,12 @@ void s3c44b0_device::lcd_configure() lineblank = BITS(m_lcd.regs.lcdcon2, 31, 21); wlh = BITS(m_lcd.regs.lcdcon1, 11, 10); mclk = get_mclk(); - verboselog(machine(), 3, "LCD - dismode %d clkval %d lineval %d wdly %d hozval %d lineblank %d wlh %d mclk %d\n", dismode, clkval, lineval, wdly, hozval, lineblank, wlh, mclk); + verboselog( *this, 3, "LCD - dismode %d clkval %d lineval %d wdly %d hozval %d lineblank %d wlh %d mclk %d\n", dismode, clkval, lineval, wdly, hozval, lineblank, wlh, mclk); vclk = (double)(mclk / (clkval * 2)); - verboselog(machine(), 3, "LCD - vclk %f\n", vclk); + verboselog( *this, 3, "LCD - vclk %f\n", vclk); framerate = 1 / (((1 / vclk) * (hozval + 1) + (1 / mclk) * (wlh + wdly + lineblank)) * (lineval + 1)); framerate = framerate / 3; // ??? - verboselog(machine(), 3, "LCD - framerate %f\n", framerate); + verboselog( *this, 3, "LCD - framerate %f\n", framerate); switch (dismode) { case S3C44B0_PNRMODE_STN_04_SS : width = ((hozval + 1) * 4); break; @@ -585,7 +585,7 @@ void s3c44b0_device::lcd_configure() } height = lineval + 1; m_lcd.framerate = framerate; - verboselog(machine(), 3, "video_screen_configure %d %d %f\n", width, height, m_lcd.framerate); + verboselog( *this, 3, "video_screen_configure %d %d %f\n", width, height, m_lcd.framerate); screen->configure(screen->width(), screen->height(), screen->visible_area(), HZ_TO_ATTOSECONDS(m_lcd.framerate)); m_lcd.hpos_min = 25; m_lcd.hpos_max = 25 + width - 1; @@ -593,7 +593,7 @@ void s3c44b0_device::lcd_configure() m_lcd.vpos_min = 25; m_lcd.vpos_max = 25 + height - 1; m_lcd.vpos_end = 25 + height - 1 + 25; - verboselog(machine(), 3, "LCD - min_x %d min_y %d max_x %d max_y %d\n", m_lcd.hpos_min, m_lcd.vpos_min, m_lcd.hpos_max, m_lcd.vpos_max); + verboselog( *this, 3, "LCD - min_x %d min_y %d max_x %d max_y %d\n", m_lcd.hpos_min, m_lcd.vpos_min, m_lcd.hpos_max, m_lcd.vpos_max); if (m_lcd.bitmap) { auto_free(machine(), m_lcd.bitmap); @@ -611,7 +611,7 @@ void s3c44b0_device::lcd_configure() void s3c44b0_device::lcd_start() { screen_device *screen = machine().first_screen(); - verboselog(machine(), 1, "LCD start\n"); + verboselog( *this, 1, "LCD start\n"); lcd_configure(); lcd_dma_init(); m_lcd.vpos = m_lcd.vpos_min; @@ -623,7 +623,7 @@ void s3c44b0_device::lcd_start() void s3c44b0_device::lcd_stop() { - verboselog(machine(), 1, "LCD stop\n"); + verboselog( *this, 1, "LCD stop\n"); m_lcd.timer->adjust(attotime::never, 0); } @@ -638,7 +638,7 @@ void s3c44b0_device::lcd_recalc() WRITE32_MEMBER( s3c44b0_device::lcd_w ) { UINT32 old_value = ((UINT32*)&m_lcd.regs)[offset]; -// verboselog(machine(), 9, "(LCD) %08X <- %08X\n", S3C44B0_BASE_LCD + (offset << 2), data); +// verboselog( *this, 9, "(LCD) %08X <- %08X\n", S3C44B0_BASE_LCD + (offset << 2), data); COMBINE_DATA(&((UINT32*)&m_lcd.regs)[offset]); switch (offset) { @@ -669,19 +669,19 @@ UINT32 s3c44b0_device::get_mclk() READ32_MEMBER( s3c44b0_device::clkpow_r ) { UINT32 data = ((UINT32*)&m_clkpow.regs)[offset]; - verboselog(machine(), 9, "(CLKPOW) %08X -> %08X\n", S3C44B0_BASE_CLKPOW + (offset << 2), data); + verboselog( *this, 9, "(CLKPOW) %08X -> %08X\n", S3C44B0_BASE_CLKPOW + (offset << 2), data); return data; } WRITE32_MEMBER( s3c44b0_device::clkpow_w ) { - verboselog(machine(), 9, "(CLKPOW) %08X <- %08X\n", S3C44B0_BASE_CLKPOW + (offset << 2), data); + verboselog( *this, 9, "(CLKPOW) %08X <- %08X\n", S3C44B0_BASE_CLKPOW + (offset << 2), data); COMBINE_DATA(&((UINT32*)&m_clkpow.regs)[offset]); switch (offset) { case S3C44B0_PLLCON : { - verboselog(machine(), 5, "CLKPOW - mclk %d\n", get_mclk()); + verboselog( *this, 5, "CLKPOW - mclk %d\n", get_mclk()); m_cpu->set_unscaled_clock(get_mclk() * CLOCK_MULTIPLIER); } break; @@ -754,7 +754,7 @@ void s3c44b0_device::check_pending_irq() void s3c44b0_device::request_irq(UINT32 int_type) { - verboselog(machine(), 5, "request irq %d\n", int_type); + verboselog( *this, 5, "request irq %d\n", int_type); m_irq.regs.intpnd |= (1 << int_type); check_pending_irq(); } @@ -776,7 +776,7 @@ void s3c44b0_device::check_pending_eint() void s3c44b0_device::request_eint(UINT32 number) { - verboselog(machine(), 5, "request external interrupt %d\n", number); + verboselog( *this, 5, "request external interrupt %d\n", number); if (number < 4) { request_irq(S3C44B0_INT_EINT0 + number); @@ -791,13 +791,13 @@ void s3c44b0_device::request_eint(UINT32 number) READ32_MEMBER( s3c44b0_device::irq_r ) { UINT32 data = ((UINT32*)&m_irq.regs)[offset]; - verboselog(machine(), 9, "(IRQ) %08X -> %08X\n", S3C44B0_BASE_INT + (offset << 2), data); + verboselog( *this, 9, "(IRQ) %08X -> %08X\n", S3C44B0_BASE_INT + (offset << 2), data); return data; } WRITE32_MEMBER( s3c44b0_device::irq_w ) { - verboselog(machine(), 9, "(IRQ) %08X <- %08X\n", S3C44B0_BASE_INT + (offset << 2), data); + verboselog( *this, 9, "(IRQ) %08X <- %08X\n", S3C44B0_BASE_INT + (offset << 2), data); COMBINE_DATA(&((UINT32*)&m_irq.regs)[offset]); switch (offset) { @@ -874,7 +874,7 @@ READ32_MEMBER( s3c44b0_device::pwm_r ) } break; } - verboselog(machine(), 9, "(PWM) %08X -> %08X\n", S3C44B0_BASE_PWM + (offset << 2), data); + verboselog( *this, 9, "(PWM) %08X -> %08X\n", S3C44B0_BASE_PWM + (offset << 2), data); return data; } @@ -885,7 +885,7 @@ void s3c44b0_device::pwm_start(int timer) const int mux_shift[] = { 0, 4, 8, 12, 16, 20}; UINT32 mclk, prescaler, mux, cnt, cmp, auto_reload; double freq, hz; - verboselog(machine(), 1, "PWM %d start\n", timer); + verboselog( *this, 1, "PWM %d start\n", timer); mclk = get_mclk(); prescaler = (m_pwm.regs.tcfg0 >> prescaler_shift[timer]) & 0xFF; mux = (m_pwm.regs.tcfg1 >> mux_shift[timer]) & 0x0F; @@ -957,7 +957,7 @@ void s3c44b0_device::pwm_start(int timer) { hz = freq / cnt; } - verboselog(machine(), 5, "PWM %d - mclk=%d prescaler=%d div=%d freq=%f cnt=%d cmp=%d auto_reload=%d hz=%f\n", timer, mclk, prescaler, mux_table[mux], freq, cnt, cmp, auto_reload, hz); + verboselog( *this, 5, "PWM %d - mclk=%d prescaler=%d div=%d freq=%f cnt=%d cmp=%d auto_reload=%d hz=%f\n", timer, mclk, prescaler, mux_table[mux], freq, cnt, cmp, auto_reload, hz); m_pwm.cnt[timer] = cnt; m_pwm.cmp[timer] = cmp; m_pwm.freq[timer] = freq; @@ -980,7 +980,7 @@ void s3c44b0_device::pwm_start(int timer) void s3c44b0_device::pwm_stop(int timer) { - verboselog(machine(), 1, "PWM %d stop\n", timer); + verboselog( *this, 1, "PWM %d stop\n", timer); m_pwm.timer[timer]->adjust(attotime::never, 0); } @@ -996,7 +996,7 @@ void s3c44b0_device::pwm_recalc(int timer) WRITE32_MEMBER( s3c44b0_device::pwm_w ) { UINT32 old_value = ((UINT32*)&m_pwm.regs)[offset]; - verboselog(machine(), 9, "(PWM) %08X <- %08X\n", S3C44B0_BASE_PWM + (offset << 2), data); + verboselog( *this, 9, "(PWM) %08X <- %08X\n", S3C44B0_BASE_PWM + (offset << 2), data); COMBINE_DATA(&((UINT32*)&m_pwm.regs)[offset]); switch (offset) { @@ -1035,7 +1035,7 @@ TIMER_CALLBACK_MEMBER( s3c44b0_device::pwm_timer_exp ) { int ch = param; const int ch_int[] = { S3C44B0_INT_TIMER0, S3C44B0_INT_TIMER1, S3C44B0_INT_TIMER2, S3C44B0_INT_TIMER3, S3C44B0_INT_TIMER4, S3C44B0_INT_TIMER5 }; - verboselog(machine(), 2, "PWM %d timer callback\n", ch); + verboselog( *this, 2, "PWM %d timer callback\n", ch); if (BITS(m_pwm.regs.tcfg1, 27, 24) == (ch + 1)) { fatalerror("s3c44b0_dma_request_pwm( device)\n"); @@ -1070,7 +1070,7 @@ inline int s3c44b0_device::iface_i2c_sda_r() void s3c44b0_device::i2c_send_start() { - verboselog(machine(), 5, "i2c_send_start\n"); + verboselog( *this, 5, "i2c_send_start\n"); iface_i2c_sda_w(1); iface_i2c_scl_w(1); iface_i2c_sda_w(0); @@ -1079,7 +1079,7 @@ void s3c44b0_device::i2c_send_start() void s3c44b0_device::i2c_send_stop() { - verboselog(machine(), 5, "i2c_send_stop\n"); + verboselog( *this, 5, "i2c_send_stop\n"); iface_i2c_sda_w(0); iface_i2c_scl_w(1); iface_i2c_sda_w(1); @@ -1089,7 +1089,7 @@ void s3c44b0_device::i2c_send_stop() UINT8 s3c44b0_device::i2c_receive_byte(int ack) { UINT8 data = 0; - verboselog(machine(), 5, "i2c_receive_byte ...\n"); + verboselog( *this, 5, "i2c_receive_byte ...\n"); iface_i2c_sda_w(1); for (int i = 0; i < 8; i++) { @@ -1097,8 +1097,8 @@ UINT8 s3c44b0_device::i2c_receive_byte(int ack) data = (data << 1) + (iface_i2c_sda_r() ? 1 : 0); iface_i2c_scl_w(0); } - verboselog(machine(), 5, "recv data %02X\n", data); - verboselog(machine(), 5, "send ack %d\n", ack); + verboselog( *this, 5, "recv data %02X\n", data); + verboselog( *this, 5, "send ack %d\n", ack); iface_i2c_sda_w(ack ? 0 : 1); iface_i2c_scl_w(1); iface_i2c_scl_w(0); @@ -1108,8 +1108,8 @@ UINT8 s3c44b0_device::i2c_receive_byte(int ack) int s3c44b0_device::i2c_send_byte(UINT8 data) { int ack; - verboselog(machine(), 5, "i2c_send_byte ...\n"); - verboselog(machine(), 5, "send data %02X\n", data); + verboselog( *this, 5, "i2c_send_byte ...\n"); + verboselog( *this, 5, "send data %02X\n", data); for (int i = 0; i < 8; i++) { iface_i2c_sda_w((data & 0x80) ? 1 : 0); @@ -1120,7 +1120,7 @@ int s3c44b0_device::i2c_send_byte(UINT8 data) iface_i2c_sda_w(1); // ack bit iface_i2c_scl_w(1); ack = iface_i2c_sda_r(); - verboselog(machine(), 5, "recv ack %d\n", ack); + verboselog( *this, 5, "recv ack %d\n", ack); iface_i2c_scl_w(0); return ack; } @@ -1128,7 +1128,7 @@ int s3c44b0_device::i2c_send_byte(UINT8 data) void s3c44b0_device::iic_start() { int mode_selection; - verboselog(machine(), 1, "IIC start\n"); + verboselog( *this, 1, "IIC start\n"); i2c_send_start(); mode_selection = BITS(m_iic.regs.iicstat, 7, 6); switch (mode_selection) @@ -1141,7 +1141,7 @@ void s3c44b0_device::iic_start() void s3c44b0_device::iic_stop() { - verboselog(machine(), 1, "IIC stop\n"); + verboselog( *this, 1, "IIC stop\n"); i2c_send_stop(); m_iic.timer->adjust(attotime::never, 0); } @@ -1149,7 +1149,7 @@ void s3c44b0_device::iic_stop() void s3c44b0_device::iic_resume() { int mode_selection; - verboselog(machine(), 1, "IIC resume\n"); + verboselog( *this, 1, "IIC resume\n"); mode_selection = BITS(m_iic.regs.iicstat, 7, 6); switch (mode_selection) { @@ -1170,14 +1170,14 @@ READ32_MEMBER( s3c44b0_device::iic_r ) } break; } - verboselog(machine(), 9, "(IIC) %08X -> %08X\n", S3C44B0_BASE_IIC + (offset << 2), data); + verboselog( *this, 9, "(IIC) %08X -> %08X\n", S3C44B0_BASE_IIC + (offset << 2), data); return data; } WRITE32_MEMBER( s3c44b0_device::iic_w ) { UINT32 old_value = ((UINT32*)&m_iic.regs)[offset]; - verboselog(machine(), 9, "(IIC) %08X <- %08X\n", S3C44B0_BASE_IIC + (offset << 2), data); + verboselog( *this, 9, "(IIC) %08X <- %08X\n", S3C44B0_BASE_IIC + (offset << 2), data); COMBINE_DATA(&((UINT32*)&m_iic.regs)[offset]); switch (offset) { @@ -1255,7 +1255,7 @@ WRITE32_MEMBER( s3c44b0_device::iic_w ) TIMER_CALLBACK_MEMBER( s3c44b0_device::iic_timer_exp ) { int enable_interrupt; - verboselog(machine(), 2, "IIC timer callback\n"); + verboselog( *this, 2, "IIC timer callback\n"); m_iic.count++; enable_interrupt = BIT(m_iic.regs.iiccon, 5); @@ -1325,14 +1325,14 @@ READ32_MEMBER( s3c44b0_device::gpio_r ) } break; } - verboselog(machine(), 9, "(GPIO) %08X -> %08X\n", S3C44B0_BASE_GPIO + (offset << 2), data); + verboselog( *this, 9, "(GPIO) %08X -> %08X\n", S3C44B0_BASE_GPIO + (offset << 2), data); return data; } WRITE32_MEMBER( s3c44b0_device::gpio_w ) { UINT32 old_value = ((UINT32*)&m_gpio.regs)[offset]; - verboselog(machine(), 9, "(GPIO) %08X <- %08X\n", S3C44B0_BASE_GPIO + (offset << 2), data); + verboselog( *this, 9, "(GPIO) %08X <- %08X\n", S3C44B0_BASE_GPIO + (offset << 2), data); COMBINE_DATA(&((UINT32*)&m_gpio.regs)[offset]); switch (offset) { @@ -1395,7 +1395,7 @@ UINT32 s3c44b0_device::uart_r(int ch, UINT32 offset) case S3C44B0_URXH : { UINT8 rxdata = data & 0xFF; - verboselog(machine(), 5, "UART %d read %02X (%c)\n", ch, rxdata, ((rxdata >= 32) && (rxdata < 128)) ? (char)rxdata : '?'); + verboselog( *this, 5, "UART %d read %02X (%c)\n", ch, rxdata, ((rxdata >= 32) && (rxdata < 128)) ? (char)rxdata : '?'); m_uart[ch].regs.utrstat &= ~1; // [bit 0] Receive buffer data ready } break; @@ -1411,7 +1411,7 @@ void s3c44b0_device::uart_w(int ch, UINT32 offset, UINT32 data, UINT32 mem_mask) case S3C44B0_UTXH : { UINT8 txdata = data & 0xFF; - verboselog(machine(), 5, "UART %d write %02X (%c)\n", ch, txdata, ((txdata >= 32) && (txdata < 128)) ? (char)txdata : '?'); + verboselog( *this, 5, "UART %d write %02X (%c)\n", ch, txdata, ((txdata >= 32) && (txdata < 128)) ? (char)txdata : '?'); #ifdef UART_PRINTF printf( "%c", ((txdata >= 32) && (txdata < 128)) ? (char)txdata : '?'); #endif @@ -1422,7 +1422,7 @@ void s3c44b0_device::uart_w(int ch, UINT32 offset, UINT32 data, UINT32 mem_mask) UINT32 mclk, hz; mclk = get_mclk(); hz = (mclk / (m_uart->regs.ubrdiv + 1)) / 16; - verboselog(machine(), 5, "UART %d - mclk %08X hz %08X\n", ch, mclk, hz); + verboselog( *this, 5, "UART %d - mclk %08X hz %08X\n", ch, mclk, hz); m_uart->timer->adjust(attotime::from_hz(hz), ch, attotime::from_hz(hz)); } break; @@ -1432,26 +1432,26 @@ void s3c44b0_device::uart_w(int ch, UINT32 offset, UINT32 data, UINT32 mem_mask) READ32_MEMBER( s3c44b0_device::uart_0_r ) { UINT32 data = uart_r(0, offset); -// verboselog(machine(), 9, "(UART 0) %08X -> %08X\n", S3C44B0_BASE_UART_0 + (offset << 2), data); +// verboselog( *this, 9, "(UART 0) %08X -> %08X\n", S3C44B0_BASE_UART_0 + (offset << 2), data); return data; } READ32_MEMBER( s3c44b0_device::uart_1_r ) { UINT32 data = uart_r(1, offset); -// verboselog(machine(), 9, "(UART 1) %08X -> %08X\n", S3C44B0_BASE_UART_1 + (offset << 2), data); +// verboselog( *this, 9, "(UART 1) %08X -> %08X\n", S3C44B0_BASE_UART_1 + (offset << 2), data); return data; } WRITE32_MEMBER( s3c44b0_device::uart_0_w ) { - verboselog(machine(), 9, "(UART 0) %08X <- %08X (%08X)\n", S3C44B0_BASE_UART_0 + (offset << 2), data, mem_mask); + verboselog( *this, 9, "(UART 0) %08X <- %08X (%08X)\n", S3C44B0_BASE_UART_0 + (offset << 2), data, mem_mask); uart_w(0, offset, data, mem_mask); } WRITE32_MEMBER( s3c44b0_device::uart_1_w ) { - verboselog(machine(), 9, "(UART 1) %08X <- %08X (%08X)\n", S3C44B0_BASE_UART_1 + (offset << 2), data, mem_mask); + verboselog( *this, 9, "(UART 1) %08X <- %08X (%08X)\n", S3C44B0_BASE_UART_1 + (offset << 2), data, mem_mask); uart_w(1, offset, data, mem_mask); } @@ -1465,7 +1465,7 @@ void s3c44b0_device::uart_fifo_w(int uart, UINT8 data) TIMER_CALLBACK_MEMBER( s3c44b0_device::uart_timer_exp ) { int ch = param; - verboselog(machine(), 2, "UART %d timer callback\n", ch); + verboselog( *this, 2, "UART %d timer callback\n", ch); if ((m_uart->regs.ucon & (1 << 9)) != 0) { const int ch_int[] = { S3C44B0_INT_UTXD0, S3C44B0_INT_UTXD1 }; @@ -1495,7 +1495,7 @@ READ32_MEMBER( s3c44b0_device::wdt_r ) } break; } - verboselog(machine(), 9, "(WDT) %08X -> %08X\n", S3C44B0_BASE_WDT + (offset << 2), data); + verboselog( *this, 9, "(WDT) %08X -> %08X\n", S3C44B0_BASE_WDT + (offset << 2), data); return data; } @@ -1503,19 +1503,19 @@ void s3c44b0_device::wdt_start() { UINT32 mclk, prescaler, clock; double freq, hz; - verboselog(machine(), 1, "WDT start\n"); + verboselog( *this, 1, "WDT start\n"); mclk = get_mclk(); prescaler = BITS(m_wdt.regs.wtcon, 15, 8); clock = 16 << BITS(m_wdt.regs.wtcon, 4, 3); freq = (double)mclk / (prescaler + 1) / clock; hz = freq / m_wdt.regs.wtcnt; - verboselog(machine(), 5, "WDT mclk %d prescaler %d clock %d freq %f hz %f\n", mclk, prescaler, clock, freq, hz); + verboselog( *this, 5, "WDT mclk %d prescaler %d clock %d freq %f hz %f\n", mclk, prescaler, clock, freq, hz); m_wdt.timer->adjust(attotime::from_hz(hz), 0, attotime::from_hz(hz)); } void s3c44b0_device::wdt_stop() { - verboselog(machine(), 1, "WDT stop\n"); + verboselog( *this, 1, "WDT stop\n"); m_wdt.regs.wtcnt = wdt_calc_current_count(); m_wdt.timer->adjust(attotime::never, 0); } @@ -1531,7 +1531,7 @@ void s3c44b0_device::wdt_recalc() WRITE32_MEMBER( s3c44b0_device::wdt_w ) { UINT32 old_value = ((UINT32*)&m_wdt.regs)[offset]; - verboselog(machine(), 9, "(WDT) %08X <- %08X\n", S3C44B0_BASE_WDT + (offset << 2), data); + verboselog( *this, 9, "(WDT) %08X <- %08X\n", S3C44B0_BASE_WDT + (offset << 2), data); COMBINE_DATA(&((UINT32*)&m_wdt.regs)[offset]); switch (offset) { @@ -1548,7 +1548,7 @@ WRITE32_MEMBER( s3c44b0_device::wdt_w ) TIMER_CALLBACK_MEMBER( s3c44b0_device::wdt_timer_exp ) { - verboselog(machine(), 2, "WDT timer callback\n"); + verboselog( *this, 2, "WDT timer callback\n"); if ((m_wdt.regs.wtcon & (1 << 2)) != 0) { request_irq(S3C44B0_INT_WDT); @@ -1565,13 +1565,13 @@ TIMER_CALLBACK_MEMBER( s3c44b0_device::wdt_timer_exp ) READ32_MEMBER( s3c44b0_device::cpuwrap_r ) { UINT32 data = ((UINT32*)&m_cpuwrap.regs)[offset]; - verboselog(machine(), 9, "(CPUWRAP) %08X -> %08X\n", S3C44B0_BASE_CPU_WRAPPER + (offset << 2), data); + verboselog( *this, 9, "(CPUWRAP) %08X -> %08X\n", S3C44B0_BASE_CPU_WRAPPER + (offset << 2), data); return data; } WRITE32_MEMBER( s3c44b0_device::cpuwrap_w ) { - verboselog(machine(), 9, "(CPUWRAP) %08X <- %08X\n", S3C44B0_BASE_CPU_WRAPPER + (offset << 2), data); + verboselog( *this, 9, "(CPUWRAP) %08X <- %08X\n", S3C44B0_BASE_CPU_WRAPPER + (offset << 2), data); COMBINE_DATA(&((UINT32*)&m_cpuwrap.regs)[offset]); } @@ -1580,7 +1580,7 @@ WRITE32_MEMBER( s3c44b0_device::cpuwrap_w ) READ32_MEMBER( s3c44b0_device::adc_r ) { UINT32 data = ((UINT32*)&m_adc.regs)[offset]; - verboselog(machine(), 9, "(ADC) %08X -> %08X\n", S3C44B0_BASE_ADC + (offset << 2), data); + verboselog( *this, 9, "(ADC) %08X -> %08X\n", S3C44B0_BASE_ADC + (offset << 2), data); return data; } @@ -1588,18 +1588,18 @@ void s3c44b0_device::adc_start() { UINT32 mclk, prescaler; double freq, hz; - verboselog(machine(), 1, "ADC start\n"); + verboselog( *this, 1, "ADC start\n"); mclk = get_mclk(); prescaler = BITS(m_adc.regs.adcpsr, 7, 0); freq = (double)mclk / (2 * (prescaler + 1)) / 16; hz = freq / 1; //m_wdt.regs.wtcnt; - verboselog(machine(), 5, "ADC mclk %d prescaler %d freq %f hz %f\n", mclk, prescaler, freq, hz); + verboselog( *this, 5, "ADC mclk %d prescaler %d freq %f hz %f\n", mclk, prescaler, freq, hz); m_adc.timer->adjust(attotime::from_hz(hz), 0); } void s3c44b0_device::adc_stop() { - verboselog(machine(), 1, "ADC stop\n"); + verboselog( *this, 1, "ADC stop\n"); m_adc.timer->adjust(attotime::never, 0); } @@ -1614,7 +1614,7 @@ void s3c44b0_device::adc_recalc() WRITE32_MEMBER( s3c44b0_device::adc_w ) { UINT32 old_value = ((UINT32*)&m_wdt.regs)[offset]; - verboselog(machine(), 9, "(ADC) %08X <- %08X\n", S3C44B0_BASE_ADC + (offset << 2), data); + verboselog( *this, 9, "(ADC) %08X <- %08X\n", S3C44B0_BASE_ADC + (offset << 2), data); COMBINE_DATA(&((UINT32*)&m_adc.regs)[offset]); switch (offset) { @@ -1632,7 +1632,7 @@ WRITE32_MEMBER( s3c44b0_device::adc_w ) TIMER_CALLBACK_MEMBER( s3c44b0_device::adc_timer_exp ) { - verboselog(machine(), 2, "ADC timer callback\n"); + verboselog( *this, 2, "ADC timer callback\n"); m_adc.regs.adccon |= (1 << 6); request_irq(S3C44B0_INT_ADC); } @@ -1642,7 +1642,7 @@ TIMER_CALLBACK_MEMBER( s3c44b0_device::adc_timer_exp ) READ32_MEMBER( s3c44b0_device::sio_r ) { UINT32 data = ((UINT32*)&m_sio.regs)[offset]; - verboselog(machine(), 9, "(SIO) %08X -> %08X\n", S3C44B0_BASE_SIO + (offset << 2), data); + verboselog( *this, 9, "(SIO) %08X -> %08X\n", S3C44B0_BASE_SIO + (offset << 2), data); return data; } @@ -1650,19 +1650,19 @@ void s3c44b0_device::sio_start() { UINT32 mclk, prescaler; double freq, hz; - verboselog(machine(), 1, "SIO start\n"); + verboselog( *this, 1, "SIO start\n"); mclk = get_mclk(); prescaler = BITS(m_sio.regs.sbrdr, 11, 0); freq = (double)mclk / 2 / (prescaler + 1); hz = freq / 1; //m_wdt.regs.wtcnt; - verboselog(machine(), 5, "SIO mclk %d prescaler %d freq %f hz %f\n", mclk, prescaler, freq, hz); + verboselog( *this, 5, "SIO mclk %d prescaler %d freq %f hz %f\n", mclk, prescaler, freq, hz); m_sio.timer->adjust(attotime::from_hz(hz), 0); // printf("SIO transmit %02X (%c)\n", m_sio.regs.siodat, ((m_sio.regs.siodat >= 32) && (m_sio.regs.siodat < 128)) ? (char)m_sio.regs.siodat : '?'); } void s3c44b0_device::sio_stop() { - verboselog(machine(), 1, "SIO stop\n"); + verboselog( *this, 1, "SIO stop\n"); // m_wdt.regs.wtcnt = s3c44b0_wdt_calc_current_count( device); m_sio.timer->adjust(attotime::never, 0); } @@ -1678,7 +1678,7 @@ void s3c44b0_device::sio_recalc() WRITE32_MEMBER( s3c44b0_device::sio_w ) { UINT32 old_value = ((UINT32*)&m_sio.regs)[offset]; - verboselog(machine(), 9, "(SIO) %08X <- %08X\n", S3C44B0_BASE_SIO + (offset << 2), data); + verboselog( *this, 9, "(SIO) %08X <- %08X\n", S3C44B0_BASE_SIO + (offset << 2), data); COMBINE_DATA(&((UINT32*)&m_sio.regs)[offset]); switch (offset) { @@ -1696,7 +1696,7 @@ WRITE32_MEMBER( s3c44b0_device::sio_w ) TIMER_CALLBACK_MEMBER( s3c44b0_device::sio_timer_exp ) { - verboselog(machine(), 2, "SIO timer callback\n"); + verboselog( *this, 2, "SIO timer callback\n"); m_sio.regs.siodat = 0x00; // TEST @@ -1720,32 +1720,32 @@ void s3c44b0_device::iis_start() int prescaler; double freq, hz; const int div[] = { 2, 4, 6, 8, 10, 12, 14, 16, 1, 0, 3, 0, 5, 0, 7, 0 }; - verboselog(machine(), 1, "IIS start\n"); + verboselog( *this, 1, "IIS start\n"); mclk = get_mclk(); prescaler = BITS(m_iis.regs.iispsr, 3, 0); freq = (double)mclk / div[prescaler]; hz = freq / 256 * 2; - verboselog(machine(), 5, "IIS mclk %d prescaler %d freq %f hz %f\n", mclk, prescaler, freq, hz); + verboselog( *this, 5, "IIS mclk %d prescaler %d freq %f hz %f\n", mclk, prescaler, freq, hz); m_iis.timer->adjust(attotime::from_hz(hz), 0, attotime::from_hz(hz)); } void s3c44b0_device::iis_stop() { - verboselog(machine(), 1, "IIS stop\n"); + verboselog( *this, 1, "IIS stop\n"); m_iis.timer->adjust(attotime::never, 0); } READ32_MEMBER( s3c44b0_device::iis_r ) { UINT32 data = ((UINT32*)&m_iis.regs)[offset]; - verboselog(machine(), 9, "(IIS) %08X -> %08X\n", S3C44B0_BASE_IIS + (offset << 2), data); + verboselog( *this, 9, "(IIS) %08X -> %08X\n", S3C44B0_BASE_IIS + (offset << 2), data); return data; } WRITE32_MEMBER( s3c44b0_device::iis_w ) { UINT32 old_value = ((UINT32*)&m_iis.regs)[offset]; - verboselog(machine(), 9, "(IIS) %08X <- %08X\n", S3C44B0_BASE_IIS + (offset << 2), data); + verboselog( *this, 9, "(IIS) %08X <- %08X\n", S3C44B0_BASE_IIS + (offset << 2), data); COMBINE_DATA(&((UINT32*)&m_iis.regs)[offset]); switch (offset) { @@ -1787,7 +1787,7 @@ WRITE32_MEMBER( s3c44b0_device::iis_w ) TIMER_CALLBACK_MEMBER( s3c44b0_device::iis_timer_exp ) { - verboselog(machine(), 2, "IIS timer callback\n"); + verboselog( *this, 2, "IIS timer callback\n"); if ((m_iis.regs.iiscon & (1 << 5)) != 0) { bdma_request_iis(); @@ -1801,20 +1801,20 @@ void s3c44b0_device::zdma_trigger(int ch) address_space &space = m_cpu->space(AS_PROGRAM); UINT32 saddr, daddr; int dal, dst, opt, das, cnt; - verboselog(machine(), 5, "s3c44b0_zdma_trigger %d\n", ch); + verboselog( *this, 5, "s3c44b0_zdma_trigger %d\n", ch); dst = BITS(m_zdma->regs.dcsrc, 31, 30); dal = BITS(m_zdma->regs.dcsrc, 29, 28); saddr = BITS(m_zdma->regs.dcsrc, 27, 0); - verboselog(machine(), 5, "dst %d dal %d saddr %08X\n", dst, dal, saddr); + verboselog( *this, 5, "dst %d dal %d saddr %08X\n", dst, dal, saddr); opt = BITS(m_zdma->regs.dcdst, 31, 30); das = BITS(m_zdma->regs.dcdst, 29, 28); daddr = BITS(m_zdma->regs.dcdst, 27, 0); - verboselog(machine(), 5, "opt %d das %d daddr %08X\n", opt, das, daddr); + verboselog( *this, 5, "opt %d das %d daddr %08X\n", opt, das, daddr); cnt = BITS(m_zdma->regs.dccnt, 19, 0); - verboselog(machine(), 5, "icnt %08X\n", cnt); + verboselog( *this, 5, "icnt %08X\n", cnt); while (cnt > 0) { - verboselog(machine(), 9, "[%08X] -> [%08X]\n", saddr, daddr); + verboselog( *this, 9, "[%08X] -> [%08X]\n", saddr, daddr); switch (dst) { case 0 : space.write_byte(daddr, space.read_byte(saddr)); break; @@ -1848,7 +1848,7 @@ void s3c44b0_device::zdma_trigger(int ch) void s3c44b0_device::zdma_start(int ch) { - verboselog(machine(), 5, "ZDMA %d start\n", ch); + verboselog( *this, 5, "ZDMA %d start\n", ch); m_zdma->regs.dcsrc = m_zdma->regs.disrc; m_zdma->regs.dcdst = m_zdma->regs.didst; m_zdma->regs.dccnt = m_zdma->regs.dicnt; @@ -1885,33 +1885,33 @@ void s3c44b0_device::zdma_w(int ch, UINT32 offset, UINT32 data, UINT32 mem_mask) READ32_MEMBER( s3c44b0_device::zdma_0_r ) { UINT32 data = zdma_r(0, offset); - verboselog(machine(), 9, "(ZDMA 0) %08X -> %08X\n", S3C44B0_BASE_ZDMA_0 + (offset << 2), data); + verboselog( *this, 9, "(ZDMA 0) %08X -> %08X\n", S3C44B0_BASE_ZDMA_0 + (offset << 2), data); return data; } READ32_MEMBER( s3c44b0_device::zdma_1_r ) { UINT32 data = zdma_r(1, offset); - verboselog(machine(), 9, "(ZDMA 1) %08X -> %08X\n", S3C44B0_BASE_ZDMA_1 + (offset << 2), data); + verboselog( *this, 9, "(ZDMA 1) %08X -> %08X\n", S3C44B0_BASE_ZDMA_1 + (offset << 2), data); return data; } WRITE32_MEMBER( s3c44b0_device::zdma_0_w ) { - verboselog(machine(), 9, "(ZDMA 0) %08X <- %08X (%08X)\n", S3C44B0_BASE_ZDMA_0 + (offset << 2), data, mem_mask); + verboselog( *this, 9, "(ZDMA 0) %08X <- %08X (%08X)\n", S3C44B0_BASE_ZDMA_0 + (offset << 2), data, mem_mask); zdma_w(0, offset, data, mem_mask); } WRITE32_MEMBER( s3c44b0_device::zdma_1_w ) { - verboselog(machine(), 9, "(ZDMA 1) %08X <- %08X (%08X)\n", S3C44B0_BASE_ZDMA_1 + (offset << 2), data, mem_mask); + verboselog( *this, 9, "(ZDMA 1) %08X <- %08X (%08X)\n", S3C44B0_BASE_ZDMA_1 + (offset << 2), data, mem_mask); zdma_w(1, offset, data, mem_mask); } TIMER_CALLBACK_MEMBER( s3c44b0_device::zdma_timer_exp ) { int ch = param; - verboselog(machine(), 2, "ZDMA %d timer callback\n", ch); + verboselog( *this, 2, "ZDMA %d timer callback\n", ch); } /* BDMA */ @@ -1921,18 +1921,18 @@ void s3c44b0_device::bdma_trigger(int ch) address_space &space = m_cpu->space(AS_PROGRAM); UINT32 saddr, daddr; int dal, dst, tdm, das, cnt; - verboselog(machine(), 5, "s3c44b0_bdma_trigger %d\n", ch); + verboselog( *this, 5, "s3c44b0_bdma_trigger %d\n", ch); dst = BITS(m_bdma->regs.dcsrc, 31, 30); dal = BITS(m_bdma->regs.dcsrc, 29, 28); saddr = BITS(m_bdma->regs.dcsrc, 27, 0); - verboselog(machine(), 5, "dst %d dal %d saddr %08X\n", dst, dal, saddr); + verboselog( *this, 5, "dst %d dal %d saddr %08X\n", dst, dal, saddr); tdm = BITS(m_bdma->regs.dcdst, 31, 30); das = BITS(m_bdma->regs.dcdst, 29, 28); daddr = BITS(m_bdma->regs.dcdst, 27, 0); - verboselog(machine(), 5, "tdm %d das %d daddr %08X\n", tdm, das, daddr); + verboselog( *this, 5, "tdm %d das %d daddr %08X\n", tdm, das, daddr); cnt = BITS(m_bdma->regs.dccnt, 19, 0); - verboselog(machine(), 5, "icnt %08X\n", cnt); - verboselog(machine(), 9, "[%08X] -> [%08X]\n", saddr, daddr); + verboselog( *this, 5, "icnt %08X\n", cnt); + verboselog( *this, 9, "[%08X] -> [%08X]\n", saddr, daddr); switch (dst) { case 0 : space.write_byte(daddr, space.read_byte(saddr)); break; @@ -1965,7 +1965,7 @@ void s3c44b0_device::bdma_trigger(int ch) void s3c44b0_device::bdma_request_iis() { - verboselog(machine(), 5, "s3c44b0_bdma_request_iis\n"); + verboselog( *this, 5, "s3c44b0_bdma_request_iis\n"); bdma_trigger(0); } @@ -1977,7 +1977,7 @@ UINT32 s3c44b0_device::bdma_r(int ch, UINT32 offset) void s3c44b0_device::bdma_start(int ch) { - verboselog(machine(), 5, "BDMA %d start\n", ch); + verboselog( *this, 5, "BDMA %d start\n", ch); int qsc = BITS(m_bdma->regs.dicnt, 31, 30); if ((ch == 0) && (qsc == 1)) { @@ -1994,7 +1994,7 @@ void s3c44b0_device::bdma_start(int ch) void s3c44b0_device::bdma_stop(int ch) { - verboselog(machine(), 5, "BDMA %d stop\n", ch); + verboselog( *this, 5, "BDMA %d stop\n", ch); m_bdma[ch].timer->adjust(attotime::never, ch); } @@ -2025,31 +2025,31 @@ void s3c44b0_device::bdma_w(int ch, UINT32 offset, UINT32 data, UINT32 mem_mask) READ32_MEMBER( s3c44b0_device::bdma_0_r ) { UINT32 data = bdma_r(0, offset); - verboselog(machine(), 9, "(BDMA 0) %08X -> %08X\n", S3C44B0_BASE_BDMA_0 + (offset << 2), data); + verboselog( *this, 9, "(BDMA 0) %08X -> %08X\n", S3C44B0_BASE_BDMA_0 + (offset << 2), data); return data; } READ32_MEMBER( s3c44b0_device::bdma_1_r ) { UINT32 data = bdma_r(1, offset); - verboselog(machine(), 9, "(BDMA 1) %08X -> %08X\n", S3C44B0_BASE_BDMA_1 + (offset << 2), data); + verboselog( *this, 9, "(BDMA 1) %08X -> %08X\n", S3C44B0_BASE_BDMA_1 + (offset << 2), data); return data; } WRITE32_MEMBER( s3c44b0_device::bdma_0_w ) { - verboselog(machine(), 9, "(BDMA 0) %08X <- %08X (%08X)\n", S3C44B0_BASE_BDMA_0 + (offset << 2), data, mem_mask); + verboselog( *this, 9, "(BDMA 0) %08X <- %08X (%08X)\n", S3C44B0_BASE_BDMA_0 + (offset << 2), data, mem_mask); bdma_w(0, offset, data, mem_mask); } WRITE32_MEMBER( s3c44b0_device::bdma_1_w ) { - verboselog(machine(), 9, "(BDMA 1) %08X <- %08X (%08X)\n", S3C44B0_BASE_BDMA_1 + (offset << 2), data, mem_mask); + verboselog( *this, 9, "(BDMA 1) %08X <- %08X (%08X)\n", S3C44B0_BASE_BDMA_1 + (offset << 2), data, mem_mask); bdma_w(1, offset, data, mem_mask); } TIMER_CALLBACK_MEMBER( s3c44b0_device::bdma_timer_exp ) { int ch = param; - verboselog(machine(), 2, "BDMA %d timer callback\n", ch); + verboselog( *this, 2, "BDMA %d timer callback\n", ch); } diff --git a/src/devices/machine/t10mmc.c b/src/devices/machine/t10mmc.c index 86e3ec696ed..b6f0fa68f34 100644 --- a/src/devices/machine/t10mmc.c +++ b/src/devices/machine/t10mmc.c @@ -13,6 +13,7 @@ static int to_msf(int frame) void t10mmc::t10_start(device_t &device) { + m_device = &device; t10spc::t10_start(device); device.save_item(NAME(m_lba)); @@ -30,7 +31,7 @@ void t10mmc::t10_reset() SetDevice( m_image->get_cdrom_file() ); if( !m_cdrom ) { - logerror( "T10MMC %s: no CD found!\n", m_image->tag() ); + m_device->logerror( "T10MMC %s: no CD found!\n", m_image->tag() ); } m_lba = 0; @@ -112,7 +113,7 @@ void t10mmc::ExecCommand() switch ( command[0] ) { case T10SPC_CMD_INQUIRY: - logerror("T10MMC: INQUIRY\n"); + m_device->logerror("T10MMC: INQUIRY\n"); m_phase = SCSI_PHASE_DATAIN; m_status_code = SCSI_STATUS_CODE_GOOD; m_transfer_length = SCSILengthFromUINT8( &command[ 4 ] ); @@ -121,7 +122,7 @@ void t10mmc::ExecCommand() break; case T10SPC_CMD_MODE_SELECT_6: - logerror("T10MMC: MODE SELECT(6) length %x control %x\n", command[4], command[5]); + m_device->logerror("T10MMC: MODE SELECT(6) length %x control %x\n", command[4], command[5]); m_phase = SCSI_PHASE_DATAOUT; m_status_code = SCSI_STATUS_CODE_GOOD; m_transfer_length = SCSILengthFromUINT8( &command[ 4 ] ); @@ -156,7 +157,7 @@ void t10mmc::ExecCommand() m_lba = command[2]<<24 | command[3]<<16 | command[4]<<8 | command[5]; m_blocks = SCSILengthFromUINT16( &command[7] ); - logerror("T10MMC: READ(10) at LBA %x for %d blocks (%d bytes)\n", m_lba, m_blocks, m_blocks * m_sector_bytes); + m_device->logerror("T10MMC: READ(10) at LBA %x for %d blocks (%d bytes)\n", m_lba, m_blocks, m_blocks * m_sector_bytes); if (m_num_subblocks > 1) { @@ -176,7 +177,7 @@ void t10mmc::ExecCommand() break; case T10MMC_CMD_READ_SUB_CHANNEL: - //logerror("T10MMC: READ SUB-CHANNEL type %d\n", command[3]); + //m_device->logerror("T10MMC: READ SUB-CHANNEL type %d\n", command[3]); m_phase = SCSI_PHASE_DATAIN; m_status_code = SCSI_STATUS_CODE_GOOD; m_transfer_length = SCSILengthFromUINT16( &command[ 7 ] ); @@ -197,7 +198,7 @@ void t10mmc::ExecCommand() break; default: - logerror("T10MMC: Unhandled READ TOC format %d\n", toc_format()); + m_device->logerror("T10MMC: Unhandled READ TOC format %d\n", toc_format()); length = 0; break; } @@ -227,10 +228,10 @@ void t10mmc::ExecCommand() } else if (m_lba == 0xffffffff) { - logerror("T10MMC: play audio from current not implemented!\n"); + m_device->logerror("T10MMC: play audio from current not implemented!\n"); } - logerror("T10MMC: PLAY AUDIO(10) at LBA %x for %x blocks\n", m_lba, m_blocks); + m_device->logerror("T10MMC: PLAY AUDIO(10) at LBA %x for %x blocks\n", m_lba, m_blocks); trk = cdrom_get_track(m_cdrom, m_lba); @@ -241,7 +242,7 @@ void t10mmc::ExecCommand() } else { - logerror("T10MMC: track is NOT audio!\n"); + m_device->logerror("T10MMC: track is NOT audio!\n"); set_sense(SCSI_SENSE_KEY_ILLEGAL_REQUEST, SCSI_SENSE_ASC_ASCQ_ILLEGAL_MODE_FOR_THIS_TRACK); } @@ -253,7 +254,7 @@ void t10mmc::ExecCommand() case T10MMC_CMD_PLAY_AUDIO_TRACK_INDEX: // be careful: tracks here are zero-based, but the SCSI command // uses the real CD track number which is 1-based! - logerror("T10MMC: PLAY AUDIO T/I: strk %d idx %d etrk %d idx %d frames %d\n", command[4], command[5], command[7], command[8], m_blocks); + m_device->logerror("T10MMC: PLAY AUDIO T/I: strk %d idx %d etrk %d idx %d frames %d\n", command[4], command[5], command[7], command[8], m_blocks); m_lba = cdrom_get_track_start(m_cdrom, command[4]-1); m_blocks = cdrom_get_track_start(m_cdrom, command[7]-1) - m_lba; if (command[4] > command[7]) @@ -275,7 +276,7 @@ void t10mmc::ExecCommand() } else { - logerror("T10MMC: track is NOT audio!\n"); + m_device->logerror("T10MMC: track is NOT audio!\n"); set_sense(SCSI_SENSE_KEY_ILLEGAL_REQUEST, SCSI_SENSE_ASC_ASCQ_ILLEGAL_MODE_FOR_THIS_TRACK); } @@ -290,7 +291,7 @@ void t10mmc::ExecCommand() m_cdda->pause_audio((command[8] & 0x01) ^ 0x01); } - logerror("T10MMC: PAUSE/RESUME: %s\n", command[8]&1 ? "RESUME" : "PAUSE"); + m_device->logerror("T10MMC: PAUSE/RESUME: %s\n", command[8]&1 ? "RESUME" : "PAUSE"); m_phase = SCSI_PHASE_STATUS; m_status_code = SCSI_STATUS_CODE_GOOD; m_transfer_length = 0; @@ -299,14 +300,14 @@ void t10mmc::ExecCommand() case T10MMC_CMD_STOP_PLAY_SCAN: abort_audio(); - logerror("T10MMC: STOP_PLAY_SCAN\n"); + m_device->logerror("T10MMC: STOP_PLAY_SCAN\n"); m_phase = SCSI_PHASE_STATUS; m_status_code = SCSI_STATUS_CODE_GOOD; m_transfer_length = 0; break; case T10SPC_CMD_MODE_SELECT_10: - logerror("T10MMC: MODE SELECT length %x control %x\n", command[7]<<8 | command[8], command[1]); + m_device->logerror("T10MMC: MODE SELECT length %x control %x\n", command[7]<<8 | command[8], command[1]); m_phase = SCSI_PHASE_DATAOUT; m_status_code = SCSI_STATUS_CODE_GOOD; m_transfer_length = SCSILengthFromUINT16( &command[ 7 ] ); @@ -329,10 +330,10 @@ void t10mmc::ExecCommand() } else if (m_lba == 0xffffffff) { - logerror("T10MMC: play audio from current not implemented!\n"); + m_device->logerror("T10MMC: play audio from current not implemented!\n"); } - logerror("T10MMC: PLAY AUDIO(12) at LBA %x for %x blocks\n", m_lba, m_blocks); + m_device->logerror("T10MMC: PLAY AUDIO(12) at LBA %x for %x blocks\n", m_lba, m_blocks); trk = cdrom_get_track(m_cdrom, m_lba); @@ -343,7 +344,7 @@ void t10mmc::ExecCommand() } else { - logerror("T10MMC: track is NOT audio!\n"); + m_device->logerror("T10MMC: track is NOT audio!\n"); set_sense(SCSI_SENSE_KEY_ILLEGAL_REQUEST, SCSI_SENSE_ASC_ASCQ_ILLEGAL_MODE_FOR_THIS_TRACK); } @@ -356,7 +357,7 @@ void t10mmc::ExecCommand() m_lba = command[2]<<24 | command[3]<<16 | command[4]<<8 | command[5]; m_blocks = command[7]<<16 | command[8]<<8 | command[9]; - logerror("T10MMC: READ(12) at LBA %x for %x blocks (%x bytes)\n", m_lba, m_blocks, m_blocks * m_sector_bytes); + m_device->logerror("T10MMC: READ(12) at LBA %x for %x blocks (%x bytes)\n", m_lba, m_blocks, m_blocks * m_sector_bytes); if (m_num_subblocks > 1) { @@ -376,7 +377,7 @@ void t10mmc::ExecCommand() break; case T10MMC_CMD_SET_CD_SPEED: - logerror("T10MMC: SET CD SPEED to %d kbytes/sec.\n", command[2]<<8 | command[3]); + m_device->logerror("T10MMC: SET CD SPEED to %d kbytes/sec.\n", command[2]<<8 | command[3]); m_phase = SCSI_PHASE_STATUS; m_status_code = SCSI_STATUS_CODE_GOOD; m_transfer_length = 0; @@ -414,7 +415,7 @@ void t10mmc::ReadData( UINT8 *data, int dataLength ) break; case T10SBC_CMD_READ_CAPACITY: - logerror("T10MMC: READ CAPACITY\n"); + m_device->logerror("T10MMC: READ CAPACITY\n"); temp = cdrom_get_track_start(m_cdrom, 0xaa); temp--; // return the last used block on the disc @@ -431,17 +432,17 @@ void t10mmc::ReadData( UINT8 *data, int dataLength ) case T10SBC_CMD_READ_10: case T10SBC_CMD_READ_12: - logerror("T10MMC: read %x dataLength, \n", dataLength); + m_device->logerror("T10MMC: read %x dataLength, \n", dataLength); if ((m_cdrom) && (m_blocks)) { while (dataLength > 0) { if (!cdrom_read_data(m_cdrom, m_lba, tmp_buffer, CD_TRACK_MODE1)) { - logerror("T10MMC: CD read error!\n"); + m_device->logerror("T10MMC: CD read error!\n"); } - logerror("True LBA: %d, buffer half: %d\n", m_lba, m_cur_subblock * m_sector_bytes); + m_device->logerror("True LBA: %d, buffer half: %d\n", m_lba, m_cur_subblock * m_sector_bytes); memcpy(data, &tmp_buffer[m_cur_subblock * m_sector_bytes], m_sector_bytes); @@ -471,7 +472,7 @@ void t10mmc::ReadData( UINT8 *data, int dataLength ) return; } - logerror("T10MMC: READ SUB-CHANNEL Time = %x, SUBQ = %x\n", command[1], command[2]); + m_device->logerror("T10MMC: READ SUB-CHANNEL Time = %x, SUBQ = %x\n", command[1], command[2]); bool msf = (command[1] & 0x2) != 0; @@ -546,7 +547,7 @@ void t10mmc::ReadData( UINT8 *data, int dataLength ) break; } default: - logerror("T10MMC: Unknown subchannel type %d requested\n", command[3]); + m_device->logerror("T10MMC: Unknown subchannel type %d requested\n", command[3]); } break; @@ -560,7 +561,7 @@ void t10mmc::ReadData( UINT8 *data, int dataLength ) { bool msf = (command[1] & 0x2) != 0; - logerror("T10MMC: READ TOC, format = %d time=%d\n", toc_format(),msf); + m_device->logerror("T10MMC: READ TOC, format = %d time=%d\n", toc_format(),msf); switch (toc_format()) { case TOC_FORMAT_TRACKS: @@ -647,7 +648,7 @@ void t10mmc::ReadData( UINT8 *data, int dataLength ) break; default: - logerror("T10MMC: Unhandled READ TOC format %d\n", toc_format()); + m_device->logerror("T10MMC: Unhandled READ TOC format %d\n", toc_format()); break; } } @@ -655,7 +656,7 @@ void t10mmc::ReadData( UINT8 *data, int dataLength ) case T10SPC_CMD_MODE_SENSE_6: case T10SPC_CMD_MODE_SENSE_10: - logerror("T10MMC: MODE SENSE page code = %x, PC = %x\n", command[2] & 0x3f, (command[2]&0xc0)>>6); + m_device->logerror("T10MMC: MODE SENSE page code = %x, PC = %x\n", command[2] & 0x3f, (command[2]&0xc0)>>6); memset(data, 0, SCSILengthFromUINT16( &command[ 7 ] )); @@ -698,7 +699,7 @@ void t10mmc::ReadData( UINT8 *data, int dataLength ) break; default: - logerror("T10MMC: MODE SENSE unknown page %x\n", command[2] & 0x3f); + m_device->logerror("T10MMC: MODE SENSE unknown page %x\n", command[2] & 0x3f); break; } break; @@ -719,7 +720,7 @@ void t10mmc::WriteData( UINT8 *data, int dataLength ) { case T10SPC_CMD_MODE_SELECT_6: case T10SPC_CMD_MODE_SELECT_10: - logerror("T10MMC: MODE SELECT page %x\n", data[0] & 0x3f); + m_device->logerror("T10MMC: MODE SELECT page %x\n", data[0] & 0x3f); switch (data[0] & 0x3f) { @@ -727,22 +728,22 @@ void t10mmc::WriteData( UINT8 *data, int dataLength ) // check for SGI extension to force 512-byte blocks if ((data[3] == 8) && (data[10] == 2)) { - logerror("T10MMC: Experimental SGI 512-byte block extension enabled\n"); + m_device->logerror("T10MMC: Experimental SGI 512-byte block extension enabled\n"); m_sector_bytes = 512; m_num_subblocks = 4; } else { - logerror("T10MMC: Unknown vendor-specific page!\n"); + m_device->logerror("T10MMC: Unknown vendor-specific page!\n"); } break; case 0xe: // audio page - logerror("Ch 0 route: %x vol: %x\n", data[8], data[9]); - logerror("Ch 1 route: %x vol: %x\n", data[10], data[11]); - logerror("Ch 2 route: %x vol: %x\n", data[12], data[13]); - logerror("Ch 3 route: %x vol: %x\n", data[14], data[15]); + m_device->logerror("Ch 0 route: %x vol: %x\n", data[8], data[9]); + m_device->logerror("Ch 1 route: %x vol: %x\n", data[10], data[11]); + m_device->logerror("Ch 2 route: %x vol: %x\n", data[12], data[13]); + m_device->logerror("Ch 3 route: %x vol: %x\n", data[14], data[15]); break; } break; diff --git a/src/devices/machine/t10mmc.h b/src/devices/machine/t10mmc.h index cfebfc1694c..c8e0bff16de 100644 --- a/src/devices/machine/t10mmc.h +++ b/src/devices/machine/t10mmc.h @@ -58,6 +58,8 @@ protected: UINT32 m_num_subblocks; UINT32 m_cur_subblock; int m_audio_sense; + + device_t *m_device; }; #endif diff --git a/src/devices/machine/t10sbc.c b/src/devices/machine/t10sbc.c index c5d68be8162..623d73acf42 100644 --- a/src/devices/machine/t10sbc.c +++ b/src/devices/machine/t10sbc.c @@ -4,6 +4,7 @@ void t10sbc::t10_start(device_t &device) { + m_device = &device; t10spc::t10_start(device); device.save_item( NAME( m_lba ) ); @@ -21,7 +22,7 @@ void t10sbc::t10_reset() m_disk = m_image->get_hard_disk_file(); if (!m_disk) { - logerror("T10SBC %s: no HD found!\n", m_image->owner()->tag()); + m_device->logerror("T10SBC %s: no HD found!\n", m_image->owner()->tag()); } else { @@ -45,7 +46,7 @@ void t10sbc::ExecCommand() case T10SBC_CMD_SEEK_6: m_lba = (command[1]&0x1f)<<16 | command[2]<<8 | command[3]; - logerror("S1410: SEEK to LBA %x\n", m_lba); + m_device->logerror("S1410: SEEK to LBA %x\n", m_lba); m_phase = SCSI_PHASE_STATUS; m_transfer_length = 0; @@ -55,7 +56,7 @@ void t10sbc::ExecCommand() m_lba = (command[1]&0x1f)<<16 | command[2]<<8 | command[3]; m_blocks = SCSILengthFromUINT8( &command[4] ); - logerror("T10SBC: READ at LBA %x for %x blocks\n", m_lba, m_blocks); + m_device->logerror("T10SBC: READ at LBA %x for %x blocks\n", m_lba, m_blocks); m_phase = SCSI_PHASE_DATAIN; m_status_code = SCSI_STATUS_CODE_GOOD; @@ -66,7 +67,7 @@ void t10sbc::ExecCommand() m_lba = (command[1]&0x1f)<<16 | command[2]<<8 | command[3]; m_blocks = SCSILengthFromUINT8( &command[4] ); - logerror("T10SBC: WRITE to LBA %x for %x blocks\n", m_lba, m_blocks); + m_device->logerror("T10SBC: WRITE to LBA %x for %x blocks\n", m_lba, m_blocks); m_phase = SCSI_PHASE_DATAOUT; m_status_code = SCSI_STATUS_CODE_GOOD; @@ -80,7 +81,7 @@ void t10sbc::ExecCommand() break; case T10SPC_CMD_MODE_SELECT_6: - logerror("T10SBC: MODE SELECT length %x control %x\n", command[4], command[5]); + m_device->logerror("T10SBC: MODE SELECT length %x control %x\n", command[4], command[5]); m_phase = SCSI_PHASE_DATAOUT; m_status_code = SCSI_STATUS_CODE_GOOD; m_transfer_length = SCSILengthFromUINT8( &command[ 4 ] ); @@ -102,7 +103,7 @@ void t10sbc::ExecCommand() m_lba = command[2]<<24 | command[3]<<16 | command[4]<<8 | command[5]; m_blocks = SCSILengthFromUINT16( &command[7] ); - logerror("T10SBC: READ at LBA %x for %x blocks\n", m_lba, m_blocks); + m_device->logerror("T10SBC: READ at LBA %x for %x blocks\n", m_lba, m_blocks); m_phase = SCSI_PHASE_DATAIN; m_status_code = SCSI_STATUS_CODE_GOOD; @@ -113,7 +114,7 @@ void t10sbc::ExecCommand() m_lba = command[2]<<24 | command[3]<<16 | command[4]<<8 | command[5]; m_blocks = SCSILengthFromUINT16( &command[7] ); - logerror("T10SBC: WRITE to LBA %x for %x blocks\n", m_lba, m_blocks); + m_device->logerror("T10SBC: WRITE to LBA %x for %x blocks\n", m_lba, m_blocks); m_phase = SCSI_PHASE_DATAOUT; m_status_code = SCSI_STATUS_CODE_GOOD; @@ -124,7 +125,7 @@ void t10sbc::ExecCommand() m_lba = command[2]<<24 | command[3]<<16 | command[4]<<8 | command[5]; m_blocks = command[6]<<24 | command[7]<<16 | command[8]<<8 | command[9]; - logerror("T10SBC: READ at LBA %x for %x blocks\n", m_lba, m_blocks); + m_device->logerror("T10SBC: READ at LBA %x for %x blocks\n", m_lba, m_blocks); m_phase = SCSI_PHASE_DATAIN; m_status_code = SCSI_STATUS_CODE_GOOD; @@ -181,7 +182,7 @@ void t10sbc::ReadData( UINT8 *data, int dataLength ) { if (!hard_disk_read(m_disk, m_lba, data)) { - logerror("T10SBC: HD read error!\n"); + m_device->logerror("T10SBC: HD read error!\n"); } m_lba++; m_blocks--; @@ -198,7 +199,7 @@ void t10sbc::ReadData( UINT8 *data, int dataLength ) info = hard_disk_get_info(m_disk); - logerror("T10SBC: READ CAPACITY\n"); + m_device->logerror("T10SBC: READ CAPACITY\n"); // get # of sectors temp = info->cylinders * info->heads * info->sectors; @@ -241,7 +242,7 @@ void t10sbc::WriteData( UINT8 *data, int dataLength ) { if (!hard_disk_write(m_disk, m_lba, data)) { - logerror("T10SBC: HD write error!\n"); + m_device->logerror("T10SBC: HD write error!\n"); } m_lba++; m_blocks--; diff --git a/src/devices/machine/t10sbc.h b/src/devices/machine/t10sbc.h index d32c0beee57..03acda90c83 100644 --- a/src/devices/machine/t10sbc.h +++ b/src/devices/machine/t10sbc.h @@ -31,6 +31,7 @@ protected: UINT32 m_blocks; hard_disk_file *m_disk; + device_t *m_device; }; #endif diff --git a/src/devices/machine/t10spc.c b/src/devices/machine/t10spc.c index 80b279efb44..906065e72ea 100644 --- a/src/devices/machine/t10spc.c +++ b/src/devices/machine/t10spc.c @@ -4,6 +4,7 @@ void t10spc::t10_start(device_t &device) { + m_device = &device; device.save_item(NAME(command)); device.save_item(NAME(commandLength)); device.save_item(NAME(m_transfer_length)); @@ -72,7 +73,7 @@ void t10spc::ExecCommand() break; default: - logerror( "SCSIDEV unknown command %02x\n", command[ 0 ] ); + m_device->logerror( "SCSIDEV unknown command %02x\n", command[ 0 ] ); m_status_code = SCSI_STATUS_CODE_GOOD; m_transfer_length = 0; break; @@ -117,7 +118,7 @@ void t10spc::ReadData( UINT8 *data, int dataLength ) break; default: - logerror( "SCSIDEV unknown read %02x\n", command[ 0 ] ); + m_device->logerror( "SCSIDEV unknown read %02x\n", command[ 0 ] ); break; } } @@ -130,7 +131,7 @@ void t10spc::WriteData( UINT8 *data, int dataLength ) break; default: - logerror( "SCSIDEV unknown write %02x\n", command[ 0 ] ); + m_device->logerror( "SCSIDEV unknown write %02x\n", command[ 0 ] ); break; } } diff --git a/src/devices/machine/wd_fdc.c b/src/devices/machine/wd_fdc.c index 8b27486c79a..5d77209e0c7 100644 --- a/src/devices/machine/wd_fdc.c +++ b/src/devices/machine/wd_fdc.c @@ -2290,7 +2290,7 @@ int wd_fdc_digital_t::digital_pll_t::get_next_bit(attotime &tm, floppy_image_dev if(counter & 0x800) break; } - if (TRACE_TRANSITION) logerror("first transition, time=%03x, inc=%3d\n", transition_time, increment); + //if (TRACE_TRANSITION) logerror("first transition, time=%03x, inc=%3d\n", transition_time, increment); int bit = transition_time != 0xffff; if(transition_time != 0xffff) { diff --git a/src/devices/machine/z80ctc.c b/src/devices/machine/z80ctc.c index 8ab638a5e8d..bf911e5d928 100644 --- a/src/devices/machine/z80ctc.c +++ b/src/devices/machine/z80ctc.c @@ -22,6 +22,7 @@ #define VERBOSE 0 #define VPRINTF(x) do { if (VERBOSE) logerror x; } while (0) +#define VPRINTF_CHANNEL(x) do { if (VERBOSE) m_device->logerror x; } while (0) @@ -339,7 +340,7 @@ attotime z80ctc_device::ctc_channel::period() const // if counter mode, no real period if ((m_mode & MODE) == MODE_COUNTER) { - logerror("CTC %d is CounterMode : Can't calculate period\n", m_index); + m_device->logerror("CTC %d is CounterMode : Can't calculate period\n", m_index); return attotime::zero; } @@ -364,7 +365,7 @@ UINT8 z80ctc_device::ctc_channel::read() { attotime period = ((m_mode & PRESCALER) == PRESCALER_16) ? m_device->m_period16 : m_device->m_period256; - VPRINTF(("CTC clock %f\n",ATTOSECONDS_TO_HZ(period.attoseconds()))); + VPRINTF_CHANNEL(("CTC clock %f\n",ATTOSECONDS_TO_HZ(period.attoseconds()))); if (m_timer != NULL) return ((int)(m_timer->remaining().as_double() / period.as_double()) + 1) & 0xff; @@ -383,7 +384,7 @@ void z80ctc_device::ctc_channel::write(UINT8 data) // if we're waiting for a time constant, this is it if ((m_mode & CONSTANT) == CONSTANT_LOAD) { - VPRINTF(("CTC ch.%d constant = %02x\n", m_index, data)); + VPRINTF_CHANNEL(("CTC ch.%d constant = %02x\n", m_index, data)); // set the time constant (0 -> 0x100) m_tconst = data ? data : 0x100; @@ -423,7 +424,7 @@ void z80ctc_device::ctc_channel::write(UINT8 data) #endif { m_device->m_vector = data & 0xf8; - logerror("CTC Vector = %02x\n", m_device->m_vector); + VPRINTF_CHANNEL(("CTC Vector = %02x\n", m_device->m_vector)); } // this must be a control word @@ -431,7 +432,7 @@ void z80ctc_device::ctc_channel::write(UINT8 data) { // set the new mode m_mode = data; - VPRINTF(("CTC ch.%d mode = %02x\n", m_index, data)); + VPRINTF_CHANNEL(("CTC ch.%d mode = %02x\n", m_index, data)); // if we're being reset, clear out any pending timers for this channel if ((data & RESET) == RESET_ACTIVE) @@ -465,7 +466,7 @@ void z80ctc_device::ctc_channel::trigger(UINT8 data) if ((m_mode & WAITING_FOR_TRIG) && (m_mode & MODE) == MODE_TIMER) { attotime curperiod = period(); - VPRINTF(("CTC period %s\n", curperiod.as_string())); + VPRINTF_CHANNEL(("CTC period %s\n", curperiod.as_string())); m_timer->adjust(curperiod, m_index, curperiod); } @@ -495,7 +496,7 @@ void z80ctc_device::ctc_channel::timer_callback() if ((m_mode & INTERRUPT) == INTERRUPT_ON) { m_int_state |= Z80_DAISY_INT; - VPRINTF(("CTC timer ch%d\n", m_index)); + VPRINTF_CHANNEL(("CTC timer ch%d\n", m_index)); m_device->interrupt_check(); } diff --git a/src/devices/machine/z80pio.c b/src/devices/machine/z80pio.c index 6463adc8fb7..e04727bf664 100644 --- a/src/devices/machine/z80pio.c +++ b/src/devices/machine/z80pio.c @@ -360,7 +360,7 @@ void z80pio_device::pio_port::reset() void z80pio_device::pio_port::trigger_interrupt() { m_ip = true; - if (LOG) logerror("Z80PIO '%s' Port %c Transfer Mode Interrupt Pending\n", m_device->tag(), 'A' + m_index); + if (LOG) m_device->logerror("Z80PIO '%s' Port %c Transfer Mode Interrupt Pending\n", m_device->tag(), 'A' + m_index); check_interrupts(); } @@ -374,7 +374,7 @@ void z80pio_device::pio_port::set_rdy(bool state) { if (m_rdy == state) return; - if (LOG) logerror("Z80PIO '%s' Port %c Ready: %u\n", m_device->tag(), 'A' + m_index, state); + if (LOG) m_device->logerror("Z80PIO '%s' Port %c Ready: %u\n", m_device->tag(), 'A' + m_index, state); m_rdy = state; if (m_index == PORT_A) @@ -390,7 +390,7 @@ void z80pio_device::pio_port::set_rdy(bool state) void z80pio_device::pio_port::set_mode(int mode) { - if (LOG) logerror("Z80PIO '%s' Port %c Mode: %u\n", m_device->tag(), 'A' + m_index, mode); + if (LOG) m_device->logerror("Z80PIO '%s' Port %c Mode: %u\n", m_device->tag(), 'A' + m_index, mode); switch (mode) { @@ -416,7 +416,7 @@ void z80pio_device::pio_port::set_mode(int mode) case MODE_BIDIRECTIONAL: if (m_index == PORT_B) { - logerror("Z80PIO '%s' Port %c Invalid Mode: %u!\n", m_device->tag(), 'A' + m_index, mode); + m_device->logerror("Z80PIO '%s' Port %c Invalid Mode: %u!\n", m_device->tag(), 'A' + m_index, mode); } else { @@ -455,7 +455,7 @@ void z80pio_device::pio_port::set_mode(int mode) void z80pio_device::pio_port::strobe(bool state) { - if (LOG) logerror("Z80PIO '%s' Port %c Strobe: %u\n", m_device->tag(), 'A' + m_index, state); + if (LOG) m_device->logerror("Z80PIO '%s' Port %c Strobe: %u\n", m_device->tag(), 'A' + m_index, state); if (m_device->m_port[PORT_A].m_mode == MODE_BIDIRECTIONAL) { @@ -573,7 +573,7 @@ void z80pio_device::pio_port::write(UINT8 data) { // trigger interrupt m_ip = true; - if (LOG) logerror("Z80PIO '%s' Port %c Bit Control Mode Interrupt Pending\n", m_device->tag(), 'A' + m_index); + if (LOG) m_device->logerror("Z80PIO '%s' Port %c Bit Control Mode Interrupt Pending\n", m_device->tag(), 'A' + m_index); } m_match = match; @@ -596,7 +596,7 @@ void z80pio_device::pio_port::control_write(UINT8 data) { // load interrupt vector m_vector = data; - if (LOG) logerror("Z80PIO '%s' Port %c Interrupt Vector: %02x\n", m_device->tag(), 'A' + m_index, data); + if (LOG) m_device->logerror("Z80PIO '%s' Port %c Interrupt Vector: %02x\n", m_device->tag(), 'A' + m_index, data); // set interrupt enable m_icw |= ICW_ENABLE_INT; @@ -616,10 +616,10 @@ void z80pio_device::pio_port::control_write(UINT8 data) if (LOG) { - logerror("Z80PIO '%s' Port %c Interrupt Enable: %u\n", m_device->tag(), 'A' + m_index, BIT(data, 7)); - logerror("Z80PIO '%s' Port %c Logic: %s\n", m_device->tag(), 'A' + m_index, BIT(data, 6) ? "AND" : "OR"); - logerror("Z80PIO '%s' Port %c Active %s\n", m_device->tag(), 'A' + m_index, BIT(data, 5) ? "High" : "Low"); - logerror("Z80PIO '%s' Port %c Mask Follows: %u\n", m_device->tag(), 'A' + m_index, BIT(data, 4)); + m_device->logerror("Z80PIO '%s' Port %c Interrupt Enable: %u\n", m_device->tag(), 'A' + m_index, BIT(data, 7)); + m_device->logerror("Z80PIO '%s' Port %c Logic: %s\n", m_device->tag(), 'A' + m_index, BIT(data, 6) ? "AND" : "OR"); + m_device->logerror("Z80PIO '%s' Port %c Active %s\n", m_device->tag(), 'A' + m_index, BIT(data, 5) ? "High" : "Low"); + m_device->logerror("Z80PIO '%s' Port %c Mask Follows: %u\n", m_device->tag(), 'A' + m_index, BIT(data, 4)); } if (m_icw & ICW_MASK_FOLLOWS) @@ -647,7 +647,7 @@ void z80pio_device::pio_port::control_write(UINT8 data) case 0x03: // set interrupt enable flip-flop m_icw = (data & 0x80) | (m_icw & 0x7f); - if (LOG) logerror("Z80PIO '%s' Port %c Interrupt Enable: %u\n", m_device->tag(), 'A' + m_index, BIT(data, 7)); + if (LOG) m_device->logerror("Z80PIO '%s' Port %c Interrupt Enable: %u\n", m_device->tag(), 'A' + m_index, BIT(data, 7)); // set interrupt enable m_ie = BIT(m_icw, 7) ? true : false; @@ -655,14 +655,14 @@ void z80pio_device::pio_port::control_write(UINT8 data) break; default: - logerror("Z80PIO '%s' Port %c Invalid Control Word: %02x!\n", m_device->tag(), 'A' + m_index, data); + m_device->logerror("Z80PIO '%s' Port %c Invalid Control Word: %02x!\n", m_device->tag(), 'A' + m_index, data); } } break; case IOR: // data direction register m_ior = data; - if (LOG) logerror("Z80PIO '%s' Port %c IOR: %02x\n", m_device->tag(), 'A' + m_index, data); + if (LOG) m_device->logerror("Z80PIO '%s' Port %c IOR: %02x\n", m_device->tag(), 'A' + m_index, data); // set interrupt enable m_ie = BIT(m_icw, 7) ? true : false; @@ -674,7 +674,7 @@ void z80pio_device::pio_port::control_write(UINT8 data) case MASK: // interrupt mask m_mask = data; - if (LOG) logerror("Z80PIO '%s' Port %c Mask: %02x\n", m_device->tag(), 'A' + m_index, data); + if (LOG) m_device->logerror("Z80PIO '%s' Port %c Mask: %02x\n", m_device->tag(), 'A' + m_index, data); // set interrupt enable m_ie = BIT(m_icw, 7) ? true : false; diff --git a/src/devices/machine/z80scc.c b/src/devices/machine/z80scc.c index 91221c8d339..1abc94fec86 100644 --- a/src/devices/machine/z80scc.c +++ b/src/devices/machine/z80scc.c @@ -73,7 +73,7 @@ TODO: #include "z80scc.h" //************************************************************************** -// MACROS / CONSTANTS +// MACROS / CONSTANTS //************************************************************************** #define VERBOSE 0 @@ -89,11 +89,11 @@ TODO: #define FUNCNAME __PRETTY_FUNCTION__ #endif -#define CHANA_TAG "cha" -#define CHANB_TAG "chb" +#define CHANA_TAG "cha" +#define CHANB_TAG "chb" //************************************************************************** -// DEVICE DEFINITIONS +// DEVICE DEFINITIONS //************************************************************************** // device type definition const device_type Z80SCC = &device_creator<z80scc_device>; @@ -108,7 +108,7 @@ const device_type SCC85233 = &device_creator<scc85233_device>; const device_type SCC8523L = &device_creator<scc8523L_device>; //------------------------------------------------- -// device_mconfig_additions - +// device_mconfig_additions - //------------------------------------------------- MACHINE_CONFIG_FRAGMENT( z80scc ) MCFG_DEVICE_ADD(CHANA_TAG, Z80SCC_CHANNEL, 0) @@ -121,11 +121,11 @@ machine_config_constructor z80scc_device::device_mconfig_additions() const } //************************************************************************** -// LIVE DEVICE +// LIVE DEVICE //************************************************************************** //------------------------------------------------- -// z80scc_device - constructor +// z80scc_device - constructor //------------------------------------------------- z80scc_device::z80scc_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, UINT32 variant, const char *shortname, const char *source) @@ -213,7 +213,7 @@ scc8523L_device::scc8523L_device(const machine_config &mconfig, const char *tag, : z80scc_device(mconfig, SCC8523L, "SCC 8523L", tag, owner, clock, TYPE_SCC8523L, "scc8523L", __FILE__){ } //------------------------------------------------- -// device_start - device-specific startup +// device_start - device-specific startup //------------------------------------------------- void z80scc_device::device_start() @@ -252,7 +252,7 @@ void z80scc_device::device_start() //------------------------------------------------- -// device_reset - device-specific reset +// device_reset - device-specific reset //------------------------------------------------- void z80scc_device::device_reset() @@ -269,7 +269,7 @@ Each of the SCC's two channels contain three sources of interrupts, making a tot sources. These three sources of interrupts are: 1) Receiver, 2) Transmitter, and 3) External/Status conditions. In addition, there are several conditions that may cause these interrupts.*/ //------------------------------------------------- -// z80daisy_irq_state - get interrupt status +// z80daisy_irq_state - get interrupt status //------------------------------------------------- int z80scc_device::z80daisy_irq_state() @@ -278,8 +278,8 @@ int z80scc_device::z80daisy_irq_state() int i; LOG(("%s %s A:%d%d%d B:%d%d%d ",FUNCNAME, tag(), - m_int_state[0], m_int_state[1], m_int_state[2], - m_int_state[3], m_int_state[4], m_int_state[5])); + m_int_state[0], m_int_state[1], m_int_state[2], + m_int_state[3], m_int_state[4], m_int_state[5])); // loop over all interrupt sources for (i = 0; i < 6; i++) @@ -300,7 +300,7 @@ int z80scc_device::z80daisy_irq_state() //------------------------------------------------- -// z80daisy_irq_ack - interrupt acknowledge +// z80daisy_irq_ack - interrupt acknowledge //------------------------------------------------- int z80scc_device::z80daisy_irq_ack() @@ -333,7 +333,7 @@ int z80scc_device::z80daisy_irq_ack() //------------------------------------------------- -// z80daisy_irq_reti - return from interrupt +// z80daisy_irq_reti - return from interrupt //------------------------------------------------- void z80scc_device::z80daisy_irq_reti() @@ -360,7 +360,7 @@ void z80scc_device::z80daisy_irq_reti() //------------------------------------------------- -// check_interrupts - +// check_interrupts - //------------------------------------------------- void z80scc_device::check_interrupts() @@ -372,7 +372,7 @@ void z80scc_device::check_interrupts() //------------------------------------------------- -// reset_interrupts - +// reset_interrupts - //------------------------------------------------- void z80scc_device::reset_interrupts() @@ -394,24 +394,24 @@ UINT8 z80scc_device::modify_vector(UINT8 vec, int i, UINT8 src) Interrupt Vector Modification V3 V2 V1 Status High/Status Low =0 V4 V5 V6 Status High/Status Low =1 - 0 0 0 Ch B Transmit Buffer Empty - 0 0 1 Ch B External/Status Change - 0 1 0 Ch B Receive Char. Available - 0 1 1 Ch B Special Receive Condition - 1 0 0 Ch A Transmit Buffer Empty - 1 0 1 Ch A External/Status Change - 1 1 0 Ch A Receive Char. Available - 1 1 1 Ch A Special Receive Condition + 0 0 0 Ch B Transmit Buffer Empty + 0 0 1 Ch B External/Status Change + 0 1 0 Ch B Receive Char. Available + 0 1 1 Ch B Special Receive Condition + 1 0 0 Ch A Transmit Buffer Empty + 1 0 1 Ch A External/Status Change + 1 1 0 Ch A Receive Char. Available + 1 1 1 Ch A Special Receive Condition */ // Add channel offset according to table above - src |= (i == CHANNEL_A ? 0x04 : 0x00 ); + src |= (i == CHANNEL_A ? 0x04 : 0x00 ); // Modify vector according to Hi/lo bit of WR9 if (m_chanA->m_wr9 & z80scc_channel::WR9_BIT_SHSL) // Affect V4-V6 { vec |= src << 4; } - else // Affect V1-V3 + else // Affect V1-V3 { vec |= src << 1; } @@ -420,7 +420,7 @@ UINT8 z80scc_device::modify_vector(UINT8 vec, int i, UINT8 src) //------------------------------------------------- -// trigger_interrupt - +// trigger_interrupt - //------------------------------------------------- void z80scc_device::trigger_interrupt(int index, int state) { @@ -438,7 +438,7 @@ void z80scc_device::trigger_interrupt(int index, int state) LOG(("Master Interrupt Enable is not set, blocking attempt to interrupt\n")); return; } - + switch(state) { case z80scc_channel::INT_RECEIVE: @@ -477,13 +477,13 @@ void z80scc_device::trigger_interrupt(int index, int state) logerror("Attempt to trigger interrupt of unknown origin blocked: %02x on channel %c\n", state, 'A' + index); return; } - + // Vector modification requested? if (m_chanA->m_wr9 & z80scc_channel::WR9_BIT_VIS) { vector = modify_vector(vector, index, source); } - + //LOG(("Z80SCC \"%s\": %c : Interrupt Request %u\n", tag(), 'A' + index, state)); // update vector register // TODO: What if interrupts are nested? May we loose the modified vector or even get the wrong one? @@ -500,20 +500,20 @@ void z80scc_device::trigger_interrupt(int index, int state) */ // Add channel offset to priority according to table above priority = prio_level + (index == CHANNEL_A ? 3 : 0 ); - + // trigger interrupt m_int_state[priority] |= Z80_DAISY_INT; - + // Based on the fact that prio levels are aligned with the bitorder of rr3 we can do this... m_chanA->m_rr3 |= (prio_level << (index == CHANNEL_A ? 3 : 0 )); - + // check for interrupt check_interrupts(); } //------------------------------------------------- -// m1_r - interrupt acknowledge +// m1_r - interrupt acknowledge //------------------------------------------------- int z80scc_device::m1_r() @@ -523,7 +523,7 @@ int z80scc_device::m1_r() //------------------------------------------------- -// cd_ba_r - Universal Bus read +// cd_ba_r - Universal Bus read //------------------------------------------------- READ8_MEMBER( z80scc_device::cd_ba_r ) { @@ -537,28 +537,28 @@ READ8_MEMBER( z80scc_device::cd_ba_r ) logerror("Z80SCC cd_ba_r not supported by this device variant, you should probably use combinations of c*_r/w and d*_r/w (see z80scc.h)\n"); return 0; } - - // LOG(("z80scc_device::cd_ba_r ba:%02x cd:%02x\n", ba, cd)); + + // LOG(("z80scc_device::cd_ba_r ba:%02x cd:%02x\n", ba, cd)); return cd ? channel->control_read() : channel->data_read(); } //------------------------------------------------- -// cd_ba_w - Universal Bus write +// cd_ba_w - Universal Bus write //------------------------------------------------- WRITE8_MEMBER( z80scc_device::cd_ba_w ) { int ba = BIT(offset, 0); int cd = BIT(offset, 1); z80scc_channel *channel = ba ? m_chanB : m_chanA; - + /* Expell non-Universal Bus variants */ if ( !(m_variant & SET_Z85X3X) ) { logerror("Z80SCC cd_ba_w not supported by this device variant, you should probably use combinations of c*_r/w and d*_r/w (see z80scc.h)\n"); return; } - - // LOG(("z80scc_device::cd_ba_w ba:%02x cd:%02x\n", ba, cd)); + + // LOG(("z80scc_device::cd_ba_w ba:%02x cd:%02x\n", ba, cd)); if (cd) channel->control_write(data); else @@ -567,7 +567,7 @@ WRITE8_MEMBER( z80scc_device::cd_ba_w ) //------------------------------------------------- -// ba_cd_r - Universal Bus read +// ba_cd_r - Universal Bus read //------------------------------------------------- READ8_MEMBER( z80scc_device::ba_cd_r ) @@ -575,21 +575,21 @@ READ8_MEMBER( z80scc_device::ba_cd_r ) int ba = BIT(offset, 1); int cd = BIT(offset, 0); z80scc_channel *channel = ba ? m_chanB : m_chanA; - + /* Expell non-Universal Bus variants */ if ( !(m_variant & SET_Z85X3X) ) { logerror("Z80SCC ba_cd_r not supported by this device variant, you should probably use combinations of c*_r/w and d*_r/w (see z80scc.h)\n"); return 0; } - - // LOG(("z80scc_device::ba_cd_r ba:%02x cd:%02x\n", ba, cd)); + + // LOG(("z80scc_device::ba_cd_r ba:%02x cd:%02x\n", ba, cd)); return cd ? channel->control_read() : channel->data_read(); } //------------------------------------------------- -// ba_cd_w - +// ba_cd_w - //------------------------------------------------- WRITE8_MEMBER( z80scc_device::ba_cd_w ) @@ -597,14 +597,14 @@ WRITE8_MEMBER( z80scc_device::ba_cd_w ) int ba = BIT(offset, 1); int cd = BIT(offset, 0); z80scc_channel *channel = ba ? m_chanB : m_chanA; - + /* Expell non-Universal Bus variants */ if ( !(m_variant & SET_Z85X3X) ) { logerror("Z80SCC ba_cd_w not supported by this device variant, you should probably use combinations of c*_r/w and d*_r/w (see z80scc.h)\n"); return; } - + LOG(("z80scc_device::ba_cd_w ba:%02x cd:%02x\n", ba, cd)); if (cd) @@ -614,11 +614,11 @@ WRITE8_MEMBER( z80scc_device::ba_cd_w ) } //************************************************************************** -// SCC CHANNEL +// SCC CHANNEL //************************************************************************** //------------------------------------------------- -// SCC_channel - constructor +// SCC_channel - constructor //------------------------------------------------- z80scc_channel::z80scc_channel(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) @@ -641,11 +641,11 @@ z80scc_channel::z80scc_channel(const machine_config &mconfig, const char *tag, d LOG(("%s\n",FUNCNAME)); // Reset all registers - m_rr0 = m_rr1 = m_rr2 = m_rr3 = m_rr4 = m_rr5 = m_rr6 = m_rr7 = m_rr8 + m_rr0 = m_rr1 = m_rr2 = m_rr3 = m_rr4 = m_rr5 = m_rr6 = m_rr7 = m_rr8 = m_rr9 = m_rr10 = m_rr11 = m_rr12 = m_rr13 = m_rr14 = m_rr15 = 0; - m_wr0 = m_wr1 = m_wr2 = m_wr3 = m_wr4 = m_wr5 = m_wr6 = m_wr7 = m_wr8 + m_wr0 = m_wr1 = m_wr2 = m_wr3 = m_wr4 = m_wr5 = m_wr6 = m_wr7 = m_wr8 = m_wr9 = m_wr10 = m_wr11 = m_wr12 = m_wr13 = m_wr14 = m_wr15 = 0; - + for (int i = 0; i < 3; i++) // TODO adapt to SCC fifos { m_rx_data_fifo[i] = 0; @@ -655,7 +655,7 @@ z80scc_channel::z80scc_channel(const machine_config &mconfig, const char *tag, d //------------------------------------------------- -// start - channel startup +// start - channel startup //------------------------------------------------- void z80scc_channel::device_start() @@ -665,10 +665,10 @@ void z80scc_channel::device_start() m_index = m_uart->get_channel_index(this); m_uart->m_wr0_ptrbits = 0; - + m_rx_fifo_sz = (m_uart->m_variant & SET_ESCC) ? 8 : 3; m_rx_fifo_wp = m_rx_fifo_rp = 0; - + // state saving save_item(NAME(m_rr0)); save_item(NAME(m_rr1)); @@ -725,7 +725,7 @@ void z80scc_channel::device_start() //------------------------------------------------- -// reset - reset channel status +// reset - reset channel status //------------------------------------------------- void z80scc_channel::device_reset() @@ -737,24 +737,24 @@ void z80scc_channel::device_reset() transmit_register_reset(); // Soft/Channel Reset values according to SCC users manual - m_wr0 = 0x00; + m_wr0 = 0x00; m_wr1 &= 0x24; m_wr3 &= 0x01; m_wr4 |= 0x04; m_wr5 &= 0x61; if (m_uart->m_variant & (z80scc_device::TYPE_SCC85C30 | SET_ESCC)) m_wr7 = 0x20; - m_wr9 &= 0xdf; // WR9 has a different hard reset value + m_wr9 &= 0xdf; // WR9 has a different hard reset value m_wr10 &= 0x60; // WR10 has a different hard reset value m_wr11 &= 0xff; // WR11 has a different hard reset value m_wr14 &= 0xc3; // WR14 has a different hard reset value m_wr14 |= 0x20; - m_wr15 = 0xf8; + m_wr15 = 0xf8; m_rr0 &= 0xfc; m_rr0 |= 0x44; m_rr1 &= 0x07; m_rr1 |= 0x06; - m_rr3 = 0x00; + m_rr3 = 0x00; m_rr10 &= 0x40; #if 1 // old reset code @@ -786,7 +786,7 @@ void z80scc_channel::device_timer(emu_timer &timer, device_timer_id id, int para //------------------------------------------------- -// tra_callback - +// tra_callback - //------------------------------------------------- void z80scc_channel::tra_callback() @@ -812,7 +812,7 @@ void z80scc_channel::tra_callback() else if (!is_transmit_register_empty()) { int db = transmit_register_get_data_bit(); - + LOG(("%" I64FMT "d %s() \"%s \"Channel %c transmit data bit %d m_wr5:%02x\n", machine().firstcpu->total_cycles(), FUNCNAME, m_owner->tag(), 'A' + m_index, db, m_wr5)); // transmit data if (m_index == z80scc_device::CHANNEL_A) @@ -829,7 +829,7 @@ void z80scc_channel::tra_callback() //------------------------------------------------- -// tra_complete - +// tra_complete - //------------------------------------------------- void z80scc_channel::tra_complete() @@ -880,7 +880,7 @@ void z80scc_channel::tra_complete() //------------------------------------------------- -// rcv_callback - +// rcv_callback - //------------------------------------------------- void z80scc_channel::rcv_callback() @@ -900,7 +900,7 @@ void z80scc_channel::rcv_callback() //------------------------------------------------- -// rcv_complete - +// rcv_complete - //------------------------------------------------- void z80scc_channel::rcv_complete() @@ -915,7 +915,7 @@ void z80scc_channel::rcv_complete() //------------------------------------------------- -// get_clock_mode - get clock divisor +// get_clock_mode - get clock divisor //------------------------------------------------- int z80scc_channel::get_clock_mode() @@ -924,10 +924,10 @@ int z80scc_channel::get_clock_mode() switch (m_wr4 & WR4_CLOCK_RATE_MASK) { - case WR4_CLOCK_RATE_X1: clocks = 1; break; - case WR4_CLOCK_RATE_X16: clocks = 16; break; - case WR4_CLOCK_RATE_X32: clocks = 32; break; - case WR4_CLOCK_RATE_X64: clocks = 64; break; + case WR4_CLOCK_RATE_X1: clocks = 1; break; + case WR4_CLOCK_RATE_X16: clocks = 16; break; + case WR4_CLOCK_RATE_X32: clocks = 32; break; + case WR4_CLOCK_RATE_X64: clocks = 64; break; } return clocks; @@ -955,7 +955,7 @@ void z80scc_channel::set_rts(int state) void z80scc_channel::update_rts() { -// LOG(("%s(%d) \"%s\": %c \n", FUNCNAME, state, m_owner->tag(), 'A' + m_index)); +// LOG(("%s(%d) \"%s\": %c \n", FUNCNAME, state, m_owner->tag(), 'A' + m_index)); if (m_wr5 & WR5_RTS) { // when the RTS bit is set, the _RTS output goes low @@ -973,7 +973,7 @@ void z80scc_channel::update_rts() } //------------------------------------------------- -// get_stop_bits - get number of stop bits +// get_stop_bits - get number of stop bits //------------------------------------------------- device_serial_interface::stop_bits_t z80scc_channel::get_stop_bits() @@ -990,7 +990,7 @@ device_serial_interface::stop_bits_t z80scc_channel::get_stop_bits() //------------------------------------------------- -// get_rx_word_length - get receive word length +// get_rx_word_length - get receive word length //------------------------------------------------- int z80scc_channel::get_rx_word_length() @@ -999,10 +999,10 @@ int z80scc_channel::get_rx_word_length() switch (m_wr3 & WR3_RX_WORD_LENGTH_MASK) { - case WR3_RX_WORD_LENGTH_5: bits = 5; break; - case WR3_RX_WORD_LENGTH_6: bits = 6; break; - case WR3_RX_WORD_LENGTH_7: bits = 7; break; - case WR3_RX_WORD_LENGTH_8: bits = 8; break; + case WR3_RX_WORD_LENGTH_5: bits = 5; break; + case WR3_RX_WORD_LENGTH_6: bits = 6; break; + case WR3_RX_WORD_LENGTH_7: bits = 7; break; + case WR3_RX_WORD_LENGTH_8: bits = 8; break; } return bits; @@ -1010,7 +1010,7 @@ int z80scc_channel::get_rx_word_length() //------------------------------------------------- -// get_tx_word_length - get transmit word length +// get_tx_word_length - get transmit word length //------------------------------------------------- int z80scc_channel::get_tx_word_length() @@ -1019,10 +1019,10 @@ int z80scc_channel::get_tx_word_length() switch (m_wr5 & WR5_TX_WORD_LENGTH_MASK) { - case WR5_TX_WORD_LENGTH_5: bits = 5; break; - case WR5_TX_WORD_LENGTH_6: bits = 6; break; - case WR5_TX_WORD_LENGTH_7: bits = 7; break; - case WR5_TX_WORD_LENGTH_8: bits = 8; break; + case WR5_TX_WORD_LENGTH_5: bits = 5; break; + case WR5_TX_WORD_LENGTH_6: bits = 6; break; + case WR5_TX_WORD_LENGTH_7: bits = 7; break; + case WR5_TX_WORD_LENGTH_8: bits = 8; break; } return bits; @@ -1231,7 +1231,7 @@ UINT8 z80scc_channel::do_sccreg_rr15() } //------------------------------------------------- -// control_read - read control register +// control_read - read control register //------------------------------------------------- UINT8 z80scc_channel::control_read() { @@ -1239,7 +1239,7 @@ UINT8 z80scc_channel::control_read() int reg = m_uart->m_wr0_ptrbits; //m_wr0; int regmask = (WR0_REGISTER_MASK | (m_uart->m_wr0_ptrbits & WR0_POINT_HIGH)); - // LOG(("%s(%02x) reg %02x, regmask %02x, WR0 %02x\n", __func__, data, reg, regmask, m_wr0)); + // LOG(("%s(%02x) reg %02x, regmask %02x, WR0 %02x\n", __func__, data, reg, regmask, m_wr0)); m_uart->m_wr0_ptrbits = 0; reg &= regmask; @@ -1252,23 +1252,23 @@ UINT8 z80scc_channel::control_read() /* TODO. Sort out 80X30 limitations in register access */ switch (reg) { - case REG_RR0_STATUS: data = do_sccreg_rr0(); break; // TODO: verify handling of SCC specific bits: D6 and D1 - case REG_RR1_SPEC_RCV_COND: data = do_sccreg_rr1(); break; + case REG_RR0_STATUS: data = do_sccreg_rr0(); break; // TODO: verify handling of SCC specific bits: D6 and D1 + case REG_RR1_SPEC_RCV_COND: data = do_sccreg_rr1(); break; case REG_RR2_INTERRUPT_VECT: data = do_sccreg_rr2(); break; // Channel dependent and SCC specific handling compared to SIO /* registers 3-7 are specific to SCC. TODO: Check variant and log/stop misuse */ case REG_RR3_INTERUPPT_PEND: data = do_sccreg_rr3(); break; - case REG_RR4_WR4_OR_RR0: data = do_sccreg_rr4(); break; - case REG_RR5_WR5_OR_RR0: data = do_sccreg_rr5(); break; - case REG_RR6_LSB_OR_RR2: data = do_sccreg_rr6(); break; - case REG_RR7_MSB_OR_RR3: data = do_sccreg_rr7(); break; + case REG_RR4_WR4_OR_RR0: data = do_sccreg_rr4(); break; + case REG_RR5_WR5_OR_RR0: data = do_sccreg_rr5(); break; + case REG_RR6_LSB_OR_RR2: data = do_sccreg_rr6(); break; + case REG_RR7_MSB_OR_RR3: data = do_sccreg_rr7(); break; /* registers 8-15 are specific to SCC */ - case REG_RR8_RECEIVE_DATA: data = data_read(); break; - case REG_RR9_WR3_OR_RR13: data = do_sccreg_rr9(); break; - case REG_RR10_MISC_STATUS: data = do_sccreg_rr10(); break; - case REG_RR11_WR10_OR_RR15: data = do_sccreg_rr11(); break; + case REG_RR8_RECEIVE_DATA: data = data_read(); break; + case REG_RR9_WR3_OR_RR13: data = do_sccreg_rr9(); break; + case REG_RR10_MISC_STATUS: data = do_sccreg_rr10(); break; + case REG_RR11_WR10_OR_RR15: data = do_sccreg_rr11(); break; case REG_RR12_LO_TIME_CONST: data = do_sccreg_rr12(); break; case REG_RR13_HI_TIME_CONST: data = do_sccreg_rr13(); break; - case REG_RR14_WR7_OR_R10: data = do_sccreg_rr14(); break; + case REG_RR14_WR7_OR_R10: data = do_sccreg_rr14(); break; case REG_RR15_WR15_EXT_STAT: data = do_sccreg_rr15(); break; default: logerror("Z80SCC \"%s\" %s: %c : Unsupported RRx register:%02x\n", m_owner->tag(), __func__, 'A' + m_index, reg); @@ -1308,7 +1308,7 @@ void z80scc_channel::do_sccreg_wr0(UINT8 data) m_wr0 = data; m_uart->m_wr0_ptrbits = data & WR0_REGISTER_MASK; - /* Sort out SCC specific behaviours from legacy SIO behaviour */ + /* Sort out SCC specific behaviours from legacy SIO behaviour */ /* WR0_Z_* are Z80X30 specific commands */ switch (data & WR0_COMMAND_MASK) { @@ -1340,7 +1340,7 @@ void z80scc_channel::do_sccreg_wr0(UINT8 data) External/Status interrupt. However, if this second status change does not persist (there are two transitions), another interrupt is not generated. Exceptions to this rule are detailed in the RR0 description.*/ - // do_sccreg_wr0(data); + // do_sccreg_wr0(data); if (!m_zc) { m_rr0 |= RR0_ZC; @@ -1441,21 +1441,21 @@ void z80scc_channel::do_sccreg_wr1(UINT8 data) LOG(("- Wait/Ready Enable %u\n", (data & WR1_WRDY_ENABLE) ? 1 : 0)); LOG(("- Wait/Ready Function %s\n", (data & WR1_WRDY_FUNCTION) ? "Ready" : "Wait")); LOG(("- Wait/Ready on %s\n", (data & WR1_WRDY_ON_RX_TX) ? "Receive" : "Transmit")); - + switch (data & WR1_RX_INT_MODE_MASK) { case WR1_RX_INT_DISABLE: LOG(("- Receiver Interrupt Disabled\n")); break; - + case WR1_RX_INT_FIRST: LOG(("- Receiver Interrupt on First Character\n")); break; - + case WR1_RX_INT_ALL_PARITY: LOG(("- Receiver Interrupt on All Characters, Parity Affects Vector\n")); break; - + case WR1_RX_INT_ALL: LOG(("- Receiver Interrupt on All Characters\n")); break; @@ -1472,7 +1472,7 @@ void z80scc_channel::do_sccreg_wr2(UINT8 data) m_wr2 = data; m_uart->m_chanA->m_rr2 = data; m_uart->m_chanB->m_rr2 = data; /* TODO: Sort out the setting of ChanB depending on bits in WR9 */ - + m_uart->check_interrupts(); } @@ -1589,13 +1589,13 @@ void z80scc_channel::do_sccreg_wr11(UINT8 data) /SYNC pin is unavailable for other use. The /SYNC signal is forced to zero internally. A hardware reset forces /NO XTAL. (At least 20 ms should be allowed after this bit is set to allow the oscillator to stabilize.)*/ - LOG((" Clock type %s\n", data & WR11_RCVCLK_TYPE ? "Crystal oscillator between RTxC and /SYNC pins" : "TTL level on RTxC pin")); + LOG((" Clock type %s\n", data & WR11_RCVCLK_TYPE ? "Crystal oscillator between RTxC and /SYNC pins" : "TTL level on RTxC pin")); /*Bits 6 and 5: Receiver Clock select bits 1 and 0 These bits determine the source of the receive clock as listed below. They do not interfere with any of the modes of operation in the SCC, but simply control a multiplexer just before the internal receive clock input. A hardware reset forces the receive clock to come from the /RTxC pin.*/ - LOG((" Receive clock source is: ")); + LOG((" Receive clock source is: ")); switch (data & WR11_RCVCLK_SRC_MASK) { case WR11_RCVCLK_SRC_RTXC: LOG(("RTxC\n")); break; @@ -1611,7 +1611,7 @@ void z80scc_channel::do_sccreg_wr11(UINT8 data) degrees the output of the DPLL used by the receiver. This makes the received and transmitted bit cells occur simultaneously, neglecting delays. A hardware reset selects the /TRxC pin as the source of the transmit clocks.*/ - LOG((" Transmit clock source is: ")); + LOG((" Transmit clock source is: ")); switch (data & WR11_TRACLK_SRC_MASK) { case WR11_TRACLK_SRC_RTXC: LOG(("RTxC\n")); break; @@ -1626,7 +1626,7 @@ void z80scc_channel::do_sccreg_wr11(UINT8 data) transmit clock is programmed to come from the /TRxC pin, /TRxC is an input, regardless of the state of this bit. The /TRxC pin is also an input if this bit is set to 0. A hardware reset forces this bit to 0.*/ - LOG((" TRxC pin is %s\n", data & WR11_TRXC_DIRECTION ? "Output" : "Input")); + LOG((" TRxC pin is %s\n", data & WR11_TRXC_DIRECTION ? "Output" : "Input")); /*Bits 1 and 0: /TRxC Output Source select bits 1 and 0 These bits determine the signal to be echoed out of the SCC via the /TRxC pin as listed in Table on page 167. No signal is produced if /TRxC has been programmed as the source of either the @@ -1634,7 +1634,7 @@ void z80scc_channel::do_sccreg_wr11(UINT8 data) If the XTAL oscillator output is programmed to be echoed, and the XTAL oscillator is not enabled, the /TRxC pin goes High. The DPLL signal that is echoed is the DPLL signal used by the receiver. Hardware reset selects the XTAL oscillator as the output source*/ - LOG((" TRxC clock source is: ")); + LOG((" TRxC clock source is: ")); switch (data & WR11_TRXSRC_SRC_MASK) { case WR11_TRXSRC_SRC_XTAL: LOG(("the Oscillator\n")); break; @@ -1656,9 +1656,9 @@ void z80scc_channel::do_sccreg_wr11(UINT8 data) the desired rate in bits per second and the BR clock period in seconds. This formula is derived because the counter decrements from N down to zero-plus-one-cycle for reloading the time constant. This is then fed to a toggle flip-flop to make the output a square wave. - + Time Constant = Clock Frequency / (2 * Desired Rate * Baud Rate Clock Period) - 2 - + */ void z80scc_channel::do_sccreg_wr12(UINT8 data) { @@ -1670,7 +1670,7 @@ void z80scc_channel::do_sccreg_wr12(UINT8 data) void z80scc_channel::do_sccreg_wr13(UINT8 data) { m_wr13 = data; - LOG(("Z80SCC \"%s\": %c : %s %02x High byte of Time Constant for Baudrate generator - not implemented \n", m_owner->tag(), 'A' + m_index, __func__, data)); + LOG(("Z80SCC \"%s\": %c : %s %02x High byte of Time Constant for Baudrate generator - not implemented \n", m_owner->tag(), 'A' + m_index, __func__, data)); } /* @@ -1743,14 +1743,14 @@ void z80scc_channel::do_sccreg_wr14(UINT8 data) interrupt. This is true, even if an External/Status condition is pending at the time the bit is set*/ void z80scc_channel::do_sccreg_wr15(UINT8 data) { - LOG(("%s(%d) \"%s\": %c : External/Status Control Bits - not implemented\n", - FUNCNAME, data, m_owner->tag(), 'A' + m_index)); + LOG(("%s(%d) \"%s\": %c : External/Status Control Bits - not implemented\n", + FUNCNAME, data, m_owner->tag(), 'A' + m_index)); m_wr15 = data; } /*TODO: Z80X30 Register Access ---------------------------- -The Shift Right/Shift Left bit in the Channel B WR0 controls which bits are decoded to form the register +The Shift Right/Shift Left bit in the Channel B WR0 controls which bits are decoded to form the register address. See do_sccreg_wr0() for details */ /*Z85X30 Register Access @@ -1771,7 +1771,7 @@ The fact that the pointer bits are reset to 0, unless explicitly set otherwise, RR0 may also be accessed in a single cycle. That is, it is not necessary to write the pointer bits with 0 before accessing WR0 or RR0.*/ //------------------------------------------------- -// control_write - write control register +// control_write - write control register //------------------------------------------------- void z80scc_channel::control_write(UINT8 data) @@ -1782,21 +1782,21 @@ void z80scc_channel::control_write(UINT8 data) m_uart->m_wr0_ptrbits = 0; // The "Point High" command is only valid for one access reg &= regmask; - + if (reg != 0) { // mask out register index m_wr0 &= ~regmask; } - + LOG(("\n%s(%02x) reg %02x, regmask %02x\n", FUNCNAME, data, reg, regmask)); - + /* TODO. Sort out 80X30 & other SCC variants limitations in register access */ switch (reg) { - case REG_WR0_COMMAND_REGPT: do_sccreg_wr0(data); ;break; + case REG_WR0_COMMAND_REGPT: do_sccreg_wr0(data); ;break; case REG_WR1_INT_DMA_ENABLE: do_sccreg_wr1(data); m_uart->check_interrupts(); break; - case REG_WR2_INT_VECTOR: do_sccreg_wr2(data); break; + case REG_WR2_INT_VECTOR: do_sccreg_wr2(data); break; case REG_WR3_RX_CONTROL: do_sccreg_wr3(data); update_serial(); @@ -1816,13 +1816,13 @@ void z80scc_channel::control_write(UINT8 data) break; case REG_WR6_SYNC_OR_SDLC_A: do_sccreg_wr6(data); break; case REG_WR7_SYNC_OR_SDLC_F: do_sccreg_wr7(data); break; - case REG_WR8_TRANSMIT_DATA: do_sccreg_wr8(data); break; + case REG_WR8_TRANSMIT_DATA: do_sccreg_wr8(data); break; case REG_WR9_MASTER_INT_CTRL: do_sccreg_wr9(data); break; case REG_WR10_MSC_RX_TX_CTRL: do_sccreg_wr10(data); break; - case REG_WR11_CLOCK_MODES: do_sccreg_wr11(data); break; - case REG_WR12_LO_BAUD_GEN: do_sccreg_wr12(data); break; - case REG_WR13_HI_BAUD_GEN: do_sccreg_wr13(data); break; - case REG_WR14_MISC_CTRL: do_sccreg_wr14(data); break; + case REG_WR11_CLOCK_MODES: do_sccreg_wr11(data); break; + case REG_WR12_LO_BAUD_GEN: do_sccreg_wr12(data); break; + case REG_WR13_HI_BAUD_GEN: do_sccreg_wr13(data); break; + case REG_WR14_MISC_CTRL: do_sccreg_wr14(data); break; case REG_WR15_EXT_ST_INT_CTRL:do_sccreg_wr15(data); break; default: logerror("Z80SCC \"%s\": %c : Unsupported WRx register:%02x\n", m_owner->tag(), 'A' + m_index, reg); @@ -1831,7 +1831,7 @@ void z80scc_channel::control_write(UINT8 data) //------------------------------------------------- -// data_read - read data register from fifo +// data_read - read data register from fifo //------------------------------------------------- UINT8 z80scc_channel::data_read() @@ -1855,13 +1855,13 @@ UINT8 z80scc_channel::data_read() FIFO to preserve the status, it is necessary to issue the Error Reset command to unlock it. Only the exit location of the FIFO is locked allowing more data to be received into the other bytes of the Receive FIFO.*/ - + // load data from the FIFO data = m_rx_fifo_rp_data(); - + // load error status from the FIFO m_rr1 = (m_rr1 & ~(RR1_CRC_FRAMING_ERROR | RR1_RX_OVERRUN_ERROR | RR1_PARITY_ERROR)) | m_rx_error_fifo[m_rx_fifo_rp]; - + // trigger interrup and lock the fifo if an error is present if (m_rr1 & (RR1_CRC_FRAMING_ERROR | RR1_RX_OVERRUN_ERROR | RR1_PARITY_ERROR)) { @@ -1925,13 +1925,13 @@ void z80scc_channel::m_rx_fifo_rp_step() } } -READ8_MEMBER (z80scc_device::da_r) { return m_chanA->data_read(); } +READ8_MEMBER (z80scc_device::da_r) { return m_chanA->data_read(); } WRITE8_MEMBER (z80scc_device::da_w) { m_chanA->data_write(data); } -READ8_MEMBER (z80scc_device::db_r) { return m_chanB->data_read(); } +READ8_MEMBER (z80scc_device::db_r) { return m_chanB->data_read(); } WRITE8_MEMBER (z80scc_device::db_w) { m_chanB->data_write(data); } //------------------------------------------------- -// data_write - write data register +// data_write - write data register //------------------------------------------------- void z80scc_channel::data_write(UINT8 data) { @@ -1962,7 +1962,7 @@ void z80scc_channel::data_write(UINT8 data) //------------------------------------------------- -// receive_data - receive data word into fifo +// receive_data - receive data word into fifo //------------------------------------------------- void z80scc_channel::receive_data(UINT8 data) @@ -2013,7 +2013,7 @@ void z80scc_channel::receive_data(UINT8 data) //------------------------------------------------- -// cts_w - clear to send handler +// cts_w - clear to send handler //------------------------------------------------- WRITE_LINE_MEMBER( z80scc_channel::cts_w ) @@ -2052,7 +2052,7 @@ WRITE_LINE_MEMBER( z80scc_channel::cts_w ) //------------------------------------------------- -// dcd_w - data carrier detected handler +// dcd_w - data carrier detected handler //------------------------------------------------- WRITE_LINE_MEMBER( z80scc_channel::dcd_w ) @@ -2090,7 +2090,7 @@ WRITE_LINE_MEMBER( z80scc_channel::dcd_w ) //------------------------------------------------- -// ri_w - ring indicator handler +// ri_w - ring indicator handler //------------------------------------------------- WRITE_LINE_MEMBER( z80scc_channel::ri_w ) @@ -2122,7 +2122,7 @@ WRITE_LINE_MEMBER( z80scc_channel::ri_w ) } //------------------------------------------------- -// sync_w - sync handler +// sync_w - sync handler //------------------------------------------------- WRITE_LINE_MEMBER( z80scc_channel::sync_w ) { @@ -2130,7 +2130,7 @@ WRITE_LINE_MEMBER( z80scc_channel::sync_w ) } //------------------------------------------------- -// rxc_w - receive clock +// rxc_w - receive clock //------------------------------------------------- WRITE_LINE_MEMBER( z80scc_channel::rxc_w ) { @@ -2143,17 +2143,17 @@ WRITE_LINE_MEMBER( z80scc_channel::rxc_w ) else if(state) { rx_clock_w(m_rx_clock < clocks/2); - + m_rx_clock++; if (m_rx_clock == clocks) m_rx_clock = 0; - + } } } //------------------------------------------------- -// txc_w - transmit clock +// txc_w - transmit clock //------------------------------------------------- WRITE_LINE_MEMBER( z80scc_channel::txc_w ) { @@ -2166,7 +2166,7 @@ WRITE_LINE_MEMBER( z80scc_channel::txc_w ) else if(state) { tx_clock_w(m_tx_clock < clocks/2); - + m_tx_clock++; if (m_tx_clock == clocks) m_tx_clock = 0; @@ -2175,7 +2175,7 @@ WRITE_LINE_MEMBER( z80scc_channel::txc_w ) } //------------------------------------------------- -// update_serial - +// update_serial - //------------------------------------------------- void z80scc_channel::update_serial() { @@ -2202,18 +2202,18 @@ void z80scc_channel::update_serial() if (m_rxc > 0) { set_rcv_rate(m_rxc / clocks); - LOG((" - Receiver clock: %d mode: %d rate: %d/%xh\n", m_rxc, clocks, m_rxc / clocks, m_rxc / clocks)); + LOG((" - Receiver clock: %d mode: %d rate: %d/%xh\n", m_rxc, clocks, m_rxc / clocks, m_rxc / clocks)); } if (m_txc > 0) { set_tra_rate(m_txc / clocks); - LOG((" - Transmit clock: %d mode: %d rate: %d/%xh\n", m_rxc, clocks, m_rxc / clocks, m_rxc / clocks)); + LOG((" - Transmit clock: %d mode: %d rate: %d/%xh\n", m_rxc, clocks, m_rxc / clocks, m_rxc / clocks)); } } //------------------------------------------------- -// set_dtr - +// set_dtr - //------------------------------------------------- void z80scc_channel::set_dtr(int state) { @@ -2229,8 +2229,8 @@ void z80scc_channel::set_dtr(int state) //------------------------------------------------- -// write_rx - called by terminal through rs232/diserial -// when character is sent to board +// write_rx - called by terminal through rs232/diserial +// when character is sent to board //------------------------------------------------- WRITE_LINE_MEMBER(z80scc_channel::write_rx) { diff --git a/src/devices/machine/z80scc.h b/src/devices/machine/z80scc.h index 5e21b85bff7..800a9dc3a0f 100644 --- a/src/devices/machine/z80scc.h +++ b/src/devices/machine/z80scc.h @@ -2,7 +2,7 @@ // copyright-holders:Joakim Larsson Edstrom /*************************************************************************** - Z80-SCC Serial Communications Controller emulation + Z80-SCC Serial Communications Controller emulation **************************************************************************** _____ _____ _____ _____ @@ -38,7 +38,7 @@ #include "cpu/z80/z80daisy.h" //************************************************************************** -// DEVICE CONFIGURATION MACROS +// DEVICE CONFIGURATION MACROS //************************************************************************** #define MCFG_Z80SCC_ADD(_tag, _clock, _rxa, _txa, _rxb, _txb) \ @@ -101,7 +101,7 @@ //************************************************************************** -// TYPE DEFINITIONS +// TYPE DEFINITIONS //************************************************************************** // ======================> z80scc_channel @@ -187,7 +187,7 @@ public: int m_txc; // Register state - // read registers enum + // read registers enum UINT8 m_rr0; // REG_RR0_STATUS UINT8 m_rr1; // REG_RR1_SPEC_RCV_COND UINT8 m_rr2; // REG_RR2_INTERRUPT_VECT @@ -197,7 +197,7 @@ public: UINT8 m_rr6; // REG_RR6_LSB_OR_RR2 UINT8 m_rr7; // REG_RR7_MSB_OR_RR3 UINT8 m_rr8; // REG_RR8_RECEIVE_DATA - UINT8 m_rr9; // REG_RR9_WR3_OR_RR13 + UINT8 m_rr9; // REG_RR9_WR3_OR_RR13 UINT8 m_rr10; // REG_RR10_MISC_STATUS UINT8 m_rr11; // REG_RR11_WR10_OR_RR15 UINT8 m_rr12; // REG_RR12_LO_TIME_CONST @@ -205,7 +205,7 @@ public: UINT8 m_rr14; // REG_RR14_WR7_OR_R10 UINT8 m_rr15; // REG_RR15_WR15_EXT_STAT - // write registers enum + // write registers enum UINT8 m_wr0; // REG_WR0_COMMAND_REGPT UINT8 m_wr1; // REG_WR1_INT_DMA_ENABLE UINT8 m_wr2; // REG_WR2_INT_VECTOR @@ -229,241 +229,241 @@ protected: { INT_TRANSMIT = 0, INT_EXTERNAL = 1, - INT_RECEIVE = 2, - INT_SPECIAL = 3 + INT_RECEIVE = 2, + INT_SPECIAL = 3 }; // Read registers enum { - REG_RR0_STATUS = 0, // SIO - REG_RR1_SPEC_RCV_COND = 1, // SIO - REG_RR2_INTERRUPT_VECT = 2, // SIO - REG_RR3_INTERUPPT_PEND = 3, - REG_RR4_WR4_OR_RR0 = 4, - REG_RR5_WR5_OR_RR0 = 5, - REG_RR6_LSB_OR_RR2 = 6, - REG_RR7_MSB_OR_RR3 = 7, - REG_RR8_RECEIVE_DATA = 8, - REG_RR9_WR3_OR_RR13 = 9, - REG_RR10_MISC_STATUS = 10, - REG_RR11_WR10_OR_RR15 = 11, - REG_RR12_LO_TIME_CONST = 12, - REG_RR13_HI_TIME_CONST = 13, - REG_RR14_WR7_OR_R10 = 14, - REG_RR15_WR15_EXT_STAT = 15 + REG_RR0_STATUS = 0, // SIO + REG_RR1_SPEC_RCV_COND = 1, // SIO + REG_RR2_INTERRUPT_VECT = 2, // SIO + REG_RR3_INTERUPPT_PEND = 3, + REG_RR4_WR4_OR_RR0 = 4, + REG_RR5_WR5_OR_RR0 = 5, + REG_RR6_LSB_OR_RR2 = 6, + REG_RR7_MSB_OR_RR3 = 7, + REG_RR8_RECEIVE_DATA = 8, + REG_RR9_WR3_OR_RR13 = 9, + REG_RR10_MISC_STATUS = 10, + REG_RR11_WR10_OR_RR15 = 11, + REG_RR12_LO_TIME_CONST = 12, + REG_RR13_HI_TIME_CONST = 13, + REG_RR14_WR7_OR_R10 = 14, + REG_RR15_WR15_EXT_STAT = 15 }; - + // Write registers enum { - REG_WR0_COMMAND_REGPT = 0, // SIO - REG_WR1_INT_DMA_ENABLE = 1, // SIO - REG_WR2_INT_VECTOR = 2, // SIO - REG_WR3_RX_CONTROL = 3, // SIO - REG_WR4_RX_TX_MODES = 4, // SIO - REG_WR5_TX_CONTROL = 5, // SIO - REG_WR6_SYNC_OR_SDLC_A = 6, // SIO - REG_WR7_SYNC_OR_SDLC_F = 7, // SIO - REG_WR8_TRANSMIT_DATA = 8, + REG_WR0_COMMAND_REGPT = 0, // SIO + REG_WR1_INT_DMA_ENABLE = 1, // SIO + REG_WR2_INT_VECTOR = 2, // SIO + REG_WR3_RX_CONTROL = 3, // SIO + REG_WR4_RX_TX_MODES = 4, // SIO + REG_WR5_TX_CONTROL = 5, // SIO + REG_WR6_SYNC_OR_SDLC_A = 6, // SIO + REG_WR7_SYNC_OR_SDLC_F = 7, // SIO + REG_WR8_TRANSMIT_DATA = 8, REG_WR9_MASTER_INT_CTRL = 9, REG_WR10_MSC_RX_TX_CTRL = 10, - REG_WR11_CLOCK_MODES = 11, - REG_WR12_LO_BAUD_GEN = 12, - REG_WR13_HI_BAUD_GEN = 13, - REG_WR14_MISC_CTRL = 14, + REG_WR11_CLOCK_MODES = 11, + REG_WR12_LO_BAUD_GEN = 12, + REG_WR13_HI_BAUD_GEN = 13, + REG_WR14_MISC_CTRL = 14, REG_WR15_EXT_ST_INT_CTRL= 15 }; enum { - RR0_RX_CHAR_AVAILABLE = 0x01, // SIO bit - RR0_ZC = 0x02, // SCC bit - RR0_TX_BUFFER_EMPTY = 0x04, // SIO - RR0_DCD = 0x08, // SIO - RR0_RI = 0x10, // DART bit? TODO: investigate function and remove - RR0_SYNC_HUNT = 0x10, // SIO bit, not supported - RR0_CTS = 0x20, // SIO bit - RR0_TX_UNDERRUN = 0x40, // SIO bit, not supported - RR0_BREAK_ABORT = 0x80 // SIO bit, not supported + RR0_RX_CHAR_AVAILABLE = 0x01, // SIO bit + RR0_ZC = 0x02, // SCC bit + RR0_TX_BUFFER_EMPTY = 0x04, // SIO + RR0_DCD = 0x08, // SIO + RR0_RI = 0x10, // DART bit? TODO: investigate function and remove + RR0_SYNC_HUNT = 0x10, // SIO bit, not supported + RR0_CTS = 0x20, // SIO bit + RR0_TX_UNDERRUN = 0x40, // SIO bit, not supported + RR0_BREAK_ABORT = 0x80 // SIO bit, not supported }; enum { - RR1_ALL_SENT = 0x01, // SIO/SCC bit - RR1_RESIDUE_CODE_MASK = 0x0e, // SIO/SCC bits, not supported - RR1_PARITY_ERROR = 0x10, // SIO/SCC bits - RR1_RX_OVERRUN_ERROR = 0x20, // SIO/SCC bits - RR1_CRC_FRAMING_ERROR = 0x40, // SIO/SCC bits - RR1_END_OF_FRAME = 0x80 // SIO/SCC bits, not supported + RR1_ALL_SENT = 0x01, // SIO/SCC bit + RR1_RESIDUE_CODE_MASK = 0x0e, // SIO/SCC bits, not supported + RR1_PARITY_ERROR = 0x10, // SIO/SCC bits + RR1_RX_OVERRUN_ERROR = 0x20, // SIO/SCC bits + RR1_CRC_FRAMING_ERROR = 0x40, // SIO/SCC bits + RR1_END_OF_FRAME = 0x80 // SIO/SCC bits, not supported }; enum - { // TODO: overload SIO functionality - RR2_INT_VECTOR_MASK = 0xff, // SCC channel A, SIO channel B (special case) - RR2_INT_VECTOR_V1 = 0x02, // SIO (special case) /SCC Channel B - RR2_INT_VECTOR_V2 = 0x04, // SIO (special case) /SCC Channel B - RR2_INT_VECTOR_V3 = 0x08 // SIO (special case) /SCC Channel B + { // TODO: overload SIO functionality + RR2_INT_VECTOR_MASK = 0xff, // SCC channel A, SIO channel B (special case) + RR2_INT_VECTOR_V1 = 0x02, // SIO (special case) /SCC Channel B + RR2_INT_VECTOR_V2 = 0x04, // SIO (special case) /SCC Channel B + RR2_INT_VECTOR_V3 = 0x08 // SIO (special case) /SCC Channel B }; - + enum { - RR3_CHANB_EXT_IP = 0x01, // SCC IP pending registers - RR3_CHANB_TX_IP = 0x02, // only read in Channel A (for both channels) - RR3_CHANB_RX_IP = 0x04, // channel B return all zero - RR3_CHANA_EXT_IP = 0x08, - RR3_CHANA_TX_IP = 0x10, - RR3_CHANA_RX_IP = 0x20 + RR3_CHANB_EXT_IP = 0x01, // SCC IP pending registers + RR3_CHANB_TX_IP = 0x02, // only read in Channel A (for both channels) + RR3_CHANB_RX_IP = 0x04, // channel B return all zero + RR3_CHANA_EXT_IP = 0x08, + RR3_CHANA_TX_IP = 0x10, + RR3_CHANA_RX_IP = 0x20 }; - + enum // Universal Bus WR0 commands for 85X30 { - WR0_REGISTER_MASK = 0x07, - WR0_COMMAND_MASK = 0x38, // COMMANDS - WR0_NULL = 0x00, // 0 0 0 - WR0_POINT_HIGH = 0x08, // 0 0 1 - WR0_RESET_EXT_STATUS = 0x10, // 0 1 0 - WR0_SEND_ABORT = 0x18, // 0 1 1 - WR0_ENABLE_INT_NEXT_RX = 0x20, // 1 0 0 - WR0_RESET_TX_INT = 0x28, // 1 0 1 - WR0_ERROR_RESET = 0x30, // 1 1 0 - WR0_RESET_HIGHEST_IUS = 0x38, // 1 1 1 - WR0_CRC_RESET_CODE_MASK = 0xc0, // RESET - WR0_CRC_RESET_NULL = 0x00, // 0 0 - WR0_CRC_RESET_RX = 0x40, // 0 1 - WR0_CRC_RESET_TX = 0x80, // 1 0 + WR0_REGISTER_MASK = 0x07, + WR0_COMMAND_MASK = 0x38, // COMMANDS + WR0_NULL = 0x00, // 0 0 0 + WR0_POINT_HIGH = 0x08, // 0 0 1 + WR0_RESET_EXT_STATUS = 0x10, // 0 1 0 + WR0_SEND_ABORT = 0x18, // 0 1 1 + WR0_ENABLE_INT_NEXT_RX = 0x20, // 1 0 0 + WR0_RESET_TX_INT = 0x28, // 1 0 1 + WR0_ERROR_RESET = 0x30, // 1 1 0 + WR0_RESET_HIGHEST_IUS = 0x38, // 1 1 1 + WR0_CRC_RESET_CODE_MASK = 0xc0, // RESET + WR0_CRC_RESET_NULL = 0x00, // 0 0 + WR0_CRC_RESET_RX = 0x40, // 0 1 + WR0_CRC_RESET_TX = 0x80, // 1 0 WR0_CRC_RESET_TX_UNDERRUN = 0xc0 // 1 1 }; enum // ZBUS WR0 commands or 80X30 { - WR0_Z_COMMAND_MASK = 0x38, // COMMANDS - WR0_Z_NULL_1 = 0x00, // 0 0 0 - WR0_Z_NULL_2 = 0x08, // 0 0 1 - WR0_Z_RESET_EXT_STATUS = 0x10, // 0 1 0 - WR0_Z_SEND_ABORT = 0x18, // 0 1 1 - WR0_Z_ENABLE_INT_NEXT_RX = 0x20, // 1 0 0 - WR0_Z_RESET_TX_INT = 0x28, // 1 0 1 - WR0_Z_ERROR_RESET = 0x30, // 1 1 0 - WR0_Z_RESET_HIGHEST_IUS = 0x38, // 1 1 1 - WR0_Z_SHIFT_MASK = 0x03, // SHIFT mode SDLC chan B - WR0_Z_SEL_SHFT_LEFT = 0x02, // 1 0 - WR0_Z_SEL_SHFT_RIGHT = 0x03 // 1 1 + WR0_Z_COMMAND_MASK = 0x38, // COMMANDS + WR0_Z_NULL_1 = 0x00, // 0 0 0 + WR0_Z_NULL_2 = 0x08, // 0 0 1 + WR0_Z_RESET_EXT_STATUS = 0x10, // 0 1 0 + WR0_Z_SEND_ABORT = 0x18, // 0 1 1 + WR0_Z_ENABLE_INT_NEXT_RX = 0x20, // 1 0 0 + WR0_Z_RESET_TX_INT = 0x28, // 1 0 1 + WR0_Z_ERROR_RESET = 0x30, // 1 1 0 + WR0_Z_RESET_HIGHEST_IUS = 0x38, // 1 1 1 + WR0_Z_SHIFT_MASK = 0x03, // SHIFT mode SDLC chan B + WR0_Z_SEL_SHFT_LEFT = 0x02, // 1 0 + WR0_Z_SEL_SHFT_RIGHT = 0x03 // 1 1 }; enum { - WR1_EXT_INT_ENABLE = 0x01, - WR1_TX_INT_ENABLE = 0x02, - WR1_PARITY_IS_SPEC_COND = 0x04, - WR1_RX_INT_MODE_MASK = 0x18, - WR1_RX_INT_DISABLE = 0x00, - WR1_RX_INT_FIRST = 0x08, - WR1_RX_INT_ALL_PARITY = 0x10, // not supported - WR1_RX_INT_ALL = 0x18, - WR1_WRDY_ON_RX_TX = 0x20, // not supported - WR1_WRDY_FUNCTION = 0x40, // not supported - WR1_WRDY_ENABLE = 0x80 // not supported + WR1_EXT_INT_ENABLE = 0x01, + WR1_TX_INT_ENABLE = 0x02, + WR1_PARITY_IS_SPEC_COND = 0x04, + WR1_RX_INT_MODE_MASK = 0x18, + WR1_RX_INT_DISABLE = 0x00, + WR1_RX_INT_FIRST = 0x08, + WR1_RX_INT_ALL_PARITY = 0x10, // not supported + WR1_RX_INT_ALL = 0x18, + WR1_WRDY_ON_RX_TX = 0x20, // not supported + WR1_WRDY_FUNCTION = 0x40, // not supported + WR1_WRDY_ENABLE = 0x80 // not supported }; enum { - WR3_RX_ENABLE = 0x01, + WR3_RX_ENABLE = 0x01, WR3_SYNC_CHAR_LOAD_INHIBIT= 0x02, // not supported - WR3_ADDRESS_SEARCH_MODE = 0x04, // not supported - WR3_RX_CRC_ENABLE = 0x08, // not supported - WR3_ENTER_HUNT_PHASE = 0x10, // not supported - WR3_AUTO_ENABLES = 0x20, - WR3_RX_WORD_LENGTH_MASK = 0xc0, - WR3_RX_WORD_LENGTH_5 = 0x00, - WR3_RX_WORD_LENGTH_7 = 0x40, - WR3_RX_WORD_LENGTH_6 = 0x80, - WR3_RX_WORD_LENGTH_8 = 0xc0 + WR3_ADDRESS_SEARCH_MODE = 0x04, // not supported + WR3_RX_CRC_ENABLE = 0x08, // not supported + WR3_ENTER_HUNT_PHASE = 0x10, // not supported + WR3_AUTO_ENABLES = 0x20, + WR3_RX_WORD_LENGTH_MASK = 0xc0, + WR3_RX_WORD_LENGTH_5 = 0x00, + WR3_RX_WORD_LENGTH_7 = 0x40, + WR3_RX_WORD_LENGTH_6 = 0x80, + WR3_RX_WORD_LENGTH_8 = 0xc0 }; enum { - WR4_PARITY_ENABLE = 0x01, - WR4_PARITY_EVEN = 0x02, - WR4_STOP_BITS_MASK = 0x0c, - WR4_STOP_BITS_1 = 0x04, - WR4_STOP_BITS_1_5 = 0x08, // not supported - WR4_STOP_BITS_2 = 0x0c, - WR4_SYNC_MODE_MASK = 0x30, // not supported - WR4_SYNC_MODE_8_BIT = 0x00, // not supported - WR4_SYNC_MODE_16_BIT = 0x10, // not supported - WR4_SYNC_MODE_SDLC = 0x20, // not supported - WR4_SYNC_MODE_EXT = 0x30, // not supported - WR4_CLOCK_RATE_MASK = 0xc0, - WR4_CLOCK_RATE_X1 = 0x00, - WR4_CLOCK_RATE_X16 = 0x40, - WR4_CLOCK_RATE_X32 = 0x80, - WR4_CLOCK_RATE_X64 = 0xc0 + WR4_PARITY_ENABLE = 0x01, + WR4_PARITY_EVEN = 0x02, + WR4_STOP_BITS_MASK = 0x0c, + WR4_STOP_BITS_1 = 0x04, + WR4_STOP_BITS_1_5 = 0x08, // not supported + WR4_STOP_BITS_2 = 0x0c, + WR4_SYNC_MODE_MASK = 0x30, // not supported + WR4_SYNC_MODE_8_BIT = 0x00, // not supported + WR4_SYNC_MODE_16_BIT = 0x10, // not supported + WR4_SYNC_MODE_SDLC = 0x20, // not supported + WR4_SYNC_MODE_EXT = 0x30, // not supported + WR4_CLOCK_RATE_MASK = 0xc0, + WR4_CLOCK_RATE_X1 = 0x00, + WR4_CLOCK_RATE_X16 = 0x40, + WR4_CLOCK_RATE_X32 = 0x80, + WR4_CLOCK_RATE_X64 = 0xc0 }; enum { - WR5_TX_CRC_ENABLE = 0x01, // not supported - WR5_RTS = 0x02, - WR5_CRC16 = 0x04, // not supported - WR5_TX_ENABLE = 0x08, - WR5_SEND_BREAK = 0x10, - WR5_TX_WORD_LENGTH_MASK = 0x60, - WR5_TX_WORD_LENGTH_5 = 0x00, - WR5_TX_WORD_LENGTH_6 = 0x40, - WR5_TX_WORD_LENGTH_7 = 0x20, - WR5_TX_WORD_LENGTH_8 = 0x60, - WR5_DTR = 0x80 + WR5_TX_CRC_ENABLE = 0x01, // not supported + WR5_RTS = 0x02, + WR5_CRC16 = 0x04, // not supported + WR5_TX_ENABLE = 0x08, + WR5_SEND_BREAK = 0x10, + WR5_TX_WORD_LENGTH_MASK = 0x60, + WR5_TX_WORD_LENGTH_5 = 0x00, + WR5_TX_WORD_LENGTH_6 = 0x40, + WR5_TX_WORD_LENGTH_7 = 0x20, + WR5_TX_WORD_LENGTH_8 = 0x60, + WR5_DTR = 0x80 }; /* SCC specifics */ enum { - WR9_CMD_MASK = 0xC0, - WR9_CMD_NORESET = 0x00, - WR9_CMD_CHNB_RESET = 0x40, - WR9_CMD_CHNA_RESET = 0x80, - WR9_CMD_HW_RESET = 0xC0, - WR9_BIT_VIS = 0x01, - WR9_BIT_NV = 0x02, - WR9_BIT_DLC = 0x04, - WR9_BIT_MIE = 0x08, - WR9_BIT_SHSL = 0x10, - WR9_BIT_IACK = 0x20 + WR9_CMD_MASK = 0xC0, + WR9_CMD_NORESET = 0x00, + WR9_CMD_CHNB_RESET = 0x40, + WR9_CMD_CHNA_RESET = 0x80, + WR9_CMD_HW_RESET = 0xC0, + WR9_BIT_VIS = 0x01, + WR9_BIT_NV = 0x02, + WR9_BIT_DLC = 0x04, + WR9_BIT_MIE = 0x08, + WR9_BIT_SHSL = 0x10, + WR9_BIT_IACK = 0x20 }; enum { - WR11_RCVCLK_TYPE = 0x80, + WR11_RCVCLK_TYPE = 0x80, WR11_RCVCLK_SRC_MASK = 0x60, // RCV CLOCK WR11_RCVCLK_SRC_RTXC = 0x00, // 0 0 WR11_RCVCLK_SRC_TRXC = 0x20, // 0 1 - WR11_RCVCLK_SRC_BR = 0x40, // 1 0 + WR11_RCVCLK_SRC_BR = 0x40, // 1 0 WR11_RCVCLK_SRC_DPLL = 0x60, // 1 1 WR11_TRACLK_SRC_MASK = 0x18, // TRA CLOCK WR11_TRACLK_SRC_RTXC = 0x00, // 0 0 WR11_TRACLK_SRC_TRXC = 0x08, // 0 1 - WR11_TRACLK_SRC_BR = 0x10, // 1 0 + WR11_TRACLK_SRC_BR = 0x10, // 1 0 WR11_TRACLK_SRC_DPLL = 0x18, // 1 1 - WR11_TRXC_DIRECTION = 0x04, + WR11_TRXC_DIRECTION = 0x04, WR11_TRXSRC_SRC_MASK = 0x03, // TRXX CLOCK WR11_TRXSRC_SRC_XTAL = 0x00, // 0 0 - WR11_TRXSRC_SRC_TRA = 0x01, // 0 1 - WR11_TRXSRC_SRC_BR = 0x02, // 1 0 + WR11_TRXSRC_SRC_TRA = 0x01, // 0 1 + WR11_TRXSRC_SRC_BR = 0x02, // 1 0 WR11_TRXSRC_SRC_DPLL = 0x03 // 1 1 }; enum { - WR14_DPLL_CMD_MASK = 0xe0, // Command - WR14_CMD_NULL = 0x00, // 0 0 0 - WR14_CMD_ESM = 0x20, // 0 0 1 - WR14_CMD_RMC = 0x40, // 0 1 0 + WR14_DPLL_CMD_MASK = 0xe0, // Command + WR14_CMD_NULL = 0x00, // 0 0 0 + WR14_CMD_ESM = 0x20, // 0 0 1 + WR14_CMD_RMC = 0x40, // 0 1 0 WR14_CMD_DISABLE_DPLL = 0x60, // 0 1 1 - WR14_CMD_SS_BGR = 0x80, // 1 0 0 - WR14_CMD_SS_RTXC = 0xa0, // 1 0 1 - WR14_CMD_SET_FM = 0xc0, // 1 1 0 - WR14_CMD_SET_NRZI = 0xe0 // 1 1 1 + WR14_CMD_SS_BGR = 0x80, // 1 0 0 + WR14_CMD_SS_RTXC = 0xa0, // 1 0 1 + WR14_CMD_SET_FM = 0xc0, // 1 1 0 + WR14_CMD_SET_NRZI = 0xe0 // 1 1 1 }; void update_serial(); @@ -477,39 +477,39 @@ protected: int get_tx_word_length(); // receiver state - UINT8 m_rx_data_fifo[8]; // receive data FIFO - UINT8 m_rx_error_fifo[8]; // receive error FIFO - UINT8 m_rx_error; // current receive error - //int m_rx_fifo // receive FIFO pointer - int m_rx_fifo_rp; // receive FIFO read pointer - int m_rx_fifo_wp; // receive FIFO write pointer - int m_rx_fifo_sz; // receive FIFO size - - int m_rx_clock; // receive clock pulse count - int m_rx_first; // first character received - int m_rx_break; // receive break condition - UINT8 m_rx_rr0_latch; // read register 0 latched + UINT8 m_rx_data_fifo[8]; // receive data FIFO + UINT8 m_rx_error_fifo[8]; // receive error FIFO + UINT8 m_rx_error; // current receive error + //int m_rx_fifo // receive FIFO pointer + int m_rx_fifo_rp; // receive FIFO read pointer + int m_rx_fifo_wp; // receive FIFO write pointer + int m_rx_fifo_sz; // receive FIFO size + + int m_rx_clock; // receive clock pulse count + int m_rx_first; // first character received + int m_rx_break; // receive break condition + UINT8 m_rx_rr0_latch; // read register 0 latched int m_rxd; - int m_ri; // ring indicator latch - int m_cts; // clear to send latch - int m_dcd; // data carrier detect latch + int m_ri; // ring indicator latch + int m_cts; // clear to send latch + int m_dcd; // data carrier detect latch // transmitter state - UINT8 m_tx_data; // transmit data register - int m_tx_clock; // transmit clock pulse count + UINT8 m_tx_data; // transmit data register + int m_tx_clock; // transmit clock pulse count - int m_dtr; // data terminal ready - int m_rts; // request to send + int m_dtr; // data terminal ready + int m_rts; // request to send // synchronous state - UINT16 m_sync; // sync character + UINT16 m_sync; // sync character int m_index; z80scc_device *m_uart; // SCC specifics - int m_ph; // Point high command to access regs 08-0f + int m_ph; // Point high command to access regs 08-0f UINT8 m_zc; }; @@ -607,7 +607,7 @@ protected: // Variants in the SCC family enum { - TYPE_Z80SCC = 0x001, + TYPE_Z80SCC = 0x001, TYPE_SCC8030 = 0x002, TYPE_SCC80C30 = 0x004, TYPE_SCC80230 = 0x008, @@ -621,10 +621,10 @@ protected: #define SET_NMOS ( z80scc_device::TYPE_SCC8030 | z80scc_device::TYPE_SCC8530 ) #define SET_CMOS ( z80scc_device::TYPE_SCC80C30 | z80scc_device::TYPE_SCC85C30 ) #define SET_ESCC ( z80scc_device::TYPE_SCC80230 | z80scc_device::TYPE_SCC85230 | z80scc_device::TYPE_SCC8523L ) -#define SET_EMSCC z80scc_device::TYPE_SCC85233 +#define SET_EMSCC z80scc_device::TYPE_SCC85233 #define SET_Z80X30 ( z80scc_device::TYPE_SCC8030 | z80scc_device::TYPE_SCC80C30 | z80scc_device::TYPE_SCC80230 ) #define SET_Z85X3X ( z80scc_device::TYPE_SCC8530 | z80scc_device::TYPE_SCC85C30 | z80scc_device::TYPE_SCC85230 \ - | z80scc_device::TYPE_SCC8523L | z80scc_device::TYPE_SCC85233 ) + | z80scc_device::TYPE_SCC8523L | z80scc_device::TYPE_SCC85233 ) enum { @@ -641,25 +641,25 @@ protected: int m_rxcb; int m_txcb; - devcb_write_line m_out_txda_cb; - devcb_write_line m_out_dtra_cb; - devcb_write_line m_out_rtsa_cb; - devcb_write_line m_out_wrdya_cb; - devcb_write_line m_out_synca_cb; - - devcb_write_line m_out_txdb_cb; - devcb_write_line m_out_dtrb_cb; - devcb_write_line m_out_rtsb_cb; - devcb_write_line m_out_wrdyb_cb; - devcb_write_line m_out_syncb_cb; - - devcb_write_line m_out_int_cb; - devcb_write_line m_out_rxdrqa_cb; - devcb_write_line m_out_txdrqa_cb; - devcb_write_line m_out_rxdrqb_cb; - devcb_write_line m_out_txdrqb_cb; - - int m_int_state[6]; // interrupt state + devcb_write_line m_out_txda_cb; + devcb_write_line m_out_dtra_cb; + devcb_write_line m_out_rtsa_cb; + devcb_write_line m_out_wrdya_cb; + devcb_write_line m_out_synca_cb; + + devcb_write_line m_out_txdb_cb; + devcb_write_line m_out_dtrb_cb; + devcb_write_line m_out_rtsb_cb; + devcb_write_line m_out_wrdyb_cb; + devcb_write_line m_out_syncb_cb; + + devcb_write_line m_out_int_cb; + devcb_write_line m_out_rxdrqa_cb; + devcb_write_line m_out_txdrqa_cb; + devcb_write_line m_out_rxdrqb_cb; + devcb_write_line m_out_txdrqb_cb; + + int m_int_state[6]; // interrupt state int m_variant; UINT8 m_wr0_ptrbits; diff --git a/src/devices/machine/z80sio.c b/src/devices/machine/z80sio.c index 09c0e46663f..00f65a8e6b4 100644 --- a/src/devices/machine/z80sio.c +++ b/src/devices/machine/z80sio.c @@ -50,7 +50,7 @@ #include "z80sio.h" //************************************************************************** -// MACROS / CONSTANTS +// MACROS / CONSTANTS //************************************************************************** #define VERBOSE 0 @@ -68,13 +68,13 @@ #define FUNCNAME __PRETTY_FUNCTION__ #endif -#define CHANA_TAG "cha" -#define CHANB_TAG "chb" +#define CHANA_TAG "cha" +#define CHANB_TAG "chb" //************************************************************************** -// DEVICE DEFINITIONS +// DEVICE DEFINITIONS //************************************************************************** // device type definition @@ -82,7 +82,7 @@ const device_type Z80SIO = &device_creator<z80sio_device>; const device_type Z80SIO_CHANNEL = &device_creator<z80sio_channel>; //------------------------------------------------- -// device_mconfig_additions - +// device_mconfig_additions - //------------------------------------------------- MACHINE_CONFIG_FRAGMENT( z80sio ) @@ -96,11 +96,11 @@ machine_config_constructor z80sio_device::device_mconfig_additions() const } //************************************************************************** -// LIVE DEVICE +// LIVE DEVICE //************************************************************************** //------------------------------------------------- -// z80sio_device - constructor +// z80sio_device - constructor //------------------------------------------------- z80sio_device::z80sio_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, UINT32 variant, const char *shortname, const char *source) @@ -164,7 +164,7 @@ z80sio_device::z80sio_device(const machine_config &mconfig, const char *tag, dev } //------------------------------------------------- -// device_start - device-specific startup +// device_start - device-specific startup //------------------------------------------------- void z80sio_device::device_start() { @@ -200,7 +200,7 @@ void z80sio_device::device_start() //------------------------------------------------- -// device_reset - device-specific reset +// device_reset - device-specific reset //------------------------------------------------- void z80sio_device::device_reset() { @@ -211,7 +211,7 @@ void z80sio_device::device_reset() } //------------------------------------------------- -// z80daisy_irq_state - get interrupt status +// z80daisy_irq_state - get interrupt status //------------------------------------------------- int z80sio_device::z80daisy_irq_state() { @@ -220,8 +220,8 @@ int z80sio_device::z80daisy_irq_state() LOG(("%s %s A:%d%d%d%d B:%d%d%d%d ",FUNCNAME, tag(), - m_int_state[0], m_int_state[1], m_int_state[2], m_int_state[3], - m_int_state[4], m_int_state[5], m_int_state[6], m_int_state[7])); + m_int_state[0], m_int_state[1], m_int_state[2], m_int_state[3], + m_int_state[4], m_int_state[5], m_int_state[6], m_int_state[7])); // loop over all interrupt sources for (i = 0; i < 8; i++) @@ -236,13 +236,13 @@ int z80sio_device::z80daisy_irq_state() } LOG(("Interrupt State %u\n", state)); - + return state; } //------------------------------------------------- -// z80daisy_irq_ack - interrupt acknowledge +// z80daisy_irq_ack - interrupt acknowledge //------------------------------------------------- int z80sio_device::z80daisy_irq_ack() { @@ -274,7 +274,7 @@ int z80sio_device::z80daisy_irq_ack() //------------------------------------------------- -// z80daisy_irq_reti - return from interrupt +// z80daisy_irq_reti - return from interrupt //------------------------------------------------- void z80sio_device::z80daisy_irq_reti() { @@ -300,7 +300,7 @@ void z80sio_device::z80daisy_irq_reti() //------------------------------------------------- -// check_interrupts - +// check_interrupts - //------------------------------------------------- void z80sio_device::check_interrupts() { @@ -311,7 +311,7 @@ void z80sio_device::check_interrupts() //------------------------------------------------- -// reset_interrupts - +// reset_interrupts - //------------------------------------------------- void z80sio_device::reset_interrupts() { @@ -327,7 +327,7 @@ void z80sio_device::reset_interrupts() //------------------------------------------------- -// trigger_interrupt - TODO: needs attention for SIO +// trigger_interrupt - TODO: needs attention for SIO //------------------------------------------------- void z80sio_device::trigger_interrupt(int index, int state) { @@ -384,7 +384,7 @@ void z80sio_device::trigger_interrupt(int index, int state) // status affects vector vector = (m_chanB->m_wr2 & 0xf1) | (!index << 3) | (state << 1); } -// } +// } // update vector register m_chanB->m_rr2 = vector; @@ -398,7 +398,7 @@ void z80sio_device::trigger_interrupt(int index, int state) //------------------------------------------------- -// m1_r - interrupt acknowledge +// m1_r - interrupt acknowledge //------------------------------------------------- int z80sio_device::m1_r() { @@ -408,7 +408,7 @@ int z80sio_device::m1_r() //------------------------------------------------- -// cd_ba_r - +// cd_ba_r - //------------------------------------------------- READ8_MEMBER( z80sio_device::cd_ba_r ) { @@ -423,7 +423,7 @@ READ8_MEMBER( z80sio_device::cd_ba_r ) //------------------------------------------------- -// cd_ba_w - +// cd_ba_w - //------------------------------------------------- WRITE8_MEMBER( z80sio_device::cd_ba_w ) { @@ -441,7 +441,7 @@ WRITE8_MEMBER( z80sio_device::cd_ba_w ) //------------------------------------------------- -// ba_cd_r - +// ba_cd_r - //------------------------------------------------- READ8_MEMBER( z80sio_device::ba_cd_r ) { @@ -456,7 +456,7 @@ READ8_MEMBER( z80sio_device::ba_cd_r ) //------------------------------------------------- -// ba_cd_w - +// ba_cd_w - //------------------------------------------------- WRITE8_MEMBER( z80sio_device::ba_cd_w ) { @@ -473,11 +473,11 @@ WRITE8_MEMBER( z80sio_device::ba_cd_w ) } //************************************************************************** -// SIO CHANNEL +// SIO CHANNEL //************************************************************************** //------------------------------------------------- -// z80sio_channel - constructor +// z80sio_channel - constructor //------------------------------------------------- z80sio_channel::z80sio_channel(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : device_t(mconfig, Z80SIO_CHANNEL, "Z80 SIO channel", tag, owner, clock, "z80sio_channel", __FILE__), @@ -512,7 +512,7 @@ z80sio_channel::z80sio_channel(const machine_config &mconfig, const char *tag, d //------------------------------------------------- -// start - channel startup +// start - channel startup //------------------------------------------------- void z80sio_channel::device_start() { @@ -555,7 +555,7 @@ void z80sio_channel::device_start() //------------------------------------------------- -// reset - reset channel status +// reset - reset channel status //------------------------------------------------- void z80sio_channel::device_reset() { @@ -590,7 +590,7 @@ void z80sio_channel::device_timer(emu_timer &timer, device_timer_id id, int para } //------------------------------------------------- -// tra_callback - +// tra_callback - //------------------------------------------------- void z80sio_channel::tra_callback() { @@ -615,7 +615,7 @@ void z80sio_channel::tra_callback() else if (!is_transmit_register_empty()) { int db = transmit_register_get_data_bit(); - + LOG(("%" I64FMT "d %s() \"%s \"Channel %c transmit data bit %d m_wr5:%02x\n", machine().firstcpu->total_cycles(), FUNCNAME, m_owner->tag(), 'A' + m_index, db, m_wr5)); // transmit data if (m_index == z80sio_device::CHANNEL_A) @@ -632,7 +632,7 @@ void z80sio_channel::tra_callback() //------------------------------------------------- -// tra_complete - +// tra_complete - //------------------------------------------------- void z80sio_channel::tra_complete() { @@ -683,7 +683,7 @@ void z80sio_channel::tra_complete() //------------------------------------------------- -// rcv_callback - +// rcv_callback - //------------------------------------------------- void z80sio_channel::rcv_callback() { @@ -703,7 +703,7 @@ void z80sio_channel::rcv_callback() //------------------------------------------------- -// rcv_complete - +// rcv_complete - //------------------------------------------------- void z80sio_channel::rcv_complete() { @@ -717,7 +717,7 @@ void z80sio_channel::rcv_complete() //------------------------------------------------- -// get_clock_mode - get clock divisor +// get_clock_mode - get clock divisor //------------------------------------------------- int z80sio_channel::get_clock_mode() @@ -727,10 +727,10 @@ int z80sio_channel::get_clock_mode() switch (m_wr4 & WR4_CLOCK_RATE_MASK) { - case WR4_CLOCK_RATE_X1: clocks = 1; break; - case WR4_CLOCK_RATE_X16: clocks = 16; break; - case WR4_CLOCK_RATE_X32: clocks = 32; break; - case WR4_CLOCK_RATE_X64: clocks = 64; break; + case WR4_CLOCK_RATE_X1: clocks = 1; break; + case WR4_CLOCK_RATE_X16: clocks = 16; break; + case WR4_CLOCK_RATE_X32: clocks = 32; break; + case WR4_CLOCK_RATE_X64: clocks = 64; break; } return clocks; @@ -758,7 +758,7 @@ void z80sio_channel::set_rts(int state) void z80sio_channel::update_rts() { - // LOG(("%s(%d) \"%s\" Channel %c \n", FUNCNAME, state, m_owner->tag(), 'A' + m_index)); + // LOG(("%s(%d) \"%s\" Channel %c \n", FUNCNAME, state, m_owner->tag(), 'A' + m_index)); LOG(("%s() \"%s\" Channel %c \n", FUNCNAME, m_owner->tag(), 'A' + m_index)); if (m_wr5 & WR5_RTS) { @@ -771,13 +771,13 @@ void z80sio_channel::update_rts() // when the RTS bit is reset, the _RTS output goes high after the transmitter empties m_rts = 0; } - + // data terminal ready output follows the state programmed into the DTR bit*/ set_dtr((m_wr5 & WR5_DTR) ? 0 : 1); } //------------------------------------------------- -// get_stop_bits - get number of stop bits +// get_stop_bits - get number of stop bits //------------------------------------------------- device_serial_interface::stop_bits_t z80sio_channel::get_stop_bits() @@ -795,7 +795,7 @@ device_serial_interface::stop_bits_t z80sio_channel::get_stop_bits() //------------------------------------------------- -// get_rx_word_length - get receive word length +// get_rx_word_length - get receive word length //------------------------------------------------- int z80sio_channel::get_rx_word_length() @@ -805,10 +805,10 @@ int z80sio_channel::get_rx_word_length() switch (m_wr3 & WR3_RX_WORD_LENGTH_MASK) { - case WR3_RX_WORD_LENGTH_5: bits = 5; break; - case WR3_RX_WORD_LENGTH_6: bits = 6; break; - case WR3_RX_WORD_LENGTH_7: bits = 7; break; - case WR3_RX_WORD_LENGTH_8: bits = 8; break; + case WR3_RX_WORD_LENGTH_5: bits = 5; break; + case WR3_RX_WORD_LENGTH_6: bits = 6; break; + case WR3_RX_WORD_LENGTH_7: bits = 7; break; + case WR3_RX_WORD_LENGTH_8: bits = 8; break; } return bits; @@ -816,7 +816,7 @@ int z80sio_channel::get_rx_word_length() //------------------------------------------------- -// get_tx_word_length - get transmit word length +// get_tx_word_length - get transmit word length //------------------------------------------------- int z80sio_channel::get_tx_word_length() @@ -826,10 +826,10 @@ int z80sio_channel::get_tx_word_length() switch (m_wr5 & WR5_TX_WORD_LENGTH_MASK) { - case WR5_TX_WORD_LENGTH_5: bits = 5; break; - case WR5_TX_WORD_LENGTH_6: bits = 6; break; - case WR5_TX_WORD_LENGTH_7: bits = 7; break; - case WR5_TX_WORD_LENGTH_8: bits = 8; break; + case WR5_TX_WORD_LENGTH_5: bits = 5; break; + case WR5_TX_WORD_LENGTH_6: bits = 6; break; + case WR5_TX_WORD_LENGTH_7: bits = 7; break; + case WR5_TX_WORD_LENGTH_8: bits = 8; break; } return bits; @@ -869,7 +869,7 @@ UINT8 z80sio_channel::do_sioreg_rr2() //------------------------------------------------- -// control_read - read control register +// control_read - read control register //------------------------------------------------- UINT8 z80sio_channel::control_read() @@ -886,8 +886,8 @@ UINT8 z80sio_channel::control_read() switch (reg) { - case REG_RR0_STATUS: data = do_sioreg_rr0(); break; - case REG_RR1_SPEC_RCV_COND: data = do_sioreg_rr1(); break; + case REG_RR0_STATUS: data = do_sioreg_rr0(); break; + case REG_RR1_SPEC_RCV_COND: data = do_sioreg_rr1(); break; case REG_RR2_INTERRUPT_VECT: data = do_sioreg_rr2(); break; default: logerror("Z80SIO \"%s\" Channel %c : Unsupported RRx register:%02x\n", m_owner->tag(), 'A' + m_index, reg); @@ -937,8 +937,8 @@ void z80sio_channel::do_sioreg_wr0(UINT8 data) // update register to reflect wire values TODO: Check if this will fire new interrupts if (!m_dcd) m_rr0 |= RR0_DCD; if (m_sync) m_rr0 |= RR0_SYNC_HUNT; - if (m_cts) m_rr0 |= RR0_CTS; - + if (m_cts) m_rr0 |= RR0_CTS; + LOG(("Z80SIO \"%s\" Channel %c : Reset External/Status Interrupt\n", m_owner->tag(), 'A' + m_index)); break; case WR0_CHANNEL_RESET: @@ -968,7 +968,7 @@ void z80sio_channel::do_sioreg_wr0(UINT8 data) break; default: LOG(("Z80SIO \"%s\" Channel %c : Unsupported WR0 command %02x mask %02x\n", m_owner->tag(), 'A' + m_index, data, WR0_REGISTER_MASK)); - + } do_sioreg_wr0_resets(data); } @@ -983,21 +983,21 @@ void z80sio_channel::do_sioreg_wr1(UINT8 data) LOG(("Z80SIO \"%s\" Channel %c : Wait/Ready Enable %u\n", m_owner->tag(), 'A' + m_index, (data & WR1_WRDY_ENABLE) ? 1 : 0)); LOG(("Z80SIO \"%s\" Channel %c : Wait/Ready Function %s\n", m_owner->tag(), 'A' + m_index, (data & WR1_WRDY_FUNCTION) ? "Ready" : "Wait")); LOG(("Z80SIO \"%s\" Channel %c : Wait/Ready on %s\n", m_owner->tag(), 'A' + m_index, (data & WR1_WRDY_ON_RX_TX) ? "Receive" : "Transmit")); - + switch (data & WR1_RX_INT_MODE_MASK) { case WR1_RX_INT_DISABLE: LOG(("Z80SIO \"%s\" Channel %c : Receiver Interrupt Disabled\n", m_owner->tag(), 'A' + m_index)); break; - + case WR1_RX_INT_FIRST: LOG(("Z80SIO \"%s\" Channel %c : Receiver Interrupt on First Character\n", m_owner->tag(), 'A' + m_index)); break; - + case WR1_RX_INT_ALL_PARITY: LOG(("Z80SIO \"%s\" Channel %c : Receiver Interrupt on All Characters, Parity Affects Vector\n", m_owner->tag(), 'A' + m_index)); break; - + case WR1_RX_INT_ALL: LOG(("Z80SIO \"%s\" Channel %c : Receiver Interrupt on All Characters\n", m_owner->tag(), 'A' + m_index)); break; @@ -1058,30 +1058,30 @@ void z80sio_channel::do_sioreg_wr7(UINT8 data) } //------------------------------------------------- -// control_write - write control register +// control_write - write control register //------------------------------------------------- void z80sio_channel::control_write(UINT8 data) { - UINT8 reg = m_wr0 & WR0_REGISTER_MASK; + UINT8 reg = m_wr0 & WR0_REGISTER_MASK; if (reg != 0) { // mask out register index m_wr0 &= ~WR0_REGISTER_MASK; } - + LOG(("\n%s(%02x) reg %02x\n", FUNCNAME, data, reg)); - + switch (reg) { - case REG_WR0_COMMAND_REGPT: do_sioreg_wr0(data); break; - case REG_WR1_INT_DMA_ENABLE: do_sioreg_wr1(data); m_uart->check_interrupts(); break; - case REG_WR2_INT_VECTOR: do_sioreg_wr2(data); break; - case REG_WR3_RX_CONTROL: do_sioreg_wr3(data); update_serial(); break; - case REG_WR4_RX_TX_MODES: do_sioreg_wr4(data); update_serial(); break; - case REG_WR5_TX_CONTROL: do_sioreg_wr5(data); update_serial(); update_rts(); break; - case REG_WR6_SYNC_OR_SDLC_A: do_sioreg_wr6(data); break; - case REG_WR7_SYNC_OR_SDLC_F: do_sioreg_wr7(data); break; + case REG_WR0_COMMAND_REGPT: do_sioreg_wr0(data); break; + case REG_WR1_INT_DMA_ENABLE: do_sioreg_wr1(data); m_uart->check_interrupts(); break; + case REG_WR2_INT_VECTOR: do_sioreg_wr2(data); break; + case REG_WR3_RX_CONTROL: do_sioreg_wr3(data); update_serial(); break; + case REG_WR4_RX_TX_MODES: do_sioreg_wr4(data); update_serial(); break; + case REG_WR5_TX_CONTROL: do_sioreg_wr5(data); update_serial(); update_rts(); break; + case REG_WR6_SYNC_OR_SDLC_A: do_sioreg_wr6(data); break; + case REG_WR7_SYNC_OR_SDLC_F: do_sioreg_wr7(data); break; default: logerror("Z80SIO \"%s\" Channel %c : Unsupported WRx register:%02x\n", m_owner->tag(), 'A' + m_index, reg); } @@ -1089,7 +1089,7 @@ void z80sio_channel::control_write(UINT8 data) //------------------------------------------------- -// data_read - read data register +// data_read - read data register //------------------------------------------------- UINT8 z80sio_channel::data_read() { @@ -1099,28 +1099,28 @@ UINT8 z80sio_channel::data_read() { // load data from the FIFO data = m_rx_data_fifo[m_rx_fifo]; - + // load error status from the FIFO m_rr1 = (m_rr1 & ~(RR1_CRC_FRAMING_ERROR | RR1_RX_OVERRUN_ERROR | RR1_PARITY_ERROR)) | m_rx_error_fifo[m_rx_fifo]; - + // decrease FIFO pointer m_rx_fifo--; - + if (m_rx_fifo < 0) { // no more characters available in the FIFO m_rr0 &= ~ RR0_RX_CHAR_AVAILABLE; } } - + LOG(("Z80SIO \"%s\" Channel %c : Data Register Read '%02x'\n", m_owner->tag(), 'A' + m_index, data)); - + return data; } - + //------------------------------------------------- -// data_write - write data register +// data_write - write data register //------------------------------------------------- void z80sio_channel::data_write(UINT8 data) { @@ -1140,7 +1140,7 @@ void z80sio_channel::data_write(UINT8 data) } else { - LOG((" Transmitter %s, data byte dropped\n", m_wr5 & WR5_TX_ENABLE ? "not enabled" : "not emptied")); + LOG((" Transmitter %s, data byte dropped\n", m_wr5 & WR5_TX_ENABLE ? "not enabled" : "not emptied")); m_rr0 &= ~RR0_TX_BUFFER_EMPTY; } @@ -1149,7 +1149,7 @@ void z80sio_channel::data_write(UINT8 data) //------------------------------------------------- -// receive_data - receive data word +// receive_data - receive data word //------------------------------------------------- void z80sio_channel::receive_data(UINT8 data) { @@ -1157,7 +1157,7 @@ void z80sio_channel::receive_data(UINT8 data) if (m_rx_fifo == 2) { - LOG((" Overrun detected\n")); + LOG((" Overrun detected\n")); // receive overrun error detected m_rx_error |= RR1_RX_OVERRUN_ERROR; @@ -1180,13 +1180,13 @@ void z80sio_channel::receive_data(UINT8 data) { m_rx_fifo++; } - + // store received character and error status into FIFO m_rx_data_fifo[m_rx_fifo] = data; m_rx_error_fifo[m_rx_fifo] = m_rx_error; - + m_rr0 |= RR0_RX_CHAR_AVAILABLE; - + // receive interrupt switch (m_wr1 & WR1_RX_INT_MODE_MASK) { @@ -1210,7 +1210,7 @@ void z80sio_channel::receive_data(UINT8 data) //------------------------------------------------- -// cts_w - clear to send handler +// cts_w - clear to send handler //------------------------------------------------- WRITE_LINE_MEMBER( z80sio_channel::cts_w ) @@ -1249,7 +1249,7 @@ WRITE_LINE_MEMBER( z80sio_channel::cts_w ) //------------------------------------------------- -// dcd_w - data carrier detected handler +// dcd_w - data carrier detected handler //------------------------------------------------- WRITE_LINE_MEMBER( z80sio_channel::dcd_w ) @@ -1287,7 +1287,7 @@ WRITE_LINE_MEMBER( z80sio_channel::dcd_w ) //------------------------------------------------- -// sh_w - Sync Hunt handler +// sh_w - Sync Hunt handler //------------------------------------------------- WRITE_LINE_MEMBER( z80sio_channel::sync_w ) @@ -1320,7 +1320,7 @@ WRITE_LINE_MEMBER( z80sio_channel::sync_w ) //------------------------------------------------- -// rxc_w - receive clock +// rxc_w - receive clock //------------------------------------------------- WRITE_LINE_MEMBER( z80sio_channel::rxc_w ) @@ -1342,7 +1342,7 @@ WRITE_LINE_MEMBER( z80sio_channel::rxc_w ) //------------------------------------------------- -// txc_w - transmit clock +// txc_w - transmit clock //------------------------------------------------- WRITE_LINE_MEMBER( z80sio_channel::txc_w ) @@ -1364,7 +1364,7 @@ WRITE_LINE_MEMBER( z80sio_channel::txc_w ) //------------------------------------------------- -// update_serial - +// update_serial - //------------------------------------------------- void z80sio_channel::update_serial() { @@ -1402,7 +1402,7 @@ void z80sio_channel::update_serial() //------------------------------------------------- -// set_dtr - +// set_dtr - //------------------------------------------------- void z80sio_channel::set_dtr(int state) @@ -1417,7 +1417,7 @@ void z80sio_channel::set_dtr(int state) } //------------------------------------------------- -// write_rx - +// write_rx - //------------------------------------------------- WRITE_LINE_MEMBER(z80sio_channel::write_rx) diff --git a/src/devices/machine/z80sio.h b/src/devices/machine/z80sio.h index bf75e8fe362..dc04bd5c020 100644 --- a/src/devices/machine/z80sio.h +++ b/src/devices/machine/z80sio.h @@ -59,7 +59,7 @@ #include "cpu/z80/z80daisy.h" //************************************************************************** -// DEVICE CONFIGURATION MACROS +// DEVICE CONFIGURATION MACROS //************************************************************************** #define MCFG_Z80SIO_ADD(_tag, _clock, _rxa, _txa, _rxb, _txb) \ @@ -116,7 +116,7 @@ //************************************************************************** -// TYPE DEFINITIONS +// TYPE DEFINITIONS //************************************************************************** // ======================> z80sio_channel @@ -146,7 +146,7 @@ public: UINT8 do_sioreg_rr0(); UINT8 do_sioreg_rr1(); UINT8 do_sioreg_rr2(); - + // write register handlers void do_sioreg_wr0(UINT8 data); void do_sioreg_wr0_resets(UINT8 data); @@ -157,7 +157,7 @@ public: void do_sioreg_wr5(UINT8 data); void do_sioreg_wr6(UINT8 data); void do_sioreg_wr7(UINT8 data); - + UINT8 control_read(); void control_write(UINT8 data); @@ -178,11 +178,11 @@ public: int m_txc; // Register state - // read registers enum + // read registers enum UINT8 m_rr0; // REG_RR0_STATUS UINT8 m_rr1; // REG_RR1_SPEC_RCV_COND UINT8 m_rr2; // REG_RR2_INTERRUPT_VECT - // write registers enum + // write registers enum UINT8 m_wr0; // REG_WR0_COMMAND_REGPT UINT8 m_wr1; // REG_WR1_INT_DMA_ENABLE UINT8 m_wr2; // REG_WR2_INT_VECTOR @@ -206,153 +206,153 @@ protected: // Read registers enum { - REG_RR0_STATUS = 0, - REG_RR1_SPEC_RCV_COND = 1, - REG_RR2_INTERRUPT_VECT = 2 + REG_RR0_STATUS = 0, + REG_RR1_SPEC_RCV_COND = 1, + REG_RR2_INTERRUPT_VECT = 2 }; - + // Write registers enum { - REG_WR0_COMMAND_REGPT = 0, - REG_WR1_INT_DMA_ENABLE = 1, - REG_WR2_INT_VECTOR = 2, - REG_WR3_RX_CONTROL = 3, - REG_WR4_RX_TX_MODES = 4, - REG_WR5_TX_CONTROL = 5, - REG_WR6_SYNC_OR_SDLC_A = 6, - REG_WR7_SYNC_OR_SDLC_F = 7 + REG_WR0_COMMAND_REGPT = 0, + REG_WR1_INT_DMA_ENABLE = 1, + REG_WR2_INT_VECTOR = 2, + REG_WR3_RX_CONTROL = 3, + REG_WR4_RX_TX_MODES = 4, + REG_WR5_TX_CONTROL = 5, + REG_WR6_SYNC_OR_SDLC_A = 6, + REG_WR7_SYNC_OR_SDLC_F = 7 }; - + enum { - RR0_RX_CHAR_AVAILABLE = 0x01, - RR0_INTERRUPT_PENDING = 0x02, - RR0_TX_BUFFER_EMPTY = 0x04, - RR0_DCD = 0x08, - RR0_SYNC_HUNT = 0x10, - RR0_CTS = 0x20, - RR0_TX_UNDERRUN = 0x40, - RR0_BREAK_ABORT = 0x80 + RR0_RX_CHAR_AVAILABLE = 0x01, + RR0_INTERRUPT_PENDING = 0x02, + RR0_TX_BUFFER_EMPTY = 0x04, + RR0_DCD = 0x08, + RR0_SYNC_HUNT = 0x10, + RR0_CTS = 0x20, + RR0_TX_UNDERRUN = 0x40, + RR0_BREAK_ABORT = 0x80 }; enum { - RR1_ALL_SENT = 0x01, - RR1_RESIDUE_CODE_MASK = 0x0e, - RR1_PARITY_ERROR = 0x10, - RR1_RX_OVERRUN_ERROR = 0x20, - RR1_CRC_FRAMING_ERROR = 0x40, - RR1_END_OF_FRAME = 0x80 + RR1_ALL_SENT = 0x01, + RR1_RESIDUE_CODE_MASK = 0x0e, + RR1_PARITY_ERROR = 0x10, + RR1_RX_OVERRUN_ERROR = 0x20, + RR1_CRC_FRAMING_ERROR = 0x40, + RR1_END_OF_FRAME = 0x80 }; enum - { // TODO: overload SIO functionality - RR2_INT_VECTOR_MASK = 0xff, // SCC channel A, SIO channel B (special case) - RR2_INT_VECTOR_V1 = 0x02, // SIO (special case) /SCC Channel B - RR2_INT_VECTOR_V2 = 0x04, // SIO (special case) /SCC Channel B - RR2_INT_VECTOR_V3 = 0x08 // SIO (special case) /SCC Channel B + { // TODO: overload SIO functionality + RR2_INT_VECTOR_MASK = 0xff, // SCC channel A, SIO channel B (special case) + RR2_INT_VECTOR_V1 = 0x02, // SIO (special case) /SCC Channel B + RR2_INT_VECTOR_V2 = 0x04, // SIO (special case) /SCC Channel B + RR2_INT_VECTOR_V3 = 0x08 // SIO (special case) /SCC Channel B }; - + enum { - WR0_REGISTER_MASK = 0x07, - WR0_COMMAND_MASK = 0x38, - WR0_NULL = 0x00, - WR0_SEND_ABORT = 0x08, // not supported - WR0_RESET_EXT_STATUS = 0x10, - WR0_CHANNEL_RESET = 0x18, - WR0_ENABLE_INT_NEXT_RX = 0x20, - WR0_RESET_TX_INT = 0x28, // not supported - WR0_ERROR_RESET = 0x30, - WR0_RETURN_FROM_INT = 0x38, // not supported - WR0_CRC_RESET_CODE_MASK = 0xc0, // not supported - WR0_CRC_RESET_NULL = 0x00, // not supported - WR0_CRC_RESET_RX = 0x40, // not supported - WR0_CRC_RESET_TX = 0x80, // not supported + WR0_REGISTER_MASK = 0x07, + WR0_COMMAND_MASK = 0x38, + WR0_NULL = 0x00, + WR0_SEND_ABORT = 0x08, // not supported + WR0_RESET_EXT_STATUS = 0x10, + WR0_CHANNEL_RESET = 0x18, + WR0_ENABLE_INT_NEXT_RX = 0x20, + WR0_RESET_TX_INT = 0x28, // not supported + WR0_ERROR_RESET = 0x30, + WR0_RETURN_FROM_INT = 0x38, // not supported + WR0_CRC_RESET_CODE_MASK = 0xc0, // not supported + WR0_CRC_RESET_NULL = 0x00, // not supported + WR0_CRC_RESET_RX = 0x40, // not supported + WR0_CRC_RESET_TX = 0x80, // not supported WR0_CRC_RESET_TX_UNDERRUN = 0xc0 // not supported }; enum { - WR1_EXT_INT_ENABLE = 0x01, - WR1_TX_INT_ENABLE = 0x02, - WR1_STATUS_VECTOR = 0x04, - WR1_RX_INT_MODE_MASK = 0x18, - WR1_RX_INT_DISABLE = 0x00, - WR1_RX_INT_FIRST = 0x08, - WR1_RX_INT_ALL_PARITY = 0x10, // not supported - WR1_RX_INT_ALL = 0x18, - WR1_WRDY_ON_RX_TX = 0x20, // not supported - WR1_WRDY_FUNCTION = 0x40, // not supported - WR1_WRDY_ENABLE = 0x80 // not supported + WR1_EXT_INT_ENABLE = 0x01, + WR1_TX_INT_ENABLE = 0x02, + WR1_STATUS_VECTOR = 0x04, + WR1_RX_INT_MODE_MASK = 0x18, + WR1_RX_INT_DISABLE = 0x00, + WR1_RX_INT_FIRST = 0x08, + WR1_RX_INT_ALL_PARITY = 0x10, // not supported + WR1_RX_INT_ALL = 0x18, + WR1_WRDY_ON_RX_TX = 0x20, // not supported + WR1_WRDY_FUNCTION = 0x40, // not supported + WR1_WRDY_ENABLE = 0x80 // not supported }; enum { - WR2_DATA_XFER_INT = 0x00, // not supported - WR2_DATA_XFER_DMA_INT = 0x01, // not supported - WR2_DATA_XFER_DMA = 0x02, // not supported - WR2_DATA_XFER_ILLEGAL = 0x03, // not supported - WR2_DATA_XFER_MASK = 0x03, // not supported - WR2_PRIORITY = 0x04, // not supported - WR2_MODE_8085_1 = 0x00, // not supported - WR2_MODE_8085_2 = 0x08, // not supported - WR2_MODE_8086_8088 = 0x10, // not supported - WR2_MODE_ILLEGAL = 0x18, // not supported - WR2_MODE_MASK = 0x18, // not supported - WR2_VECTORED_INT = 0x20, // not supported - WR2_PIN10_SYNDETB_RTSB = 0x80 // not supported + WR2_DATA_XFER_INT = 0x00, // not supported + WR2_DATA_XFER_DMA_INT = 0x01, // not supported + WR2_DATA_XFER_DMA = 0x02, // not supported + WR2_DATA_XFER_ILLEGAL = 0x03, // not supported + WR2_DATA_XFER_MASK = 0x03, // not supported + WR2_PRIORITY = 0x04, // not supported + WR2_MODE_8085_1 = 0x00, // not supported + WR2_MODE_8085_2 = 0x08, // not supported + WR2_MODE_8086_8088 = 0x10, // not supported + WR2_MODE_ILLEGAL = 0x18, // not supported + WR2_MODE_MASK = 0x18, // not supported + WR2_VECTORED_INT = 0x20, // not supported + WR2_PIN10_SYNDETB_RTSB = 0x80 // not supported }; enum { - WR3_RX_ENABLE = 0x01, + WR3_RX_ENABLE = 0x01, WR3_SYNC_CHAR_LOAD_INHIBIT= 0x02, // not supported - WR3_ADDRESS_SEARCH_MODE = 0x04, // not supported - WR3_RX_CRC_ENABLE = 0x08, // not supported - WR3_ENTER_HUNT_PHASE = 0x10, // not supported - WR3_AUTO_ENABLES = 0x20, - WR3_RX_WORD_LENGTH_MASK = 0xc0, - WR3_RX_WORD_LENGTH_5 = 0x00, - WR3_RX_WORD_LENGTH_7 = 0x40, - WR3_RX_WORD_LENGTH_6 = 0x80, - WR3_RX_WORD_LENGTH_8 = 0xc0 + WR3_ADDRESS_SEARCH_MODE = 0x04, // not supported + WR3_RX_CRC_ENABLE = 0x08, // not supported + WR3_ENTER_HUNT_PHASE = 0x10, // not supported + WR3_AUTO_ENABLES = 0x20, + WR3_RX_WORD_LENGTH_MASK = 0xc0, + WR3_RX_WORD_LENGTH_5 = 0x00, + WR3_RX_WORD_LENGTH_7 = 0x40, + WR3_RX_WORD_LENGTH_6 = 0x80, + WR3_RX_WORD_LENGTH_8 = 0xc0 }; enum { - WR4_PARITY_ENABLE = 0x01, - WR4_PARITY_EVEN = 0x02, - WR4_STOP_BITS_MASK = 0x0c, - WR4_STOP_BITS_1 = 0x04, - WR4_STOP_BITS_1_5 = 0x08, // not supported - WR4_STOP_BITS_2 = 0x0c, - WR4_SYNC_MODE_MASK = 0x30, // not supported - WR4_SYNC_MODE_8_BIT = 0x00, // not supported - WR4_SYNC_MODE_16_BIT = 0x10, // not supported - WR4_SYNC_MODE_SDLC = 0x20, // not supported - WR4_SYNC_MODE_EXT = 0x30, // not supported - WR4_CLOCK_RATE_MASK = 0xc0, - WR4_CLOCK_RATE_X1 = 0x00, - WR4_CLOCK_RATE_X16 = 0x40, - WR4_CLOCK_RATE_X32 = 0x80, - WR4_CLOCK_RATE_X64 = 0xc0 + WR4_PARITY_ENABLE = 0x01, + WR4_PARITY_EVEN = 0x02, + WR4_STOP_BITS_MASK = 0x0c, + WR4_STOP_BITS_1 = 0x04, + WR4_STOP_BITS_1_5 = 0x08, // not supported + WR4_STOP_BITS_2 = 0x0c, + WR4_SYNC_MODE_MASK = 0x30, // not supported + WR4_SYNC_MODE_8_BIT = 0x00, // not supported + WR4_SYNC_MODE_16_BIT = 0x10, // not supported + WR4_SYNC_MODE_SDLC = 0x20, // not supported + WR4_SYNC_MODE_EXT = 0x30, // not supported + WR4_CLOCK_RATE_MASK = 0xc0, + WR4_CLOCK_RATE_X1 = 0x00, + WR4_CLOCK_RATE_X16 = 0x40, + WR4_CLOCK_RATE_X32 = 0x80, + WR4_CLOCK_RATE_X64 = 0xc0 }; enum { - WR5_TX_CRC_ENABLE = 0x01, // not supported - WR5_RTS = 0x02, - WR5_CRC16 = 0x04, // not supported - WR5_TX_ENABLE = 0x08, - WR5_SEND_BREAK = 0x10, - WR5_TX_WORD_LENGTH_MASK = 0x60, - WR5_TX_WORD_LENGTH_5 = 0x00, - WR5_TX_WORD_LENGTH_6 = 0x40, - WR5_TX_WORD_LENGTH_7 = 0x20, - WR5_TX_WORD_LENGTH_8 = 0x60, - WR5_DTR = 0x80 + WR5_TX_CRC_ENABLE = 0x01, // not supported + WR5_RTS = 0x02, + WR5_CRC16 = 0x04, // not supported + WR5_TX_ENABLE = 0x08, + WR5_SEND_BREAK = 0x10, + WR5_TX_WORD_LENGTH_MASK = 0x60, + WR5_TX_WORD_LENGTH_5 = 0x00, + WR5_TX_WORD_LENGTH_6 = 0x40, + WR5_TX_WORD_LENGTH_7 = 0x20, + WR5_TX_WORD_LENGTH_8 = 0x60, + WR5_DTR = 0x80 }; void update_serial(); @@ -366,30 +366,30 @@ protected: int get_tx_word_length(); // receiver state - UINT8 m_rx_data_fifo[3]; // receive data FIFO - UINT8 m_rx_error_fifo[3]; // receive error FIFO - UINT8 m_rx_error; // current receive error - int m_rx_fifo; // receive FIFO pointer + UINT8 m_rx_data_fifo[3]; // receive data FIFO + UINT8 m_rx_error_fifo[3]; // receive error FIFO + UINT8 m_rx_error; // current receive error + int m_rx_fifo; // receive FIFO pointer - int m_rx_clock; // receive clock pulse count - int m_rx_first; // first character received - int m_rx_break; // receive break condition - UINT8 m_rx_rr0_latch; // read register 0 latched + int m_rx_clock; // receive clock pulse count + int m_rx_first; // first character received + int m_rx_break; // receive break condition + UINT8 m_rx_rr0_latch; // read register 0 latched int m_rxd; - int m_sh; // sync hunt - int m_cts; // clear to send latch - int m_dcd; // data carrier detect latch + int m_sh; // sync hunt + int m_cts; // clear to send latch + int m_dcd; // data carrier detect latch // transmitter state - UINT8 m_tx_data; // transmit data register - int m_tx_clock; // transmit clock pulse count + UINT8 m_tx_data; // transmit data register + int m_tx_clock; // transmit clock pulse count - int m_dtr; // data terminal ready - int m_rts; // request to send + int m_dtr; // data terminal ready + int m_rts; // request to send // synchronous state - UINT16 m_sync; // sync character + UINT16 m_sync; // sync character int m_index; z80sio_device *m_uart; @@ -403,11 +403,11 @@ class z80sio_device : public device_t, { friend class z80sio_channel; - public: + public: // construction/destruction z80sio_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, UINT32 variant, const char *shortname, const char *source); z80sio_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + template<class _Object> static devcb_base &set_out_txda_callback(device_t &device, _Object object) { return downcast<z80sio_device &>(device).m_out_txda_cb.set_callback(object); } template<class _Object> static devcb_base &set_out_dtra_callback(device_t &device, _Object object) { return downcast<z80sio_device &>(device).m_out_dtra_cb.set_callback(object); } template<class _Object> static devcb_base &set_out_rtsa_callback(device_t &device, _Object object) { return downcast<z80sio_device &>(device).m_out_rtsa_cb.set_callback(object); } @@ -504,25 +504,25 @@ protected: int m_rxcb; int m_txcb; - devcb_write_line m_out_txda_cb; - devcb_write_line m_out_dtra_cb; - devcb_write_line m_out_rtsa_cb; - devcb_write_line m_out_wrdya_cb; - devcb_write_line m_out_synca_cb; - - devcb_write_line m_out_txdb_cb; - devcb_write_line m_out_dtrb_cb; - devcb_write_line m_out_rtsb_cb; - devcb_write_line m_out_wrdyb_cb; - devcb_write_line m_out_syncb_cb; - - devcb_write_line m_out_int_cb; - devcb_write_line m_out_rxdrqa_cb; - devcb_write_line m_out_txdrqa_cb; - devcb_write_line m_out_rxdrqb_cb; - devcb_write_line m_out_txdrqb_cb; - - int m_int_state[8]; // interrupt state + devcb_write_line m_out_txda_cb; + devcb_write_line m_out_dtra_cb; + devcb_write_line m_out_rtsa_cb; + devcb_write_line m_out_wrdya_cb; + devcb_write_line m_out_synca_cb; + + devcb_write_line m_out_txdb_cb; + devcb_write_line m_out_dtrb_cb; + devcb_write_line m_out_rtsb_cb; + devcb_write_line m_out_wrdyb_cb; + devcb_write_line m_out_syncb_cb; + + devcb_write_line m_out_int_cb; + devcb_write_line m_out_rxdrqa_cb; + devcb_write_line m_out_txdrqa_cb; + devcb_write_line m_out_rxdrqb_cb; + devcb_write_line m_out_txdrqb_cb; + + int m_int_state[8]; // interrupt state int m_variant; }; diff --git a/src/devices/sound/discrete.c b/src/devices/sound/discrete.c index 71e95ed46bc..e9e1281f42c 100644 --- a/src/devices/sound/discrete.c +++ b/src/devices/sound/discrete.c @@ -436,7 +436,7 @@ void discrete_base_node::resolve_input_nodes(void) { m_device->discrete_log("Warning - discrete_start - NODE_%02d trying to use a node on static input %d", index(), inputnum); /* also report it in the error log so it is not missed */ - logerror("Warning - discrete_start - NODE_%02d trying to use a node on static input %d", index(), inputnum); + m_device->logerror("Warning - discrete_start - NODE_%02d trying to use a node on static input %d", index(), inputnum); } else { diff --git a/src/devices/sound/fm.c b/src/devices/sound/fm.c index 3782790409f..cb30e55656a 100644 --- a/src/devices/sound/fm.c +++ b/src/devices/sound/fm.c @@ -683,7 +683,7 @@ struct FM_OPN #define LOG_LEVEL LOG_INF #ifndef __RAINE__ -#define LOG(n,x) do { if( (n)>=LOG_LEVEL ) logerror x; } while (0) +#define LOG(d,n,x) do { if( (n)>=LOG_LEVEL ) d->logerror x; } while (0) #endif /* limitter */ @@ -2422,6 +2422,8 @@ struct YM2610 UINT8 flagmask; /* YM2608 only */ UINT8 irqmask; /* YM2608 only */ + + device_t *device; }; /* here is the virtual YM2608 */ @@ -2558,19 +2560,19 @@ static void FM_ADPCMAWrite(YM2610 *F2610,int r,int v) if(F2610->pcmbuf==NULL) { /* Check ROM Mapped */ - logerror("YM2608-YM2610: ADPCM-A rom not mapped\n"); + F2610->device->logerror("YM2608-YM2610: ADPCM-A rom not mapped\n"); adpcm[c].flag = 0; } else { if(adpcm[c].end >= F2610->pcm_size) { /* Check End in Range */ - logerror("YM2610: ADPCM-A end out of range: $%08x\n",adpcm[c].end); + F2610->device->logerror("YM2610: ADPCM-A end out of range: $%08x\n",adpcm[c].end); /*adpcm[c].end = F2610->pcm_size-1;*/ /* JB: DO NOT uncomment this, otherwise you will break the comparison in the ADPCM_CALC_CHA() */ } if(adpcm[c].start >= F2610->pcm_size) /* Check Start in Range */ { - logerror("YM2608-YM2610: ADPCM-A start out of range: $%08x\n",adpcm[c].start); + F2610->device->logerror("YM2608-YM2610: ADPCM-A start out of range: $%08x\n",adpcm[c].start); adpcm[c].flag = 0; } } @@ -3070,7 +3072,7 @@ void ym2608_reset_chip(void *chip) DELTAT->output_pointer = OPN->out_delta; DELTAT->portshift = 5; /* always 5bits shift */ /* ASG */ DELTAT->output_range = 1<<23; - YM_DELTAT_ADPCM_Reset(DELTAT,OUTD_CENTER,YM_DELTAT_EMULATION_MODE_NORMAL); + YM_DELTAT_ADPCM_Reset(DELTAT,OUTD_CENTER,YM_DELTAT_EMULATION_MODE_NORMAL,DELTAT->device); } /* YM2608 write */ @@ -3153,7 +3155,7 @@ int ym2608_write(void *chip, int a,UINT8 v) switch( addr ) { case 0x0e: /* DAC data */ - logerror("YM2608: write to DAC data (unimplemented) value=%02x\n",v); + F2608->device->logerror("YM2608: write to DAC data (unimplemented) value=%02x\n",v); break; default: /* 0x00-0x0d */ @@ -3205,7 +3207,7 @@ UINT8 ym2608_read(void *chip,int a) { if(addr == 0x0f) { - logerror("YM2608 A/D convertion is accessed but not implemented !\n"); + F2608->device->logerror("YM2608 A/D convertion is accessed but not implemented !\n"); ret = 0x80; /* 2's complement PCM data - result from A/D convertion */ } } @@ -3283,9 +3285,9 @@ void ym2610_update_one(void *chip, FMSAMPLE **buffer, int length) #define FM_MSG_YM2610B "YM2610-%p.CH%d is playing,Check whether the type of the chip is YM2610B\n" /* Check YM2610B warning message */ if( FM_KEY_IS(&F2610->CH[0].SLOT[3]) ) - LOG(LOG_WAR,(FM_MSG_YM2610B,F2610->OPN.ST.param,0)); + LOG(F2610->device,LOG_WAR,(FM_MSG_YM2610B,F2610->OPN.ST.param,0)); if( FM_KEY_IS(&F2610->CH[3].SLOT[3]) ) - LOG(LOG_WAR,(FM_MSG_YM2610B,F2610->OPN.ST.param,3)); + LOG(F2610->device,LOG_WAR,(FM_MSG_YM2610B,F2610->OPN.ST.param,3)); #endif /* refresh PG and EG */ @@ -3628,6 +3630,7 @@ void *ym2610_init(void *param, device_t *device, int clock, int rate, return NULL; } + F2610->device = device; /* FM */ F2610->OPN.ST.param = param; F2610->OPN.type = TYPE_YM2610; @@ -3744,7 +3747,7 @@ void ym2610_reset_chip(void *chip) DELTAT->output_pointer = OPN->out_delta; DELTAT->portshift = 8; /* allways 8bits shift */ DELTAT->output_range = 1<<23; - YM_DELTAT_ADPCM_Reset(DELTAT,OUTD_CENTER,YM_DELTAT_EMULATION_MODE_YM2610); + YM_DELTAT_ADPCM_Reset(DELTAT,OUTD_CENTER,YM_DELTAT_EMULATION_MODE_YM2610,F2610->device); } /* YM2610 write */ @@ -3817,7 +3820,7 @@ int ym2610_write(void *chip, int a, UINT8 v) break; default: - logerror("YM2610: write to unknown deltat register %02x val=%02x\n",addr,v); + F2610->device->logerror("YM2610: write to unknown deltat register %02x val=%02x\n",addr,v); break; } diff --git a/src/devices/sound/fm2612.c b/src/devices/sound/fm2612.c index 034b07a8595..22e7e8b7749 100644 --- a/src/devices/sound/fm2612.c +++ b/src/devices/sound/fm2612.c @@ -693,6 +693,7 @@ struct YM2612 /* dac output (YM2612) */ int dacen; INT32 dacout; + device_t *device; }; /* log output level */ @@ -702,7 +703,7 @@ struct YM2612 #define LOG_LEVEL LOG_INF #ifndef __RAINE__ -#define LOG(n,x) do { if( (n)>=LOG_LEVEL ) logerror x; } while (0) +#define LOG(d,n,x) do { if( (n)>=LOG_LEVEL ) d->logerror x; } while (0) #endif /* limitter */ @@ -2375,6 +2376,7 @@ void * ym2612_init(void *param, device_t *device, int clock, int rate, /* allocate total level table (128kb space) */ init_tables(); + F2612->device = device; F2612->OPN.ST.param = param; F2612->OPN.type = TYPE_YM2612; F2612->OPN.P_CH = F2612->CH; @@ -2528,7 +2530,7 @@ UINT8 ym2612_read(void *chip,int a) case 1: case 2: case 3: - LOG(LOG_WAR,("YM2612 #%p:A=%d read unmapped area\n",F2612->OPN.ST.param,a)); + LOG(F2612->device,LOG_WAR,("YM2612 #%p:A=%d read unmapped area\n",F2612->OPN.ST.param,a)); return FM_STATUS_FLAG(&F2612->OPN.ST); } return 0; diff --git a/src/devices/sound/fmopl.c b/src/devices/sound/fmopl.c index 4932cde31fa..e368e3a077d 100644 --- a/src/devices/sound/fmopl.c +++ b/src/devices/sound/fmopl.c @@ -1520,7 +1520,7 @@ static void OPLWriteReg(FM_OPL *OPL, int r, int v) if(OPL->keyboardhandler_w) OPL->keyboardhandler_w(OPL->keyboard_param,v); else - logerror("Y8950: write unmapped KEYBOARD port\n"); + OPL->device->logerror("Y8950: write unmapped KEYBOARD port\n"); } break; case 0x07: /* DELTA-T control 1 : START,REC,MEMDATA,REPT,SPOFF,x,x,RST */ @@ -1554,7 +1554,7 @@ static void OPLWriteReg(FM_OPL *OPL, int r, int v) case 0x15: /* DAC data high 8 bits (F7,F6...F2) */ case 0x16: /* DAC data low 2 bits (F1, F0 in bits 7,6) */ case 0x17: /* DAC data shift (S2,S1,S0 in bits 2,1,0) */ - logerror("FMOPL.C: DAC data register written, but not implemented reg=%02x val=%02x\n",r,v); + OPL->device->logerror("FMOPL.C: DAC data register written, but not implemented reg=%02x val=%02x\n",r,v); break; case 0x18: /* I/O CTRL (Direction) */ @@ -1571,7 +1571,7 @@ static void OPLWriteReg(FM_OPL *OPL, int r, int v) break; #endif default: - logerror("FMOPL.C: write to unknown register: %02x\n",r); + OPL->device->logerror("FMOPL.C: write to unknown register: %02x\n",r); break; } break; @@ -1748,7 +1748,7 @@ static int OPL_LockTable(device_t *device) if (cymfile) device->machine().scheduler().timer_pulse ( attotime::from_hz(110), FUNC(cymfile_callback)); /*110 Hz pulse timer*/ else - logerror("Could not create file 3812_.cym\n"); + device->logerror("Could not create file 3812_.cym\n"); } return 0; @@ -1808,7 +1808,7 @@ static void OPLResetChip(FM_OPL *OPL) DELTAT->output_pointer = &OPL->output_deltat[0]; DELTAT->portshift = 5; DELTAT->output_range = 1<<23; - YM_DELTAT_ADPCM_Reset(DELTAT,0,YM_DELTAT_EMULATION_MODE_NORMAL); + YM_DELTAT_ADPCM_Reset(DELTAT,0,YM_DELTAT_EMULATION_MODE_NORMAL,OPL->device); } #endif } @@ -2074,7 +2074,7 @@ static unsigned char OPLRead(FM_OPL *OPL,int a) if(OPL->keyboardhandler_r) return OPL->keyboardhandler_r(OPL->keyboard_param); else - logerror("Y8950: read unmapped KEYBOARD port\n"); + OPL->device->logerror("Y8950: read unmapped KEYBOARD port\n"); } return 0; @@ -2095,13 +2095,13 @@ static unsigned char OPLRead(FM_OPL *OPL,int a) if(OPL->porthandler_r) return OPL->porthandler_r(OPL->port_param); else - logerror("Y8950:read unmapped I/O port\n"); + OPL->device->logerror("Y8950:read unmapped I/O port\n"); } return 0; case 0x1a: /* PCM-DATA */ if(OPL->type&OPL_TYPE_ADPCM) { - logerror("Y8950 A/D convertion is accessed but not implemented !\n"); + OPL->device->logerror("Y8950 A/D convertion is accessed but not implemented !\n"); return 0x80; /* 2's complement PCM data - result from A/D convertion */ } return 0; diff --git a/src/devices/sound/k053260.c b/src/devices/sound/k053260.c index 86054000829..8ec3937cffe 100644 --- a/src/devices/sound/k053260.c +++ b/src/devices/sound/k053260.c @@ -383,10 +383,10 @@ void k053260_device::KDSC_Voice::update_pan_volume() void k053260_device::KDSC_Voice::key_on() { if (m_start >= m_device->m_rom_size) - logerror("K053260: Attempting to start playing past the end of the ROM ( start = %06x, length = %06x )\n", m_start, m_length); + m_device->logerror("K053260: Attempting to start playing past the end of the ROM ( start = %06x, length = %06x )\n", m_start, m_length); else if (m_start + m_length >= m_device->m_rom_size) - logerror("K053260: Attempting to play past the end of the ROM ( start = %06x, length = %06x )\n", + m_device->logerror("K053260: Attempting to play past the end of the ROM ( start = %06x, length = %06x )\n", m_start, m_length); else @@ -395,7 +395,7 @@ void k053260_device::KDSC_Voice::key_on() m_counter = 0x1000 - CLOCKS_PER_SAMPLE; // force update on next sound_stream_update m_output = 0; m_playing = true; - if (LOG) logerror("K053260: start = %06x, length = %06x, pitch = %04x, vol = %02x, loop = %s, %s\n", + if (LOG) m_device->logerror("K053260: start = %06x, length = %06x, pitch = %04x, vol = %02x, loop = %s, %s\n", m_start, m_length, m_pitch, m_volume, m_loop ? "yes" : "no", m_kadpcm ? "KADPCM" : "PCM" ); } } @@ -465,7 +465,7 @@ UINT8 k053260_device::KDSC_Voice::read_rom() if (offs >= m_device->m_rom_size) { - logerror("%s: K053260: Attempting to read past the end of the ROM (offs = %06x, size = %06x)\n", + m_device->logerror("%s: K053260: Attempting to read past the end of the ROM (offs = %06x, size = %06x)\n", m_device->machine().describe_context(), offs, m_device->m_rom_size); return 0; } diff --git a/src/devices/sound/samples.c b/src/devices/sound/samples.c index 863e30f0832..964c21e2b22 100644 --- a/src/devices/sound/samples.c +++ b/src/devices/sound/samples.c @@ -84,8 +84,8 @@ void samples_device::start(UINT8 channel, UINT32 samplenum, bool loop) chan.stream->update(); // update the parameters - sample_t &sample = m_sample[samplenum]; - chan.source = &sample.data[0]; + sample_t &sample = m_sample[samplenum]; + chan.source = (sample.data.size() > 0) ? &sample.data[0] : NULL; chan.source_length = sample.data.size(); chan.source_num = (chan.source_length > 0) ? samplenum : -1; chan.pos = 0; diff --git a/src/devices/sound/tms5220.c b/src/devices/sound/tms5220.c index feb3a8e01fe..6129ecb3370 100644 --- a/src/devices/sound/tms5220.c +++ b/src/devices/sound/tms5220.c @@ -161,7 +161,7 @@ Interpolation is inhibited (i.e. interpolation at IP frames will not happen x100aaaa: LOAD ADDRESS (LA) Send a load address command (M0 low M1 high) to VSM with the 4 'a' bits; Note you need to send four or five of these in sequence to actually specify an address to the vsm. TALK STATUS must be CLEAR for this command to work; otherwise it is treated as a NOP. - x101xxxx: SPEAK (SPK) Begins speaking, pulling spech data from the current address pointer location of the VSM modules. + x101xxxx: SPEAK (SPK) Begins speaking, pulling speech data from the current address pointer location of the VSM modules. x110xxxx: SPEAK EXTERNAL (SPKEXT) Clears the FIFO using SPKEE line, then sets TALKD (TALKST remains zero) until 8 bytes have been written to the FIFO, at which point it begins speaking, pulling data from the 16 byte fifo. The patent implies TALK STATUS must be CLEAR for this command to work; otherwise it is treated as a NOP, but the decap shows that this is not true, and is an error on the patent diagram. @@ -575,7 +575,8 @@ void tms5220_device::update_fifo_status_and_ints() if (!m_buffer_empty) set_interrupt_state(1); m_buffer_empty = 1; - m_TALK = m_SPEN = 0; // /BE being active clears the TALK status via TCON, which in turn clears SPEN + if (m_DDIS) + m_TALK = m_SPEN = 0; // /BE being active clears the TALK status via TCON, which in turn clears SPEN, but ONLY if m_DDIS is set! See patent page 16, gate 232b } else m_buffer_empty = 0; @@ -1181,7 +1182,7 @@ void tms5220_device::process_command(unsigned char cmd) m_data_register = m_speechrom->read(8); /* read one byte from speech ROM... */ m_RDB_flag = TRUE; } - break; + break; case 0x00: case 0x20: /* set rate (tms5220c and cd2501ecd only), otherwise NOP */ if (TMS5220_HAS_RATE_CONTROL) @@ -1601,6 +1602,9 @@ void tms5220_device::device_timer(emu_timer &timer, device_timer_id id, int para /* bring up to date first */ m_stream->update(); m_read_latch = status_read(); +#ifdef DEBUG_IO_READY + fprintf(stderr,"Serviced read, returning %02x\n", m_read_latch); +#endif break; case 0x03: /* High Impedance */ diff --git a/src/devices/sound/ym2151.c b/src/devices/sound/ym2151.c index 804cbc5a6fd..b709efa14bd 100644 --- a/src/devices/sound/ym2151.c +++ b/src/devices/sound/ym2151.c @@ -1197,7 +1197,7 @@ void ym2151_write_reg(void *_chip, int r, int v) break; default: - logerror("YM2151 Write %02x to undocumented register #%02x\n",v,r); + chip->device->logerror("YM2151 Write %02x to undocumented register #%02x\n",v,r); break; } break; @@ -1548,7 +1548,7 @@ void * ym2151_init(device_t *device, int clock, int rate) if (cymfile) device->machine().scheduler().timer_pulse ( attotime::from_hz(110), FUNC(cymfile_callback)); /*110 Hz pulse timer*/ else - logerror("Could not create file 2151_.cym\n"); + device->logerror("Could not create file 2151_.cym\n"); } return PSG; diff --git a/src/devices/sound/ym2413.c b/src/devices/sound/ym2413.c index 631560912b0..505e3385fc6 100644 --- a/src/devices/sound/ym2413.c +++ b/src/devices/sound/ym2413.c @@ -1689,7 +1689,7 @@ static void OPLLWriteReg(YM2413 *chip, int r, int v) if ((chip->rhythm&0x20)==0) /*rhythm off to on*/ { - logerror("YM2413: Rhythm mode enable\n"); + chip->device->logerror("YM2413: Rhythm mode enable\n"); /* Load instrument settings for channel seven(chan=6 since we're zero based). (Bass drum) */ chan = 6; @@ -1751,7 +1751,7 @@ static void OPLLWriteReg(YM2413 *chip, int r, int v) if (chip->rhythm&0x20) /*rhythm on to off*/ { - logerror("YM2413: Rhythm mode disable\n"); + chip->device->logerror("YM2413: Rhythm mode disable\n"); /* Load instrument settings for channel seven(chan=6 since we're zero based).*/ chan = 6; inst = &chip->inst_tab[chip->instvol_r[chan]>>4][0]; @@ -1825,7 +1825,7 @@ static void OPLLWriteReg(YM2413 *chip, int r, int v) if (CH->sus!=(v&0x20)) - logerror("chan=%i sus=%2x\n",chan,v&0x20); + chip->device->logerror("chan=%i sus=%2x\n",chan,v&0x20); CH->sus = v & 0x20; } @@ -1939,7 +1939,7 @@ static int OPLL_LockTable(device_t *device) if (cymfile) device->machine().scheduler().timer_pulse ( attotime::from_hz(110), FUNC(cymfile_callback)); /*110 Hz pulse timer*/ else - logerror("Could not create file 2413_.cym\n"); + device->logerror("Could not create file 2413_.cym\n"); } return 0; diff --git a/src/devices/sound/ymdeltat.c b/src/devices/sound/ymdeltat.c index 30600b2d02b..7d67bcf357b 100644 --- a/src/devices/sound/ymdeltat.c +++ b/src/devices/sound/ymdeltat.c @@ -228,7 +228,7 @@ value: START, REC, MEMDAT, REPEAT, SPOFF, x,x,RESET meaning: /* if yes, then let's check if ADPCM memory is mapped and big enough */ if(DELTAT->memory == 0) { - logerror("YM Delta-T ADPCM rom not mapped\n"); + DELTAT->device->logerror("YM Delta-T ADPCM rom not mapped\n"); DELTAT->portstate = 0x00; DELTAT->PCM_BSY = 0; } @@ -236,12 +236,12 @@ value: START, REC, MEMDAT, REPEAT, SPOFF, x,x,RESET meaning: { if( DELTAT->end >= DELTAT->memory_size ) /* Check End in Range */ { - logerror("YM Delta-T ADPCM end out of range: $%08x\n", DELTAT->end); + DELTAT->device->logerror("YM Delta-T ADPCM end out of range: $%08x\n", DELTAT->end); DELTAT->end = DELTAT->memory_size - 1; } if( DELTAT->start >= DELTAT->memory_size ) /* Check Start in Range */ { - logerror("YM Delta-T ADPCM start out of range: $%08x\n", DELTAT->start); + DELTAT->device->logerror("YM Delta-T ADPCM start out of range: $%08x\n", DELTAT->start); DELTAT->portstate = 0x00; DELTAT->PCM_BSY = 0; } @@ -411,8 +411,9 @@ value: START, REC, MEMDAT, REPEAT, SPOFF, x,x,RESET meaning: } } -void YM_DELTAT_ADPCM_Reset(YM_DELTAT *DELTAT,int pan,int emulation_mode) +void YM_DELTAT_ADPCM_Reset(YM_DELTAT *DELTAT,int pan,int emulation_mode,device_t *device) { + DELTAT->device = device; DELTAT->now_addr = 0; DELTAT->now_step = 0; DELTAT->step = 0; diff --git a/src/devices/sound/ymdeltat.h b/src/devices/sound/ymdeltat.h index 28b5d535b32..afff1ab447a 100644 --- a/src/devices/sound/ymdeltat.h +++ b/src/devices/sound/ymdeltat.h @@ -71,13 +71,14 @@ struct YM_DELTAT { /* AT: rearranged and tigntened structure */ UINT8 reg[16]; /* adpcm registers */ UINT8 emulation_mode; /* which chip we're emulating */ + device_t *device; }; /*void YM_DELTAT_BRDY_callback(YM_DELTAT *DELTAT);*/ UINT8 YM_DELTAT_ADPCM_Read(YM_DELTAT *DELTAT); void YM_DELTAT_ADPCM_Write(YM_DELTAT *DELTAT,int r,int v); -void YM_DELTAT_ADPCM_Reset(YM_DELTAT *DELTAT,int pan,int emulation_mode); +void YM_DELTAT_ADPCM_Reset(YM_DELTAT *DELTAT,int pan,int emulation_mode, device_t *device); void YM_DELTAT_ADPCM_CALC(YM_DELTAT *DELTAT); void YM_DELTAT_postload(YM_DELTAT *DELTAT,UINT8 *regs); diff --git a/src/devices/sound/ymf262.c b/src/devices/sound/ymf262.c index 0982ae266e8..5e4349e2f5b 100644 --- a/src/devices/sound/ymf262.c +++ b/src/devices/sound/ymf262.c @@ -1701,7 +1701,7 @@ static void OPL3WriteReg(OPL3 *chip, int r, int v) default: if (r < 0x120) - logerror("YMF262: write to unknown register (set#2): %03x value=%02x\n",r,v); + chip->device->logerror("YMF262: write to unknown register (set#2): %03x value=%02x\n",r,v); break; } @@ -1761,7 +1761,7 @@ static void OPL3WriteReg(OPL3 *chip, int r, int v) break; default: - logerror("YMF262: write to unknown register: %02x value=%02x\n",r,v); + chip->device->logerror("YMF262: write to unknown register: %02x value=%02x\n",r,v); break; } break; @@ -2271,7 +2271,7 @@ static int OPL3_LockTable(device_t *device) if (cymfile) device->machine().scheduler().timer_pulse ( attotime::from_hz(110), FUNC(cymfile_callback)); /*110 Hz pulse timer*/ else - logerror("Could not create ymf262_.cym file\n"); + device->logerror("Could not create ymf262_.cym file\n"); } return 0; diff --git a/src/devices/video/gf4500.c b/src/devices/video/gf4500.c index 48e2f8495c3..498660b6b44 100644 --- a/src/devices/video/gf4500.c +++ b/src/devices/video/gf4500.c @@ -13,7 +13,7 @@ #define VERBOSE_LEVEL ( 0 ) -INLINE void ATTR_PRINTF(3,4) verboselog( running_machine &machine, int n_level, const char *s_fmt, ...) +INLINE void ATTR_PRINTF(3,4) verboselog( device_t &device, int n_level, const char *s_fmt, ...) { if (VERBOSE_LEVEL >= n_level) { @@ -22,7 +22,7 @@ INLINE void ATTR_PRINTF(3,4) verboselog( running_machine &machine, int n_level, va_start(v, s_fmt); vsprintf(buf, s_fmt, v); va_end(v); - logerror("%s: %s", machine.describe_context(), buf); + device.logerror("%s: %s", device.machine().describe_context(), buf); } } @@ -125,7 +125,7 @@ READ32_MEMBER( gf4500_device::read ) } if ((offset < (GF4500_FRAMEBUF_OFFSET / 4)) || (offset >= ((GF4500_FRAMEBUF_OFFSET + (321 * 240 * 2)) / 4))) { - verboselog(machine(), 9, "(GFO) %08X -> %08X\n", 0x34000000 + (offset << 2), data); + verboselog( *this, 9, "(GFO) %08X -> %08X\n", 0x34000000 + (offset << 2), data); } return data; } @@ -135,7 +135,7 @@ WRITE32_MEMBER( gf4500_device::write ) COMBINE_DATA(&m_data[offset]); if ((offset < (GF4500_FRAMEBUF_OFFSET / 4)) || (offset >= ((GF4500_FRAMEBUF_OFFSET + (321 * 240 * 2)) / 4))) { - verboselog(machine(), 9, "(GFO) %08X <- %08X\n", 0x34000000 + (offset << 2), data); + verboselog( *this, 9, "(GFO) %08X <- %08X\n", 0x34000000 + (offset << 2), data); } switch (offset) { diff --git a/src/devices/video/mc6845.c b/src/devices/video/mc6845.c index 4c1d811369c..372a99a8a30 100644 --- a/src/devices/video/mc6845.c +++ b/src/devices/video/mc6845.c @@ -536,6 +536,9 @@ void mc6845_device::recompute_parameters(bool postload) if ( m_screen != NULL ) m_screen->configure(horiz_pix_total, vert_pix_total, visarea, refresh); + if(!m_reconfigure_cb.isnull()) + m_reconfigure_cb(horiz_pix_total, vert_pix_total, visarea, refresh); + m_has_valid_parameters = true; } else @@ -549,6 +552,7 @@ void mc6845_device::recompute_parameters(bool postload) m_hsync_off_pos = hsync_off_pos; m_vsync_on_pos = vsync_on_pos; m_vsync_off_pos = vsync_off_pos; + m_line_counter = 0; } } @@ -667,6 +671,7 @@ void mc6845_device::handle_line_timer() if ( m_line_counter == m_vert_disp ) { m_line_enable_ff = false; + m_current_disp_addr = m_disp_start_addr; } /* Check if VSYNC should be enabled */ @@ -1005,6 +1010,7 @@ void mc6845_device::device_start() m_out_vsync_cb.resolve_safe(); /* bind delegates */ + m_reconfigure_cb.bind_relative_to(*owner()); m_begin_update_cb.bind_relative_to(*owner()); m_update_row_cb.bind_relative_to(*owner()); m_end_update_cb.bind_relative_to(*owner()); diff --git a/src/devices/video/mc6845.h b/src/devices/video/mc6845.h index 053c2b9491e..c445fac2c33 100644 --- a/src/devices/video/mc6845.h +++ b/src/devices/video/mc6845.h @@ -39,6 +39,9 @@ #define MCFG_MC6845_CHAR_WIDTH(_pixels) \ mc6845_device::set_char_width(*device, _pixels); +#define MCFG_MC6845_RECONFIGURE_CB(_class, _method) \ + mc6845_device::set_reconfigure_callback(*device, mc6845_reconfigure_delegate(&_class::_method, #_class "::" #_method, downcast<_class *>(owner))); + #define MCFG_MC6845_BEGIN_UPDATE_CB(_class, _method) \ mc6845_device::set_begin_update_callback(*device, mc6845_begin_update_delegate(&_class::_method, #_class "::" #_method, downcast<_class *>(owner))); @@ -65,6 +68,9 @@ /* callback definitions */ +typedef device_delegate<void (int width, int height, const rectangle &visarea, attoseconds_t frame_period)> mc6845_reconfigure_delegate; +#define MC6845_RECONFIGURE(name) void name(int width, int height, const rectangle &visarea, attoseconds_t frame_period) + typedef device_delegate<void (bitmap_rgb32 &bitmap, const rectangle &cliprect)> mc6845_begin_update_delegate; #define MC6845_BEGIN_UPDATE(name) void name(bitmap_rgb32 &bitmap, const rectangle &cliprect) @@ -110,6 +116,7 @@ public: } static void set_char_width(device_t &device, int pixels) { downcast<mc6845_device &>(device).m_hpixels_per_column = pixels; } + static void set_reconfigure_callback(device_t &device, mc6845_reconfigure_delegate callback) { downcast<mc6845_device &>(device).m_reconfigure_cb = callback; } static void set_begin_update_callback(device_t &device, mc6845_begin_update_delegate callback) { downcast<mc6845_device &>(device).m_begin_update_cb = callback; } static void set_update_row_callback(device_t &device, mc6845_update_row_delegate callback) { downcast<mc6845_device &>(device).m_update_row_cb = callback; } static void set_end_update_callback(device_t &device, mc6845_end_update_delegate callback) { downcast<mc6845_device &>(device).m_end_update_cb = callback; } @@ -286,6 +293,8 @@ protected: int m_hpixels_per_column; /* number of pixels per video memory address */ + mc6845_reconfigure_delegate m_reconfigure_cb; + /* if specified, this gets called before any pixel update, optionally return a pointer that will be passed to the update and tear down callbacks */ diff --git a/src/devices/video/poly.h b/src/devices/video/poly.h index 0ba401e0755..958c69a934d 100644 --- a/src/devices/video/poly.h +++ b/src/devices/video/poly.h @@ -466,7 +466,7 @@ void poly_manager<_BaseType, _ObjectData, _MaxParams, _MaxPolys>::wait(const cha { time = get_profile_ticks() - time; if (time > LOG_WAIT_THRESHOLD) - logerror("Poly:Waited %d cycles for %s\n", (int)time, debug_reason); + machine().logerror("Poly:Waited %d cycles for %s\n", (int)time, debug_reason); } // reset the state @@ -1177,7 +1177,7 @@ template<typename _BaseType, int _MaxParams> struct frustum_clip_vertex { _BaseType x, y, z, w; // A 3d coordinate already transformed by a projection matrix - _BaseType p[_MaxParams]; // Additional parameters to clip + _BaseType p[_MaxParams]; // Additional parameters to clip }; @@ -1212,11 +1212,11 @@ int frustum_clip_w(const frustum_clip_vertex<_BaseType, _MaxParams>* v, int num_ clipv[clip_verts].y = v[previ].y + ((v[i].y - v[previ].y) * t); clipv[clip_verts].z = v[previ].z + ((v[i].z - v[previ].z) * t); clipv[clip_verts].w = v[previ].w + ((v[i].w - v[previ].w) * t); - - // Interpolate the rest of the parameters - for (int pi = 0; pi < _MaxParams; pi++) - clipv[clip_verts].p[pi] = v[previ].p[pi] + ((v[i].p[pi] - v[previ].p[pi]) * t); - + + // Interpolate the rest of the parameters + for (int pi = 0; pi < _MaxParams; pi++) + clipv[clip_verts].p[pi] = v[previ].p[pi] + ((v[i].p[pi] - v[previ].p[pi]) * t); + ++clip_verts; } if (v1_side > 0) // current point is inside @@ -1280,12 +1280,12 @@ int frustum_clip(const frustum_clip_vertex<_BaseType, _MaxParams>* v, int num_ve clipv[clip_verts].y = v[previ].y + ((v[i].y - v[previ].y) * t); clipv[clip_verts].z = v[previ].z + ((v[i].z - v[previ].z) * t); clipv[clip_verts].w = v[previ].w + ((v[i].w - v[previ].w) * t); - - // Interpolate the rest of the parameters - for (int pi = 0; pi < _MaxParams; pi++) - clipv[clip_verts].p[pi] = v[previ].p[pi] + ((v[i].p[pi] - v[previ].p[pi]) * t); - ++clip_verts; + // Interpolate the rest of the parameters + for (int pi = 0; pi < _MaxParams; pi++) + clipv[clip_verts].p[pi] = v[previ].p[pi] + ((v[i].p[pi] - v[previ].p[pi]) * t); + + ++clip_verts; } if (v1_side > 0) // current point is inside { @@ -1304,15 +1304,15 @@ int frustum_clip(const frustum_clip_vertex<_BaseType, _MaxParams>* v, int num_ve template<typename _BaseType, int _MaxParams> int frustum_clip_all(frustum_clip_vertex<_BaseType, _MaxParams>* clip_vert, int num_vertices, frustum_clip_vertex<_BaseType, _MaxParams>* out) { - num_vertices = frustum_clip_w<_BaseType, _MaxParams>(clip_vert, num_vertices, clip_vert); - num_vertices = frustum_clip<_BaseType, _MaxParams>(clip_vert, num_vertices, clip_vert, 0, 0); // W <= -X - num_vertices = frustum_clip<_BaseType, _MaxParams>(clip_vert, num_vertices, clip_vert, 0, 1); // W <= +X - num_vertices = frustum_clip<_BaseType, _MaxParams>(clip_vert, num_vertices, clip_vert, 1, 0); // W <= -Y - num_vertices = frustum_clip<_BaseType, _MaxParams>(clip_vert, num_vertices, clip_vert, 1, 1); // W <= +X - num_vertices = frustum_clip<_BaseType, _MaxParams>(clip_vert, num_vertices, clip_vert, 2, 0); // W <= -Z - num_vertices = frustum_clip<_BaseType, _MaxParams>(clip_vert, num_vertices, clip_vert, 2, 1); // W <= +Z - out = clip_vert; - return num_vertices; + num_vertices = frustum_clip_w<_BaseType, _MaxParams>(clip_vert, num_vertices, clip_vert); + num_vertices = frustum_clip<_BaseType, _MaxParams>(clip_vert, num_vertices, clip_vert, 0, 0); // W <= -X + num_vertices = frustum_clip<_BaseType, _MaxParams>(clip_vert, num_vertices, clip_vert, 0, 1); // W <= +X + num_vertices = frustum_clip<_BaseType, _MaxParams>(clip_vert, num_vertices, clip_vert, 1, 0); // W <= -Y + num_vertices = frustum_clip<_BaseType, _MaxParams>(clip_vert, num_vertices, clip_vert, 1, 1); // W <= +X + num_vertices = frustum_clip<_BaseType, _MaxParams>(clip_vert, num_vertices, clip_vert, 2, 0); // W <= -Z + num_vertices = frustum_clip<_BaseType, _MaxParams>(clip_vert, num_vertices, clip_vert, 2, 1); // W <= +Z + out = clip_vert; + return num_vertices; } diff --git a/src/devices/video/polylgcy.c b/src/devices/video/polylgcy.c index 720110e5ca3..84b35a5b768 100644 --- a/src/devices/video/polylgcy.c +++ b/src/devices/video/polylgcy.c @@ -414,7 +414,7 @@ void poly_wait(legacy_poly_manager *poly, const char *debug_reason) { time = get_profile_ticks() - time; if (time > LOG_WAIT_THRESHOLD) - logerror("Poly:Waited %d cycles for %s\n", (int)time, debug_reason); + osd_printf_verbose("Poly:Waited %d cycles for %s\n", (int)time, debug_reason); } /* reset the state */ diff --git a/src/devices/video/psx.c b/src/devices/video/psx.c index 167280e3415..fae5adaf923 100644 --- a/src/devices/video/psx.c +++ b/src/devices/video/psx.c @@ -101,7 +101,7 @@ static const UINT16 m_p_n_prevpointlist3[] = { 2, 0, 1 }; #define TEXTURE_V( a ) ( a.b.h ) #define TEXTURE_U( a ) ( a.b.l ) -INLINE void ATTR_PRINTF(3,4) verboselog( running_machine& machine, int n_level, const char *s_fmt, ... ) +INLINE void ATTR_PRINTF(3,4) verboselog( device_t& device, int n_level, const char *s_fmt, ... ) { if( VERBOSE_LEVEL >= n_level ) { @@ -110,7 +110,7 @@ INLINE void ATTR_PRINTF(3,4) verboselog( running_machine& machine, int n_level, va_start( v, s_fmt ); vsprintf( buf, s_fmt, v ); va_end( v ); - logerror( "%s: %s", machine.describe_context(), buf ); + device.logerror( "%s: %s", device.machine().describe_context(), buf ); } } @@ -724,7 +724,7 @@ UINT32 psxgpu_device::update_screen(screen_device &screen, bitmap_ind16 &bitmap, n_line = n_lines; while( n_line > 0 ) { - UINT16 *p_n_src = p_p_vram[ n_y + n_displaystarty ] + ((n_x + n_displaystartx) * 3); + UINT16 *p_n_src = p_p_vram[ n_y + n_displaystarty ] + 3 * n_x + n_displaystartx; UINT16 *p_n_dest = &bitmap.pix16(n_y + n_top, n_x + n_left); n_column = n_columns; @@ -790,11 +790,11 @@ void psxgpu_device::decode_tpage( UINT32 tpage ) n_ti = 0; if( ( tpage & ~0x39ff ) != 0 ) { - verboselog( machine(), 1, "not handled: draw mode %08x\n", tpage & ~0x39ff ); + verboselog( *this, 1, "not handled: draw mode %08x\n", tpage & ~0x39ff ); } if( n_tp == 3 ) { - verboselog( machine(), 0, "not handled: tp == 3\n" ); + verboselog( *this, 0, "not handled: tp == 3\n" ); } } else @@ -810,15 +810,15 @@ void psxgpu_device::decode_tpage( UINT32 tpage ) n_iy = 0; if( ( tpage & ~0x27ef ) != 0 ) { - verboselog( machine(), 1, "not handled: draw mode %08x\n", tpage & ~0x27ef ); + verboselog( *this, 1, "not handled: draw mode %08x\n", tpage & ~0x27ef ); } if( n_tp == 3 ) { - verboselog( machine(), 0, "not handled: tp == 3\n" ); + verboselog( *this, 0, "not handled: tp == 3\n" ); } else if( n_tp == 2 && n_ti != 0 ) { - verboselog( machine(), 0, "not handled: interleaved 15 bit texture\n" ); + verboselog( *this, 0, "not handled: interleaved 15 bit texture\n" ); } } } @@ -863,7 +863,7 @@ void psxgpu_device::decode_tpage( UINT32 tpage ) p_n_redtrans = p_n_redaddtrans; \ p_n_greentrans = p_n_greenaddtrans; \ p_n_bluetrans = p_n_blueaddtrans; \ - verboselog( machine(), 2, "Transparency Mode: 0.5*B + 0.5*F\n" ); \ + verboselog( *this, 2, "Transparency Mode: 0.5*B + 0.5*F\n" ); \ break; \ case 0x01: \ p_n_f = p_n_f1; \ @@ -873,7 +873,7 @@ void psxgpu_device::decode_tpage( UINT32 tpage ) p_n_redtrans = p_n_redaddtrans; \ p_n_greentrans = p_n_greenaddtrans; \ p_n_bluetrans = p_n_blueaddtrans; \ - verboselog( machine(), 2, "Transparency Mode: 1.0*B + 1.0*F\n" ); \ + verboselog( *this, 2, "Transparency Mode: 1.0*B + 1.0*F\n" ); \ break; \ case 0x02: \ p_n_f = p_n_f1; \ @@ -883,7 +883,7 @@ void psxgpu_device::decode_tpage( UINT32 tpage ) p_n_redtrans = p_n_redsubtrans; \ p_n_greentrans = p_n_greensubtrans; \ p_n_bluetrans = p_n_bluesubtrans; \ - verboselog( machine(), 2, "Transparency Mode: 1.0*B - 1.0*F\n" ); \ + verboselog( *this, 2, "Transparency Mode: 1.0*B - 1.0*F\n" ); \ break; \ case 0x03: \ p_n_f = p_n_f025; \ @@ -893,7 +893,7 @@ void psxgpu_device::decode_tpage( UINT32 tpage ) p_n_redtrans = p_n_redaddtrans; \ p_n_greentrans = p_n_greenaddtrans; \ p_n_bluetrans = p_n_blueaddtrans; \ - verboselog( machine(), 2, "Transparency Mode: 1.0*B + 0.25*F\n" ); \ + verboselog( *this, 2, "Transparency Mode: 1.0*B + 0.25*F\n" ); \ break; \ } \ break; \ @@ -3046,15 +3046,15 @@ void psxgpu_device::gpu_write( UINT32 *p_ram, INT32 n_size ) { UINT32 data = *( p_ram ); - verboselog( machine(), 2, "PSX Packet #%u %08x\n", n_gpu_buffer_offset, data ); + verboselog( *this, 2, "PSX Packet #%u %08x\n", n_gpu_buffer_offset, data ); m_packet.n_entry[ n_gpu_buffer_offset ] = data; switch( m_packet.n_entry[ 0 ] >> 24 ) { case 0x00: - verboselog( machine(), 1, "not handled: GPU Command 0x00: (%08x)\n", data ); + verboselog( *this, 1, "not handled: GPU Command 0x00: (%08x)\n", data ); break; case 0x01: - verboselog( machine(), 1, "not handled: clear cache\n" ); + verboselog( *this, 1, "not handled: clear cache\n" ); break; case 0x02: if( n_gpu_buffer_offset < 2 ) @@ -3063,7 +3063,7 @@ void psxgpu_device::gpu_write( UINT32 *p_ram, INT32 n_size ) } else { - verboselog( machine(), 1, "%02x: frame buffer rectangle %u,%u %u,%u\n", m_packet.n_entry[ 0 ] >> 24, + verboselog( *this, 1, "%02x: frame buffer rectangle %u,%u %u,%u\n", m_packet.n_entry[ 0 ] >> 24, m_packet.n_entry[ 1 ] & 0xffff, m_packet.n_entry[ 1 ] >> 16, m_packet.n_entry[ 2 ] & 0xffff, m_packet.n_entry[ 2 ] >> 16 ); FrameBufferRectangleDraw(); n_gpu_buffer_offset = 0; @@ -3079,7 +3079,7 @@ void psxgpu_device::gpu_write( UINT32 *p_ram, INT32 n_size ) } else { - verboselog( machine(), 1, "%02x: monochrome 3 point polygon\n", m_packet.n_entry[ 0 ] >> 24 ); + verboselog( *this, 1, "%02x: monochrome 3 point polygon\n", m_packet.n_entry[ 0 ] >> 24 ); FlatPolygon( 3 ); n_gpu_buffer_offset = 0; } @@ -3094,7 +3094,7 @@ void psxgpu_device::gpu_write( UINT32 *p_ram, INT32 n_size ) } else { - verboselog( machine(), 1, "%02x: textured 3 point polygon\n", m_packet.n_entry[ 0 ] >> 24 ); + verboselog( *this, 1, "%02x: textured 3 point polygon\n", m_packet.n_entry[ 0 ] >> 24 ); FlatTexturedPolygon( 3 ); n_gpu_buffer_offset = 0; } @@ -3109,7 +3109,7 @@ void psxgpu_device::gpu_write( UINT32 *p_ram, INT32 n_size ) } else { - verboselog( machine(), 1, "%02x: monochrome 4 point polygon\n", m_packet.n_entry[ 0 ] >> 24 ); + verboselog( *this, 1, "%02x: monochrome 4 point polygon\n", m_packet.n_entry[ 0 ] >> 24 ); FlatPolygon( 4 ); n_gpu_buffer_offset = 0; } @@ -3124,7 +3124,7 @@ void psxgpu_device::gpu_write( UINT32 *p_ram, INT32 n_size ) } else { - verboselog( machine(), 1, "%02x: textured 4 point polygon\n", m_packet.n_entry[ 0 ] >> 24 ); + verboselog( *this, 1, "%02x: textured 4 point polygon\n", m_packet.n_entry[ 0 ] >> 24 ); FlatTexturedPolygon( 4 ); n_gpu_buffer_offset = 0; } @@ -3139,7 +3139,7 @@ void psxgpu_device::gpu_write( UINT32 *p_ram, INT32 n_size ) } else { - verboselog( machine(), 1, "%02x: gouraud 3 point polygon\n", m_packet.n_entry[ 0 ] >> 24 ); + verboselog( *this, 1, "%02x: gouraud 3 point polygon\n", m_packet.n_entry[ 0 ] >> 24 ); GouraudPolygon( 3 ); n_gpu_buffer_offset = 0; } @@ -3154,7 +3154,7 @@ void psxgpu_device::gpu_write( UINT32 *p_ram, INT32 n_size ) } else { - verboselog( machine(), 1, "%02x: gouraud textured 3 point polygon\n", m_packet.n_entry[ 0 ] >> 24 ); + verboselog( *this, 1, "%02x: gouraud textured 3 point polygon\n", m_packet.n_entry[ 0 ] >> 24 ); GouraudTexturedPolygon( 3 ); n_gpu_buffer_offset = 0; } @@ -3169,7 +3169,7 @@ void psxgpu_device::gpu_write( UINT32 *p_ram, INT32 n_size ) } else { - verboselog( machine(), 1, "%02x: gouraud 4 point polygon\n", m_packet.n_entry[ 0 ] >> 24 ); + verboselog( *this, 1, "%02x: gouraud 4 point polygon\n", m_packet.n_entry[ 0 ] >> 24 ); GouraudPolygon( 4 ); n_gpu_buffer_offset = 0; } @@ -3184,7 +3184,7 @@ void psxgpu_device::gpu_write( UINT32 *p_ram, INT32 n_size ) } else { - verboselog( machine(), 1, "%02x: gouraud textured 4 point polygon\n", m_packet.n_entry[ 0 ] >> 24 ); + verboselog( *this, 1, "%02x: gouraud textured 4 point polygon\n", m_packet.n_entry[ 0 ] >> 24 ); GouraudTexturedPolygon( 4 ); n_gpu_buffer_offset = 0; } @@ -3198,7 +3198,7 @@ void psxgpu_device::gpu_write( UINT32 *p_ram, INT32 n_size ) } else { - verboselog( machine(), 1, "%02x: monochrome line\n", m_packet.n_entry[ 0 ] >> 24 ); + verboselog( *this, 1, "%02x: monochrome line\n", m_packet.n_entry[ 0 ] >> 24 ); MonochromeLine(); n_gpu_buffer_offset = 0; } @@ -3213,7 +3213,7 @@ void psxgpu_device::gpu_write( UINT32 *p_ram, INT32 n_size ) } else { - verboselog( machine(), 1, "%02x: monochrome polyline\n", m_packet.n_entry[ 0 ] >> 24 ); + verboselog( *this, 1, "%02x: monochrome polyline\n", m_packet.n_entry[ 0 ] >> 24 ); MonochromeLine(); if( ( m_packet.n_entry[ 3 ] & 0xf000f000 ) != 0x50005000 ) { @@ -3237,7 +3237,7 @@ void psxgpu_device::gpu_write( UINT32 *p_ram, INT32 n_size ) } else { - verboselog( machine(), 1, "%02x: gouraud line\n", m_packet.n_entry[ 0 ] >> 24 ); + verboselog( *this, 1, "%02x: gouraud line\n", m_packet.n_entry[ 0 ] >> 24 ); GouraudLine(); n_gpu_buffer_offset = 0; } @@ -3253,7 +3253,7 @@ void psxgpu_device::gpu_write( UINT32 *p_ram, INT32 n_size ) } else { - verboselog( machine(), 1, "%02x: gouraud polyline\n", m_packet.n_entry[ 0 ] >> 24 ); + verboselog( *this, 1, "%02x: gouraud polyline\n", m_packet.n_entry[ 0 ] >> 24 ); GouraudLine(); if( ( m_packet.n_entry[ 4 ] & 0xf000f000 ) != 0x50005000 ) { @@ -3279,7 +3279,7 @@ void psxgpu_device::gpu_write( UINT32 *p_ram, INT32 n_size ) } else { - verboselog( machine(), 1, "%02x: rectangle %d,%d %d,%d\n", + verboselog( *this, 1, "%02x: rectangle %d,%d %d,%d\n", m_packet.n_entry[ 0 ] >> 24, (INT16)( m_packet.n_entry[ 1 ] & 0xffff ), (INT16)( m_packet.n_entry[ 1 ] >> 16 ), (INT16)( m_packet.n_entry[ 2 ] & 0xffff ), (INT16)( m_packet.n_entry[ 2 ] >> 16 ) ); @@ -3297,7 +3297,7 @@ void psxgpu_device::gpu_write( UINT32 *p_ram, INT32 n_size ) } else { - verboselog( machine(), 1, "%02x: sprite %d,%d %u,%u %08x, %08x\n", + verboselog( *this, 1, "%02x: sprite %d,%d %u,%u %08x, %08x\n", m_packet.n_entry[ 0 ] >> 24, (INT16)( m_packet.n_entry[ 1 ] & 0xffff ), (INT16)( m_packet.n_entry[ 1 ] >> 16 ), m_packet.n_entry[ 3 ] & 0xffff, m_packet.n_entry[ 3 ] >> 16, @@ -3314,7 +3314,7 @@ void psxgpu_device::gpu_write( UINT32 *p_ram, INT32 n_size ) } else { - verboselog( machine(), 1, "%02x: dot %d,%d %08x\n", + verboselog( *this, 1, "%02x: dot %d,%d %08x\n", m_packet.n_entry[ 0 ] >> 24, (INT16)( m_packet.n_entry[ 1 ] & 0xffff ), (INT16)( m_packet.n_entry[ 1 ] >> 16 ), m_packet.n_entry[ 0 ] & 0xffffff ); @@ -3331,7 +3331,7 @@ void psxgpu_device::gpu_write( UINT32 *p_ram, INT32 n_size ) } else { - verboselog( machine(), 1, "%02x: 16x16 rectangle %08x %08x\n", m_packet.n_entry[ 0 ] >> 24, + verboselog( *this, 1, "%02x: 16x16 rectangle %08x %08x\n", m_packet.n_entry[ 0 ] >> 24, m_packet.n_entry[ 0 ], m_packet.n_entry[ 1 ] ); FlatRectangle8x8(); n_gpu_buffer_offset = 0; @@ -3347,7 +3347,7 @@ void psxgpu_device::gpu_write( UINT32 *p_ram, INT32 n_size ) } else { - verboselog( machine(), 1, "%02x: 8x8 sprite %08x %08x %08x\n", m_packet.n_entry[ 0 ] >> 24, + verboselog( *this, 1, "%02x: 8x8 sprite %08x %08x %08x\n", m_packet.n_entry[ 0 ] >> 24, m_packet.n_entry[ 0 ], m_packet.n_entry[ 1 ], m_packet.n_entry[ 2 ] ); Sprite8x8(); n_gpu_buffer_offset = 0; @@ -3362,7 +3362,7 @@ void psxgpu_device::gpu_write( UINT32 *p_ram, INT32 n_size ) } else { - verboselog( machine(), 1, "%02x: 16x16 rectangle %08x %08x\n", m_packet.n_entry[ 0 ] >> 24, + verboselog( *this, 1, "%02x: 16x16 rectangle %08x %08x\n", m_packet.n_entry[ 0 ] >> 24, m_packet.n_entry[ 0 ], m_packet.n_entry[ 1 ] ); FlatRectangle16x16(); n_gpu_buffer_offset = 0; @@ -3378,7 +3378,7 @@ void psxgpu_device::gpu_write( UINT32 *p_ram, INT32 n_size ) } else { - verboselog( machine(), 1, "%02x: 16x16 sprite %08x %08x %08x\n", m_packet.n_entry[ 0 ] >> 24, + verboselog( *this, 1, "%02x: 16x16 sprite %08x %08x %08x\n", m_packet.n_entry[ 0 ] >> 24, m_packet.n_entry[ 0 ], m_packet.n_entry[ 1 ], m_packet.n_entry[ 2 ] ); Sprite16x16(); n_gpu_buffer_offset = 0; @@ -3391,7 +3391,7 @@ void psxgpu_device::gpu_write( UINT32 *p_ram, INT32 n_size ) } else { - verboselog( machine(), 1, "move image in frame buffer %08x %08x %08x %08x\n", m_packet.n_entry[ 0 ], m_packet.n_entry[ 1 ], m_packet.n_entry[ 2 ], m_packet.n_entry[ 3 ] ); + verboselog( *this, 1, "move image in frame buffer %08x %08x %08x %08x\n", m_packet.n_entry[ 0 ], m_packet.n_entry[ 1 ], m_packet.n_entry[ 2 ], m_packet.n_entry[ 3 ] ); MoveImage(); n_gpu_buffer_offset = 0; } @@ -3408,7 +3408,7 @@ void psxgpu_device::gpu_write( UINT32 *p_ram, INT32 n_size ) { UINT16 *p_vram; - verboselog( machine(), 2, "send image to framebuffer ( pixel %u,%u = %u )\n", + verboselog( *this, 2, "send image to framebuffer ( pixel %u,%u = %u )\n", ( n_vramx + m_packet.n_entry[ 1 ] ) & 1023, ( n_vramy + ( m_packet.n_entry[ 1 ] >> 16 ) ) & 1023, data & 0xffff ); @@ -3422,7 +3422,7 @@ void psxgpu_device::gpu_write( UINT32 *p_ram, INT32 n_size ) n_vramy++; if( n_vramy >= ( m_packet.n_entry[ 2 ] >> 16 ) ) { - verboselog( machine(), 1, "%02x: send image to framebuffer %u,%u %u,%u\n", m_packet.n_entry[ 0 ] >> 24, + verboselog( *this, 1, "%02x: send image to framebuffer %u,%u %u,%u\n", m_packet.n_entry[ 0 ] >> 24, m_packet.n_entry[ 1 ] & 0xffff, ( m_packet.n_entry[ 1 ] >> 16 ), m_packet.n_entry[ 2 ] & 0xffff, ( m_packet.n_entry[ 2 ] >> 16 ) ); n_gpu_buffer_offset = 0; @@ -3442,12 +3442,12 @@ void psxgpu_device::gpu_write( UINT32 *p_ram, INT32 n_size ) } else { - verboselog( machine(), 1, "%02x: copy image from frame buffer\n", m_packet.n_entry[ 0 ] >> 24 ); + verboselog( *this, 1, "%02x: copy image from frame buffer\n", m_packet.n_entry[ 0 ] >> 24 ); n_gpustatus |= ( 1L << 0x1b ); } break; case 0xe1: - verboselog( machine(), 1, "%02x: draw mode %06x\n", m_packet.n_entry[ 0 ] >> 24, + verboselog( *this, 1, "%02x: draw mode %06x\n", m_packet.n_entry[ 0 ] >> 24, m_packet.n_entry[ 0 ] & 0xffffff ); decode_tpage( m_packet.n_entry[ 0 ] & 0xffffff ); break; @@ -3456,7 +3456,7 @@ void psxgpu_device::gpu_write( UINT32 *p_ram, INT32 n_size ) n_twx = ( ( ( m_packet.n_entry[ 0 ] >> 10 ) & 0x1f ) << 3 ); n_twh = 255 - ( ( ( m_packet.n_entry[ 0 ] >> 5 ) & 0x1f ) << 3 ); n_tww = 255 - ( ( m_packet.n_entry[ 0 ] & 0x1f ) << 3 ); - verboselog( machine(), 1, "%02x: texture window %u,%u %u,%u\n", m_packet.n_entry[ 0 ] >> 24, + verboselog( *this, 1, "%02x: texture window %u,%u %u,%u\n", m_packet.n_entry[ 0 ] >> 24, n_twx, n_twy, n_tww, n_twh ); break; case 0xe3: @@ -3469,7 +3469,7 @@ void psxgpu_device::gpu_write( UINT32 *p_ram, INT32 n_size ) { n_drawarea_y1 = ( m_packet.n_entry[ 0 ] >> 12 ) & 1023; } - verboselog( machine(), 1, "%02x: drawing area top left %d,%d\n", m_packet.n_entry[ 0 ] >> 24, + verboselog( *this, 1, "%02x: drawing area top left %d,%d\n", m_packet.n_entry[ 0 ] >> 24, n_drawarea_x1, n_drawarea_y1 ); break; case 0xe4: @@ -3482,7 +3482,7 @@ void psxgpu_device::gpu_write( UINT32 *p_ram, INT32 n_size ) { n_drawarea_y2 = ( m_packet.n_entry[ 0 ] >> 12 ) & 1023; } - verboselog( machine(), 1, "%02x: drawing area bottom right %d,%d\n", m_packet.n_entry[ 0 ] >> 24, + verboselog( *this, 1, "%02x: drawing area bottom right %d,%d\n", m_packet.n_entry[ 0 ] >> 24, n_drawarea_x2, n_drawarea_y2 ); break; case 0xe5: @@ -3495,7 +3495,7 @@ void psxgpu_device::gpu_write( UINT32 *p_ram, INT32 n_size ) { n_drawoffset_y = SINT11( ( m_packet.n_entry[ 0 ] >> 12 ) & 2047 ); } - verboselog( machine(), 1, "%02x: drawing offset %d,%d\n", m_packet.n_entry[ 0 ] >> 24, + verboselog( *this, 1, "%02x: drawing offset %d,%d\n", m_packet.n_entry[ 0 ] >> 24, n_drawoffset_x, n_drawoffset_y ); break; case 0xe6: @@ -3503,18 +3503,18 @@ void psxgpu_device::gpu_write( UINT32 *p_ram, INT32 n_size ) n_gpustatus |= ( data & 0x03 ) << 0xb; if( ( m_packet.n_entry[ 0 ] & 3 ) != 0 ) { - verboselog( machine(), 1, "not handled: mask setting %d\n", m_packet.n_entry[ 0 ] & 3 ); + verboselog( *this, 1, "not handled: mask setting %d\n", m_packet.n_entry[ 0 ] & 3 ); } else { - verboselog( machine(), 1, "mask setting %d\n", m_packet.n_entry[ 0 ] & 3 ); + verboselog( *this, 1, "mask setting %d\n", m_packet.n_entry[ 0 ] & 3 ); } break; default: #if defined( MAME_DEBUG ) popmessage( "unknown GPU packet %08x", m_packet.n_entry[ 0 ] ); #endif - verboselog( machine(), 0, "unknown GPU packet %08x (%08x)\n", m_packet.n_entry[ 0 ], data ); + verboselog( *this, 0, "unknown GPU packet %08x (%08x)\n", m_packet.n_entry[ 0 ], data ); #if ( STOP_ON_ERROR ) n_gpu_buffer_offset = 1; #endif @@ -3539,18 +3539,18 @@ WRITE32_MEMBER( psxgpu_device::write ) gpu_reset(); break; case 0x01: - verboselog( machine(), 1, "not handled: reset command buffer\n" ); + verboselog( *this, 1, "not handled: reset command buffer\n" ); n_gpu_buffer_offset = 0; break; case 0x02: - verboselog( machine(), 1, "not handled: reset irq\n" ); + verboselog( *this, 1, "not handled: reset irq\n" ); break; case 0x03: n_gpustatus &= ~( 1L << 0x17 ); n_gpustatus |= ( data & 0x01 ) << 0x17; break; case 0x04: - verboselog( machine(), 1, "dma setup %d\n", data & 3 ); + verboselog( *this, 1, "dma setup %d\n", data & 3 ); n_gpustatus &= ~( 3L << 0x1d ); n_gpustatus |= ( data & 0x03 ) << 0x1d; n_gpustatus &= ~( 1L << 0x19 ); @@ -3569,20 +3569,20 @@ WRITE32_MEMBER( psxgpu_device::write ) { n_displaystarty = ( data >> 12 ) & 1023; } - verboselog( machine(), 1, "start of display area %d %d\n", m_n_displaystartx, n_displaystarty ); + verboselog( *this, 1, "start of display area %d %d\n", m_n_displaystartx, n_displaystarty ); break; case 0x06: n_horiz_disstart = data & 4095; n_horiz_disend = ( data >> 12 ) & 4095; - verboselog( machine(), 1, "horizontal display range %d %d\n", n_horiz_disstart, n_horiz_disend ); + verboselog( *this, 1, "horizontal display range %d %d\n", n_horiz_disstart, n_horiz_disend ); break; case 0x07: n_vert_disstart = data & 1023; n_vert_disend = ( data >> 10 ) & 2047; - verboselog( machine(), 1, "vertical display range %d %d\n", n_vert_disstart, n_vert_disend ); + verboselog( *this, 1, "vertical display range %d %d\n", n_vert_disstart, n_vert_disend ); break; case 0x08: - verboselog( machine(), 1, "display mode %02x\n", data & 0xff ); + verboselog( *this, 1, "display mode %02x\n", data & 0xff ); n_gpustatus &= ~( 127L << 0x10 ); n_gpustatus |= ( data & 0x3f ) << 0x11; /* width 0 + height + videmode + isrgb24 + isinter */ n_gpustatus |= ( ( data & 0x40 ) >> 0x06 ) << 0x10; /* width 1 */ @@ -3593,10 +3593,10 @@ WRITE32_MEMBER( psxgpu_device::write ) updatevisiblearea(); break; case 0x09: - verboselog( machine(), 1, "not handled: GPU Control 0x09: %08x\n", data ); + verboselog( *this, 1, "not handled: GPU Control 0x09: %08x\n", data ); break; case 0x0d: - verboselog( machine(), 1, "reset lightgun coordinates %08x\n", data ); + verboselog( *this, 1, "reset lightgun coordinates %08x\n", data ); n_lightgun_x = 0; n_lightgun_y = 0; break; @@ -3612,7 +3612,7 @@ WRITE32_MEMBER( psxgpu_device::write ) { n_gpuinfo = n_drawarea_x1 | ( n_drawarea_y1 << 12 ); } - verboselog( machine(), 1, "GPU Info - Draw area top left %08x\n", n_gpuinfo ); + verboselog( *this, 1, "GPU Info - Draw area top left %08x\n", n_gpuinfo ); break; case 0x04: if( m_n_gputype == 2 ) @@ -3623,7 +3623,7 @@ WRITE32_MEMBER( psxgpu_device::write ) { n_gpuinfo = n_drawarea_x2 | ( n_drawarea_y2 << 12 ); } - verboselog( machine(), 1, "GPU Info - Draw area bottom right %08x\n", n_gpuinfo ); + verboselog( *this, 1, "GPU Info - Draw area bottom right %08x\n", n_gpuinfo ); break; case 0x05: if( m_n_gputype == 2 ) @@ -3634,35 +3634,35 @@ WRITE32_MEMBER( psxgpu_device::write ) { n_gpuinfo = ( n_drawoffset_x & 2047 ) | ( ( n_drawoffset_y & 2047 ) << 12 ); } - verboselog( machine(), 1, "GPU Info - Draw offset %08x\n", n_gpuinfo ); + verboselog( *this, 1, "GPU Info - Draw offset %08x\n", n_gpuinfo ); break; case 0x07: n_gpuinfo = m_n_gputype; - verboselog( machine(), 1, "GPU Info - GPU Type %08x\n", n_gpuinfo ); + verboselog( *this, 1, "GPU Info - GPU Type %08x\n", n_gpuinfo ); break; case 0x08: n_gpuinfo = n_lightgun_x | ( n_lightgun_y << 16 ); - verboselog( machine(), 1, "GPU Info - lightgun coordinates %08x\n", n_gpuinfo ); + verboselog( *this, 1, "GPU Info - lightgun coordinates %08x\n", n_gpuinfo ); break; default: - verboselog( machine(), 0, "GPU Info - unknown request (%08x)\n", data ); + verboselog( *this, 0, "GPU Info - unknown request (%08x)\n", data ); n_gpuinfo = 0; break; } break; case 0x20: - verboselog( machine(), 1, "not handled: GPU Control 0x20: %08x\n", data ); + verboselog( *this, 1, "not handled: GPU Control 0x20: %08x\n", data ); break; default: #if defined( MAME_DEBUG ) popmessage( "unknown GPU command %08x", data ); #endif - verboselog( machine(), 0, "gpu_w( %08x ) unknown GPU command\n", data ); + verboselog( *this, 0, "gpu_w( %08x ) unknown GPU command\n", data ); break; } break; default: - verboselog( machine(), 0, "gpu_w( %08x, %08x, %08x ) unknown register\n", offset, data, mem_mask ); + verboselog( *this, 0, "gpu_w( %08x, %08x, %08x ) unknown register\n", offset, data, mem_mask ); break; } } @@ -3682,7 +3682,7 @@ void psxgpu_device::gpu_read( UINT32 *p_ram, INT32 n_size ) UINT32 n_pixel; PAIR data; - verboselog( machine(), 2, "copy image from frame buffer ( %d, %d )\n", n_vramx, n_vramy ); + verboselog( *this, 2, "copy image from frame buffer ( %d, %d )\n", n_vramx, n_vramy ); data.d = 0; for( n_pixel = 0; n_pixel < 2; n_pixel++ ) { @@ -3695,7 +3695,7 @@ void psxgpu_device::gpu_read( UINT32 *p_ram, INT32 n_size ) n_vramy++; if( n_vramy >= ( m_packet.n_entry[ 2 ] >> 16 ) ) { - verboselog( machine(), 1, "copy image from frame buffer end\n" ); + verboselog( *this, 1, "copy image from frame buffer end\n" ); n_gpustatus &= ~( 1L << 0x1b ); n_gpu_buffer_offset = 0; n_vramx = 0; @@ -3713,7 +3713,7 @@ void psxgpu_device::gpu_read( UINT32 *p_ram, INT32 n_size ) } else { - verboselog( machine(), 2, "read GPU info (%08x)\n", n_gpuinfo ); + verboselog( *this, 2, "read GPU info (%08x)\n", n_gpuinfo ); *( p_ram ) = n_gpuinfo; } p_ram++; @@ -3732,10 +3732,10 @@ READ32_MEMBER( psxgpu_device::read ) break; case 0x01: data = n_gpustatus; - verboselog( machine(), 1, "read GPU status (%08x)\n", data ); + verboselog( *this, 1, "read GPU status (%08x)\n", data ); break; default: - verboselog( machine(), 0, "gpu_r( %08x, %08x ) unknown register\n", offset, mem_mask ); + verboselog( *this, 0, "gpu_r( %08x, %08x ) unknown register\n", offset, mem_mask ); data = 0; break; } @@ -3757,7 +3757,7 @@ void psxgpu_device::vblank(screen_device &screen, bool vblank_state) void psxgpu_device::gpu_reset( void ) { - verboselog( machine(), 1, "reset gpu\n" ); + verboselog( *this, 1, "reset gpu\n" ); n_gpu_buffer_offset = 0; n_gpustatus = 0x14802000; n_drawarea_x1 = 0; diff --git a/src/devices/video/saa5050.c b/src/devices/video/saa5050.c index 2440d0bc357..12ab5d41a16 100644 --- a/src/devices/video/saa5050.c +++ b/src/devices/video/saa5050.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Curt Coder +// copyright-holders:Curt Coder, Nigel Barnes /********************************************************************** Mullard SAA5050 Teletext Character Generator emulation @@ -12,7 +12,6 @@ TODO: - - character rounding - remote controller input - boxing @@ -40,8 +39,8 @@ const device_type SAA5057 = &device_creator<saa5057_device>; //------------------------------------------------- ROM_START( saa5050 ) - ROM_REGION( 0xa00, "chargen", 0 ) - ROM_LOAD( "saa5050", 0x0140, 0x08c0, BAD_DUMP CRC(78c17e3e) SHA1(4e1c59dc484505de1dc0b1ba7e5f70a54b0d4ccc) ) + ROM_REGION( 0x500, "chargen", 0 ) + ROM_LOAD("saa5050", 0x0140, 0x03c0, BAD_DUMP CRC(6298fc0b) SHA1(ae38e7f51dd33733bacfa896425ca105682b31d6)) ROM_END @@ -50,8 +49,8 @@ ROM_END //------------------------------------------------- ROM_START( saa5051 ) - ROM_REGION( 0xa00, "chargen", 0 ) - ROM_LOAD( "saa5051", 0x0140, 0x08c0, NO_DUMP ) + ROM_REGION( 0x500, "chargen", 0 ) + ROM_LOAD("saa5051", 0x0140, 0x03c0, BAD_DUMP CRC(a770611c) SHA1(9ab9d24b845fe2964fba2f4770d54025d2c8026a)) ROM_END @@ -60,8 +59,8 @@ ROM_END //------------------------------------------------- ROM_START( saa5052 ) - ROM_REGION( 0xa00, "chargen", 0 ) - ROM_LOAD( "saa5052", 0x0140, 0x08c0, BAD_DUMP CRC(cda3bf79) SHA1(cf5ea94459c09001d422dadc212bc970b4b4aa20) ) + ROM_REGION( 0x500, "chargen", 0 ) + ROM_LOAD("saa5052", 0x0140, 0x03c0, BAD_DUMP CRC(2eb76737) SHA1(ec4bc515e28e851a6433f7ca0a11ede0f1d21a68)) ROM_END @@ -70,8 +69,8 @@ ROM_END //------------------------------------------------- ROM_START( saa5053 ) - ROM_REGION( 0xa00, "chargen", 0 ) - ROM_LOAD( "saa5053", 0x0140, 0x08c0, NO_DUMP ) + ROM_REGION( 0x500, "chargen", 0 ) + ROM_LOAD("saa5053", 0x0140, 0x03c0, BAD_DUMP CRC(46288c33) SHA1(1e471a1b5670d7163e9f62d31be7cab0330a07cd)) ROM_END @@ -80,8 +79,8 @@ ROM_END //------------------------------------------------- ROM_START( saa5054 ) - ROM_REGION( 0xa00, "chargen", 0 ) - ROM_LOAD( "saa5054", 0x0140, 0x08c0, NO_DUMP ) + ROM_REGION( 0x500, "chargen", 0 ) + ROM_LOAD("saa5054", 0x0140, 0x03c0, BAD_DUMP CRC(56298472) SHA1(7a273ad7270507dca4ce621fc1e6b51a1ac25085)) ROM_END @@ -90,8 +89,8 @@ ROM_END //------------------------------------------------- ROM_START( saa5055 ) - ROM_REGION( 0xa00, "chargen", 0 ) - ROM_LOAD( "saa5055", 0x0140, 0x08c0, NO_DUMP ) + ROM_REGION( 0x500, "chargen", 0 ) + ROM_LOAD("saa5055", 0x0140, 0x03c0, BAD_DUMP CRC(f95b9c8c) SHA1(c5ce7fe84df6de6a317fa0e87bda413c82c04618)) ROM_END @@ -100,8 +99,8 @@ ROM_END //------------------------------------------------- ROM_START( saa5056 ) - ROM_REGION( 0xa00, "chargen", 0 ) - ROM_LOAD( "saa5056", 0x0140, 0x08c0, NO_DUMP ) + ROM_REGION( 0x500, "chargen", 0 ) + ROM_LOAD("saa5056", 0x0140, 0x03c0, BAD_DUMP CRC(86ab8b85) SHA1(2d1ff08b4dda15cf70832881750a962189455f41)) ROM_END @@ -110,8 +109,8 @@ ROM_END //------------------------------------------------- ROM_START( saa5057 ) - ROM_REGION( 0xa00, "chargen", 0 ) - ROM_LOAD( "saa5057", 0x0140, 0x08c0, NO_DUMP ) + ROM_REGION( 0x500, "chargen", 0 ) + ROM_LOAD("saa5057", 0x0140, 0x08c0, BAD_DUMP CRC(d6664fb3) SHA1(5a93445dde03066073e2909a935900e5f8439d81)) ROM_END @@ -160,6 +159,10 @@ const rom_entry *saa5057_device::device_rom_region() const } +#define ALPHANUMERIC 0x01 +#define CONTIGUOUS 0x02 +#define SEPARATED 0x03 + //************************************************************************** // LIVE DEVICE @@ -225,22 +228,25 @@ void saa5050_device::device_start() // register for state saving save_item(NAME(m_code)); - save_item(NAME(m_last_code)); + save_item(NAME(m_held_char)); save_item(NAME(m_char_data)); save_item(NAME(m_bit)); save_item(NAME(m_color)); save_item(NAME(m_ra)); save_item(NAME(m_bg)); save_item(NAME(m_fg)); + save_item(NAME(m_prev_col)); save_item(NAME(m_graphics)); save_item(NAME(m_separated)); - save_item(NAME(m_conceal)); save_item(NAME(m_flash)); save_item(NAME(m_boxed)); save_item(NAME(m_double_height)); - save_item(NAME(m_double_height_top_row)); + save_item(NAME(m_double_height_old)); save_item(NAME(m_double_height_bottom_row)); - save_item(NAME(m_hold)); + save_item(NAME(m_double_height_prev_row)); + save_item(NAME(m_hold_char)); + save_item(NAME(m_hold_clear)); + save_item(NAME(m_hold_off)); save_item(NAME(m_frame_count)); } @@ -252,7 +258,7 @@ void saa5050_device::device_start() void saa5050_device::device_reset() { m_ra = 0; - m_double_height_top_row = false; + m_double_height = false; m_double_height_bottom_row = false; } @@ -263,86 +269,175 @@ void saa5050_device::device_reset() void saa5050_device::process_control_character(UINT8 data) { + m_hold_clear = false; + m_hold_off = false; + switch (data) { - case ALPHA_RED: - case ALPHA_GREEN: - case ALPHA_YELLOW: - case ALPHA_BLUE: - case ALPHA_MAGENTA: - case ALPHA_CYAN: - case ALPHA_WHITE: - m_graphics = false; - m_conceal = false; - m_fg = data & 0x07; - break; - - case FLASH: - m_flash = true; - break; + case ALPHA_RED: + case ALPHA_GREEN: + case ALPHA_YELLOW: + case ALPHA_BLUE: + case ALPHA_MAGENTA: + case ALPHA_CYAN: + case ALPHA_WHITE: + m_graphics = false; + m_hold_clear = true; + m_fg = data & 0x07; + set_next_chartype(); + break; + + case FLASH: + m_flash = true; + break; + + case STEADY: + m_flash = false; + break; + + case END_BOX: + case START_BOX: + // TODO + break; + + case NORMAL_HEIGHT: + case DOUBLE_HEIGHT: + m_double_height = !!(data & 1); + if (m_double_height) m_double_height_prev_row = true; + break; + + case GRAPHICS_RED: + case GRAPHICS_GREEN: + case GRAPHICS_YELLOW: + case GRAPHICS_BLUE: + case GRAPHICS_MAGENTA: + case GRAPHICS_CYAN: + case GRAPHICS_WHITE: + m_graphics = true; + m_fg = data & 0x07; + set_next_chartype(); + break; + + case CONCEAL_DISPLAY: + m_fg = m_prev_col = m_bg; + break; + + case CONTIGUOUS_GFX: + m_separated = false; + set_next_chartype(); + break; + + case SEPARATED_GFX: + m_separated = true; + set_next_chartype(); + break; + + case BLACK_BACKGROUND: + m_bg = 0; + break; + + case NEW_BACKGROUND: + m_bg = m_fg; + break; + + case HOLD_GRAPHICS: + m_hold_char = true; + break; + + case RELEASE_GRAPHICS: + m_hold_off = true; + break; + } +} - case STEADY: - m_flash = false; - break; - case END_BOX: - case START_BOX: - // TODO - break; +void saa5050_device::set_next_chartype() +{ + if (m_graphics) + { + if (m_separated) + m_next_chartype = SEPARATED; + else + m_next_chartype = CONTIGUOUS; + } + else + { + m_next_chartype = ALPHANUMERIC; + } +}; - case NORMAL_HEIGHT: - m_double_height = 0; - break; - case DOUBLE_HEIGHT: - if (!m_double_height_bottom_row) - { - m_double_height_top_row = true; - } +//------------------------------------------------- +// get_gfx_data - graphics generator +//------------------------------------------------- - m_double_height = 1; +UINT16 saa5050_device::get_gfx_data(UINT8 data, offs_t row, bool separated) +{ + UINT16 c = 0; + switch (row >> 1) + { + case 0: case 1: + c += (data & 0x01) ? 0xfc0 : 0; // bit 1 top left + c += (data & 0x02) ? 0x03f : 0; // bit 2 top right + if (separated) c &= 0x3cf; break; - - case GRAPHICS_RED: - case GRAPHICS_GREEN: - case GRAPHICS_YELLOW: - case GRAPHICS_BLUE: - case GRAPHICS_MAGENTA: - case GRAPHICS_CYAN: - case GRAPHICS_WHITE: - m_graphics = true; - m_conceal = false; - m_fg = data & 0x07; + case 2: + if (separated) break; + c += (data & 0x01) ? 0xfc0 : 0; // bit 1 top left + c += (data & 0x02) ? 0x03f : 0; // bit 2 top right break; - - case CONCEAL_DISPLAY: - m_conceal = true; + case 3: case 4: case 5: + c += (data & 0x04) ? 0xfc0 : 0; // bit 3 middle left + c += (data & 0x08) ? 0x03f : 0; // bit 4 middle right + if (separated) c &= 0x3cf; break; - - case CONTIGUOUS_GFX: - m_separated = false; + case 6: + if (separated) break; + c += (data & 0x04) ? 0xfc0 : 0; // bit 3 middle left + c += (data & 0x08) ? 0x03f : 0; // bit 4 middle right break; - - case SEPARATED_GFX: - m_separated = true; + case 7: case 8: + c += (data & 0x10) ? 0xfc0 : 0; // bit 5 bottom left + c += (data & 0x40) ? 0x03f : 0; // bit 7 bottom right + if (separated) c &= 0x3cf; break; - - case BLACK_BACKGROUND: - m_bg = 0; + case 9: + if (separated) break; + c += (data & 0x10) ? 0xfc0 : 0; // bit 5 bottom left + c += (data & 0x40) ? 0x03f : 0; // bit 7 bottom right break; + } + return c; +} - case NEW_BACKGROUND: - m_bg = m_fg; - break; - case HOLD_GRAPHICS: - m_hold = true; - break; +//------------------------------------------------- +// get_rom_data - read rom +//------------------------------------------------- - case RELEASE_GRAPHICS: - m_hold = false; - break; +UINT16 saa5050_device::get_rom_data(UINT8 data, offs_t row) +{ + UINT16 c; + if (row < 0 || row >= 20) + { + c = 0; + } + else + { + c = m_char_rom[(data * 10) + (row >> 1)]; + c = ((c & 0x01) * 0x03) + ((c & 0x02) * 0x06) + ((c & 0x04) * 0x0c) + ((c & 0x08) * 0x18) + ((c & 0x10) * 0x30); } + return c; +} + + +//------------------------------------------------- +// character_rounding +//------------------------------------------------- + +UINT16 saa5050_device::character_rounding(UINT16 a, UINT16 b) +{ + return a | ((a >> 1) & b & ~(b >> 1)) | ((a << 1) & b & ~(b << 1)); } @@ -352,23 +447,64 @@ void saa5050_device::process_control_character(UINT8 data) void saa5050_device::get_character_data(UINT8 data) { - if (m_graphics && (data & 0x20)) + m_double_height_old = m_double_height; + m_prev_col = m_fg; + m_curr_chartype = m_next_chartype; + + if (data < 0x20) + { + process_control_character(data); + if (m_hold_char && m_double_height == m_double_height_old) + { + data = m_held_char; + if (data >= 0x40 && data < 0x60) data = 0x20; + m_curr_chartype = m_held_chartype; + } + else + { + data = 0x20; + } + } + else if (m_graphics) + { + m_held_char = data; + m_held_chartype = m_curr_chartype; + } + + offs_t ra = m_ra; + if (m_double_height_old) { - data += (data & 0x40) ? 64 : 96; - if (m_separated) data += 64; + ra >>= 1; + if (m_double_height_bottom_row) ra += 10; } - if ((data < 0x20) && m_hold) data = m_last_code; - if (m_conceal) data = 0x20; if (m_flash && (m_frame_count > 38)) data = 0x20; if (m_double_height_bottom_row && !m_double_height) data = 0x20; - m_last_code = data; - offs_t ra = m_ra >> 1; - if (m_double_height) ra >>= 1; - if (m_double_height && m_double_height_bottom_row) ra += 5; + if (m_hold_off) + { + m_hold_char = false; + m_held_char = 32; + } + if (m_hold_clear) + { + m_held_char = 32; + } - m_char_data = m_char_rom[(data * 10) + ra]; + if (m_curr_chartype == ALPHANUMERIC || !BIT(data,5)) + m_char_data = character_rounding(get_rom_data(data, ra), get_rom_data(data, ra + ((ra & 1) ? 1 : -1))); + else + m_char_data = get_gfx_data(data, ra, (m_curr_chartype == SEPARATED)); +} + + +//------------------------------------------------- +// crs_w - character rounding select +//------------------------------------------------- + +WRITE_LINE_MEMBER( saa5050_device::crs_w ) +{ + m_crs = !(state & 1); } @@ -381,7 +517,6 @@ WRITE_LINE_MEMBER( saa5050_device::dew_w ) if (state) { m_ra = 19; - m_double_height_top_row = false; m_frame_count++; if (m_frame_count > 50) m_frame_count = 0; @@ -400,23 +535,27 @@ WRITE_LINE_MEMBER( saa5050_device::lose_w ) m_ra++; m_ra %= 20; + if (m_ra == 19) + { + if (m_double_height_bottom_row) + m_double_height_bottom_row = false; + else + m_double_height_bottom_row = m_double_height_prev_row; + } + m_fg = 7; m_bg = 0; m_graphics = false; m_separated = false; - m_conceal = false; m_flash = false; m_boxed = false; - m_hold = false; - m_double_height = 0; - m_bit = 5; - m_last_code = 0x20; - - if (!m_ra) - { - m_double_height_bottom_row = m_double_height_top_row; - m_double_height_top_row = false; - } + m_hold_char = false; + m_held_char = 0x20; + m_next_chartype = ALPHANUMERIC; + m_held_chartype = ALPHANUMERIC; + m_double_height = false; + m_double_height_prev_row = false; + m_bit = 11; } } @@ -439,7 +578,6 @@ WRITE_LINE_MEMBER( saa5050_device::f1_w ) { if (state) { - process_control_character(m_code); get_character_data(m_code); } } @@ -453,10 +591,10 @@ WRITE_LINE_MEMBER( saa5050_device::tr6_w ) { if (state) { - m_color = BIT(m_char_data, m_bit) ? m_fg : m_bg; + m_color = BIT(m_char_data, m_bit) ? m_prev_col : m_bg; m_bit--; - if (m_bit < 0) m_bit = 5; + if (m_bit < 0) m_bit = 11; } } @@ -500,7 +638,7 @@ UINT32 saa5050_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap f1_w(1); f1_w(0); - for (int bit = 0; bit < 6; bit++) + for (int bit = 0; bit < 12; bit++) { tr6_w(1); tr6_w(0); @@ -516,7 +654,6 @@ UINT32 saa5050_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap rgb_t rgb = rgb_t(r, g, b); bitmap.pix32(y, x++) = rgb; - bitmap.pix32(y, x++) = rgb; } } } diff --git a/src/devices/video/saa5050.h b/src/devices/video/saa5050.h index 0155da83e4e..93371e79798 100644 --- a/src/devices/video/saa5050.h +++ b/src/devices/video/saa5050.h @@ -65,6 +65,7 @@ public: // optional information overrides virtual const rom_entry *device_rom_region() const; + DECLARE_WRITE_LINE_MEMBER( crs_w ); DECLARE_WRITE_LINE_MEMBER( dew_w ); DECLARE_WRITE_LINE_MEMBER( lose_w ); void write(UINT8 data); @@ -120,6 +121,10 @@ private: }; void process_control_character(UINT8 data); + void set_next_chartype(); + UINT16 get_gfx_data(UINT8 data, offs_t row, bool separated); + UINT16 get_rom_data(UINT8 data, offs_t row); + UINT16 character_rounding(UINT16 a, UINT16 b); void get_character_data(UINT8 data); required_region_ptr<UINT8> m_char_rom; @@ -127,22 +132,29 @@ private: devcb_read8 m_read_d; UINT8 m_code; - UINT8 m_last_code; - UINT8 m_char_data; + UINT8 m_held_char; + UINT8 m_next_chartype; + UINT8 m_curr_chartype; + UINT8 m_held_chartype; + UINT16 m_char_data; int m_bit; rgb_t m_color; + int m_crs; int m_ra; int m_bg; int m_fg; + int m_prev_col; bool m_graphics; bool m_separated; - bool m_conceal; bool m_flash; bool m_boxed; - int m_double_height; - bool m_double_height_top_row; + bool m_double_height; + bool m_double_height_old; bool m_double_height_bottom_row; - bool m_hold; + bool m_double_height_prev_row; + bool m_hold_char; + bool m_hold_clear; + bool m_hold_off; int m_frame_count; int m_cols; @@ -248,7 +260,7 @@ extern const device_type SAA5051; // German extern const device_type SAA5052; // Swedish/Finnish extern const device_type SAA5053; // Italian extern const device_type SAA5054; // Belgian -extern const device_type SAA5055; // U.S. ASCII +extern const device_type SAA5055; // US ASCII extern const device_type SAA5056; // Hebrew extern const device_type SAA5057; // Cyrillic diff --git a/src/devices/video/snes_ppu.c b/src/devices/video/snes_ppu.c index 93529ad307e..ce33d0a7dae 100644 --- a/src/devices/video/snes_ppu.c +++ b/src/devices/video/snes_ppu.c @@ -1818,7 +1818,7 @@ void snes_ppu_device::refresh_scanline( bitmap_rgb32 &bitmap, UINT16 curline ) struct SNES_SCANLINE *scanline1, *scanline2; UINT16 c; UINT16 prev_colour = 0; - int blurring = machine().root_device().ioport("OPTIONS")->read_safe(0) & 0x01; + int blurring = read_safe(machine().root_device().ioport("OPTIONS"), 0) & 0x01; g_profiler.start(PROFILER_VIDEO); @@ -2828,13 +2828,13 @@ void snes_ppu_device::write(address_space &space, UINT32 offset, UINT8 data) UINT8 snes_ppu_device::dbg_video( UINT16 curline ) { int i; - UINT8 toggles = machine().root_device().ioport("DEBUG1")->read_safe(0); + UINT8 toggles = read_safe(machine().root_device().ioport("DEBUG1"), 0); m_debug_options.select_pri[SNES_BG1] = (toggles & 0x03); m_debug_options.select_pri[SNES_BG2] = (toggles & 0x0c) >> 2; m_debug_options.select_pri[SNES_BG3] = (toggles & 0x30) >> 4; m_debug_options.select_pri[SNES_BG4] = (toggles & 0xc0) >> 6; - toggles = machine().root_device().ioport("DEBUG2")->read_safe(0); + toggles = read_safe(machine().root_device().ioport("DEBUG2"), 0); for (i = 0; i < 4; i++) DEBUG_TOGGLE(i, m_debug_options.bg_disabled[i], ("Debug: Disabled BG%d.\n", i + 1), ("Debug: Enabled BG%d.\n", i + 1)) DEBUG_TOGGLE(4, m_debug_options.bg_disabled[SNES_OAM], ("Debug: Disabled OAM.\n"), ("Debug: Enabled OAM.\n")) @@ -2842,11 +2842,11 @@ UINT8 snes_ppu_device::dbg_video( UINT16 curline ) DEBUG_TOGGLE(6, m_debug_options.colormath_disabled, ("Debug: Disabled Color Math.\n"), ("Debug: Enabled Color Math.\n")) DEBUG_TOGGLE(7, m_debug_options.windows_disabled, ("Debug: Disabled Window Masks.\n"), ("Debug: Enabled Window Masks.\n")) - toggles = machine().root_device().ioport("DEBUG4")->read_safe(0); + toggles = read_safe(machine().root_device().ioport("DEBUG4"), 0); for (i = 0; i < 8; i++) DEBUG_TOGGLE(i, m_debug_options.mode_disabled[i], ("Debug: Disabled Mode %d drawing.\n", i), ("Debug: Enabled Mode %d drawing.\n", i)) - toggles = machine().root_device().ioport("DEBUG3")->read_safe(0); + toggles = read_safe(machine().root_device().ioport("DEBUG3"), 0); DEBUG_TOGGLE(2, m_debug_options.mosaic_disabled, ("Debug: Disabled Mosaic.\n"), ("Debug: Enabled Mosaic.\n")) m_debug_options.sprite_reversed = BIT(toggles, 7); m_debug_options.select_pri[SNES_OAM] = (toggles & 0x70) >> 4; diff --git a/src/devices/video/voodoo.c b/src/devices/video/voodoo.c index 1874fccad29..44765270482 100644 --- a/src/devices/video/voodoo.c +++ b/src/devices/video/voodoo.c @@ -413,7 +413,7 @@ int voodoo_update(device_t *device, bitmap_rgb32 &bitmap, const rectangle &clipr /* display stats */ if (v->stats.display) - popmessage(v->stats.buffer, 0, 0); + device->popmessage(v->stats.buffer, 0, 0); /* update render override */ v->stats.render_override = device->machine().input().code_pressed(KEYCODE_ENTER); @@ -457,7 +457,7 @@ void voodoo_set_init_enable(device_t *device, UINT32 newval) voodoo_state *v = get_safe_token(device); v->pci.init_enable = newval; if (LOG_REGISTERS) - logerror("VOODOO.%d.REG:initEnable write = %08X\n", v->index, newval); + device->logerror("VOODOO.%d.REG:initEnable write = %08X\n", v->index, newval); } @@ -844,7 +844,7 @@ static void swap_buffers(voodoo_state *v) { int count; - if (LOG_VBLANK_SWAP) logerror("--- swap_buffers @ %d\n", v->screen->vpos()); + if (LOG_VBLANK_SWAP) v->device->logerror("--- swap_buffers @ %d\n", v->screen->vpos()); /* force a partial update */ v->screen->update_partial(v->screen->vpos()); @@ -968,7 +968,7 @@ static TIMER_CALLBACK( vblank_off_callback ) { voodoo_state *v = (voodoo_state *)ptr; - if (LOG_VBLANK_SWAP) logerror("--- vblank end\n"); + if (LOG_VBLANK_SWAP) v->device->logerror("--- vblank end\n"); /* set internal state and call the client */ v->fbi.vblank = FALSE; @@ -1000,24 +1000,24 @@ static TIMER_CALLBACK( vblank_callback ) { voodoo_state *v = (voodoo_state *)ptr; - if (LOG_VBLANK_SWAP) logerror("--- vblank start\n"); + if (LOG_VBLANK_SWAP) v->device->logerror("--- vblank start\n"); /* flush the pipes */ if (v->pci.op_pending) { - if (LOG_VBLANK_SWAP) logerror("---- vblank flush begin\n"); + if (LOG_VBLANK_SWAP) v->device->logerror("---- vblank flush begin\n"); flush_fifos(v, machine.time()); - if (LOG_VBLANK_SWAP) logerror("---- vblank flush end\n"); + if (LOG_VBLANK_SWAP) v->device->logerror("---- vblank flush end\n"); } /* increment the count */ v->fbi.vblank_count++; if (v->fbi.vblank_count > 250) v->fbi.vblank_count = 250; - if (LOG_VBLANK_SWAP) logerror("---- vblank count = %d", v->fbi.vblank_count); + if (LOG_VBLANK_SWAP) v->device->logerror("---- vblank count = %d", v->fbi.vblank_count); if (v->fbi.vblank_swap_pending) - if (LOG_VBLANK_SWAP) logerror(" (target=%d)", v->fbi.vblank_swap); - if (LOG_VBLANK_SWAP) logerror("\n"); + if (LOG_VBLANK_SWAP) v->device->logerror(" (target=%d)", v->fbi.vblank_swap); + if (LOG_VBLANK_SWAP) v->device->logerror("\n"); /* if we're past the swap count, do the swap */ if (v->fbi.vblank_swap_pending && v->fbi.vblank_count >= v->fbi.vblank_swap) @@ -1119,7 +1119,7 @@ static void recompute_video_memory(voodoo_state *v) switch (memory_config) { case 3: /* reserved */ - logerror("VOODOO.%d.ERROR:Unexpected memory configuration in recompute_video_memory!\n", v->index); + v->device->logerror("VOODOO.%d.ERROR:Unexpected memory configuration in recompute_video_memory!\n", v->index); case 0: /* 2 color buffers, 1 aux buffer */ v->fbi.rgboffs[2] = ~0; @@ -1651,26 +1651,26 @@ static UINT32 cmdfifo_execute(voodoo_state *v, cmdfifo_info *f) switch ((command >> 3) & 7) { case 0: /* NOP */ - if (LOG_CMDFIFO) logerror(" NOP\n"); + if (LOG_CMDFIFO) v->device->logerror(" NOP\n"); break; case 1: /* JSR */ - if (LOG_CMDFIFO) logerror(" JSR $%06X\n", target); + if (LOG_CMDFIFO) v->device->logerror(" JSR $%06X\n", target); osd_printf_debug("JSR in CMDFIFO!\n"); src = &fifobase[target / 4]; break; case 2: /* RET */ - if (LOG_CMDFIFO) logerror(" RET $%06X\n", target); + if (LOG_CMDFIFO) v->device->logerror(" RET $%06X\n", target); fatalerror("RET in CMDFIFO!\n"); case 3: /* JMP LOCAL FRAME BUFFER */ - if (LOG_CMDFIFO) logerror(" JMP LOCAL FRAMEBUF $%06X\n", target); + if (LOG_CMDFIFO) v->device->logerror(" JMP LOCAL FRAMEBUF $%06X\n", target); src = &fifobase[target / 4]; break; case 4: /* JMP AGP */ - if (LOG_CMDFIFO) logerror(" JMP AGP $%06X\n", target); + if (LOG_CMDFIFO) v->device->logerror(" JMP AGP $%06X\n", target); fatalerror("JMP AGP in CMDFIFO!\n"); src = &fifobase[target / 4]; break; @@ -1698,7 +1698,7 @@ static UINT32 cmdfifo_execute(voodoo_state *v, cmdfifo_info *f) inc = (command >> 15) & 1; target = (command >> 3) & 0xfff; - if (LOG_CMDFIFO) logerror(" PACKET TYPE 1: count=%d inc=%d reg=%04X\n", count, inc, target); + if (LOG_CMDFIFO) v->device->logerror(" PACKET TYPE 1: count=%d inc=%d reg=%04X\n", count, inc, target); if (v->type >= TYPE_VOODOO_BANSHEE && (target & 0x800)) { @@ -1729,7 +1729,7 @@ static UINT32 cmdfifo_execute(voodoo_state *v, cmdfifo_info *f) 1 31:0 = Data word */ case 2: - if (LOG_CMDFIFO) logerror(" PACKET TYPE 2: mask=%X\n", (command >> 3) & 0x1ffffff); + if (LOG_CMDFIFO) v->device->logerror(" PACKET TYPE 2: mask=%X\n", (command >> 3) & 0x1ffffff); /* loop over all registers and write them one at a time */ for (i = 3; i <= 31; i++) @@ -1766,7 +1766,7 @@ static UINT32 cmdfifo_execute(voodoo_state *v, cmdfifo_info *f) count = (command >> 6) & 15; code = (command >> 3) & 7; - if (LOG_CMDFIFO) logerror(" PACKET TYPE 3: count=%d code=%d mask=%03X smode=%02X pc=%d\n", count, code, (command >> 10) & 0xfff, (command >> 22) & 0x3f, (command >> 28) & 1); + if (LOG_CMDFIFO) v->device->logerror(" PACKET TYPE 3: count=%d code=%d mask=%03X smode=%02X pc=%d\n", count, code, (command >> 10) & 0xfff, (command >> 22) & 0x3f, (command >> 28) & 1); /* copy relevant bits into the setup mode register */ v->reg[sSetupMode].u = ((command >> 10) & 0xff) | ((command >> 6) & 0xf0000); @@ -1876,7 +1876,7 @@ static UINT32 cmdfifo_execute(voodoo_state *v, cmdfifo_info *f) /* extract parameters */ target = (command >> 3) & 0xfff; - if (LOG_CMDFIFO) logerror(" PACKET TYPE 4: mask=%X reg=%04X pad=%d\n", (command >> 15) & 0x3fff, target, command >> 29); + if (LOG_CMDFIFO) v->device->logerror(" PACKET TYPE 4: mask=%X reg=%04X pad=%d\n", (command >> 15) & 0x3fff, target, command >> 29); if (v->type >= TYPE_VOODOO_BANSHEE && (target & 0x800)) { @@ -1930,7 +1930,7 @@ static UINT32 cmdfifo_execute(voodoo_state *v, cmdfifo_info *f) { case 0: // Linear FB { - if (LOG_CMDFIFO) logerror(" PACKET TYPE 5: FB count=%d dest=%08X bd2=%X bdN=%X\n", count, target, (command >> 26) & 15, (command >> 22) & 15); + if (LOG_CMDFIFO) v->device->logerror(" PACKET TYPE 5: FB count=%d dest=%08X bd2=%X bdN=%X\n", count, target, (command >> 26) & 15, (command >> 22) & 15); UINT32 addr = target * 4; for (i=0; i < count; i++) @@ -1948,7 +1948,7 @@ static UINT32 cmdfifo_execute(voodoo_state *v, cmdfifo_info *f) } case 2: // 3D LFB { - if (LOG_CMDFIFO) logerror(" PACKET TYPE 5: 3D LFB count=%d dest=%08X bd2=%X bdN=%X\n", count, target, (command >> 26) & 15, (command >> 22) & 15); + if (LOG_CMDFIFO) v->device->logerror(" PACKET TYPE 5: 3D LFB count=%d dest=%08X bd2=%X bdN=%X\n", count, target, (command >> 26) & 15, (command >> 22) & 15); /* loop over words */ for (i = 0; i < count; i++) @@ -1973,7 +1973,7 @@ static UINT32 cmdfifo_execute(voodoo_state *v, cmdfifo_info *f) case 3: // Texture Port { - if (LOG_CMDFIFO) logerror(" PACKET TYPE 5: textureRAM count=%d dest=%08X bd2=%X bdN=%X\n", count, target, (command >> 26) & 15, (command >> 22) & 15); + if (LOG_CMDFIFO) v->device->logerror(" PACKET TYPE 5: textureRAM count=%d dest=%08X bd2=%X bdN=%X\n", count, target, (command >> 26) & 15, (command >> 22) & 15); /* loop over words */ for (i = 0; i < count; i++) @@ -2036,7 +2036,7 @@ static void cmdfifo_w(voodoo_state *v, cmdfifo_info *f, offs_t offset, UINT32 da UINT32 addr = f->base + offset * 4; UINT32 *fifobase = (UINT32 *)v->fbi.ram; - if (LOG_CMDFIFO_VERBOSE) logerror("CMDFIFO_w(%04X) = %08X\n", offset, data); + if (LOG_CMDFIFO_VERBOSE) v->device->logerror("CMDFIFO_w(%04X) = %08X\n", offset, data); /* write the data */ if (addr < f->end) @@ -2056,7 +2056,7 @@ static void cmdfifo_w(voodoo_state *v, cmdfifo_info *f, offs_t offset, UINT32 da else if (addr < f->amin) { if (f->holes != 0) - logerror("Unexpected CMDFIFO: AMin=%08X AMax=%08X Holes=%d WroteTo:%08X\n", + v->device->logerror("Unexpected CMDFIFO: AMin=%08X AMax=%08X Holes=%d WroteTo:%08X\n", f->amin, f->amax, f->holes, addr); //f->amin = f->amax = addr; f->holes += (addr - f->base) / 4; @@ -2094,7 +2094,7 @@ static void cmdfifo_w(voodoo_state *v, cmdfifo_info *f, offs_t offset, UINT32 da v->pci.op_pending = TRUE; v->pci.op_end_time = v->device->machine().time() + attotime(0, (attoseconds_t)cycles * v->attoseconds_per_cycle); - if (LOG_FIFO_VERBOSE) logerror("VOODOO.%d.FIFO:direct write start at %d.%08X%08X end at %d.%08X%08X\n", v->index, + if (LOG_FIFO_VERBOSE) v->device->logerror("VOODOO.%d.FIFO:direct write start at %d.%08X%08X end at %d.%08X%08X\n", v->index, v->device->machine().time().seconds(), (UINT32)(v->device->machine().time().attoseconds() >> 32), (UINT32)v->device->machine().time().attoseconds(), v->pci.op_end_time.seconds(), (UINT32)(v->pci.op_end_time.attoseconds() >> 32), (UINT32)v->pci.op_end_time.attoseconds()); } @@ -2152,7 +2152,7 @@ static void check_stalled_cpu(voodoo_state *v, attotime current_time) /* resume if necessary */ if (resume || !v->pci.op_pending) { - if (LOG_FIFO) logerror("VOODOO.%d.FIFO:Stall condition cleared; resuming\n", v->index); + if (LOG_FIFO) v->device->logerror("VOODOO.%d.FIFO:Stall condition cleared; resuming\n", v->index); v->pci.stall_state = NOT_STALLED; /* either call the callback, or trigger the trigger */ @@ -2223,7 +2223,7 @@ static INT32 register_w(voodoo_state *v, offs_t offset, UINT32 data) /* first make sure this register is readable */ if (!(v->regaccess[regnum] & REGISTER_WRITE)) { - logerror("VOODOO.%d.ERROR:Invalid attempt to write %s\n", v->index, v->regnames[regnum]); + v->device->logerror("VOODOO.%d.ERROR:Invalid attempt to write %s\n", v->index, v->regnames[regnum]); return 0; } @@ -2557,7 +2557,7 @@ static INT32 register_w(voodoo_state *v, offs_t offset, UINT32 data) } } else - logerror("clutData ignored because video timing reset = 1\n"); + v->device->logerror("clutData ignored because video timing reset = 1\n"); } break; @@ -2925,9 +2925,9 @@ default_case: if (LOG_REGISTERS) { if (regnum < fvertexAx || regnum > fdWdY) - logerror("VOODOO.%d.REG:%s(%d) write = %08X\n", v->index, (regnum < 0x384/4) ? v->regnames[regnum] : "oob", chips, origdata); + v->device->logerror("VOODOO.%d.REG:%s(%d) write = %08X\n", v->index, (regnum < 0x384/4) ? v->regnames[regnum] : "oob", chips, origdata); else - logerror("VOODOO.%d.REG:%s(%d) write = %f\n", v->index, (regnum < 0x384/4) ? v->regnames[regnum] : "oob", chips, (double) u2f(origdata)); + v->device->logerror("VOODOO.%d.REG:%s(%d) write = %f\n", v->index, (regnum < 0x384/4) ? v->regnames[regnum] : "oob", chips, (double) u2f(origdata)); } return cycles; @@ -2974,14 +2974,14 @@ static INT32 lfb_direct_w(voodoo_state *v, offs_t offset, UINT32 data, UINT32 me destmax = (v->fbi.mask + 1 - v->fbi.lfb_base*4) / 2; bufoffs = y * v->fbi.rowpixels + x; if (bufoffs >= destmax) { - logerror("lfb_direct_w: Buffer offset out of bounds x=%i y=%i offset=%08X bufoffs=%08X data=%08X\n", x, y, offset, (UINT32) bufoffs, data); + v->device->logerror("lfb_direct_w: Buffer offset out of bounds x=%i y=%i offset=%08X bufoffs=%08X data=%08X\n", x, y, offset, (UINT32) bufoffs, data); return 0; } if (ACCESSING_BITS_0_15) dest[bufoffs + 0] = data&0xffff; if (ACCESSING_BITS_16_31) dest[bufoffs + 1] = data>>16; - if (LOG_LFB) logerror("VOODOO.%d.LFB:write direct (%d,%d) = %08X & %08X\n", v->index, x, y, data, mem_mask); + if (LOG_LFB) v->device->logerror("VOODOO.%d.LFB:write direct (%d,%d) = %08X & %08X\n", v->index, x, y, data, mem_mask); return 0; } @@ -3182,7 +3182,7 @@ static INT32 lfb_w(voodoo_state *v, offs_t offset, UINT32 data, UINT32 mem_mask) break; default: /* reserved */ - logerror("lfb_w: Unknown format\n"); + v->device->logerror("lfb_w: Unknown format\n"); return 0; } @@ -3223,7 +3223,7 @@ static INT32 lfb_w(voodoo_state *v, offs_t offset, UINT32 data, UINT32 mem_mask) DECLARE_DITHER_POINTERS_NO_DITHER_VAR; UINT32 bufoffs; - if (LOG_LFB) logerror("VOODOO.%d.LFB:write raw mode %X (%d,%d) = %08X & %08X\n", v->index, LFBMODE_WRITE_FORMAT(v->reg[lfbMode].u), x, y, data, mem_mask); + if (LOG_LFB) v->device->logerror("VOODOO.%d.LFB:write raw mode %X (%d,%d) = %08X & %08X\n", v->index, LFBMODE_WRITE_FORMAT(v->reg[lfbMode].u), x, y, data, mem_mask); /* determine the screen Y */ scry = y; @@ -3281,7 +3281,7 @@ static INT32 lfb_w(voodoo_state *v, offs_t offset, UINT32 data, UINT32 mem_mask) { DECLARE_DITHER_POINTERS; - if (LOG_LFB) logerror("VOODOO.%d.LFB:write pipelined mode %X (%d,%d) = %08X & %08X\n", v->index, LFBMODE_WRITE_FORMAT(v->reg[lfbMode].u), x, y, data, mem_mask); + if (LOG_LFB) v->device->logerror("VOODOO.%d.LFB:write pipelined mode %X (%d,%d) = %08X & %08X\n", v->index, LFBMODE_WRITE_FORMAT(v->reg[lfbMode].u), x, y, data, mem_mask); /* determine the screen Y */ scry = y; @@ -3489,13 +3489,13 @@ static INT32 texture_w(voodoo_state *v, offs_t offset, UINT32 data) tbaseaddr = t->lodoffset[lod]; tbaseaddr += tt * ((t->wmask >> lod) + 1) + ts; - if (LOG_TEXTURE_RAM) logerror("Texture 8-bit w: lod=%d s=%d t=%d data=%08X\n", lod, ts, tt, data); + if (LOG_TEXTURE_RAM) v->device->logerror("Texture 8-bit w: lod=%d s=%d t=%d data=%08X\n", lod, ts, tt, data); } else { tbaseaddr = t->lodoffset[0] + offset*4; - if (LOG_TEXTURE_RAM) logerror("Texture 8-bit w: offset=%X data=%08X\n", offset*4, data); + if (LOG_TEXTURE_RAM) v->device->logerror("Texture 8-bit w: offset=%X data=%08X\n", offset*4, data); } /* write the four bytes in little-endian order */ @@ -3529,13 +3529,13 @@ static INT32 texture_w(voodoo_state *v, offs_t offset, UINT32 data) tbaseaddr = t->lodoffset[lod]; tbaseaddr += 2 * (tt * ((t->wmask >> lod) + 1) + ts); - if (LOG_TEXTURE_RAM) logerror("Texture 16-bit w: lod=%d s=%d t=%d data=%08X\n", lod, ts, tt, data); + if (LOG_TEXTURE_RAM) v->device->logerror("Texture 16-bit w: lod=%d s=%d t=%d data=%08X\n", lod, ts, tt, data); } else { tbaseaddr = t->lodoffset[0] + offset*4; - if (LOG_TEXTURE_RAM) logerror("Texture 16-bit w: offset=%X data=%08X\n", offset*4, data); + if (LOG_TEXTURE_RAM) v->device->logerror("Texture 16-bit w: offset=%X data=%08X\n", offset*4, data); } /* write the two words in little-endian order */ @@ -3568,7 +3568,7 @@ static void flush_fifos(voodoo_state *v, attotime current_time) if (!v->pci.op_pending) fatalerror("flush_fifos called with no pending operation\n"); - if (LOG_FIFO_VERBOSE) logerror("VOODOO.%d.FIFO:flush_fifos start -- pending=%d.%08X%08X cur=%d.%08X%08X\n", v->index, + if (LOG_FIFO_VERBOSE) v->device->logerror("VOODOO.%d.FIFO:flush_fifos start -- pending=%d.%08X%08X cur=%d.%08X%08X\n", v->index, v->pci.op_end_time.seconds(), (UINT32)(v->pci.op_end_time.attoseconds() >> 32), (UINT32)v->pci.op_end_time.attoseconds(), current_time.seconds(), (UINT32)(current_time.attoseconds() >> 32), (UINT32)current_time.attoseconds()); @@ -3594,7 +3594,7 @@ static void flush_fifos(voodoo_state *v, attotime current_time) { v->pci.op_pending = FALSE; in_flush = FALSE; - if (LOG_FIFO_VERBOSE) logerror("VOODOO.%d.FIFO:flush_fifos end -- CMDFIFO empty\n", v->index); + if (LOG_FIFO_VERBOSE) v->device->logerror("VOODOO.%d.FIFO:flush_fifos end -- CMDFIFO empty\n", v->index); return; } } @@ -3606,7 +3606,7 @@ static void flush_fifos(voodoo_state *v, attotime current_time) { v->pci.op_pending = FALSE; in_flush = FALSE; - if (LOG_FIFO_VERBOSE) logerror("VOODOO.%d.FIFO:flush_fifos end -- CMDFIFO empty\n", v->index); + if (LOG_FIFO_VERBOSE) v->device->logerror("VOODOO.%d.FIFO:flush_fifos end -- CMDFIFO empty\n", v->index); return; } } @@ -3623,7 +3623,7 @@ static void flush_fifos(voodoo_state *v, attotime current_time) { v->pci.op_pending = FALSE; in_flush = FALSE; - if (LOG_FIFO_VERBOSE) logerror("VOODOO.%d.FIFO:flush_fifos end -- FIFOs empty\n", v->index); + if (LOG_FIFO_VERBOSE) v->device->logerror("VOODOO.%d.FIFO:flush_fifos end -- FIFOs empty\n", v->index); return; } @@ -3666,12 +3666,12 @@ static void flush_fifos(voodoo_state *v, attotime current_time) /* account for those cycles */ v->pci.op_end_time += attotime(0, (attoseconds_t)cycles * v->attoseconds_per_cycle); - if (LOG_FIFO_VERBOSE) logerror("VOODOO.%d.FIFO:update -- pending=%d.%08X%08X cur=%d.%08X%08X\n", v->index, + if (LOG_FIFO_VERBOSE) v->device->logerror("VOODOO.%d.FIFO:update -- pending=%d.%08X%08X cur=%d.%08X%08X\n", v->index, v->pci.op_end_time.seconds(), (UINT32)(v->pci.op_end_time.attoseconds() >> 32), (UINT32)v->pci.op_end_time.attoseconds(), current_time.seconds(), (UINT32)(current_time.attoseconds() >> 32), (UINT32)current_time.attoseconds()); } - if (LOG_FIFO_VERBOSE) logerror("VOODOO.%d.FIFO:flush_fifos end -- pending command complete at %d.%08X%08X\n", v->index, + if (LOG_FIFO_VERBOSE) v->device->logerror("VOODOO.%d.FIFO:flush_fifos end -- pending command complete at %d.%08X%08X\n", v->index, v->pci.op_end_time.seconds(), (UINT32)(v->pci.op_end_time.attoseconds() >> 32), (UINT32)v->pci.op_end_time.attoseconds()); in_flush = FALSE; @@ -3873,7 +3873,7 @@ static UINT32 register_r(voodoo_state *v, offs_t offset) /* first make sure this register is readable */ if (!(v->regaccess[regnum] & REGISTER_READ)) { - logerror("VOODOO.%d.ERROR:Invalid attempt to read %s\n", v->index, regnum < 225 ? v->regnames[regnum] : "unknown register"); + v->device->logerror("VOODOO.%d.ERROR:Invalid attempt to read %s\n", v->index, regnum < 225 ? v->regnames[regnum] : "unknown register"); return 0xffffffff; } @@ -4029,7 +4029,7 @@ static UINT32 register_r(voodoo_state *v, offs_t offset) logit = FALSE; if (logit) - logerror("VOODOO.%d.REG:%s read = %08X\n", v->index, v->regnames[regnum], result); + v->device->logerror("VOODOO.%d.REG:%s read = %08X\n", v->index, v->regnames[regnum], result); } return result; @@ -4100,7 +4100,7 @@ static UINT32 lfb_r(voodoo_state *v, offs_t offset, bool lfb_3d) /* advance pointers to the proper row */ bufoffs = scry * v->fbi.rowpixels + x; if (bufoffs >= bufmax) { - logerror("LFB_R: Buffer offset out of bounds x=%i y=%i lfb_3d=%i offset=%08X bufoffs=%08X\n", x, y, lfb_3d, offset, (UINT32) bufoffs); + v->device->logerror("LFB_R: Buffer offset out of bounds x=%i y=%i lfb_3d=%i offset=%08X bufoffs=%08X\n", x, y, lfb_3d, offset, (UINT32) bufoffs); return 0xffffffff; } @@ -4118,7 +4118,7 @@ static UINT32 lfb_r(voodoo_state *v, offs_t offset, bool lfb_3d) if (LFBMODE_BYTE_SWIZZLE_READS(v->reg[lfbMode].u)) data = FLIPENDIAN_INT32(data); - if (LOG_LFB) logerror("VOODOO.%d.LFB:read (%d,%d) = %08X\n", v->index, x, y, data); + if (LOG_LFB) v->device->logerror("VOODOO.%d.LFB:read (%d,%d) = %08X\n", v->index, x, y, data); return data; } @@ -5396,7 +5396,7 @@ static INT32 triangle(voodoo_state *v) g_profiler.stop(); /* 1 pixel per clock, plus some setup time */ - if (LOG_REGISTERS) logerror("cycles = %d\n", TRIANGLE_SETUP_CLOCKS + pixels); + if (LOG_REGISTERS) v->device->logerror("cycles = %d\n", TRIANGLE_SETUP_CLOCKS + pixels); return TRIANGLE_SETUP_CLOCKS + pixels; } diff --git a/src/emu/cheat.c b/src/emu/cheat.c index 08f86957eac..e01ccc1a1a7 100644 --- a/src/emu/cheat.c +++ b/src/emu/cheat.c @@ -834,7 +834,7 @@ bool cheat_entry::activate() { execute_on_script(); changed = true; - popmessage("Activated %s", m_description.c_str()); + manager().machine().popmessage("Activated %s", m_description.c_str()); } // if we're a oneshot parameter cheat and we're active, execute the "state change" script and indicate change @@ -842,7 +842,7 @@ bool cheat_entry::activate() { execute_change_script(); changed = true; - popmessage("Activated\n %s = %s", m_description.c_str(), m_parameter->text()); + manager().machine().popmessage("Activated\n %s = %s", m_description.c_str(), m_parameter->text()); } return changed; @@ -1097,7 +1097,7 @@ void cheat_manager::set_enable(bool enable) for (cheat_entry *cheat = m_cheatlist.first(); cheat != NULL; cheat = cheat->next()) if (cheat->state() == SCRIPT_STATE_RUN) cheat->execute_off_script(); - popmessage("Cheats Disabled"); + machine().popmessage("Cheats Disabled"); m_disabled = true; } @@ -1109,7 +1109,7 @@ void cheat_manager::set_enable(bool enable) for (cheat_entry *cheat = m_cheatlist.first(); cheat != NULL; cheat = cheat->next()) if (cheat->state() == SCRIPT_STATE_RUN) cheat->execute_on_script(); - popmessage("Cheats Enabled"); + machine().popmessage("Cheats Enabled"); } } diff --git a/src/emu/debug/debugcmd.c b/src/emu/debug/debugcmd.c index 9bab7b07b25..8993c9a095e 100644 --- a/src/emu/debug/debugcmd.c +++ b/src/emu/debug/debugcmd.c @@ -835,7 +835,7 @@ static void execute_logerror(running_machine &machine, int ref, int params, cons /* then do a printf */ if (mini_printf(machine, buffer, param[0], params - 1, &values[1])) - logerror("%s", buffer); + machine.logerror("%s", buffer); } diff --git a/src/emu/debug/debugcon.c b/src/emu/debug/debugcon.c index f52e1665505..e2bda0b6af2 100644 --- a/src/emu/debug/debugcon.c +++ b/src/emu/debug/debugcon.c @@ -544,7 +544,7 @@ text_buffer *debug_console_get_textbuf(void) the errorlog ring buffer -------------------------------------------------*/ -void debug_errorlog_write_line(running_machine &machine, const char *line) +void debug_errorlog_write_line(const running_machine &machine, const char *line) { if (errorlog_textbuf) text_buffer_print(errorlog_textbuf, line); diff --git a/src/emu/debug/debugcon.h b/src/emu/debug/debugcon.h index 783716c5114..6861530cdd5 100644 --- a/src/emu/debug/debugcon.h +++ b/src/emu/debug/debugcon.h @@ -89,7 +89,7 @@ void CLIB_DECL debug_console_printf_wrap(running_machine &machine, int wrap text_buffer * debug_console_get_textbuf(void); /* errorlog management */ -void debug_errorlog_write_line(running_machine &machine, const char *line); +void debug_errorlog_write_line(const running_machine &machine, const char *line); text_buffer * debug_errorlog_get_textbuf(void); #endif diff --git a/src/emu/devcb.c b/src/emu/devcb.c index afa1056ec10..5a0b4d69e44 100644 --- a/src/emu/devcb.c +++ b/src/emu/devcb.c @@ -310,7 +310,7 @@ UINT64 devcb_read_base::read_ioport_adapter(address_space &space, offs_t offset, UINT64 devcb_read_base::read_logged_adapter(address_space &space, offs_t offset, UINT64 mask) { - logerror("%s: read %s\n", m_device.machine().describe_context(), m_target_tag); + m_device.logerror("%s: read %s\n", m_device.machine().describe_context(), m_target_tag); return shift_mask_xor(m_target_int); } @@ -518,7 +518,8 @@ void devcb_write_base::write64_adapter(address_space &space, offs_t offset, UINT void devcb_write_base::write_ioport_adapter(address_space &space, offs_t offset, UINT64 data, UINT64 mask) { - m_target.ioport->write_safe(unshift_mask_xor(data)); + if (m_target.ioport) + m_target.ioport->write(unshift_mask_xor(data)); } @@ -529,7 +530,7 @@ void devcb_write_base::write_ioport_adapter(address_space &space, offs_t offset, void devcb_write_base::write_logged_adapter(address_space &space, offs_t offset, UINT64 data, UINT64 mask) { - logerror("%s: unresolved devcb write\n", m_device.machine().describe_context()); + m_device.logerror("%s: unresolved devcb write\n", m_device.machine().describe_context()); } diff --git a/src/emu/device.c b/src/emu/device.c index 2fd68e6ed8e..2bf2b0a3eff 100644 --- a/src/emu/device.c +++ b/src/emu/device.c @@ -9,6 +9,8 @@ ***************************************************************************/ #include "emu.h" +#include "string.h" +#include "ui/ui.h" #include "debug/debugcpu.h" @@ -846,7 +848,41 @@ finder_base *device_t::register_auto_finder(finder_base &autodev) return old; } +void device_t::popmessage(const char *format, ...) const +{ + // if the format is NULL, it is a signal to clear the popmessage + if (format == NULL) + machine().ui().popup_time(0, " "); + + // otherwise, generate the buffer and call the UI to display the message + else + { + std::string temp; + va_list arg; + // dump to the buffer + va_start(arg, format); + strvprintf(temp, format, arg); + va_end(arg); + + // pop it in the UI + machine().ui().popup_time(temp.length() / 40 + 2, "%s", temp.c_str()); + } +} + +void device_t::logerror(const char *format, ...) const +{ + va_list arg; + va_start(arg, format); + vlogerror(format, arg); + va_end(arg); +} +void device_t::vlogerror(const char *format, va_list args) const +{ + std::string fmt("["); + fmt += tag() + std::string("] ") + format; + machine().vlogerror(fmt.c_str(), args); +} //************************************************************************** // LIVE DEVICE INTERFACES @@ -1012,3 +1048,4 @@ void device_interface::interface_debug_setup() { // do nothing by default } + diff --git a/src/emu/device.h b/src/emu/device.h index b6b245c8490..cde81b237c5 100644 --- a/src/emu/device.h +++ b/src/emu/device.h @@ -205,6 +205,11 @@ public: void set_system_bios(UINT8 bios) { m_system_bios = bios; } bool findit(bool isvalidation = false) const; + // misc + void popmessage(const char *format, ...) const; + void logerror(const char *format, ...) const; + void vlogerror(const char *format, va_list args) const; + protected: // miscellaneous helpers void set_machine(running_machine &machine); diff --git a/src/emu/diexec.c b/src/emu/diexec.c index d527dc88c39..f1f1528f826 100644 --- a/src/emu/diexec.c +++ b/src/emu/diexec.c @@ -18,7 +18,7 @@ #define VERBOSE 0 -#define LOG(x) do { if (VERBOSE) logerror x; } while (0) +#define LOG(x) do { if (VERBOSE) m_execute->device().logerror x; } while (0) #define TEMPLOG 0 @@ -615,7 +615,8 @@ int device_execute_interface::standard_irq_callback(int irqline) { // get the default vector and acknowledge the interrupt if needed int vector = m_input[irqline].default_irq_callback(); - LOG(("standard_irq_callback('%s', %d) $%04x\n", device().tag(), irqline, vector)); + + if (VERBOSE) device().logerror("standard_irq_callback('%s', %d) $%04x\n", device().tag(), irqline, vector); // if there's a driver callback, run it to get the vector if (!m_driver_irq.isnull()) @@ -783,7 +784,7 @@ if (TEMPLOG) printf("setline(%s,%d,%d,%d)\n", m_execute->device().tag(), m_linen m_qindex--; empty_event_queue(); event_index = m_qindex++; - logerror("Exceeded pending input line event queue on device '%s'!\n", m_execute->device().tag()); + m_execute->device().logerror("Exceeded pending input line event queue on device '%s'!\n", m_execute->device().tag()); } // enqueue the event @@ -867,7 +868,7 @@ if (TEMPLOG) printf(" (%d,%d)\n", m_curstate, m_curvector); break; default: - logerror("empty_event_queue device '%s', line %d, unknown state %d\n", m_execute->device().tag(), m_linenum, m_curstate); + m_execute->device().logerror("empty_event_queue device '%s', line %d, unknown state %d\n", m_execute->device().tag(), m_linenum, m_curstate); break; } diff --git a/src/emu/diimage.c b/src/emu/diimage.c index e4c40167114..77eb1fd579a 100644 --- a/src/emu/diimage.c +++ b/src/emu/diimage.c @@ -758,7 +758,6 @@ bool device_image_interface::load_software(software_list_device &swlist, const c { std::string locationtag, breakstr("%"); const rom_entry *region; - std::string regiontag; bool retVal = FALSE; int warningcount = 0; for (region = start; region != NULL; region = rom_next_region(region)) @@ -971,7 +970,7 @@ done: if (!m_init_phase) { if (device().machine().phase() == MACHINE_PHASE_RUNNING) - popmessage("Error: Unable to %s image '%s': %s", is_create ? "create" : "load", path, error()); + device().popmessage("Error: Unable to %s image '%s': %s", is_create ? "create" : "load", path, error()); else osd_printf_error("Error: Unable to %s image '%s': %s\n", is_create ? "create" : "load", path, error()); } @@ -986,7 +985,7 @@ done: if (!m_init_phase) { if (device().machine().phase() == MACHINE_PHASE_RUNNING) - popmessage("Image '%s' was successfully %s.", path, is_create ? "created" : "loaded"); + device().popmessage("Image '%s' was successfully %s.", path, is_create ? "created" : "loaded"); else osd_printf_info("Image '%s' was successfully %s.\n", path, is_create ? "created" : "loaded"); } diff --git a/src/emu/dinetwork.c b/src/emu/dinetwork.c index 9aa1cf828c7..fc411c6529c 100644 --- a/src/emu/dinetwork.c +++ b/src/emu/dinetwork.c @@ -42,7 +42,7 @@ void device_network_interface::set_interface(int id) { m_dev.reset(open_netdev(id, this, (int)(m_bandwidth*1000000/8.0f/1500))); if(!m_dev) { - logerror("Network interface %d not found\n", id); + device().logerror("Network interface %d not found\n", id); id = -1; } m_intf = id; diff --git a/src/emu/dipty.c b/src/emu/dipty.c index 1d188f95d0a..f0637abb0fe 100644 --- a/src/emu/dipty.c +++ b/src/emu/dipty.c @@ -12,10 +12,10 @@ #include "osdcore.h" device_pty_interface::device_pty_interface(const machine_config &mconfig, device_t &device) - : device_interface(device, "pty"), - m_pty_master(NULL), - m_slave_name(), - m_opened(false) + : device_interface(device, "pty"), + m_pty_master(NULL), + m_slave_name(), + m_opened(false) { } @@ -25,61 +25,61 @@ device_pty_interface::~device_pty_interface() bool device_pty_interface::open(void) { - if (!m_opened) { - char buffer[ 128 ]; - - if (osd_openpty(&m_pty_master , buffer , sizeof(buffer)) == FILERR_NONE) { - m_opened = true; - m_slave_name.assign(buffer); - } else { - m_opened = false; - m_pty_master = NULL; - } - } - - return m_opened; + if (!m_opened) { + char buffer[ 128 ]; + + if (osd_openpty(&m_pty_master , buffer , sizeof(buffer)) == FILERR_NONE) { + m_opened = true; + m_slave_name.assign(buffer); + } else { + m_opened = false; + m_pty_master = NULL; + } + } + + return m_opened; } void device_pty_interface::close(void) { - if (m_opened) { - osd_close(m_pty_master); - m_opened = false; - } + if (m_opened) { + osd_close(m_pty_master); + m_opened = false; + } } bool device_pty_interface::is_open(void) const { - return m_opened; + return m_opened; } ssize_t device_pty_interface::read(UINT8 *rx_chars , size_t count) { - UINT32 actual_bytes; + UINT32 actual_bytes; - if (m_opened && osd_read(m_pty_master, rx_chars, 0, count, &actual_bytes) == FILERR_NONE) { - return actual_bytes; - } else { - return -1; - } + if (m_opened && osd_read(m_pty_master, rx_chars, 0, count, &actual_bytes) == FILERR_NONE) { + return actual_bytes; + } else { + return -1; + } } void device_pty_interface::write(UINT8 tx_char) { - UINT32 actual_bytes; + UINT32 actual_bytes; - if (m_opened) { - osd_write(m_pty_master, &tx_char, 0, 1, &actual_bytes); - } + if (m_opened) { + osd_write(m_pty_master, &tx_char, 0, 1, &actual_bytes); + } } bool device_pty_interface::is_slave_connected(void) const { - // TODO: really check for slave status - return m_opened; + // TODO: really check for slave status + return m_opened; } const char *device_pty_interface::slave_name(void) const { - return m_slave_name.c_str(); + return m_slave_name.c_str(); } diff --git a/src/emu/dipty.h b/src/emu/dipty.h index c381420a0ca..8df192efcca 100644 --- a/src/emu/dipty.h +++ b/src/emu/dipty.h @@ -20,26 +20,26 @@ class device_pty_interface : public device_interface { public: - // construction/destruction - device_pty_interface(const machine_config &mconfig, device_t &device); - virtual ~device_pty_interface(); + // construction/destruction + device_pty_interface(const machine_config &mconfig, device_t &device); + virtual ~device_pty_interface(); - bool open(void); - void close(void); + bool open(void); + void close(void); - bool is_open(void) const; + bool is_open(void) const; - ssize_t read(UINT8 *rx_chars , size_t count); - void write(UINT8 tx_char); + ssize_t read(UINT8 *rx_chars , size_t count); + void write(UINT8 tx_char); - bool is_slave_connected(void) const; + bool is_slave_connected(void) const; - const char *slave_name(void) const; + const char *slave_name(void) const; protected: - osd_file *m_pty_master; - std::string m_slave_name; - bool m_opened; + osd_file *m_pty_master; + std::string m_slave_name; + bool m_opened; }; // iterator diff --git a/src/emu/disound.c b/src/emu/disound.c index 506ae9c4d07..94c92a62de1 100644 --- a/src/emu/disound.c +++ b/src/emu/disound.c @@ -408,7 +408,7 @@ void device_mixer_interface::interface_pre_start() // no inputs? that's weird if (m_auto_allocated_inputs == 0) { - logerror("Warning: mixer \"%s\" has no inputs\n", device().tag()); + device().logerror("Warning: mixer \"%s\" has no inputs\n", device().tag()); return; } diff --git a/src/emu/drivers/xtal.h b/src/emu/drivers/xtal.h index 0c9f2061326..469bbd46a94 100644 --- a/src/emu/drivers/xtal.h +++ b/src/emu/drivers/xtal.h @@ -223,6 +223,7 @@ enum XTAL_64MHz = 64000000, /* BattleToads */ XTAL_66_6667MHz = 66666700, /* Later Midway games */ XTAL_67_7376MHz = 67737600, /* PSX-based h/w, Sony ZN1-2-based */ + XTAL_72MHz = 72000000, /* Aristocrat MKV */ XTAL_72_576MHz = 72576000, /* Centipede, Millipede, Missile Command, Let's Go Bowling "Multipede" */ XTAL_73_728MHz = 73728000, /* Ms. Pac-Man/Galaga 20th Anniversary */ XTAL_100MHz = 100000000, /* PSX-based Namco System 12, Vegas, Sony ZN1-2-based */ diff --git a/src/emu/emuopts.c b/src/emu/emuopts.c index 148facf5cc4..a163a7ae65d 100644 --- a/src/emu/emuopts.c +++ b/src/emu/emuopts.c @@ -445,7 +445,7 @@ void emu_options::parse_standard_inis(std::string &error_string) parse_one_ini("computer", OPTION_PRIORITY_SYSTYPE_INI, &error_string); else if (cursystem->flags & MACHINE_TYPE_OTHER) parse_one_ini("othersys", OPTION_PRIORITY_SYSTYPE_INI, &error_string); - + machine_config config(*cursystem, *this); screen_device_iterator iter(config.root_device()); for (const screen_device *device = iter.first(); device != NULL; device = iter.next()) @@ -582,7 +582,7 @@ const char *emu_options::sub_value(std::string &buffer, const char *name, const { std::string tmp = std::string(",").append(subname).append("="); buffer = value(name); - int pos = buffer.find(tmp.c_str()); + int pos = buffer.find(tmp); if (pos != -1) { int endpos = buffer.find_first_of(',', pos + 1); diff --git a/src/emu/hash.h b/src/emu/hash.h index 9dc12af136b..6f066b237a0 100644 --- a/src/emu/hash.h +++ b/src/emu/hash.h @@ -66,7 +66,7 @@ public: bool operator!=(const hash_collection &rhs) const { return !(*this == rhs); } // getters - bool flag(char flag) const { return (m_flags.find_first_of(flag) != -1); } + bool flag(char flag) const { return (m_flags.find_first_of(flag) != std::string::npos); } const char *hash_types(std::string &buffer) const; // hash manipulators diff --git a/src/emu/info.c b/src/emu/info.c index 25ea424130f..8cdf12f1ded 100644 --- a/src/emu/info.c +++ b/src/emu/info.c @@ -645,7 +645,7 @@ void info_xml_creator::output_chips(device_t &device, const char *root_tag) if (strcmp(exec->device().tag(), device.tag())) { std::string newtag(exec->device().tag()), oldtag(":"); - newtag = newtag.substr(newtag.find(oldtag.append(root_tag).c_str()) + oldtag.length()); + newtag = newtag.substr(newtag.find(oldtag.append(root_tag)) + oldtag.length()); fprintf(m_output, "\t\t<chip"); fprintf(m_output, " type=\"cpu\""); @@ -663,7 +663,7 @@ void info_xml_creator::output_chips(device_t &device, const char *root_tag) if (strcmp(sound->device().tag(), device.tag())) { std::string newtag(sound->device().tag()), oldtag(":"); - newtag = newtag.substr(newtag.find(oldtag.append(root_tag).c_str()) + oldtag.length()); + newtag = newtag.substr(newtag.find(oldtag.append(root_tag)) + oldtag.length()); fprintf(m_output, "\t\t<chip"); fprintf(m_output, " type=\"audio\""); @@ -691,7 +691,7 @@ void info_xml_creator::output_display(device_t &device, const char *root_tag) if (strcmp(screendev->tag(), device.tag())) { std::string newtag(screendev->tag()), oldtag(":"); - newtag = newtag.substr(newtag.find(oldtag.append(root_tag).c_str()) + oldtag.length()); + newtag = newtag.substr(newtag.find(oldtag.append(root_tag)) + oldtag.length()); fprintf(m_output, "\t\t<display"); fprintf(m_output, " tag=\"%s\"", xml_normalize_string(newtag.c_str())); @@ -1097,7 +1097,7 @@ void info_xml_creator::output_switches(const ioport_list &portlist, const char * std::string output; std::string newtag(port->tag()), oldtag(":"); - newtag = newtag.substr(newtag.find(oldtag.append(root_tag).c_str()) + oldtag.length()); + newtag = newtag.substr(newtag.find(oldtag.append(root_tag)) + oldtag.length()); // output the switch name information std::string normalized_field_name(xml_normalize_string(field->name())); @@ -1228,7 +1228,7 @@ void info_xml_creator::output_images(device_t &device, const char *root_tag) if (strcmp(imagedev->device().tag(), device.tag())) { std::string newtag(imagedev->device().tag()), oldtag(":"); - newtag = newtag.substr(newtag.find(oldtag.append(root_tag).c_str()) + oldtag.length()); + newtag = newtag.substr(newtag.find(oldtag.append(root_tag)) + oldtag.length()); // print m_output device type fprintf(m_output, "\t\t<device type=\"%s\"", xml_normalize_string(imagedev->image_type_name())); @@ -1286,7 +1286,7 @@ void info_xml_creator::output_slots(device_t &device, const char *root_tag) if (strcmp(slot->device().tag(), device.tag())) { std::string newtag(slot->device().tag()), oldtag(":"); - newtag = newtag.substr(newtag.find(oldtag.append(root_tag).c_str()) + oldtag.length()); + newtag = newtag.substr(newtag.find(oldtag.append(root_tag)) + oldtag.length()); // print m_output device type fprintf(m_output, "\t\t<slot name=\"%s\">\n", xml_normalize_string(newtag.c_str())); diff --git a/src/emu/input.c b/src/emu/input.c index 96fa1458368..01469566a63 100644 --- a/src/emu/input.c +++ b/src/emu/input.c @@ -1581,7 +1581,7 @@ input_code input_manager::code_from_token(const char *_token) // first token should be the devclass int curtok = 0; input_device_class devclass = input_device_class((*devclass_token_table)[token[curtok++].c_str()]); - if (devclass == ~0) + if (devclass == ~input_device_class(0)) return INPUT_CODE_INVALID; // second token might be index; look for number @@ -1596,7 +1596,7 @@ input_code input_manager::code_from_token(const char *_token) // next token is the item ID input_item_id itemid = input_item_id((*itemid_token_table)[token[curtok].c_str()]); - bool standard = (itemid != ~0); + bool standard = (itemid != ~input_item_id(0)); // if we're a standard code, default the itemclass based on it input_item_class itemclass = ITEM_CLASS_INVALID; @@ -1634,7 +1634,7 @@ input_code input_manager::code_from_token(const char *_token) if (curtok < numtokens) { modifier = input_item_modifier((*modifier_token_table)[token[curtok].c_str()]); - if (modifier != ~0) + if (modifier != ~input_item_modifier(0)) curtok++; else modifier = ITEM_MODIFIER_NONE; diff --git a/src/emu/ioport.c b/src/emu/ioport.c index 1514462e579..5c0224aa77c 100644 --- a/src/emu/ioport.c +++ b/src/emu/ioport.c @@ -898,7 +898,7 @@ void natural_keyboard::post(unicode_char ch) { const keycode_map_entry *code = find_code(ch); std::string tempstr; - logerror("natural_keyboard::post(): code=%i (%s) field->name='%s'\n", int(ch), unicode_to_string(tempstr, ch), (code != NULL && code->field[0] != NULL) ? code->field[0]->name() : "<null>"); + machine().logerror("natural_keyboard::post(): code=%i (%s) field->name='%s'\n", int(ch), unicode_to_string(tempstr, ch), (code != NULL && code->field[0] != NULL) ? code->field[0]->name() : "<null>"); } // can we post this key in the queue directly? @@ -1102,7 +1102,7 @@ void natural_keyboard::build_codes(ioport_manager &manager) if (LOG_NATURAL_KEYBOARD) { std::string tempstr; - logerror("natural_keyboard: code=%i (%s) port=%p field->name='%s'\n", int(code), unicode_to_string(tempstr, code), (void *)port, field->name()); + machine().logerror("natural_keyboard: code=%i (%s) port=%p field->name='%s'\n", int(code), unicode_to_string(tempstr, code), (void *)port, field->name()); } } } @@ -3421,7 +3421,7 @@ void ioport_manager::playback_end(const char *message) // pop a message if (message != NULL) - popmessage("Playback Ended\nReason: %s", message); + machine().popmessage("Playback Ended\nReason: %s", message); // display speed stats m_playback_accumulated_speed /= m_playback_accumulated_frames; @@ -3567,7 +3567,7 @@ void ioport_manager::record_end(const char *message) // pop a message if (message != NULL) - popmessage("Recording Ended\nReason: %s", message); + machine().popmessage("Recording Ended\nReason: %s", message); } } diff --git a/src/emu/ioport.h b/src/emu/ioport.h index 623a3083253..6531bda50af 100644 --- a/src/emu/ioport.h +++ b/src/emu/ioport.h @@ -1204,9 +1204,7 @@ public: // read/write to the port ioport_value read(); - ioport_value read_safe(ioport_value defval) { return (this == NULL) ? defval : read(); } void write(ioport_value value, ioport_value mask = ~0); - void write_safe(ioport_value value, ioport_value mask = ~0) { if (this != NULL) write(value, mask); } // other operations ioport_field *field(ioport_value mask); @@ -1227,6 +1225,9 @@ private: auto_pointer<ioport_port_live> m_live; // live state of port (NULL if not live) }; +inline ioport_value read_safe(ioport_port *port, ioport_value defval) { return (port == NULL) ? defval : port->read(); } + + // ======================> analog_field diff --git a/src/emu/machine.c b/src/emu/machine.c index 3f0eb5a9c15..39529e546f0 100644 --- a/src/emu/machine.c +++ b/src/emu/machine.c @@ -206,7 +206,7 @@ TIMER_CALLBACK_MEMBER(running_machine::autoboot_callback) else if (strlen(options().autoboot_command())!=0) { std::string cmd = std::string(options().autoboot_command()); strreplace(cmd, "'", "\\'"); - std::string val = std::string("emu.keypost('").append(cmd.c_str()).append("')").c_str(); + std::string val = std::string("emu.keypost('").append(cmd).append("')"); manager().lua()->load_string(val.c_str()); } } @@ -256,6 +256,7 @@ void running_machine::start() m_memory.initialize(); // initialize the watchdog + m_watchdog_counter = 0; m_watchdog_timer = m_scheduler.timer_alloc(timer_expired_delegate(FUNC(running_machine::watchdog_fired), this)); if (config().m_watchdog_vblank_count != 0 && primary_screen != NULL) primary_screen->register_vblank_callback(vblank_state_delegate(FUNC(running_machine::watchdog_vblank), this)); @@ -562,7 +563,7 @@ std::string running_machine::get_statename(const char *option) // handle %d in the template (for image devices) std::string statename_dev("%d_"); - int pos = statename_str.find(statename_dev.c_str()); + int pos = statename_str.find(statename_dev); if (pos != -1) { @@ -807,12 +808,52 @@ void running_machine::add_logerror_callback(logerror_callback callback) m_logerror_list.append(*global_alloc(logerror_callback_item(callback))); } +/*------------------------------------------------- + popmessage - pop up a user-visible message +-------------------------------------------------*/ + +void running_machine::popmessage(const char *format, ...) const +{ + // if the format is NULL, it is a signal to clear the popmessage + if (format == NULL) + ui().popup_time(0, " "); + + // otherwise, generate the buffer and call the UI to display the message + else + { + std::string temp; + va_list arg; + + // dump to the buffer + va_start(arg, format); + strvprintf(temp,format, arg); + va_end(arg); + + // pop it in the UI + ui().popup_time(temp.length() / 40 + 2, "%s", temp.c_str()); + } +} + + +/*------------------------------------------------- + logerror - log to the debugger and any other + OSD-defined output streams +-------------------------------------------------*/ + +void running_machine::logerror(const char *format, ...) const +{ + va_list arg; + va_start(arg, format); + vlogerror(format, arg); + va_end(arg); +} + //------------------------------------------------- // vlogerror - vprintf-style error logging //------------------------------------------------- -void CLIB_DECL running_machine::vlogerror(const char *format, va_list args) +void running_machine::vlogerror(const char *format, va_list args) const { // process only if there is a target if (m_logerror_list.first() != NULL) @@ -1072,7 +1113,7 @@ void running_machine::watchdog_vblank(screen_device &screen, bool vblank_state) // logfile //------------------------------------------------- -void running_machine::logfile_callback(running_machine &machine, const char *buffer) +void running_machine::logfile_callback(const running_machine &machine, const char *buffer) { if (machine.m_logfile != NULL) machine.m_logfile->puts(buffer); @@ -1269,7 +1310,6 @@ void running_machine::nvram_save() } } } - //************************************************************************** // CALLBACK ITEMS //************************************************************************** diff --git a/src/emu/machine.h b/src/emu/machine.h index a989ba2c874..4cb35929d4e 100644 --- a/src/emu/machine.h +++ b/src/emu/machine.h @@ -144,7 +144,7 @@ class running_machine friend void debugger_init(running_machine &machine); friend class sound_manager; - typedef void (*logerror_callback)(running_machine &machine, const char *string); + typedef void (*logerror_callback)(const running_machine &machine, const char *string); // must be at top of member variables resource_pool m_respool; // pool of resources for this machine @@ -226,9 +226,12 @@ public: // watchdog control void watchdog_reset(); void watchdog_enable(bool enable = true); + INT32 get_vblank_watchdog_counter() { return m_watchdog_counter; } // misc - void CLIB_DECL vlogerror(const char *format, va_list args); + void popmessage(const char *format, ...) const; + void logerror(const char *format, ...) const; + void vlogerror(const char *format, va_list args) const; UINT32 rand(); const char *describe_context(); @@ -265,7 +268,7 @@ private: void nvram_save(); // internal callbacks - static void logfile_callback(running_machine &machine, const char *buffer); + static void logfile_callback(const running_machine &machine, const char *buffer); // internal device helpers void start_all_devices(); diff --git a/src/emu/mame.c b/src/emu/mame.c index 92d64cb61cc..526cf304015 100644 --- a/src/emu/mame.c +++ b/src/emu/mame.c @@ -253,72 +253,3 @@ int machine_manager::execute() // return an error return error; } - - -/*************************************************************************** - MISCELLANEOUS -***************************************************************************/ - -/*------------------------------------------------- - popmessage - pop up a user-visible message --------------------------------------------------*/ - -void CLIB_DECL popmessage(const char *format, ...) -{ - if (machine_manager::instance()==NULL || machine_manager::instance()->machine() == NULL) return; - - // if the format is NULL, it is a signal to clear the popmessage - if (format == NULL) - machine_manager::instance()->machine()->ui().popup_time(0, " "); - - // otherwise, generate the buffer and call the UI to display the message - else - { - std::string temp; - va_list arg; - - // dump to the buffer - va_start(arg, format); - strvprintf(temp,format, arg); - va_end(arg); - - // pop it in the UI - machine_manager::instance()->machine()->ui().popup_time(temp.length() / 40 + 2, "%s", temp.c_str()); - - /* - // also write to error.log - logerror("popmessage: %s\n", temp.c_str()); - -#ifdef MAME_DEBUG - // and to command-line in a DEBUG build - osd_printf_info("popmessage: %s\n", temp.c_str()); -#endif - */ - } -} - - -/*------------------------------------------------- - logerror - log to the debugger and any other - OSD-defined output streams --------------------------------------------------*/ - -void CLIB_DECL logerror(const char *format, ...) -{ - va_list arg; - va_start(arg, format); - vlogerror(format, arg); - va_end(arg); -} - - -/*------------------------------------------------- - vlogerror - log to the debugger and any other - OSD-defined output streams --------------------------------------------------*/ - -void CLIB_DECL vlogerror(const char *format, va_list arg) -{ - if (machine_manager::instance()!=NULL && machine_manager::instance()->machine() != NULL) - machine_manager::instance()->machine()->vlogerror(format, arg); -} diff --git a/src/emu/mame.h b/src/emu/mame.h index e3967868913..03d3dae3892 100644 --- a/src/emu/mame.h +++ b/src/emu/mame.h @@ -121,19 +121,4 @@ private: extern const char build_version[]; extern const char bare_build_version[]; - -/*************************************************************************** - FUNCTION PROTOTYPES -***************************************************************************/ - -/* ----- miscellaneous bits & pieces ----- */ - -// pop-up a user visible message -void CLIB_DECL popmessage(const char *format, ...) ATTR_PRINTF(1,2); - -// log to the standard error.log file -void CLIB_DECL logerror(const char *format, ...) ATTR_PRINTF(1,2); -void CLIB_DECL vlogerror(const char *format, va_list arg); - - #endif /* __MAME_H__ */ diff --git a/src/emu/memory.c b/src/emu/memory.c index bf251912004..653b858569f 100644 --- a/src/emu/memory.c +++ b/src/emu/memory.c @@ -676,7 +676,7 @@ private: if (m_space.device().interface(intf)) is_octal = intf->is_octal(); - logerror("%s: unmapped %s memory read from %s & %s\n", + m_space.device().logerror("%s: unmapped %s memory read from %s & %s\n", m_space.machine().describe_context(), m_space.name(), core_i64_format(m_space.byte_to_address(offset * sizeof(_UintType)), m_space.addrchars(),is_octal), core_i64_format(mask, 2 * sizeof(_UintType),is_octal)); @@ -749,7 +749,7 @@ private: if (m_space.device().interface(intf)) is_octal = intf->is_octal(); - logerror("%s: unmapped %s memory write to %s = %s & %s\n", + m_space.device().logerror("%s: unmapped %s memory write to %s = %s & %s\n", m_space.machine().describe_context(), m_space.name(), core_i64_format(m_space.byte_to_address(offset * sizeof(_UintType)), m_space.addrchars(),is_octal), core_i64_format(data, 2 * sizeof(_UintType),is_octal), @@ -1929,8 +1929,6 @@ void address_space::populate_from_map(address_map *map) void address_space::populate_map_entry(const address_map_entry &entry, read_or_write readorwrite) { const map_handler_data &data = (readorwrite == ROW_READ) ? entry.m_read : entry.m_write; - std::string fulltag; - // based on the handler type, alter the bits, name, funcptr, and object switch (data.m_type) { @@ -2965,9 +2963,9 @@ void address_table::verify_reference_counts() if (memcmp(actual_refcounts, handler_refcount, sizeof(handler_refcount))) { - logerror("Refcount failure:\n"); + osd_printf_error("Refcount failure:\n"); for(int i = STATIC_COUNT; i != SUBTABLE_BASE; i++) - logerror("%02x: %4x .. %4x\n", i, handler_refcount[i-STATIC_COUNT], actual_refcounts[i-STATIC_COUNT]); + osd_printf_error("%02x: %4x .. %4x\n", i, handler_refcount[i-STATIC_COUNT], actual_refcounts[i-STATIC_COUNT]); throw emu_fatalerror("memory.c: refcounts are fucked.\n"); } } diff --git a/src/emu/rendutil.c b/src/emu/rendutil.c index e6f5e791eec..872533583b5 100644 --- a/src/emu/rendutil.c +++ b/src/emu/rendutil.c @@ -554,19 +554,19 @@ bool render_load_png(bitmap_argb32 &bitmap, emu_file &file, const char *dirname, // verify we can handle this PNG if (png.bit_depth > 8) { - logerror("%s: Unsupported bit depth %d (8 bit max)\n", filename, png.bit_depth); + osd_printf_error("%s: Unsupported bit depth %d (8 bit max)\n", filename, png.bit_depth); png_free(&png); return false; } if (png.interlace_method != 0) { - logerror("%s: Interlace unsupported\n", filename); + osd_printf_error("%s: Interlace unsupported\n", filename); png_free(&png); return false; } if (png.color_type != 0 && png.color_type != 3 && png.color_type != 2 && png.color_type != 6) { - logerror("%s: Unsupported color type %d\n", filename, png.color_type); + osd_printf_error("%s: Unsupported color type %d\n", filename, png.color_type); png_free(&png); return false; } diff --git a/src/emu/romload.c b/src/emu/romload.c index fe3104d7f8a..2e64fe20c58 100644 --- a/src/emu/romload.c +++ b/src/emu/romload.c @@ -675,7 +675,7 @@ static int open_rom_file(romload_private *romdata, const char *regiontag, const } // prepare locations where we have to load from: list/parentname & list/clonename - std::string swlist(tag1.c_str()); + std::string swlist(tag1); tag2.assign(swlist.append(tag4)); if (has_parent) { @@ -1076,7 +1076,7 @@ int open_disk_image(emu_options &options, const game_driver *gamedrv, const rom_ } // prepare locations where we have to load from: list/parentname (if any) & list/clonename - std::string swlist(tag1.c_str()); + std::string swlist(tag1); tag2.assign(swlist.append(tag4)); if (has_parent) { diff --git a/src/emu/save.c b/src/emu/save.c index c6a1e5bd6fc..fe20fe2a988 100644 --- a/src/emu/save.c +++ b/src/emu/save.c @@ -32,7 +32,7 @@ #define VERBOSE 0 -#define LOG(x) do { if (VERBOSE) logerror x; } while (0) +#define LOG(x) do { if (VERBOSE) machine().logerror x; } while (0) @@ -153,7 +153,7 @@ void save_manager::save_memory(device_t *device, const char *module, const char // check for invalid timing if (!m_reg_allowed) { - logerror("Attempt to register save state entry after state registration is closed!\nModule %s tag %s name %s\n", module, tag, name); + machine().logerror("Attempt to register save state entry after state registration is closed!\nModule %s tag %s name %s\n", module, tag, name); if (machine().system().flags & MACHINE_SUPPORTS_SAVE) fatalerror("Attempt to register save state entry after state registration is closed!\nModule %s tag %s name %s\n", module, tag, name); m_illegal_regs++; @@ -244,7 +244,7 @@ save_error save_manager::read_file(emu_file &file) // verify the header and report an error if it doesn't match UINT32 sig = signature(); - if (validate_header(header, machine().system().name, sig, popmessage, "Error: ") != STATERR_NONE) + if (validate_header(header, machine().system().name, sig, NULL, "Error: ") != STATERR_NONE) return STATERR_INVALID_HEADER; // determine whether or not to flip the data when done diff --git a/src/emu/schedule.c b/src/emu/schedule.c index f94b2919b5d..28521538d16 100644 --- a/src/emu/schedule.c +++ b/src/emu/schedule.c @@ -25,7 +25,7 @@ #define VERBOSE 0 -#define LOG(x) do { if (VERBOSE) logerror x; } while (0) +#define LOG(x) do { if (VERBOSE) machine().logerror x; } while (0) #define PRECISION @@ -300,11 +300,11 @@ inline void emu_timer::schedule_next_period() void emu_timer::dump() const { - logerror("%p: en=%d temp=%d exp=%15s start=%15s per=%15s param=%d ptr=%p", this, m_enabled, m_temporary, m_expire.as_string(PRECISION), m_start.as_string(PRECISION), m_period.as_string(PRECISION), m_param, m_ptr); + machine().logerror("%p: en=%d temp=%d exp=%15s start=%15s per=%15s param=%d ptr=%p", this, m_enabled, m_temporary, m_expire.as_string(PRECISION), m_start.as_string(PRECISION), m_period.as_string(PRECISION), m_param, m_ptr); if (m_device == NULL) - logerror(" cb=%s\n", m_callback.name()); + machine().logerror(" cb=%s\n", m_callback.name()); else - logerror(" dev=%s id=%d\n", m_device->tag(), m_id); + machine().logerror(" dev=%s id=%d\n", m_device->tag(), m_id); } @@ -379,7 +379,7 @@ bool device_scheduler::can_save() const for (emu_timer *timer = m_timer_list; timer != NULL; timer = timer->next()) if (timer->m_temporary && !timer->expire().is_never()) { - logerror("Failed save state attempt due to anonymous timers:\n"); + machine().logerror("Failed save state attempt due to anonymous timers:\n"); dump_timers(); return false; } @@ -658,7 +658,7 @@ void device_scheduler::timed_trigger(void *ptr, INT32 param) void device_scheduler::presave() { // report the timer state after a log - logerror("Prior to saving state:\n"); + machine().logerror("Prior to saving state:\n"); dump_timers(); } @@ -693,7 +693,7 @@ void device_scheduler::postload() rebuild_execute_list(); // report the timer state after a log - logerror("After resetting/reordering timers:\n"); + machine().logerror("After resetting/reordering timers:\n"); dump_timers(); } @@ -984,11 +984,11 @@ void device_scheduler::add_scheduling_quantum(const attotime &quantum, const att void device_scheduler::dump_timers() const { - logerror("=============================================\n"); - logerror("Timer Dump: Time = %15s\n", time().as_string(PRECISION)); + machine().logerror("=============================================\n"); + machine().logerror("Timer Dump: Time = %15s\n", time().as_string(PRECISION)); for (emu_timer *timer = first_timer(); timer != NULL; timer = timer->next()) timer->dump(); - logerror("=============================================\n"); + machine().logerror("=============================================\n"); } #if (defined(__MINGW32__) && (__GNUC__ >= 5)) diff --git a/src/emu/screen.c b/src/emu/screen.c index c3bb09e320a..399c376c856 100644 --- a/src/emu/screen.c +++ b/src/emu/screen.c @@ -63,6 +63,7 @@ screen_device::screen_device(const machine_config &mconfig, const char *tag, dev m_curtexture(0), m_changed(true), m_last_partial_scan(0), + m_partial_scan_hpos(0), m_color(rgb_t(0xff, 0xff, 0xff, 0xff)), m_brightness(0xff), m_frame_period(DEFAULT_FRAME_PERIOD.as_attoseconds()), @@ -661,21 +662,121 @@ bool screen_device::update_partial(int scanline) void screen_device::update_now() { + // these two checks only apply if we're allowed to skip frames + if (!(m_video_attributes & VIDEO_ALWAYS_UPDATE)) + { + // if skipping this frame, bail + if (machine().video().skip_this_frame()) + { + LOG_PARTIAL_UPDATES(("skipped due to frameskipping\n")); + return; + } + + // skip if this screen is not visible anywhere + if (!machine().render().is_live(*this)) + { + LOG_PARTIAL_UPDATES(("skipped because screen not live\n")); + return; + } + } + int current_vpos = vpos(); int current_hpos = hpos(); + rectangle clip = m_visarea; + + LOG_PARTIAL_UPDATES(("update_now(): Y=%d, X=%d, last partial %d, partial hpos %d (vis %d %d)\n", current_vpos, current_hpos, m_last_partial_scan, m_partial_scan_hpos, m_visarea.max_x, m_visarea.max_y)); - // since we can currently update only at the scanline - // level, we are trying to do the right thing by - // updating including the current scanline, only if the - // beam is past the halfway point horizontally. - // If the beam is in the first half of the scanline, - // we only update up to the previous scanline. - // This minimizes the number of pixels that might be drawn - // incorrectly until we support a pixel level granularity - if (current_hpos < (m_width / 2) && current_vpos > 0) - current_vpos = current_vpos - 1; - - update_partial(current_vpos); + // start off by doing a partial update up to the line before us, in case that was necessary + if (current_vpos > m_last_partial_scan) + { + // if the line before us was incomplete, we must do it in two pieces + if (m_partial_scan_hpos > 0) + { + INT32 save_scan = m_partial_scan_hpos; + update_partial(current_vpos - 2); + m_partial_scan_hpos = save_scan; + + // now finish the previous partial scanline + int scanline = current_vpos - 1; + if (m_partial_scan_hpos > clip.min_x) + clip.min_x = m_partial_scan_hpos; + if (current_hpos < clip.max_x) + clip.max_x = current_hpos; + if (m_last_partial_scan > clip.min_y) + clip.min_y = m_last_partial_scan; + if (scanline < clip.max_y) + clip.max_y = scanline; + + // if there's something to draw, do it + if ((clip.min_x <= clip.max_x) && (clip.min_y <= clip.max_y)) + { + g_profiler.start(PROFILER_VIDEO); + + screen_bitmap &curbitmap = m_bitmap[m_curbitmap]; + switch (curbitmap.format()) + { + default: + case BITMAP_FORMAT_IND16: m_screen_update_ind16(*this, curbitmap.as_ind16(), clip); break; + case BITMAP_FORMAT_RGB32: m_screen_update_rgb32(*this, curbitmap.as_rgb32(), clip); break; + } + + m_partial_updates_this_frame++; + g_profiler.stop(); + m_partial_scan_hpos = 0; + m_last_partial_scan = current_vpos + 1; + } + } + else + { + update_partial(current_vpos - 1); + } + } + + // now draw this partial scanline + clip = m_visarea; + + if (m_partial_scan_hpos > clip.min_x) + clip.min_x = m_partial_scan_hpos; + if (current_hpos < clip.max_x) + clip.max_x = current_hpos; + if (current_vpos > clip.min_y) + clip.min_y = current_vpos; + if (current_vpos < clip.max_y) + clip.max_y = current_vpos; + + // and if there's something to draw, do it + if ((clip.min_x <= clip.max_x) && (clip.min_y <= clip.max_y)) + { + g_profiler.start(PROFILER_VIDEO); + + LOG_PARTIAL_UPDATES(("doing scanline partial draw: Y %d X %d-%d\n", clip.max_y, clip.min_x, clip.max_x)); + + UINT32 flags = UPDATE_HAS_NOT_CHANGED; + screen_bitmap &curbitmap = m_bitmap[m_curbitmap]; + switch (curbitmap.format()) + { + default: + case BITMAP_FORMAT_IND16: flags = m_screen_update_ind16(*this, curbitmap.as_ind16(), clip); break; + case BITMAP_FORMAT_RGB32: flags = m_screen_update_rgb32(*this, curbitmap.as_rgb32(), clip); break; + } + + m_partial_updates_this_frame++; + g_profiler.stop(); + + // if we modified the bitmap, we have to commit + m_changed |= ~flags & UPDATE_HAS_NOT_CHANGED; + + // remember where we left off + m_partial_scan_hpos = current_hpos; + m_last_partial_scan = current_vpos; + + // if we completed the line, mark it so + if (current_hpos >= m_visarea.max_x) + { + m_partial_scan_hpos = 0; + m_last_partial_scan = current_vpos + 1; + } + } } @@ -687,6 +788,7 @@ void screen_device::update_now() void screen_device::reset_partial_updates() { m_last_partial_scan = 0; + m_partial_scan_hpos = 0; m_partial_updates_this_frame = 0; m_scanline0_timer->adjust(time_until_pos(0)); } diff --git a/src/emu/screen.h b/src/emu/screen.h index f3aab539cce..725160005a2 100644 --- a/src/emu/screen.h +++ b/src/emu/screen.h @@ -285,6 +285,7 @@ private: UINT8 m_curtexture; // current texture index bool m_changed; // has this bitmap changed? INT32 m_last_partial_scan; // scanline of last partial update + INT32 m_partial_scan_hpos; // horizontal pixel last rendered on this partial scanline bitmap_argb32 m_screen_overlay_bitmap; // screen overlay bitmap UINT32 m_unique_id; // unique id for this screen_device rgb_t m_color; // render color diff --git a/src/emu/softlist.c b/src/emu/softlist.c index c2e8dba671a..c90bb6cccdc 100644 --- a/src/emu/softlist.c +++ b/src/emu/softlist.c @@ -158,7 +158,7 @@ bool software_part::is_compatible(const software_list_device &swlistdev) const for (int start = 0, end = filt.find_first_of(',',start); end != -1; start = end + 1, end = filt.find_first_of(',', start)) { std::string token(filt, start, end - start + 1); - if (comp.find(token.c_str()) != -1) + if (comp.find(token) != -1) return true; } return false; @@ -181,7 +181,7 @@ bool software_part::matches_interface(const char *interface_list) const // then add a comma to the end of our interface and return true if we find it in the list string std::string our_interface = std::string(m_interface).append(","); - return (interfaces.find(our_interface.c_str()) != -1); + return (interfaces.find(our_interface) != -1); } diff --git a/src/emu/sound/filter.c b/src/emu/sound/filter.c index 3d80966d029..4893c29c005 100644 --- a/src/emu/sound/filter.c +++ b/src/emu/sound/filter.c @@ -169,7 +169,7 @@ void filter2_setup(device_t *device, int type, double fc, double d, double gain, filter2->b1 = -2.0*(filter2->b0); break; default: - logerror("filter2_setup() - Invalid filter type for 2nd order filter."); + device->logerror("filter2_setup() - Invalid filter type for 2nd order filter."); break; } @@ -211,7 +211,7 @@ void filter_opamp_m_bandpass_setup(device_t *device, double r1, double r2, doubl if (r1 == 0) { - logerror("filter_opamp_m_bandpass_setup() - r1 can not be 0"); + device->logerror("filter_opamp_m_bandpass_setup() - r1 can not be 0"); return; /* Filter can not be setup. Undefined results. */ } diff --git a/src/emu/ui/cheatopt.c b/src/emu/ui/cheatopt.c index c2956e7ca46..0ab91a41c03 100644 --- a/src/emu/ui/cheatopt.c +++ b/src/emu/ui/cheatopt.c @@ -30,7 +30,7 @@ void ui_menu_cheat::handle() bool changed = false; /* clear cheat comment on any movement or keypress */ - popmessage(NULL); + machine().popmessage(NULL); /* handle reset all + reset all cheats for reload all option */ if ((FPTR)menu_event->itemref < 3 && menu_event->iptkey == IPT_UI_SELECT) @@ -74,7 +74,7 @@ void ui_menu_cheat::handle() case IPT_UI_DOWN: string = curcheat->comment(); if (string != NULL && string[0] != 0) - popmessage("Cheat Comment:\n%s", string); + machine().popmessage("Cheat Comment:\n%s", string); break; } } @@ -87,7 +87,7 @@ void ui_menu_cheat::handle() /* display the reloaded cheats */ reset(UI_MENU_RESET_REMEMBER_REF); - popmessage("All cheats reloaded"); + machine().popmessage("All cheats reloaded"); } /* if things changed, update */ diff --git a/src/emu/ui/filemngr.c b/src/emu/ui/filemngr.c index 5e02b657cd0..55070364014 100644 --- a/src/emu/ui/filemngr.c +++ b/src/emu/ui/filemngr.c @@ -104,7 +104,6 @@ void ui_menu_file_manager::populate() { std::string buffer, tmp_inst, tmp_name; bool first_entry = true; - std::string prev_owner; if (!m_warnings.empty()) { diff --git a/src/emu/ui/imgcntrl.c b/src/emu/ui/imgcntrl.c index f1166bb3a8a..05d6a758b7c 100644 --- a/src/emu/ui/imgcntrl.c +++ b/src/emu/ui/imgcntrl.c @@ -142,7 +142,7 @@ void ui_menu_control_device_image::load_software_part() hook_load(temp_name, true); else { - popmessage("The selected game is missing one or more required ROM or CHD images. Please select a different game."); + machine().popmessage("The selected game is missing one or more required ROM or CHD images. Please select a different game."); state = SELECT_SOFTLIST; } } @@ -334,7 +334,7 @@ void ui_menu_control_device_image::handle() zippath_combine(path, current_directory.c_str(), current_file.c_str()); int err = image->create(path.c_str(), 0, NULL); if (err != 0) - popmessage("Error: %s", image->error()); + machine().popmessage("Error: %s", image->error()); ui_menu::stack_pop(machine()); break; } diff --git a/src/emu/ui/info_pty.c b/src/emu/ui/info_pty.c index 1fe865f5668..5a6dca59efb 100644 --- a/src/emu/ui/info_pty.c +++ b/src/emu/ui/info_pty.c @@ -13,7 +13,7 @@ #include "ui/info_pty.h" ui_menu_pty_info::ui_menu_pty_info(running_machine &machine, render_container *container) : - ui_menu(machine, container) + ui_menu(machine, container) { } @@ -23,22 +23,22 @@ ui_menu_pty_info::~ui_menu_pty_info() void ui_menu_pty_info::populate() { - item_append("Pseudo terminals", NULL, MENU_FLAG_DISABLE, NULL); - item_append("", NULL, MENU_FLAG_DISABLE, NULL); - - pty_interface_iterator iter(machine().root_device()); - for (device_pty_interface *pty = iter.first(); pty != NULL; pty = iter.next()) { - const char *port_name = pty->device().owner()->tag() + 1; - if (pty->is_open()) { - item_append(port_name , pty->slave_name() , MENU_FLAG_DISABLE , NULL); - } else { - item_append(port_name , "[failed]" , MENU_FLAG_DISABLE , NULL); - } - item_append("", NULL, MENU_FLAG_DISABLE, NULL); - } + item_append("Pseudo terminals", NULL, MENU_FLAG_DISABLE, NULL); + item_append("", NULL, MENU_FLAG_DISABLE, NULL); + + pty_interface_iterator iter(machine().root_device()); + for (device_pty_interface *pty = iter.first(); pty != NULL; pty = iter.next()) { + const char *port_name = pty->device().owner()->tag() + 1; + if (pty->is_open()) { + item_append(port_name , pty->slave_name() , MENU_FLAG_DISABLE , NULL); + } else { + item_append(port_name , "[failed]" , MENU_FLAG_DISABLE , NULL); + } + item_append("", NULL, MENU_FLAG_DISABLE, NULL); + } } void ui_menu_pty_info::handle() { - process(0); + process(0); } diff --git a/src/emu/ui/inputmap.c b/src/emu/ui/inputmap.c index 9aa63fdcec9..375c59075b6 100644 --- a/src/emu/ui/inputmap.c +++ b/src/emu/ui/inputmap.c @@ -91,7 +91,6 @@ void ui_menu_input_general::populate() { input_item_data *itemlist = NULL; int suborder[SEQ_TYPE_TOTAL]; - std::string tempstring; int sortorder = 1; /* create a mini lookup table for sort order based on sequence type */ @@ -154,7 +153,6 @@ void ui_menu_input_specific::populate() { input_item_data *itemlist = NULL; int suborder[SEQ_TYPE_TOTAL]; - std::string tempstring; int port_count = 0; /* create a mini lookup table for sort order based on sequence type */ diff --git a/src/emu/ui/mainmenu.c b/src/emu/ui/mainmenu.c index 196fdb976c2..27d224678ce 100644 --- a/src/emu/ui/mainmenu.c +++ b/src/emu/ui/mainmenu.c @@ -91,10 +91,10 @@ void ui_menu_main::populate() item_append("Tape Control", NULL, 0, (void *)TAPE_CONTROL); } - pty_interface_iterator ptyiter(machine().root_device()); - if (ptyiter.first() != NULL) { - item_append("Pseudo terminals", NULL, 0, (void *)PTY_INFO); - } + pty_interface_iterator ptyiter(machine().root_device()); + if (ptyiter.first() != NULL) { + item_append("Pseudo terminals", NULL, 0, (void *)PTY_INFO); + } if (machine().ioport().has_bioses()) item_append("Bios Selection", NULL, 0, (void *)BIOS_SELECTION); @@ -196,8 +196,8 @@ void ui_menu_main::handle() ui_menu::stack_push(auto_alloc_clear(machine(), ui_menu_tape_control(machine(), container, NULL))); break; - case PTY_INFO: - ui_menu::stack_push(auto_alloc_clear(machine(), ui_menu_pty_info(machine(), container))); + case PTY_INFO: + ui_menu::stack_push(auto_alloc_clear(machine(), ui_menu_pty_info(machine(), container))); break; case SLOT_DEVICES: diff --git a/src/emu/ui/mainmenu.h b/src/emu/ui/mainmenu.h index b35a5927073..aa1f3a99885 100644 --- a/src/emu/ui/mainmenu.h +++ b/src/emu/ui/mainmenu.h @@ -45,7 +45,7 @@ private: SELECT_GAME, BIOS_SELECTION, BARCODE_READ, - PTY_INFO + PTY_INFO }; }; diff --git a/src/emu/ui/swlist.c b/src/emu/ui/swlist.c index 6e5cbf33f93..a7096539924 100644 --- a/src/emu/ui/swlist.c +++ b/src/emu/ui/swlist.c @@ -263,7 +263,7 @@ void ui_menu_software_list::handle() // reload the menu with the new order reset(UI_MENU_RESET_REMEMBER_REF); - popmessage("Switched Order: entries now ordered by %s", m_ordered_by_shortname ? "shortname" : "description"); + machine().popmessage("Switched Order: entries now ordered by %s", m_ordered_by_shortname ? "shortname" : "description"); } // handle selections else if (event->iptkey == IPT_UI_SELECT) diff --git a/src/emu/ui/ui.c b/src/emu/ui/ui.c index fbcf3dfc693..d6dca99c255 100644 --- a/src/emu/ui/ui.c +++ b/src/emu/ui/ui.c @@ -1705,9 +1705,9 @@ UINT32 ui_manager::handler_load_save(running_machine &machine, render_container { // display a popup indicating things were cancelled if (state == LOADSAVE_SAVE) - popmessage("Save cancelled"); + machine.popmessage("Save cancelled"); else - popmessage("Load cancelled"); + machine.popmessage("Load cancelled"); // reset the state machine.resume(); @@ -1733,12 +1733,12 @@ UINT32 ui_manager::handler_load_save(running_machine &machine, render_container sprintf(filename, "%c", file); if (state == LOADSAVE_SAVE) { - popmessage("Save to position %c", file); + machine.popmessage("Save to position %c", file); machine.schedule_save(filename); } else { - popmessage("Load from position %c", file); + machine.popmessage("Load from position %c", file); machine.schedule_load(filename); } diff --git a/src/emu/ui/viewgfx.c b/src/emu/ui/viewgfx.c index 912ac0a8b3f..d4aa5ab3a27 100644 --- a/src/emu/ui/viewgfx.c +++ b/src/emu/ui/viewgfx.c @@ -1089,15 +1089,15 @@ static void tilemap_handle_keys(running_machine &machine, ui_gfx_state &state, i state.tilemap.zoom--; state.bitmap_dirty = true; if (state.tilemap.zoom != 0) - popmessage("Zoom = %d", state.tilemap.zoom); + machine.popmessage("Zoom = %d", state.tilemap.zoom); else - popmessage("Zoom Auto"); + machine.popmessage("Zoom Auto"); } if (ui_input_pressed(machine, IPT_UI_ZOOM_IN) && state.tilemap.zoom < 8) { state.tilemap.zoom++; state.bitmap_dirty = true; - popmessage("Zoom = %d", state.tilemap.zoom); + machine.popmessage("Zoom = %d", state.tilemap.zoom); } // handle rotation (R) diff --git a/src/emu/validity.c b/src/emu/validity.c index 7dbe67206a0..45f39ff444f 100644 --- a/src/emu/validity.c +++ b/src/emu/validity.c @@ -196,7 +196,6 @@ bool validity_checker::check_all() // if we had warnings or errors, output if (m_errors > 0 || m_warnings > 0) { - std::string tempstr; output_via_delegate(OSD_OUTPUT_CHANNEL_ERROR, "Core: %d errors, %d warnings\n", m_errors, m_warnings); if (m_errors > 0) { diff --git a/src/emu/video.c b/src/emu/video.c index adc2888b2e7..178bd9d0aba 100644 --- a/src/emu/video.c +++ b/src/emu/video.c @@ -767,7 +767,7 @@ void video_manager::update_throttle(attotime emutime) if (emu_delta_attoseconds < 0 || emu_delta_attoseconds > ATTOSECONDS_PER_SECOND / 10) { if (LOG_THROTTLE) - logerror("Resync due to weird emutime delta: %s\n", attotime(0, emu_delta_attoseconds).as_string(18)); + machine().logerror("Resync due to weird emutime delta: %s\n", attotime(0, emu_delta_attoseconds).as_string(18)); break; } @@ -782,7 +782,7 @@ void video_manager::update_throttle(attotime emutime) if (diff_ticks >= ticks_per_second) { if (LOG_THROTTLE) - logerror("Resync due to real time advancing by more than 1 second\n"); + machine().logerror("Resync due to real time advancing by more than 1 second\n"); break; } @@ -808,7 +808,7 @@ void video_manager::update_throttle(attotime emutime) (real_is_ahead_attoseconds < 0 && popcount[m_throttle_history & 0xff] < 6)) { if (LOG_THROTTLE) - logerror("Resync due to being behind: %s (history=%08X)\n", attotime(0, -real_is_ahead_attoseconds).as_string(18), m_throttle_history); + machine().logerror("Resync due to being behind: %s (history=%08X)\n", attotime(0, -real_is_ahead_attoseconds).as_string(18), m_throttle_history); break; } @@ -879,7 +879,7 @@ osd_ticks_t video_manager::throttle_until_ticks(osd_ticks_t target_ticks) m_average_oversleep = (m_average_oversleep * 99 + oversleep_milliticks) / 100; if (LOG_THROTTLE) - logerror("Slept for %d ticks, got %d ticks, avgover = %d\n", (int)delta, (int)actual_ticks, (int)m_average_oversleep); + machine().logerror("Slept for %d ticks, got %d ticks, avgover = %d\n", (int)delta, (int)actual_ticks, (int)m_average_oversleep); } } current_ticks = new_ticks; @@ -1126,7 +1126,7 @@ file_error video_manager::open_next(emu_file &file, const char *extension) // handle %d in the template (for image devices) std::string snapdev("%d_"); - int pos = snapstr.find(snapdev.c_str()); + int pos = snapstr.find(snapdev); if (pos != -1) { @@ -1326,11 +1326,11 @@ void video_manager::toggle_record_movie() if (!is_recording()) { begin_recording(NULL, MF_MNG); - popmessage("REC START"); + machine().popmessage("REC START"); } else { end_recording(MF_MNG); - popmessage("REC STOP"); + machine().popmessage("REC STOP"); } } diff --git a/src/emu/video/resnet.c b/src/emu/video/resnet.c index 0245aba6161..57f9423f480 100644 --- a/src/emu/video/resnet.c +++ b/src/emu/video/resnet.c @@ -203,25 +203,25 @@ double compute_resistor_weights( /* debug code */ if (VERBOSE) { - logerror("compute_resistor_weights(): scaler = %15.10f\n",scale); - logerror("min val :%i max val:%i Total number of networks :%i\n", minval, maxval, networks_no ); + osd_printf_info("compute_resistor_weights(): scaler = %15.10f\n",scale); + osd_printf_info("min val :%i max val:%i Total number of networks :%i\n", minval, maxval, networks_no ); for(i = 0; i < networks_no;i++) { double sum = 0.0; - logerror(" Network no.%i=> resistances: %i", i, rescount[i] ); + osd_printf_info(" Network no.%i=> resistances: %i", i, rescount[i] ); if (r_pu[i] != 0) - logerror(", pullup resistor: %i Ohms",r_pu[i]); + osd_printf_info(", pullup resistor: %i Ohms",r_pu[i]); if (r_pd[i] != 0) - logerror(", pulldown resistor: %i Ohms",r_pd[i]); - logerror("\n maximum output of this network:%10.5f (scaled to %15.10f)\n", max_out[i], max_out[i]*scale ); + osd_printf_info(", pulldown resistor: %i Ohms",r_pd[i]); + osd_printf_info("\n maximum output of this network:%10.5f (scaled to %15.10f)\n", max_out[i], max_out[i]*scale ); for (n = 0; n < rescount[i]; n++) { - logerror(" res %2i:%9.1f Ohms weight=%10.5f (scaled = %15.10f)\n", n, r[i][n], w[i][n], ws[i][n] ); + osd_printf_info(" res %2i:%9.1f Ohms weight=%10.5f (scaled = %15.10f)\n", n, r[i][n], w[i][n], ws[i][n] ); sum += ws[i][n]; } - logerror(" sum of scaled weights = %15.10f\n", sum ); + osd_printf_info(" sum of scaled weights = %15.10f\n", sum ); } } /* debug end */ @@ -393,25 +393,25 @@ double compute_resistor_net_outputs( /* debug code */ if (VERBOSE) { - logerror("compute_resistor_net_outputs(): scaler = %15.10f\n",scale); - logerror("min val :%i max val:%i Total number of networks :%i\n", minval, maxval, networks_no ); + osd_printf_info("compute_resistor_net_outputs(): scaler = %15.10f\n",scale); + osd_printf_info("min val :%i max val:%i Total number of networks :%i\n", minval, maxval, networks_no ); for(i = 0; i < networks_no;i++) { - logerror(" Network no.%i=> resistances: %i", i, rescount[i] ); + osd_printf_info(" Network no.%i=> resistances: %i", i, rescount[i] ); if (r_pu[i] != 0) - logerror(", pullup resistor: %i Ohms",r_pu[i]); + osd_printf_info(", pullup resistor: %i Ohms",r_pu[i]); if (r_pd[i] != 0) - logerror(", pulldown resistor: %i Ohms",r_pd[i]); - logerror("\n maximum output of this network:%10.5f", max_out[i] ); - logerror("\n minimum output of this network:%10.5f\n", min_out[i] ); + osd_printf_info(", pulldown resistor: %i Ohms",r_pd[i]); + osd_printf_info("\n maximum output of this network:%10.5f", max_out[i] ); + osd_printf_info("\n minimum output of this network:%10.5f\n", min_out[i] ); for (n = 0; n < rescount[i]; n++) { - logerror(" res %2i:%9.1f Ohms\n", n, r[i][n]); + osd_printf_info(" res %2i:%9.1f Ohms\n", n, r[i][n]); } for (n = 0; n < (1<<rescount[i]); n++) { - logerror(" combination %2i out=%10.5f (scaled = %15.10f)\n", n, o[i*(1<<MAX_RES_PER_NET)+n], os[i*(1<<MAX_RES_PER_NET)+n] ); + osd_printf_info(" combination %2i out=%10.5f (scaled = %15.10f)\n", n, o[i*(1<<MAX_RES_PER_NET)+n], os[i*(1<<MAX_RES_PER_NET)+n] ); } } } diff --git a/src/emu/video/rgbvmx.c b/src/emu/video/rgbvmx.c index a35572368a7..29c15437401 100644 --- a/src/emu/video/rgbvmx.c +++ b/src/emu/video/rgbvmx.c @@ -175,46 +175,14 @@ void rgbaint_t::scale_and_clamp(const rgbaint_t& scale) { mul(scale); sra_imm(8); - max(0); - min(255); + clamp_to_uint8(); } void rgbaint_t::scale_imm_and_clamp(const INT32 scale) { mul_imm(scale); sra_imm(8); - max(0); - min(255); -} - -void rgbaint_t::scale2_add_and_clamp(const rgbaint_t& scale, const rgbaint_t& other, const rgbaint_t& scale2) -{ - rgbaint_t color2(other); - color2.mul(scale2); - - mul(scale); - add(color2); - sra_imm(8); - max(0); - min(255); -} - -void rgbaint_t::scale_imm_add_and_clamp(const INT32 scale, const rgbaint_t& other) -{ - mul_imm(scale); - sra_imm(8); - add(other); - max(0); - min(255); -} - -void rgbaint_t::scale_add_and_clamp(const rgbaint_t& scale, const rgbaint_t& other) -{ - mul(scale); - sra_imm(8); - add(other); - max(0); - min(255); + clamp_to_uint8(); } #endif // defined(__ALTIVEC__) diff --git a/src/emu/video/rgbvmx.h b/src/emu/video/rgbvmx.h index 10c235eaa5a..66d0ae8d2c4 100644 --- a/src/emu/video/rgbvmx.h +++ b/src/emu/video/rgbvmx.h @@ -19,11 +19,20 @@ class rgbaint_t { +protected: + typedef __vector signed char VECS8; + typedef __vector unsigned char VECU8; + typedef __vector signed short VECS16; + typedef __vector unsigned short VECU16; + typedef __vector signed int VECS32; + typedef __vector unsigned int VECU32; + public: inline rgbaint_t() { } inline rgbaint_t(UINT32 rgba) { set(rgba); } inline rgbaint_t(INT32 a, INT32 r, INT32 g, INT32 b) { set(a, r, g, b); } inline rgbaint_t(rgb_t& rgb) { set(rgb); } + inline rgbaint_t(VECS32 rgba) { m_value = rgba; } inline void set(rgbaint_t& other) { m_value = other.m_value; } @@ -49,8 +58,8 @@ public: inline rgb_t to_rgba() { - VECU32 temp = vec_pack(m_value, m_value); - temp = vec_pack((VECU16)temp, (VECU16)temp); + VECU32 temp = vec_packs(m_value, m_value); + temp = vec_packsu((VECS16)temp, (VECS16)temp); UINT32 result; vec_ste(temp, 0, &result); return result; @@ -59,7 +68,7 @@ public: inline rgb_t to_rgba_clamp() { VECU32 temp = vec_packs(m_value, m_value); - temp = vec_packsu((VECU16)temp, (VECU16)temp); + temp = vec_packsu((VECS16)temp, (VECS16)temp); UINT32 result; vec_ste(temp, 0, &result); return result; @@ -222,8 +231,7 @@ public: inline void shl(const rgbaint_t& shift) { const VECU32 limit = { 32, 32, 32, 32 }; - const VECU32 temp = vec_splat(shift.m_value, 3); - m_value = vec_and(vec_sl(m_value, temp), vec_cmpgt(limit, temp)); + m_value = vec_and(vec_sl(m_value, (VECU32)shift.m_value), vec_cmpgt(limit, (VECU32)shift.m_value)); } inline void shl_imm(const UINT8 shift) @@ -235,8 +243,7 @@ public: inline void shr(const rgbaint_t& shift) { const VECU32 limit = { 32, 32, 32, 32 }; - const VECU32 temp = vec_splat(shift.m_value, 3); - m_value = vec_and(vec_sr(m_value, temp), vec_cmpgt(limit, temp)); + m_value = vec_and(vec_sr(m_value, (VECU32)shift.m_value), vec_cmpgt(limit, (VECU32)shift.m_value)); } inline void shr_imm(const UINT8 shift) @@ -248,7 +255,7 @@ public: inline void sra(const rgbaint_t& shift) { const VECU32 limit = { 31, 31, 31, 31 }; - m_value = vec_sra(m_value, vec_min((VECU32)vec_splat(shift.m_value, 3), limit)); + m_value = vec_sra(m_value, vec_min((VECU32)shift.m_value, limit)); } inline void sra_imm(const UINT8 shift) @@ -279,6 +286,11 @@ public: m_value = vec_and(m_value, color.m_value); } + inline void andnot_reg(const rgbaint_t& color) + { + m_value = vec_andc(m_value, color.m_value); + } + inline void and_imm(const INT32 value) { const VECS32 temp = { value, value, value, value }; @@ -318,6 +330,15 @@ public: m_value = vec_or(vec_and(vsign, mask), vec_and(m_value, vec_nor(mask, vzero))); } + inline void clamp_to_uint8() + { + const VECU32 zero = { 0, 0, 0, 0 }; + m_value = vec_packs(m_value, m_value); + m_value = vec_packsu((VECS16)m_value, (VECS16)m_value); + m_value = vec_mergeh((VECU8)zero, (VECU8)m_value); + m_value = vec_mergeh((VECS16)zero, (VECS16)m_value); + } + inline void sign_extend(const UINT32 compare, const UINT32 sign) { const VECS32 compare_vec = { compare, compare, compare, compare }; @@ -342,9 +363,33 @@ public: void scale_and_clamp(const rgbaint_t& scale); void scale_imm_and_clamp(const INT32 scale); - void scale2_add_and_clamp(const rgbaint_t& scale, const rgbaint_t& other, const rgbaint_t& scale2); - void scale_add_and_clamp(const rgbaint_t& scale, const rgbaint_t& other); - void scale_imm_add_and_clamp(const INT32 scale, const rgbaint_t& other); + + void scale_imm_add_and_clamp(const INT32 scale, const rgbaint_t& other) + { + mul_imm(scale); + sra_imm(8); + add(other); + clamp_to_uint8(); + } + + void scale_add_and_clamp(const rgbaint_t& scale, const rgbaint_t& other) + { + mul(scale); + sra_imm(8); + add(other); + clamp_to_uint8(); + } + + void scale2_add_and_clamp(const rgbaint_t& scale, const rgbaint_t& other, const rgbaint_t& scale2) + { + rgbaint_t color2(other); + color2.mul(scale2); + + mul(scale); + add(color2); + sra_imm(8); + clamp_to_uint8(); + } inline void cmpeq(const rgbaint_t& value) { @@ -480,14 +525,30 @@ public: return result; } -protected: - typedef __vector signed char VECS8; - typedef __vector unsigned char VECU8; - typedef __vector signed short VECS16; - typedef __vector unsigned short VECU16; - typedef __vector signed int VECS32; - typedef __vector unsigned int VECU32; + inline void bilinear_filter_rgbaint(UINT32 rgb00, UINT32 rgb01, UINT32 rgb10, UINT32 rgb11, UINT8 u, UINT8 v) + { + const VECS32 zero = vec_splat_s32(0); + VECS32 color00 = vec_perm((VECS32)vec_lde(0, &rgb00), zero, vec_lvsl(0, &rgb00)); + VECS32 color01 = vec_perm((VECS32)vec_lde(0, &rgb01), zero, vec_lvsl(0, &rgb01)); + VECS32 color10 = vec_perm((VECS32)vec_lde(0, &rgb10), zero, vec_lvsl(0, &rgb10)); + VECS32 color11 = vec_perm((VECS32)vec_lde(0, &rgb11), zero, vec_lvsl(0, &rgb11)); + + /* interleave color01 and color00 at the byte level */ + color01 = vec_mergeh((VECU8)color01, (VECU8)color00); + color11 = vec_mergeh((VECU8)color11, (VECU8)color10); + color01 = vec_mergeh((VECU8)zero, (VECU8)color01); + color11 = vec_mergeh((VECU8)zero, (VECU8)color11); + color01 = vec_msum((VECS16)color01, scale_table[u], zero); + color11 = vec_msum((VECS16)color11, scale_table[u], zero); + color01 = vec_sl(color01, vec_splat_u32(15)); + color11 = vec_sr(color11, vec_splat_u32(1)); + color01 = vec_max((VECS16)color01, (VECS16)color11); + color01 = vec_msum((VECS16)color01, scale_table[v], zero); + m_value = vec_sr(color01, vec_splat_u32(15)); + } + +protected: VECS32 m_value; static const VECU8 alpha_perm; diff --git a/src/emu/video/vector.c b/src/emu/video/vector.c index f0146234afe..720e24bd049 100644 --- a/src/emu/video/vector.c +++ b/src/emu/video/vector.c @@ -227,12 +227,12 @@ void vector_device::add_point(int x, int y, rgb_t color, int intensity) if (m_flicker && (intensity > 0)) { float random = (float)(machine().rand() & 255) / 255.0f; // random value between 0.0 and 1.0 - + intensity -= (int)(intensity * random * m_flicker); if (intensity < 0) { intensity = 0; - } + } if (intensity > 255) { intensity = 255; @@ -344,7 +344,7 @@ UINT32 vector_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, coords.y1 = ((float)curpoint->y - yoffs) * yscale; // extend zero-length vector line (vector point) by quarter beam_width on both sides - if (fabs(coords.x0 - coords.x1) < FLT_EPSILON && + if (fabs(coords.x0 - coords.x1) < FLT_EPSILON && fabs(coords.y0 - coords.y1) < FLT_EPSILON) { coords.x0 += xratio * beam_width * 0.25f; diff --git a/src/lib/formats/ap_dsk35.c b/src/lib/formats/ap_dsk35.c index a9633ba7624..9efd835120d 100644 --- a/src/lib/formats/ap_dsk35.c +++ b/src/lib/formats/ap_dsk35.c @@ -1287,7 +1287,7 @@ bool dc42_format::load(io_generic *io, UINT32 form_factor, floppy_image *image) UINT8 format = h[0x51]; if((encoding != 0x00 || format != 0x02) && (encoding != 0x01 || format != 0x22)) { - logerror("dc42: Unsupported encoding/format combination %02x/%02x\n", encoding, format); + osd_printf_error("dc42: Unsupported encoding/format combination %02x/%02x\n", encoding, format); return false; } diff --git a/src/lib/formats/apollo_dsk.c b/src/lib/formats/apollo_dsk.c index 2770122a5c9..29dbe23b0b5 100644 --- a/src/lib/formats/apollo_dsk.c +++ b/src/lib/formats/apollo_dsk.c @@ -45,3 +45,11 @@ const apollo_format::format apollo_format::formats[] = { }; const floppy_format_type FLOPPY_APOLLO_FORMAT = &floppy_image_format_creator<apollo_format>; + +int apollo_format::identify(io_generic *io, UINT32 form_factor) +{ + UINT64 size = io_generic_size(io); + UINT32 expected_size = 77*2*8*1024; + + return ((size == expected_size) || (size == 0)) ? 1 : 0; +} diff --git a/src/lib/formats/apollo_dsk.h b/src/lib/formats/apollo_dsk.h index 180787f2453..05013d79055 100644 --- a/src/lib/formats/apollo_dsk.h +++ b/src/lib/formats/apollo_dsk.h @@ -17,6 +17,7 @@ class apollo_format : public upd765_format { public: apollo_format(); + virtual int identify(io_generic *io, UINT32 form_factor); virtual const char *name() const; virtual const char *description() const; virtual const char *extensions() const; diff --git a/src/lib/formats/bbc_dsk.c b/src/lib/formats/bbc_dsk.c index 53c3652ab51..193ab435e69 100644 --- a/src/lib/formats/bbc_dsk.c +++ b/src/lib/formats/bbc_dsk.c @@ -9,76 +9,81 @@ ***************************************************************************/ #include "bbc_dsk.h" -#include "basicdsk.h" -LEGACY_FLOPPY_OPTIONS_START(bbc) - LEGACY_FLOPPY_OPTION( ssd40, "bbc,img,ssd", "BBC 40t SSD disk image", basicdsk_identify_default, basicdsk_construct_default, NULL, - HEADS([1]) - TRACKS([40]) - SECTORS([10]) - SECTOR_LENGTH([256]) - FIRST_SECTOR_ID([0])) - LEGACY_FLOPPY_OPTION( ssd80, "bbc,img,ssd", "BBC 80t SSD disk image", basicdsk_identify_default, basicdsk_construct_default, NULL, - HEADS([1]) - TRACKS([80]) - SECTORS([10]) - SECTOR_LENGTH([256]) - FIRST_SECTOR_ID([0])) - LEGACY_FLOPPY_OPTION( dsd40, "dsd", "BBC 40t DSD disk image", basicdsk_identify_default, basicdsk_construct_default, NULL, - HEADS([2]) - TRACKS([40]) - SECTORS([10]) - SECTOR_LENGTH([256]) - INTERLEAVE([0]) - FIRST_SECTOR_ID([0])) - LEGACY_FLOPPY_OPTION( dsd80, "dsd", "BBC 80t DSD disk image", basicdsk_identify_default, basicdsk_construct_default, NULL, - HEADS([2]) - TRACKS([80]) - SECTORS([10]) - SECTOR_LENGTH([256]) - INTERLEAVE([0]) - FIRST_SECTOR_ID([0])) -LEGACY_FLOPPY_OPTIONS_END - -/********************************************************************/ - -bbc_ssd_525_format::bbc_ssd_525_format() : wd177x_format(formats) +bbc_dfs_format::bbc_dfs_format() : wd177x_format(formats) { } -const char *bbc_ssd_525_format::name() const +const char *bbc_dfs_format::name() const { - return "ssd"; + return "dfs"; } -const char *bbc_ssd_525_format::description() const +const char *bbc_dfs_format::description() const { - return "BBC Micro 5.25\" disk image"; + return "Acorn DFS disk image"; } -const char *bbc_ssd_525_format::extensions() const +const char *bbc_dfs_format::extensions() const { - return "bbc,img,ssd"; + return "bbc,img,ssd,dsd"; } -int bbc_ssd_525_format::find_size(io_generic *io, UINT32 form_factor) +int bbc_dfs_format::find_size(io_generic *io, UINT32 form_factor) { - char cat[8]; - io_generic_read(io, cat, 256, 8); - UINT64 sectors = ((cat[6] & 3) << 8) + cat[7]; // sector count from catalogue + UINT8 cat[8]; + UINT32 sectors0, sectors2; + + // read sector count from side 0 catalogue + io_generic_read(io, cat, 0x100, 8); + sectors0 = ((cat[6] & 3) << 8) + cat[7]; + UINT64 size = io_generic_size(io); for(int i=0; formats[i].form_factor; i++) { const format &f = formats[i]; if(form_factor != floppy_image::FF_UNKNOWN && form_factor != f.form_factor) continue; - if((size <= (UINT64)compute_track_size(f) * f.track_count * f.head_count) && (sectors == f.track_count * f.sector_count)) - return i; + if ((size <= (UINT64)compute_track_size(f) * f.track_count * f.head_count) && (sectors0 == f.track_count * f.sector_count)) { + if (f.head_count == 2) + { + // read sector count from side 2 catalogue + if (f.sector_base_id == -1) + io_generic_read(io, cat, 0xb00, 8); // interleaved + else + io_generic_read(io, cat, compute_track_size(f) * f.track_count + 0x100, 8); // sequential + sectors2 = ((cat[6] & 3) << 8) + cat[7]; + } + else + { + sectors2 = sectors0; + } + + if (sectors0 == sectors2) + return i; + } } return -1; } -const bbc_ssd_525_format::format bbc_ssd_525_format::formats[] = +int bbc_dfs_format::identify(io_generic *io, UINT32 form_factor) +{ + int type = find_size(io, form_factor); + + if(type != -1) + return 90; + return 0; +} + +int bbc_dfs_format::get_image_offset(const format &f, int head, int track) +{ + if (f.sector_base_id == -1) + return (track * f.head_count + head) * compute_track_size(f); + else + return (f.track_count * head + track) * compute_track_size(f); +} + +const bbc_dfs_format::format bbc_dfs_format::formats[] = { { // 100k 40 track single sided single density floppy_image::FF_525, floppy_image::SSSD, floppy_image::FM, @@ -92,138 +97,262 @@ const bbc_ssd_525_format::format bbc_ssd_525_format::formats[] = floppy_image::FF_525, floppy_image::DSSD, floppy_image::FM, 4000, 10, 40, 2, 256, {}, 0, {}, 40, 10, 10 }, + { // 200k 40 track double sided single density (interleaved) + floppy_image::FF_525, floppy_image::DSSD, floppy_image::FM, + 4000, 10, 40, 2, 256, {}, -1, { 0,1,2,3,4,5,6,7,8,9 }, 40, 10, 10 + }, { // 400k 80 track double sided single density floppy_image::FF_525, floppy_image::DSQD, floppy_image::FM, 4000, 10, 80, 2, 256, {}, 0, {}, 40, 10, 10 }, + { // 400k 80 track double sided single density (interleaved) + floppy_image::FF_525, floppy_image::DSQD, floppy_image::FM, + 4000, 10, 80, 2, 256, {}, -1, { 0,1,2,3,4,5,6,7,8,9 }, 40, 10, 10 + }, {} }; -bbc_dsd_525_format::bbc_dsd_525_format() : wd177x_format(formats) +bbc_adfs_format::bbc_adfs_format() : wd177x_format(formats) { } -const char *bbc_dsd_525_format::name() const +const char *bbc_adfs_format::name() const { - return "dsd"; + return "adfs"; } -const char *bbc_dsd_525_format::description() const +const char *bbc_adfs_format::description() const { - return "BBC Micro 5.25\" disk image"; + return "Acorn ADFS disk image"; } -const char *bbc_dsd_525_format::extensions() const +const char *bbc_adfs_format::extensions() const { - return "dsd"; + return "adf,ads,adm,adl"; } -int bbc_dsd_525_format::find_size(io_generic *io, UINT32 form_factor) +int bbc_adfs_format::find_size(io_generic *io, UINT32 form_factor) { - char cat[8]; - io_generic_read(io, cat, 256, 8); - UINT64 sectors = ((cat[6] & 3) << 8) + cat[7]; // sector count from catalogue + UINT8 map[3]; + UINT32 sectors; + + // read sector count from free space map + io_generic_read(io, map, 0xfc, 3); + sectors = map[0] + (map[1] << 8) + (map[2] << 16); + UINT64 size = io_generic_size(io); for(int i=0; formats[i].form_factor; i++) { const format &f = formats[i]; if(form_factor != floppy_image::FF_UNKNOWN && form_factor != f.form_factor) continue; - if((size <= (UINT64)compute_track_size(f) * f.track_count * f.head_count) && (sectors == f.track_count * f.sector_count)) + // valid images will have sector counts adfs-s = 0x280; adfs-m = 0x500; adfs-l = 0xa00; though many adfs-s images are incorrect + if ((size == (UINT64)compute_track_size(f) * f.track_count * f.head_count) && (sectors == 0x280 || sectors == 0x500 || sectors == 0xa00)) { return i; + } } return -1; } -const bbc_dsd_525_format::format bbc_dsd_525_format::formats[] = +int bbc_adfs_format::identify(io_generic *io, UINT32 form_factor) { - { // 200k 40 track double sided single density - floppy_image::FF_525, floppy_image::DSQD, floppy_image::FM, - 4000, 10, 40, 2, 256, {}, -1, { 0,1,2,3,4,5,6,7,8,9 }, 40, 10, 10 + int type = find_size(io, form_factor); + + if(type != -1) + return 100; + return 0; +} + +int bbc_adfs_format::get_image_offset(const format &f, int head, int track) +{ + if (f.sector_base_id == -1) + return (track * f.head_count + head) * compute_track_size(f); + else + return (f.track_count * head + track) * compute_track_size(f); +} + +const bbc_adfs_format::format bbc_adfs_format::formats[] = +{ + { // 160K 5 1/4 inch 40 track single sided double density + floppy_image::FF_525, floppy_image::SSDD, floppy_image::MFM, + 2000, 16, 40, 1, 256, {}, 0, {}, 60, 22, 43 }, - { // 400k 80 track double sided single density - floppy_image::FF_525, floppy_image::DSQD, floppy_image::FM, - 4000, 10, 80, 2, 256, {}, -1, { 0,1,2,3,4,5,6,7,8,9 }, 40, 10, 10 + { // 320K 5 1/4 inch 80 track single sided double density + floppy_image::FF_525, floppy_image::SSDD, floppy_image::MFM, + 2000, 16, 80, 1, 256, {}, 0, {}, 60, 22, 43 + }, + { // 640K 5 1/4 inch 80 track double sided double density (interleaved) + floppy_image::FF_525, floppy_image::DSDD, floppy_image::MFM, + 2000, 16, 80, 2, 256, {}, -1, { 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 }, 60, 22, 43 + }, + { // 160K 3 1/2 inch 40 track single sided double density + floppy_image::FF_35, floppy_image::SSDD, floppy_image::MFM, + 2000, 16, 40, 1, 256, {}, 0, {}, 60, 22, 43 + }, + { // 320K 3 1/2 inch 80 track single sided double density + floppy_image::FF_35, floppy_image::SSQD, floppy_image::MFM, + 2000, 16, 80, 1, 256, {}, 0, {}, 60, 22, 43 + }, + { // 640K 3 1/2 inch 80 track double sided double density (interleaved) + floppy_image::FF_35, floppy_image::DSQD, floppy_image::MFM, + 2000, 16, 80, 2, 256, {}, -1, { 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 }, 60, 22, 43 }, {} }; -bbc_adf_525_format::bbc_adf_525_format() : wd177x_format(formats) +bbc_dos_format::bbc_dos_format() : wd177x_format(formats) { } -const char *bbc_adf_525_format::name() const +const char *bbc_dos_format::name() const { - return "adf"; + return "dos"; } -const char *bbc_adf_525_format::description() const +const char *bbc_dos_format::description() const { - return "BBC Micro 5.25\" ADFS disk image"; + return "Acorn DOS disk image"; } -const char *bbc_adf_525_format::extensions() const +const char *bbc_dos_format::extensions() const { - return "adf,ads,adm,adl,img"; + return "img,adl"; } -const bbc_adf_525_format::format bbc_adf_525_format::formats[] = +int bbc_dos_format::find_size(io_generic *io, UINT32 form_factor) { - { // 160K 40 track single sided double density - floppy_image::FF_525, floppy_image::SSDD, floppy_image::MFM, - 2000, 16, 40, 1, 256, {}, 0, {}, 60, 22, 43 - }, - { // 320K 80 track single sided double density - floppy_image::FF_525, floppy_image::SSDD, floppy_image::MFM, - 2000, 16, 80, 1, 256, {}, 0, {}, 60, 22, 43 + UINT8 cat[3]; + UINT32 sectors; + + UINT64 size = io_generic_size(io); + for(int i=0; formats[i].form_factor; i++) { + const format &f = formats[i]; + if(form_factor != floppy_image::FF_UNKNOWN && form_factor != f.form_factor) + continue; + + if (size == (UINT64)compute_track_size(f) * f.track_count * f.head_count) { + switch (size) + { + case 640 * 1024: // 640K Acorn (Bootable) DOS Format + // read sector count from free space map - Acorn DOS = 0xaa0 + io_generic_read(io, cat, 0xfc, 3); + sectors = cat[0] + (cat[1] << 8) + (cat[2] << 16); + if (sectors == 0xaa0) { + // read media type ID from FAT - Acorn DOS = 0xff + if (f.sector_base_id == -1) + io_generic_read(io, cat, 0x2000, 1); // interleaved + else + io_generic_read(io, cat, 0x1000, 1); // sequential + if (cat[0] == 0xff) return i; + } + break; + case 800 * 1024: // 800K Acorn DOS Format + // read media type ID from FAT - Acorn DOS = 0xfd + io_generic_read(io, cat, 0, 1); + if (cat[0] == 0xfd) return i; + break; + } + } + } + return -1; +} + +int bbc_dos_format::identify(io_generic *io, UINT32 form_factor) +{ + int type = find_size(io, form_factor); + + if(type != -1) + return 100; + return 0; +} + +int bbc_dos_format::get_image_offset(const format &f, int head, int track) +{ + if (f.sector_base_id == -1) + return (track * f.head_count + head) * compute_track_size(f); + else + return (f.track_count * head + track) * compute_track_size(f); +} + +const bbc_dos_format::format bbc_dos_format::formats[] = +{ + { // 640K 5 1/4 inch 80 track double sided double density - gaps unverified + floppy_image::FF_525, floppy_image::DSDD, floppy_image::MFM, + 2000, 16, 80, 2, 256, {}, 0, {}, 60, 22, 43 }, - { // 640K 80 track double sided double density + { // 640K 5 1/4 inch 80 track double sided double density (interleaved) - gaps unverified floppy_image::FF_525, floppy_image::DSDD, floppy_image::MFM, 2000, 16, 80, 2, 256, {}, -1, { 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 }, 60, 22, 43 }, + { // 800K 5 1/4 inch 80 track double sided double density - gaps unverified + floppy_image::FF_525, floppy_image::DSDD, floppy_image::MFM, + 2000, 5, 80, 2, 1024, {}, 0, {}, 60, 22, 43 + }, {} }; -bbc_adf_35_format::bbc_adf_35_format() : wd177x_format(formats) +bbc_cpm_format::bbc_cpm_format() : wd177x_format(formats) { } -const char *bbc_adf_35_format::name() const +const char *bbc_cpm_format::name() const { - return "adf"; + return "cpm"; } -const char *bbc_adf_35_format::description() const +const char *bbc_cpm_format::description() const { - return "BBC Micro 3.5\" ADFS disk image"; + return "Acorn CP/M disk image"; } -const char *bbc_adf_35_format::extensions() const +const char *bbc_cpm_format::extensions() const { - return "adf,ads,adm,adl,img"; + return "img,ssd,dsd"; } -const bbc_adf_35_format::format bbc_adf_35_format::formats[] = { - { // 160K 3 1/2 inch 40 track single sided double density - floppy_image::FF_35, floppy_image::SSDD, floppy_image::MFM, - 2000, 16, 40, 1, 256, {}, 0, {}, 60, 22, 43 +int bbc_cpm_format::identify(io_generic *io, UINT32 form_factor) +{ + UINT8 h[8]; + + io_generic_read(io, h, 0, 8); + + int type = find_size(io, form_factor); + + if(type != -1 && (memcmp(h, "Acorn CP", 8) == 0 || memcmp(h, "Slogger ", 8) == 0)) { + return 100; + } + return 0; +} + +int bbc_cpm_format::get_image_offset(const format &f, int head, int track) +{ + if (f.sector_base_id == -1) + return (track * f.head_count + head) * compute_track_size(f); + else + return (f.track_count * head + track) * compute_track_size(f); +} + +const bbc_cpm_format::format bbc_cpm_format::formats[] = +{ + { // 400K 5 1/4 inch 80 track double sided single density - gaps unverified + floppy_image::FF_525, floppy_image::DSQD, floppy_image::FM, + 4000, 5, 80, 2, 512, {}, 0, {}, 40, 10, 10 }, - { // 320K 3 1/2 inch 80 track single sided double density - floppy_image::FF_35, floppy_image::SSQD, floppy_image::MFM, - 2000, 16, 80, 1, 256, {}, 0, {}, 60, 22, 43 + { // 400k 5 1/4 inch 80 track double sided single density (interleaved) - gaps unverified + floppy_image::FF_525, floppy_image::DSQD, floppy_image::FM, + 4000, 5, 80, 2, 512, {}, -1, { 0,1,2,3,4 }, 40, 10, 10 }, - { // 640K 3 1/2 inch 80 track double sided double density - floppy_image::FF_35, floppy_image::DSQD, floppy_image::MFM, - 2000, 16, 80, 2, 256, {}, -1, { 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 }, 60, 22, 43 + { // 800K 5 1/4 inch 80 track double sided double density - gaps unverified + floppy_image::FF_525, floppy_image::DSDD, floppy_image::MFM, + 2000, 10, 80, 2, 512, {}, 0, {}, 60, 22, 43 }, {} }; - -const floppy_format_type FLOPPY_BBC_SSD_525_FORMAT = &floppy_image_format_creator<bbc_ssd_525_format>; -const floppy_format_type FLOPPY_BBC_DSD_525_FORMAT = &floppy_image_format_creator<bbc_dsd_525_format>; -const floppy_format_type FLOPPY_BBC_ADF_525_FORMAT = &floppy_image_format_creator<bbc_adf_525_format>; -const floppy_format_type FLOPPY_BBC_ADF_35_FORMAT = &floppy_image_format_creator<bbc_adf_35_format>; +const floppy_format_type FLOPPY_BBC_DFS_FORMAT = &floppy_image_format_creator<bbc_dfs_format>; +const floppy_format_type FLOPPY_BBC_ADFS_FORMAT = &floppy_image_format_creator<bbc_adfs_format>; +const floppy_format_type FLOPPY_BBC_DOS_FORMAT = &floppy_image_format_creator<bbc_dos_format>; +const floppy_format_type FLOPPY_BBC_CPM_FORMAT = &floppy_image_format_creator<bbc_cpm_format>; diff --git a/src/lib/formats/bbc_dsk.h b/src/lib/formats/bbc_dsk.h index d757c8a90ac..28bba03e61b 100644 --- a/src/lib/formats/bbc_dsk.h +++ b/src/lib/formats/bbc_dsk.h @@ -13,21 +13,16 @@ #ifndef __BBC_DSK_H__ #define __BBC_DSK_H__ -#include "flopimg.h" #include "wd177x_dsk.h" -/**************************************************************************/ - -LEGACY_FLOPPY_OPTIONS_EXTERN(bbc); - -/**************************************************************************/ - -class bbc_ssd_525_format : public wd177x_format +class bbc_dfs_format : public wd177x_format { public: - bbc_ssd_525_format(); + bbc_dfs_format(); virtual int find_size(io_generic *io, UINT32 form_factor); + virtual int identify(io_generic *io, UINT32 form_factor); + virtual int get_image_offset(const format &f, int head, int track); virtual const char *name() const; virtual const char *description() const; virtual const char *extensions() const; @@ -36,12 +31,14 @@ private: static const format formats[]; }; -class bbc_dsd_525_format : public wd177x_format +class bbc_adfs_format : public wd177x_format { public: - bbc_dsd_525_format(); + bbc_adfs_format(); virtual int find_size(io_generic *io, UINT32 form_factor); + virtual int identify(io_generic *io, UINT32 form_factor); + virtual int get_image_offset(const format &f, int head, int track); virtual const char *name() const; virtual const char *description() const; virtual const char *extensions() const; @@ -50,11 +47,14 @@ private: static const format formats[]; }; -class bbc_adf_525_format : public wd177x_format +class bbc_dos_format : public wd177x_format { public: - bbc_adf_525_format(); + bbc_dos_format(); + virtual int find_size(io_generic *io, UINT32 form_factor); + virtual int identify(io_generic *io, UINT32 form_factor); + virtual int get_image_offset(const format &f, int head, int track); virtual const char *name() const; virtual const char *description() const; virtual const char *extensions() const; @@ -63,11 +63,13 @@ private: static const format formats[]; }; -class bbc_adf_35_format : public wd177x_format +class bbc_cpm_format : public wd177x_format { public: - bbc_adf_35_format(); + bbc_cpm_format(); + virtual int identify(io_generic *io, UINT32 form_factor); + virtual int get_image_offset(const format &f, int head, int track); virtual const char *name() const; virtual const char *description() const; virtual const char *extensions() const; @@ -77,9 +79,9 @@ private: }; -extern const floppy_format_type FLOPPY_BBC_SSD_525_FORMAT; -extern const floppy_format_type FLOPPY_BBC_DSD_525_FORMAT; -extern const floppy_format_type FLOPPY_BBC_ADF_525_FORMAT; -extern const floppy_format_type FLOPPY_BBC_ADF_35_FORMAT; +extern const floppy_format_type FLOPPY_BBC_DFS_FORMAT; +extern const floppy_format_type FLOPPY_BBC_ADFS_FORMAT; +extern const floppy_format_type FLOPPY_BBC_DOS_FORMAT; +extern const floppy_format_type FLOPPY_BBC_CPM_FORMAT; #endif // __BBC_DSK_H__ diff --git a/src/lib/formats/camplynx_cas.c b/src/lib/formats/camplynx_cas.c index 02133da4da4..a525f18d3cb 100644 --- a/src/lib/formats/camplynx_cas.c +++ b/src/lib/formats/camplynx_cas.c @@ -116,7 +116,7 @@ static int camplynx_handle_cassette(INT16 *buffer, const UINT8 *bytes) pgmname[0] = (char)0x4D; // Tell user how to load the tape - popmessage("%s",pgmname.c_str()); + osd_printf_info("%s",pgmname.c_str()); /* data zeroes */ for (i=0; i<555; i++) diff --git a/src/lib/formats/camplynx_dsk.c b/src/lib/formats/camplynx_dsk.c new file mode 100644 index 00000000000..c58b12b9423 --- /dev/null +++ b/src/lib/formats/camplynx_dsk.c @@ -0,0 +1,57 @@ +// license:BSD-3-Clause +// copyright-holders:Robbbert +/********************************************************************* + + formats/camplynx_dsk.c + + Camputers Lynx disk image format + + There is no inter-sector info on these disks. It is simply a + dump of the 512 bytes from each sector and track in order. + + Extension is LDF as used by the Pale emulator + + The disk is formatted with 512 bytes per sector, 10 sectors, + 6040 bytes per track. 200KB disks are single sided 40 tracks. + 800KB disks are double sided 80 tracks. + + The numbers below are guesswork since there's no documentation. + +*********************************************************************/ + +#include <assert.h> + +#include "formats/camplynx_dsk.h" + +camplynx_format::camplynx_format() : wd177x_format(formats) +{ +} + +const char *camplynx_format::name() const +{ + return "camplynx"; +} + +const char *camplynx_format::description() const +{ + return "Camputers Lynx disk image"; +} + +const char *camplynx_format::extensions() const +{ + return "ldf"; +} + +const camplynx_format::format camplynx_format::formats[] = { + { /* 200K 13cm double density single sided */ + floppy_image::FF_525, floppy_image::SSDD, floppy_image::MFM, + 2000, 10, 40, 1, 512, {}, 1, {}, 100, 22, 30 // guesswork to stop it crashing + }, + { /* 800K 13cm quad density double sided */ + floppy_image::FF_525, floppy_image::DSQD, floppy_image::MFM, + 2000, 10, 80, 2, 512, {}, 1, {}, 100, 22, 30 // guesswork to stop it crashing + }, + {} +}; + +const floppy_format_type FLOPPY_CAMPLYNX_FORMAT = &floppy_image_format_creator<camplynx_format>; diff --git a/src/lib/formats/camplynx_dsk.h b/src/lib/formats/camplynx_dsk.h new file mode 100644 index 00000000000..96efac0b60b --- /dev/null +++ b/src/lib/formats/camplynx_dsk.h @@ -0,0 +1,30 @@ +// license:BSD-3-Clause +// copyright-holders:Robbbert +/********************************************************************* + + formats/camplynx_dsk.h + + Camputers Lynx disk image format + +*********************************************************************/ + +#ifndef CAMPLYNX_DSK_H_ +#define CAMPLYNX_DSK_H_ + +#include "wd177x_dsk.h" + +class camplynx_format : public wd177x_format { +public: + camplynx_format(); + + virtual const char *name() const; + virtual const char *description() const; + virtual const char *extensions() const; + +private: + static const format formats[]; +}; + +extern const floppy_format_type FLOPPY_CAMPLYNX_FORMAT; + +#endif diff --git a/src/lib/formats/cbm_crt.c b/src/lib/formats/cbm_crt.c index dce20d6e603..d169d0c2fd7 100644 --- a/src/lib/formats/cbm_crt.c +++ b/src/lib/formats/cbm_crt.c @@ -159,11 +159,11 @@ bool cbm_crt_read_header(core_file* file, size_t *roml_size, size_t *romh_size, if (LOG) { - logerror("Name: %s\n", header.name); - logerror("Hardware: %04x\n", hardware); - logerror("Slot device: %s\n", CRT_C64_SLOT_NAMES[hardware]); - logerror("EXROM: %u\n", header.exrom); - logerror("GAME: %u\n", header.game); + osd_printf_verbose("Name: %s\n", header.name); + osd_printf_verbose("Hardware: %04x\n", hardware); + osd_printf_verbose("Slot device: %s\n", CRT_C64_SLOT_NAMES[hardware]); + osd_printf_verbose("EXROM: %u\n", header.exrom); + osd_printf_verbose("GAME: %u\n", header.game); } // determine ROM region lengths @@ -178,9 +178,9 @@ bool cbm_crt_read_header(core_file* file, size_t *roml_size, size_t *romh_size, if (LOG) { - logerror("CHIP Address: %04x\n", address); - logerror("CHIP Size: %04x\n", size); - logerror("CHIP Type: %04x\n", type); + osd_printf_verbose("CHIP Address: %04x\n", address); + osd_printf_verbose("CHIP Size: %04x\n", size); + osd_printf_verbose("CHIP Type: %04x\n", type); } switch (address) @@ -188,7 +188,7 @@ bool cbm_crt_read_header(core_file* file, size_t *roml_size, size_t *romh_size, case 0x8000: *roml_size += size; break; case 0xa000: *romh_size += size; break; case 0xe000: *romh_size += size; break; - default: logerror("Invalid CHIP loading address!\n"); break; + default: osd_printf_verbose("Invalid CHIP loading address!\n"); break; } core_fseek(file, size, SEEK_CUR); diff --git a/src/lib/formats/flex_dsk.c b/src/lib/formats/flex_dsk.c index e8e24e1dd53..ced4bf2f8a5 100644 --- a/src/lib/formats/flex_dsk.c +++ b/src/lib/formats/flex_dsk.c @@ -39,7 +39,7 @@ int flex_format::identify(io_generic *io, UINT32 form_factor) if(((info.last_trk+1) * info.last_sec) * 256 == io_generic_size(io)) { - logerror("flex_dsk: %i tracks, %i sectors\n",info.last_trk+1,info.last_sec); + osd_printf_verbose("flex_dsk: %i tracks, %i sectors\n",info.last_trk+1,info.last_sec); return 100; } return 0; diff --git a/src/lib/formats/mfm_hd.c b/src/lib/formats/mfm_hd.c index ed50e60deb2..617ebf2b992 100644 --- a/src/lib/formats/mfm_hd.c +++ b/src/lib/formats/mfm_hd.c @@ -247,13 +247,13 @@ void mfmhd_image_format_t::showtrack(UINT16* enctrack, int length) { for (int i=0; i < length; i+=16) { - logerror("%07x: ", i); + osd_printf_verbose("%07x: ", i); for (int j=0; j < 16; j++) { - logerror("%04x ", enctrack[i+j]); + osd_printf_verbose("%04x ", enctrack[i+j]); } - logerror(" "); - logerror("\n"); + osd_printf_verbose(" "); + osd_printf_verbose("\n"); } } @@ -320,7 +320,7 @@ chd_error mfmhd_generic_format::load(chd_file* chdfile, UINT16* trackimage, int int sec_il_start = (m_param.cylskew * cylinder + m_param.headskew * head) % sectorcount; int delta = (sectorcount + m_param.interleave-1) / m_param.interleave; - if (TRACE_RWTRACK) logerror("%s: Load track (c=%d,h=%d) from CHD, interleave=%d, cylskew=%d, headskew=%d\n", tag(), cylinder, head, m_param.interleave, m_param.cylskew, m_param.headskew); + if (TRACE_RWTRACK) osd_printf_verbose("%s: Load track (c=%d,h=%d) from CHD, interleave=%d, cylskew=%d, headskew=%d\n", tag(), cylinder, head, m_param.interleave, m_param.cylskew, m_param.headskew); m_lastbit = false; @@ -337,12 +337,12 @@ chd_error mfmhd_generic_format::load(chd_file* chdfile, UINT16* trackimage, int // Gap 1 mfm_encode(trackimage, position, 0x4e, m_param.gap1); - if (TRACE_LAYOUT) logerror("%s: cyl=%d head=%d: sector sequence = ", tag(), cylinder, head); + if (TRACE_LAYOUT) osd_printf_verbose("%s: cyl=%d head=%d: sector sequence = ", tag(), cylinder, head); sec_number = sec_il_start; for (int sector = 0; sector < sectorcount; sector++) { - if (TRACE_LAYOUT) logerror("%02d ", sec_number); + if (TRACE_LAYOUT) osd_printf_verbose("%02d ", sec_number); // Sync gap mfm_encode(trackimage, position, 0x00, m_param.sync); @@ -388,7 +388,7 @@ chd_error mfmhd_generic_format::load(chd_file* chdfile, UINT16* trackimage, int } else { - logerror("%s: Invalid CHS data (%d,%d,%d); not loading from CHD\n", tag(), cylinder, head, sector); + osd_printf_verbose("%s: Invalid CHS data (%d,%d,%d); not loading from CHD\n", tag(), cylinder, head, sector); } for (int i=0; i < size; i++) @@ -411,7 +411,7 @@ chd_error mfmhd_generic_format::load(chd_file* chdfile, UINT16* trackimage, int sec_number = sec_il_start; } } - if (TRACE_LAYOUT) logerror("\n"); + if (TRACE_LAYOUT) osd_printf_verbose("\n"); // Gap 4 if (state == CHDERR_NONE) @@ -436,7 +436,7 @@ enum chd_error mfmhd_generic_format::save(chd_file* chdfile, UINT16* trackimage, int tracksize, int current_cylinder, int current_head) { - if (TRACE_RWTRACK) logerror("%s: write back (c=%d,h=%d) to CHD\n", tag(), current_cylinder, current_head); + if (TRACE_RWTRACK) osd_printf_verbose("%s: write back (c=%d,h=%d) to CHD\n", tag(), current_cylinder, current_head); UINT8 buffer[16384]; // for header or sector content @@ -497,10 +497,10 @@ chd_error mfmhd_generic_format::save(chd_file* chdfile, UINT16* trackimage, int { for (int i=0; i < tracksize; i++) { - if ((i % 16)==0) logerror("\n%04x: ", i); - logerror("%02x ", (m_param.encoding==MFM_BITS || m_param.encoding==MFM_BYTE)? mfm_decode(trackimage[i]) : (trackimage[i]&0xff)); + if ((i % 16)==0) osd_printf_verbose("\n%04x: ", i); + osd_printf_verbose("%02x ", (m_param.encoding==MFM_BITS || m_param.encoding==MFM_BYTE)? mfm_decode(trackimage[i]) : (trackimage[i]&0xff)); } - logerror("\n"); + osd_printf_verbose("\n"); } // We have to go through the bytes of the track and save a sector as soon as one shows up @@ -550,7 +550,7 @@ chd_error mfmhd_generic_format::save(chd_file* chdfile, UINT16* trackimage, int case FOUND_A1: crc = ccitt_crc16_one(crc, byte); - // logerror("%s: MFM HD: Byte = %02x, CRC=%04x\n", tag(), byte, crc); + // osd_printf_verbose("%s: MFM HD: Byte = %02x, CRC=%04x\n", tag(), byte, crc); // Put byte into buffer // but not the data mark and the CRC @@ -576,7 +576,7 @@ chd_error mfmhd_generic_format::save(chd_file* chdfile, UINT16* trackimage, int if (m_param.headerlen == 5) cylinder |= ((buffer[2]&0x70)<<4); else { - logerror("%s: Unexpected header size: %d, cylinder=%d, position=%04x\n", tag(), m_param.headerlen, cylinder, bytepos); + osd_printf_verbose("%s: Unexpected header size: %d, cylinder=%d, position=%04x\n", tag(), m_param.headerlen, cylinder, bytepos); showtrack(trackimage, tracksize); } @@ -586,17 +586,17 @@ chd_error mfmhd_generic_format::save(chd_file* chdfile, UINT16* trackimage, int if (identexp != ident) { - logerror("%s: Field error; ident = %02x (expected %02x) for sector chs=(%d,%d,%d)\n", tag(), ident, identexp, cylinder, head, sector); + osd_printf_verbose("%s: Field error; ident = %02x (expected %02x) for sector chs=(%d,%d,%d)\n", tag(), ident, identexp, cylinder, head, sector); } if (cylinder != current_cylinder) { - logerror("%s: Sector header of sector %d defines cylinder = %02x (should be %02x)\n", tag(), sector, cylinder, current_cylinder); + osd_printf_verbose("%s: Sector header of sector %d defines cylinder = %02x (should be %02x)\n", tag(), sector, cylinder, current_cylinder); } if (head != current_head) { - logerror("%s: Sector header of sector %d defines head = %02x (should be %02x)\n", tag(), sector, head, current_head); + osd_printf_verbose("%s: Sector header of sector %d defines head = %02x (should be %02x)\n", tag(), sector, head, current_head); } // Check skew @@ -629,7 +629,7 @@ chd_error mfmhd_generic_format::save(chd_file* chdfile, UINT16* trackimage, int } search_header = false; - if (TRACE_DETAIL) logerror("%s: Found sector chs=(%d,%d,%d)\n", tag(), cylinder, head, sector); + if (TRACE_DETAIL) osd_printf_verbose("%s: Found sector chs=(%d,%d,%d)\n", tag(), cylinder, head, sector); headerpos = pos; // Start the GAP2 counter (if not already determined) if (m_param.gap2==0) countgap2 = true; @@ -641,17 +641,17 @@ chd_error mfmhd_generic_format::save(chd_file* chdfile, UINT16* trackimage, int int lbaposition = chs_to_lba(cylinder, head, sector); if (lbaposition>=0) { - if (TRACE_DETAIL) logerror("%s: Writing sector chs=(%d,%d,%d) to CHD\n", tag(), current_cylinder, current_head, sector); + if (TRACE_DETAIL) osd_printf_verbose("%s: Writing sector chs=(%d,%d,%d) to CHD\n", tag(), current_cylinder, current_head, sector); chdstate = chdfile->write_units(chs_to_lba(current_cylinder, current_head, sector), buffer); if (chdstate != CHDERR_NONE) { - logerror("%s: Write error while writing sector chs=(%d,%d,%d)\n", tag(), cylinder, head, sector); + osd_printf_verbose("%s: Write error while writing sector chs=(%d,%d,%d)\n", tag(), cylinder, head, sector); } } else { - logerror("%s: Invalid CHS data in track image: (%d,%d,%d); not saving to CHD\n", tag(), cylinder, head, sector); + osd_printf_verbose("%s: Invalid CHS data in track image: (%d,%d,%d); not saving to CHD\n", tag(), cylinder, head, sector); } if (m_param.gap3==0) countgap3 = true; search_header = true; @@ -662,7 +662,7 @@ chd_error mfmhd_generic_format::save(chd_file* chdfile, UINT16* trackimage, int // Let's test for a 5-byte header if (search_header && m_param.headerlen==4 && current_cylinder==0 && current_head==0) { - if (TRACE_DETAIL) logerror("%s: CRC error for 4-byte header; trying 5 bytes\n", tag()); + if (TRACE_DETAIL) osd_printf_verbose("%s: CRC error for 4-byte header; trying 5 bytes\n", tag()); m_param.headerlen=5; count = 1; bytepos++; @@ -670,7 +670,7 @@ chd_error mfmhd_generic_format::save(chd_file* chdfile, UINT16* trackimage, int } else { - logerror("%s: CRC error in %s of (%d,%d,%d)\n", tag(), search_header? "header" : "data", cylinder, head, sector); + osd_printf_verbose("%s: CRC error in %s of (%d,%d,%d)\n", tag(), search_header? "header" : "data", cylinder, head, sector); search_header = true; } } @@ -679,7 +679,7 @@ chd_error mfmhd_generic_format::save(chd_file* chdfile, UINT16* trackimage, int if (!search_header && (pos - headerpos) > 30) { - logerror("%s: Error; missing DAM; searching next header\n", tag()); + osd_printf_verbose("%s: Error; missing DAM; searching next header\n", tag()); search_header = true; } } @@ -693,7 +693,7 @@ chd_error mfmhd_generic_format::save(chd_file* chdfile, UINT16* trackimage, int // Successfully determined the interleave m_param.interleave = interleave; if (TRACE_FORMAT) - if (current_cylinder==0 && current_head==0) logerror("%s: Determined interleave = %d\n", tag(), m_param.interleave); + if (current_cylinder==0 && current_head==0) osd_printf_verbose("%s: Determined interleave = %d\n", tag(), m_param.interleave); } if (check_skew == false) @@ -703,12 +703,12 @@ chd_error mfmhd_generic_format::save(chd_file* chdfile, UINT16* trackimage, int if (m_secnumber[1] != -1) { if (save_param(MFMHD_HSKEW)) m_param.headskew = m_secnumber[1]-m_secnumber[0]; - if (TRACE_FORMAT) logerror("%s: Determined head skew = %d\n", tag(), m_param.headskew); + if (TRACE_FORMAT) osd_printf_verbose("%s: Determined head skew = %d\n", tag(), m_param.headskew); } if (m_secnumber[2] != -1) { if (save_param(MFMHD_CSKEW)) m_param.cylskew = m_secnumber[2]-m_secnumber[0]; - if (TRACE_FORMAT) logerror("%s: Determined cylinder skew = %d\n", tag(), m_param.cylskew); + if (TRACE_FORMAT) osd_printf_verbose("%s: Determined cylinder skew = %d\n", tag(), m_param.cylskew); } } } diff --git a/src/lib/formats/pasti_dsk.c b/src/lib/formats/pasti_dsk.c index 656a50c86b0..6fa53b2590d 100644 --- a/src/lib/formats/pasti_dsk.c +++ b/src/lib/formats/pasti_dsk.c @@ -302,7 +302,7 @@ void pasti_format::wd_generate_track_from_sectors_and_track(int track, int head, if(obs.sector_count) { wd_sect_info *last = sect_infos + obs.sector_count-1; if(last->dend != -1 && last->dend < last->hstart) { - logerror("pasti: Unsupported sector header/data over index, track %d head %d\n", track, head); + osd_printf_error("pasti: Unsupported sector header/data over index, track %d head %d\n", track, head); return; } @@ -313,7 +313,7 @@ void pasti_format::wd_generate_track_from_sectors_and_track(int track, int head, wd_sect_info *s = sect_infos + i; if(i+1 != obs.sector_count) { if(s->dstart != -1 && s[1].hstart < s->dend) { - logerror("pasti: Unsupported sector overlap, track %d head %d\n", track, head); + osd_printf_error("pasti: Unsupported sector overlap, track %d head %d\n", track, head); return; } } @@ -365,7 +365,7 @@ void pasti_format::wd_generate_track_from_sectors_only(int track, int head, flop for(int i=0; i != obs.sector_count; i++) { const wd_sect &s = obs.sectors[i]; if(i+1 != obs.sector_count && obs.sectors[i+1].position < s.position+10+44+4+(128 << (s.id[3] & 3))) { - logerror("pasti: Unsupported sector data sharing, track %d head %d\n", track, head); + osd_printf_error("pasti: Unsupported sector data sharing, track %d head %d\n", track, head); return; } if(tdata.size() >> 4 < s.position - 12) { diff --git a/src/lib/formats/ti99_dsk.c b/src/lib/formats/ti99_dsk.c index d83853e0a5d..8315bcafd91 100644 --- a/src/lib/formats/ti99_dsk.c +++ b/src/lib/formats/ti99_dsk.c @@ -40,7 +40,7 @@ #include <time.h> #include <assert.h> -#include "emu.h" // logerror +#include "emu.h" // osd_printf_verbose #include "imageutl.h" #include "ti99_dsk.h" @@ -113,17 +113,17 @@ bool ti99_floppy_format::load(io_generic *io, UINT32 form_factor, floppy_image * int track_size = get_track_size(cell_size, sector_count); int track_count = file_size / (track_size*heads); - if (TRACE) logerror("ti99_dsk: track count = %d\n", track_count); + if (TRACE) osd_printf_verbose("ti99_dsk: track count = %d\n", track_count); if (track_count > maxtrack) { - logerror("ti99_dsk: Floppy disk has too many tracks for this drive.\n"); + osd_printf_verbose("ti99_dsk: Floppy disk has too many tracks for this drive.\n"); return false; } bool doubletracks = (track_count * 2 <= maxtrack); - if (doubletracks) logerror("ti99_dsk: 40-track image in an 80-track drive. On save, image size will double.\n"); + if (doubletracks) osd_printf_verbose("ti99_dsk: 40-track image in an 80-track drive. On save, image size will double.\n"); // Read the image for(int head=0; head < heads; head++) @@ -224,7 +224,7 @@ bool ti99_floppy_format::save(io_generic *io, floppy_image *image) else maxsect = 9; } } - if (TRACE) logerror("ti99_dsk: Sectors/track: %d\n", maxsect); + if (TRACE) osd_printf_verbose("ti99_dsk: Sectors/track: %d\n", maxsect); // We try different cell sizes until we find a fitting size. // If this fails, we fall back to a size of 2000 ns @@ -233,7 +233,7 @@ bool ti99_floppy_format::save(io_generic *io, floppy_image *image) // to find so many marks with a wrong cell size. if (marks < 6 && attempt < 4) { - if (TRACE) logerror("ti99_dsk: Decoding with cell size %d failed.\n", cell_size); + if (TRACE) osd_printf_verbose("ti99_dsk: Decoding with cell size %d failed.\n", cell_size); attempt++; write = false; } @@ -245,12 +245,12 @@ bool ti99_floppy_format::save(io_generic *io, floppy_image *image) { if (min_heads()==1) { - if (TRACE) logerror("ti99_dsk: We don't have a second side and the format allows for single-sided recording.\n"); + if (TRACE) osd_printf_verbose("ti99_dsk: We don't have a second side and the format allows for single-sided recording.\n"); return true; } else { - logerror("ti99_dsk: No second side, but this format requires two-sided recording. Saving empty tracks.\n"); + osd_printf_verbose("ti99_dsk: No second side, but this format requires two-sided recording. Saving empty tracks.\n"); } } } @@ -262,8 +262,8 @@ bool ti99_floppy_format::save(io_generic *io, floppy_image *image) { if (head == 0 && track == 0) { - if (marks >=6) { if (TRACE) logerror("ti99_dsk: Decoding with cell size %d successful.\n", cell_size); } - else logerror("ti99_dsk: No address marks found on track 0. Assuming MFM format.\n"); + if (marks >=6) { if (TRACE) osd_printf_verbose("ti99_dsk: Decoding with cell size %d successful.\n", cell_size); } + else osd_printf_verbose("ti99_dsk: No address marks found on track 0. Assuming MFM format.\n"); } } // Save to the file @@ -299,7 +299,7 @@ void ti99_floppy_format::generate_track_fm(int track, int head, int cell_size, U if (check_for_address_marks(trackdata, floppy_image::FM)==false) { - if (head==0 && track==0) logerror("ti99_dsk: Cannot find FM address marks on track %d, head %d; likely broken or unformatted.\n", track, head); + if (head==0 && track==0) osd_printf_verbose("ti99_dsk: Cannot find FM address marks on track %d, head %d; likely broken or unformatted.\n", track, head); return; } @@ -336,14 +336,14 @@ void ti99_floppy_format::generate_track_fm(int track, int head, int cell_size, U { // PC99 format: no real CRC; replace it // Also, when converting from SDF we let this method create the proper CRC. - // logerror("Warning: PC99 format using pseudo CRC1; replace by %04x\n", crc1); + // osd_printf_verbose("Warning: PC99 format using pseudo CRC1; replace by %04x\n", crc1); trackdata[i] = (crc1 >> 8) & 0xff; trackdata[i+1] = crc1 & 0xff; found_crc = crc1; } if (crc1 != found_crc) { - logerror("ti99_dsk: Warning: CRC1 does not match (track=%d, head=%d). Found = %04x, calc = %04x\n", track, head, found_crc& 0xffff, crc1& 0xffff); + osd_printf_verbose("ti99_dsk: Warning: CRC1 does not match (track=%d, head=%d). Found = %04x, calc = %04x\n", track, head, found_crc& 0xffff, crc1& 0xffff); } } else @@ -356,14 +356,14 @@ void ti99_floppy_format::generate_track_fm(int track, int head, int cell_size, U if ((found_crc & 0xffff) == 0xf7f7) { // PC99 format: no real CRC; replace it - // logerror("Warning: PC99 format using pseudo CRC2; replace by %04x\n", crc2); + // osd_printf_verbose("Warning: PC99 format using pseudo CRC2; replace by %04x\n", crc2); trackdata[i] = (crc2 >> 8) & 0xff; trackdata[i+1] = crc2 & 0xff; found_crc = crc2; } if (crc2 != found_crc) { - logerror("ti99_dsk: Warning: CRC2 does not match (track=%d, head=%d). Found = %04x, calc = %04x\n", track, head, found_crc& 0xffff, crc2& 0xffff); + osd_printf_verbose("ti99_dsk: Warning: CRC2 does not match (track=%d, head=%d). Found = %04x, calc = %04x\n", track, head, found_crc& 0xffff, crc2& 0xffff); } } } @@ -391,7 +391,7 @@ void ti99_floppy_format::generate_track_mfm(int track, int head, int cell_size, if (check_for_address_marks(trackdata, floppy_image::MFM)==false) { - if (track==0 && head==0) logerror("ti99_dsk: Cannot find MFM address marks on track %d, head %d; likely broken or unformatted.\n", track, head); + if (track==0 && head==0) osd_printf_verbose("ti99_dsk: Cannot find MFM address marks on track %d, head %d; likely broken or unformatted.\n", track, head); return; } @@ -432,14 +432,14 @@ void ti99_floppy_format::generate_track_mfm(int track, int head, int cell_size, if ((found_crc & 0xffff) == 0xf7f7) { // PC99 format: pseudo CRC; replace it - // logerror("Warning: PC99 format using pseudo CRC1; replace by %04x\n", crc1); + // osd_printf_verbose("Warning: PC99 format using pseudo CRC1; replace by %04x\n", crc1); trackdata[i] = (crc1 >> 8) & 0xff; trackdata[i+1] = crc1 & 0xff; found_crc = crc1; } if (crc1 != found_crc) { - logerror("ti99_dsk: Warning: CRC1 does not match (track=%d, head=%d). Found = %04x, calc = %04x\n", track, head, found_crc & 0xffff, crc1& 0xffff); + osd_printf_verbose("ti99_dsk: Warning: CRC1 does not match (track=%d, head=%d). Found = %04x, calc = %04x\n", track, head, found_crc & 0xffff, crc1& 0xffff); } } else @@ -452,14 +452,14 @@ void ti99_floppy_format::generate_track_mfm(int track, int head, int cell_size, if ((found_crc & 0xffff) == 0xf7f7) { // PC99 format: pseudo CRC; replace it - // logerror("Warning: PC99 format using pseudo CRC2; replace by %04x\n", crc2); + // osd_printf_verbose("Warning: PC99 format using pseudo CRC2; replace by %04x\n", crc2); trackdata[i] = (crc2 >> 8) & 0xff; trackdata[i+1] = crc2 & 0xff; found_crc = crc2; } if (crc2 != found_crc) { - logerror("ti99_dsk: Warning: CRC2 does not match (track=%d, head=%d). Found = %04x, calc = %04x\n", track, head, found_crc& 0xffff, crc2& 0xffff); + osd_printf_verbose("ti99_dsk: Warning: CRC2 does not match (track=%d, head=%d). Found = %04x, calc = %04x\n", track, head, found_crc& 0xffff, crc2& 0xffff); } } } @@ -735,7 +735,7 @@ int ti99_sdf_format::identify(io_generic *io, UINT32 form_factor) // as a bad sector map if ((file_size / SECTOR_SIZE) % 10 == 3) { - if (TRACE) logerror("ti99_dsk: Stripping map of bad sectors at image end\n"); + if (TRACE) osd_printf_verbose("ti99_dsk: Stripping map of bad sectors at image end\n"); file_size -= SECTOR_SIZE*3; } @@ -772,15 +772,15 @@ int ti99_sdf_format::identify(io_generic *io, UINT32 form_factor) // Check from contents if ((vib.id[0]=='D')&&(vib.id[1]=='S')&&(vib.id[2]=='K')) { - if (TRACE) logerror("ti99_dsk: Found formatted SDF disk medium\n"); + if (TRACE) osd_printf_verbose("ti99_dsk: Found formatted SDF disk medium\n"); vote = 100; } else { - if (TRACE) logerror("ti99_dsk: No valid VIB found; disk may be unformatted\n"); + if (TRACE) osd_printf_verbose("ti99_dsk: No valid VIB found; disk may be unformatted\n"); } } - else if (TRACE) logerror("ti99_dsk: Disk image is not a SDF image\n"); + else if (TRACE) osd_printf_verbose("ti99_dsk: Disk image is not a SDF image\n"); return vote; } @@ -816,7 +816,7 @@ void ti99_sdf_format::determine_sizes(io_generic *io, int& cell_size, int& secto if (vib.density < 4) cell_size = 2000; else cell_size = 1000; } - if (TRACE) logerror("ti99_dsk: VIB says that this disk is %s density with %d sectors per track, %d tracks, and %d heads\n", (cell_size==4000)? "single": ((cell_size==2000)? "double" : "high"), sector_count, vib.tracksperside, heads); + if (TRACE) osd_printf_verbose("ti99_dsk: VIB says that this disk is %s density with %d sectors per track, %d tracks, and %d heads\n", (cell_size==4000)? "single": ((cell_size==2000)? "double" : "high"), sector_count, vib.tracksperside, heads); have_vib = true; } @@ -855,13 +855,13 @@ void ti99_sdf_format::determine_sizes(io_generic *io, int& cell_size, int& secto { if (sector_count == 16 && sector_count1 == 18) { - logerror("ti99_dsk: Warning: Invalid 16-sector format. Assuming 18 sectors.\n"); + osd_printf_verbose("ti99_dsk: Warning: Invalid 16-sector format. Assuming 18 sectors.\n"); sector_count = 18; } else { if (heads == 2 && ((cell_size1 != cell_size) || (sector_count1 != sector_count))) - logerror("ti99_dsk: Warning: Disk image size does not correspond with format information in VIB.\n"); + osd_printf_verbose("ti99_dsk: Warning: Disk image size does not correspond with format information in VIB.\n"); } } else @@ -975,19 +975,19 @@ void ti99_floppy_format::showtrack(UINT8* trackdata, int length) { for (int i=0; i < length; i+=16) { - logerror("%07x: ", i); + osd_printf_verbose("%07x: ", i); for (int j=0; j < 16; j++) { - logerror("%02x", trackdata[i+j]); - if ((j&1)==1) logerror(" "); + osd_printf_verbose("%02x", trackdata[i+j]); + if ((j&1)==1) osd_printf_verbose(" "); } - logerror(" "); + osd_printf_verbose(" "); for (int j=0; j < 16; j++) { - if (trackdata[i+j] >= 32 && trackdata[i+j]<128) logerror("%c", trackdata[i+j]); - else logerror("."); + if (trackdata[i+j] >= 32 && trackdata[i+j]<128) osd_printf_verbose("%c", trackdata[i+j]); + else osd_printf_verbose("."); } - logerror("\n"); + osd_printf_verbose("\n"); } } @@ -1075,7 +1075,7 @@ int ti99_tdf_format::identify(io_generic *io, UINT32 form_factor) if (vote > 0) { - if (TRACE) logerror("ti99_dsk: Image looks like a TDF image\n"); + if (TRACE) osd_printf_error("ti99_dsk: Image looks like a TDF image\n"); // Get some bytes from track 0 io_generic_read(io, trackdata, 0, 2000); @@ -1083,10 +1083,10 @@ int ti99_tdf_format::identify(io_generic *io, UINT32 form_factor) if (check_for_address_marks(trackdata, floppy_image::FM)==true || check_for_address_marks(trackdata, floppy_image::MFM)==true) vote=100; else { - if (TRACE) logerror("ti99_dsk: Image does not comply with TDF; may be broken or unformatted\n"); + if (TRACE) osd_printf_error("ti99_dsk: Image does not comply with TDF; may be broken or unformatted\n"); } } - else if (TRACE) logerror("ti99_dsk: Disk image is not a TDF image\n"); + else if (TRACE) osd_printf_error("ti99_dsk: Disk image is not a TDF image\n"); return vote; } diff --git a/src/lib/formats/tzx_cas.c b/src/lib/formats/tzx_cas.c index 6037c200122..225184b7bd0 100644 --- a/src/lib/formats/tzx_cas.c +++ b/src/lib/formats/tzx_cas.c @@ -43,7 +43,8 @@ We are currently using the numbers from the TZX specification... #include <assert.h> #include "tzx_cas.h" - +#include "formats/imageutl.h" +#include "emu.h" #define TZX_WAV_FREQUENCY 44100 #define WAVE_LOW -0x5a9e @@ -296,6 +297,214 @@ static int tzx_cas_handle_block( INT16 **buffer, const UINT8 *bytes, int pause, return size; } +static int tzx_handle_direct(INT16 **buffer, const UINT8 *bytes, int pause, int data_size, int tstates, int bits_in_last_byte) +{ + int size = 0; + int samples = tcycles_to_samplecount(tstates); + + /* data */ + for (int data_index = 0; data_index < data_size; data_index++) + { + UINT8 byte = bytes[data_index]; + int bits_to_go = (data_index == (data_size - 1)) ? bits_in_last_byte : 8; + + for ( ; bits_to_go > 0; byte <<= 1, bits_to_go--) + { + if (byte & 0x80) wave_data = WAVE_HIGH; + else wave_data = WAVE_LOW; + + tzx_output_wave(buffer, samples); + size += samples; + + } + } + + /* pause */ + if (pause > 0) + { + int start_pause_samples = millisec_to_samplecount(1); + int rest_pause_samples = millisec_to_samplecount(pause - 1); + + tzx_output_wave(buffer, start_pause_samples); + size += start_pause_samples; + wave_data = WAVE_LOW; + tzx_output_wave(buffer, rest_pause_samples); + size += rest_pause_samples; + } + return size; +} + + +INLINE int tzx_handle_symbol(INT16 **buffer, const UINT8 *symtable, UINT8 symbol, int maxp) +{ + int size = 0; + const UINT8 *cursymb = symtable + (2 * maxp + 1)*symbol; + + UINT8 starttype = cursymb[0]; + +// printf("start polarity %01x (max number of symbols is %d)\n", starttype, maxp); + + switch (starttype) + { + case 0x00: + toggle_wave_data(); + break; + + case 0x01: + // don't change + break; + + case 0x02: + // force low + wave_data = WAVE_LOW; + break; + + case 0x03: + // force high + wave_data = WAVE_HIGH; + break; + + default: + printf("SYMDEF invalid - bad starting polarity"); + } + + for (int i = 0; i < maxp; i++) + { + UINT16 pulse_length = cursymb[1 + (i*2)] | (cursymb[2 + (i*2)] << 8); + // printf("pulse_length %04x\n", pulse_length); + + // shorter lists can be terminated with a pulse_length of 0 + if (pulse_length != 0) + { + + + int samples = tcycles_to_samplecount(pulse_length); + tzx_output_wave(buffer, samples); + size += samples; + toggle_wave_data(); + + } + else + { + toggle_wave_data(); + i = maxp; + continue; + } + } + + //toggle_wave_data(); + + return size; +} + +INLINE int stream_get_bit(const UINT8 *bytes, UINT8 &stream_bit, UINT32 &stream_byte) +{ + // get bit here + UINT8 retbit = 0; + + UINT8 byte = bytes[stream_byte]; + byte = byte << stream_bit; + + if (byte & 0x80) retbit = 1; + + + stream_bit++; + + if (stream_bit == 8) + { + stream_bit = 0; + stream_byte++; + } + + return retbit; +} + +static int tzx_handle_generalized(INT16 **buffer, const UINT8 *bytes, int pause, int data_size, UINT32 totp, int npp, int asp, UINT32 totd, int npd, int asd ) +{ + int size = 0; + + if (totp > 0) + { + // printf("pilot block table %04x\n", totp); + + const UINT8 *symtable = bytes; + const UINT8 *table2 = symtable + (2 * npp + 1)*asp; + + // the Pilot and sync data stream has an RLE encoding + for (int i = 0; i < totp; i+=3) + { + UINT8 symbol = table2[i + 0]; + UINT16 repetitions = table2[i + 1] + (table2[i + 2] << 8); + //printf("symbol %02x repititions %04x\n", symbol, repetitions); // does 1 mean repeat once, or that it only occurs once? + + for (int j = 0; j < repetitions; j++) + { + size += tzx_handle_symbol(buffer, symtable, symbol, npp); + // toggle_wave_data(); + } + + + } + + // advance to after this data + bytes += ((2 * npp + 1)*asp) + totp * 3; + } + else + { + printf("no pilot block\n"); + } + + if (totd > 0) + { + printf("data block table %04x (has %0d symbols, max symbol length is %d)\n", totd, asd, npd); + + const UINT8 *symtable = bytes; + const UINT8 *table2 = bytes + (2 * npd + 1)*asd; + + int NB = ceil(compute_log2(asd)); // number of bits needed to represent each symbol + printf("NB is %d\n", NB); + + UINT8 stream_bit = 0; + UINT32 stream_byte = 0; + + for (int i = 0; i < totd; i++) + { + UINT8 symbol = 0; + + for (int j = 0; j < NB; j++) + { + symbol |= stream_get_bit(table2, stream_bit, stream_byte) << j; + } + + size += tzx_handle_symbol(buffer, symtable, symbol, npd); + + //toggle_wave_data(); + } + } + else + { + printf("no data block\n"); + } + + + + /* pause */ + if (pause > 0) + { + int start_pause_samples = millisec_to_samplecount(1); + int rest_pause_samples = millisec_to_samplecount(pause - 1); + + tzx_output_wave(buffer, start_pause_samples); + size += start_pause_samples; + wave_data = WAVE_LOW; + tzx_output_wave(buffer, rest_pause_samples); + size += rest_pause_samples; + } + return size; +} + + + static void ascii_block_common_log( const char *block_type_string, UINT8 block_type ) { LOG_FORMATS("%s (type %02x) encountered.\n", block_type_string, block_type); @@ -338,12 +547,13 @@ static int tzx_cas_do_work( INT16 **buffer ) while (current_block < block_count) { int pause_time; - int data_size, text_size, total_size, i; + UINT32 data_size; + int text_size, total_size, i; int pilot, pilot_length, sync1, sync2; int bit0, bit1, bits_in_last_byte; UINT8 *cur_block = blocks[current_block]; UINT8 block_type = cur_block[0]; - + UINT16 tstates = 0; /* Uncomment this to include into error.log a list of the types each block */ LOG_FORMATS("tzx_cas_fill_wave: block %d, block_type %02x\n", current_block, block_type); @@ -516,9 +726,13 @@ static int tzx_cas_do_work( INT16 **buffer ) current_block++; break; - case 0x15: /* Direct Recording */ + case 0x15: /* Direct Recording */ // used on 'bombscar' in the cpc_cass list // having this missing is fatal - printf("Unsupported block type (0x15 - Direct Recording) encountered.\n"); + tstates = cur_block[1] + (cur_block[2] << 8); + pause_time= cur_block[3] + (cur_block[4] << 8); + bits_in_last_byte = cur_block[5]; + data_size = cur_block[6] + (cur_block[7] << 8) + (cur_block[8] << 16); + size += tzx_handle_direct(buffer, &cur_block[9], pause_time, data_size, tstates, bits_in_last_byte); current_block++; break; @@ -529,9 +743,28 @@ static int tzx_cas_do_work( INT16 **buffer ) break; case 0x19: /* Generalized Data Block */ - // having this missing is fatal - printf("Unsupported block type (0x19 - Generalized Data Block) encountered.\n"); - current_block++; + { + // having this missing is fatal + // used crudely by batmanc in spectrum_cass list (which is just a redundant encoding of batmane ?) + printf("Unsupported block type (0x19 - Generalized Data Block) encountered.\n"); + + data_size = cur_block[1] + (cur_block[2] << 8) + (cur_block[3] << 16) + (cur_block[4] << 24); + pause_time= cur_block[5] + (cur_block[6] << 8); + + UINT32 totp = cur_block[7] + (cur_block[8] << 8) + (cur_block[9] << 16) + (cur_block[10] << 24); + int npp = cur_block[11]; + int asp = cur_block[12]; + if (asp == 0) asp = 256; + + UINT32 totd = cur_block[13] + (cur_block[14] << 8) + (cur_block[15] << 16) + (cur_block[16] << 24); + int npd = cur_block[17]; + int asd = cur_block[18]; + if (asd == 0) asd = 256; + + size += tzx_handle_generalized(buffer, &cur_block[19], pause_time, data_size, totp, npp, asp, totd, npd, asd); + + current_block++; + } break; } diff --git a/src/lib/formats/victor9k_dsk.c b/src/lib/formats/victor9k_dsk.c index 21dc6397e8e..56494094dad 100644 --- a/src/lib/formats/victor9k_dsk.c +++ b/src/lib/formats/victor9k_dsk.c @@ -97,7 +97,7 @@ zone. */ -#include "emu.h" // logerror, BIT, emu_fatalerror +#include "emu.h" // osd_printf_verbose, BIT, emu_fatalerror #include "formats/victor9k_dsk.h" victor9k_format::victor9k_format() @@ -143,66 +143,66 @@ int victor9k_format::identify(io_generic *io, UINT32 form_factor) void victor9k_format::log_boot_sector(UINT8 *data) { // System disc ID - logerror("System disc: %s\n", ((data[0] == 0xff) && (data[1] == 0x00)) ? "yes" : "no"); + osd_printf_verbose("System disc: %s\n", ((data[0] == 0xff) && (data[1] == 0x00)) ? "yes" : "no"); // Load address - logerror("Load address: %04x\n", (data[1] << 8) | data[2]); + osd_printf_verbose("Load address: %04x\n", (data[1] << 8) | data[2]); // Length - logerror("Length: %04x\n", (data[3] << 8) | data[4]); + osd_printf_verbose("Length: %04x\n", (data[3] << 8) | data[4]); // Entry offset - logerror("Entry offset: %04x\n", (data[5] << 8) | data[6]); + osd_printf_verbose("Entry offset: %04x\n", (data[5] << 8) | data[6]); // Entry segment - logerror("Entry segment: %04x\n", (data[7] << 8) | data[8]); + osd_printf_verbose("Entry segment: %04x\n", (data[7] << 8) | data[8]); // I.D. - //logerror("I.D.: %s\n", data[10]); + //osd_printf_verbose("I.D.: %s\n", data[10]); // Part number - //logerror("Part number: %s\n", data[18]); + //osd_printf_verbose("Part number: %s\n", data[18]); // Sector size - logerror("Sector size: %04x\n", (data[25] << 8) | data[26]); + osd_printf_verbose("Sector size: %04x\n", (data[25] << 8) | data[26]); // Data start - logerror("Data start: %04x\n", (data[27] << 8) | data[28]); + osd_printf_verbose("Data start: %04x\n", (data[27] << 8) | data[28]); // Boot start - logerror("Boot start: %04x\n", (data[29] << 8) | data[30]); + osd_printf_verbose("Boot start: %04x\n", (data[29] << 8) | data[30]); // Flags - logerror("%s sided\n", BIT(data[33], 0) ? "Double" : "Single"); - logerror("Interleave factor: %u\n", data[32] >> 4); + osd_printf_verbose("%s sided\n", BIT(data[33], 0) ? "Double" : "Single"); + osd_printf_verbose("Interleave factor: %u\n", data[32] >> 4); // Disc type switch (data[34]) { - case 0x00: logerror("Disc type: CP/M\n"); break; - case 0x01: logerror("Disc type: MS-DOS\n"); break; - default: logerror("Disc type: unknown\n"); break; + case 0x00: osd_printf_verbose("Disc type: CP/M\n"); break; + case 0x01: osd_printf_verbose("Disc type: MS-DOS\n"); break; + default: osd_printf_verbose("Disc type: unknown\n"); break; } // Speed table - logerror("Speed table: "); + osd_printf_verbose("Speed table: "); for (int i = 38; i < 56; i++) { - logerror("%02x ", data[i]); + osd_printf_verbose("%02x ", data[i]); } - logerror("\n"); + osd_printf_verbose("\n"); // Zone table - logerror("Zone table: "); + osd_printf_verbose("Zone table: "); for (int i = 56; i < 71; i++) { - logerror("%02x ", data[i]); + osd_printf_verbose("%02x ", data[i]); } - logerror("\n"); + osd_printf_verbose("\n"); // Sector/track - logerror("Sector/track: "); + osd_printf_verbose("Sector/track: "); for (int i = 71; i < 86; i++) { - logerror("%02x ", data[i]); + osd_printf_verbose("%02x ", data[i]); } - logerror("\n"); + osd_printf_verbose("\n"); } floppy_image_format_t::desc_e* victor9k_format::get_sector_desc(const format &f, int ¤t_size, int sector_count) diff --git a/src/lib/util/corealloc.h b/src/lib/util/corealloc.h index eb97e643686..5cd481824ed 100644 --- a/src/lib/util/corealloc.h +++ b/src/lib/util/corealloc.h @@ -87,14 +87,18 @@ extern const zeromem_t zeromem; #ifndef NO_MEM_TRACKING // re-route classic malloc-style allocations #undef malloc -#undef calloc #undef realloc #undef free #define malloc(x) malloc_file_line(x, __FILE__, __LINE__, true, false, false) -#define calloc(x,y) __error_use_auto_alloc_clear_or_global_alloc_clear_instead__ #define realloc(x,y) __error_realloc_is_dangerous__ #define free(x) free_file_line(x, __FILE__, __LINE__, true) + +#if !defined(_MSC_VER) || _MSC_VER < 1900 // < VS2015 +#undef calloc +#define calloc(x,y) __error_use_auto_alloc_clear_or_global_alloc_clear_instead__ +#endif + #endif #endif /* __COREALLOC_H__ */ diff --git a/src/mame/arcade.lst b/src/mame/arcade.lst index 8a134ed54ac..4db2af3c82c 100644 --- a/src/mame/arcade.lst +++ b/src/mame/arcade.lst @@ -1232,6 +1232,7 @@ dkongj // (c) 1981 Nintendo dkongjo // (c) 1981 Nintendo dkongjo1 // (c) 1981 Nintendo dkongf // hack from Jeff's Romhack +dkongpe // hack Pauline Edition dkongx // hack dkongx11 // hack dkongjr // (c) 1982 Nintendo of America @@ -1826,7 +1827,7 @@ rtypej // (c) 1987 (Japan) rtypejp // (c) 1987 (Japan) rtypeu // (c) 1987 + Nintendo USA license (US) rtypeb // bootleg -rtypem82b // bootleg +rtypem82b // bootleg bchopper // (c) 1987 mrheli // (c) 1987 (Japan) nspirit // (c) 1988 @@ -1844,7 +1845,7 @@ dbreedm72 // (c) 1989 rtype2 // (c) 1989 rtype2j // (c) 1989 (Japan) rtype2jc // (c) 1989 (Japan) -rtype2m82b // bootleg +rtype2m82b // bootleg majtitle // (c) 1990 (World) majtitlej // (c) 1990 (Japan) hharry // (c) 1990 (World) @@ -1855,12 +1856,12 @@ poundfor // (c) 1990 (World) poundforj // (c) 1990 (Japan) poundforu // (c) 1990 Irem America (US) airduelm72 // (c) 1990 (Japan) -airduel // (c) 1990 (World) +airduel // (c) 1990 (World) cosmccop // (c) 1991 (World) gallop // (c) 1991 (Japan) ltswords // (c) 1991 (World) kengo // (c) 1991 (Japan) -kengoa // (c) 1991 (Japan) +kengoa // (c) 1991 (Japan) // not M72, but same sound hardware sichuan2 // (c) 1989 Tamtex sichuan2a // (c) 1989 Tamtex @@ -2096,8 +2097,15 @@ boblbobl // bootleg sboblbobl // bootleg sboblbobla // bootleg sboblboblb // bootleg +sboblboblc // bootleg +bublboblb // bootleg bub68705 // bootleg dland // bootleg +bbredux // bootleg / hack +bublcave // hack +boblcave // hack +bublcave11 // hack +bublcave10 // hack missb2 // bootleg on enhanced hardware bublpong // bootleg on enhanced hardware kikikai // A85 (c) 1986 Taito Corporation @@ -2863,6 +2871,7 @@ pacslot // (c) 1996 Namco ppsatan // (c) 1996 <unknown> ddonpach // (c) 1997 Atlus/Cave ddonpachj // (c) 1997 Atlus/Cave +ddonpacha // hack dfeveron // (c) 1998 Cave + Nihon System license feversos // (c) 1998 Cave + Nihon System license esprade // (c) 1998 Atlus/Cave @@ -3096,7 +3105,7 @@ madgear // 2/1989 (c) 1989 (US) madgearj // 2/1989 (c) 1989 (Japan) ledstorm // 1988 (c) 1988 (US) leds2011 // 1988 (c) 1988 (World) -leds2011u // 1988 (c) 1988 (US) +leds2011u // 1988 (c) 1988 (US) // 3/1989 Dokaben (baseball) - see below among "Mitchell" games // 8/1989 Dokaben 2 (baseball) - see below among "Mitchell" games // 10/1989 Capcom Baseball - see below among "Mitchell" games @@ -3111,6 +3120,7 @@ leds2011u // 1988 (c) 1988 (US) // Capcom CPS1 games forgottn // 7/1988 (c) 1988 (World) +forgottna // 7/1988 (c) 1988 (World) forgottnu // 7/1988 (c) 1988 (USA) forgottnu1 // 7/1988 (c) 1988 (USA) forgottnua // 7/1988 (c) 1988 (USA) @@ -3865,7 +3875,7 @@ soulclbrjb // 1998.?? Soul Calibur (Japan, SOC11/VER.B) soulclbrja // 1998.?? Soul Calibur (Japan, SOC11/VER.A2) technodr // 1998.07 Techno Drive mdhorse // 1998.11 Derby Quiz My Dream Horse (Japan, MDH1/VER.A2) -aplarail // 1998.12 Attack Pla Rail +aplarail // 1998.12 Attack Pla Rail tenkomor // 1998.?? Tenkomori Shooting (Asia, TKM2/VER.A1) tenkomorja // 1998.12 Tenkomori Shooting (Japan, TKM1/VER.A1) pacapp // 1998.12 Paca Paca Passion (Japan, PPP1/VER.A2) @@ -4501,6 +4511,7 @@ wboyub // bootleg of wboyu wbdeluxe // (c) 1986 + Escape license (S1) wboysys2 // 834-5984 (c) 1986 + Escape license (S1) gardia // 834-6119 (S2?) +gardiaj // gardiab // bootleg nob // (c) Data East nobb // bootleg @@ -4685,11 +4696,11 @@ riotcity // (c) 1991 Sega / Westone (Unprotected) ryukyu // (c) 1990 (FD1094) sdib // (c) 1987 (FD1089A) sdibl // (c) 1987 bootleg -sdibl2 // bootleg -sdibl3 // bootleg -sdibl4 // bootleg -sdibl5 // bootleg -sdibl6 // bootleg +sdibl2 // bootleg +sdibl3 // bootleg +sdibl4 // bootleg +sdibl5 // bootleg +sdibl6 // bootleg defense // (c) 1987 (FD1094) shinobi5 // (c) 1987 (Unprotected) shinobi4 // (c) 1987 (MC-8123B) @@ -4879,7 +4890,7 @@ toutrund // bootleg toutrunjd // bootleg toutrun3d // bootleg toutrunj1d // bootleg -toutrun2d // bootleg +toutrun2d // bootleg shangon3d // bootleg // X Board @@ -5336,6 +5347,7 @@ tfrceacj // (c) 1990 Sega / Technosoft tfrceacb // bootleg twinsqua // (c) 1991 Sega soniccar // (c) 1991 Sega +sonicpop ribbit // (c) 1991 Sega tantr // (c) 1992 Sega tantrkor // (c) 1992 Sega @@ -5583,8 +5595,8 @@ shaktamb // 2001.10.17 Shakatto Tambourine Cho Powerup Chu (2K1 AUT) keyboard // 2001.11 La Keyboard ikaruga // 2001.12 Ikaruga lupinsho // 2001.12 Lupin the Third: the Shooting -drbyocwc // 2001.?? Derby Owners Club World Edition (Rev. C) -derbyocw // 2001.?? Derby Owners Club World Edition (Rev. D) +drbyocwc // 2001.?? Derby Owners Club World Edition (Rev C) +derbyocw // 2001.?? Derby Owners Club World Edition (Rev D) // 2001.?? Star Horse 2001 vathlete // 2002.03 Virtua Athletics / Virtua Athlete mok // 2002.03.06 The Maze of the Kings @@ -5721,7 +5733,7 @@ initdexpo // 2002.?? Initial D Arcade Stage (Export) // 2003.05 Initial D Arcade Stage Ver. 2 (Japan) (Rev A) initdv2j // 2003.05.27 Initial D Arcade Stage Ver. 2 (Japan) (Rev B) // 2003.09 World Club Champion Football Serie A 2002-2003 - // 2003.?? Club Kart Cycraft Edition +clubkcyc // 2003.?? Club Kart Cycraft Edition (Rev A) clubk2k3 // 2003.?? Club Kart: European Session (2003, Rev A) clubk2kp // 2003.?? Club Kart: European Session (2003, prototype) clubkprz // 2003.?? Club Kart Prize @@ -5748,6 +5760,7 @@ vf4tuned // 2004.12 Virtua Fighter 4 Final Tuned (Rev F) // 2006.09 Mobile Suit Gundam 0079 Card Builder Ver.2.01 // 2006.10 World Club Champion Football European Clubs 2005-2006 bugfix // 2006.11 Mobile Suit Gundam 0079 Card Builder Ver.2.02 +inidv3ca // 2006.?? Initial D Arcade Stage Ver. 3 Cycraft Edition (Rev A) inidv3cy // 2006.?? Initial D Arcade Stage Ver. 3 Cycraft Edition (Rev B) // 2007.03 Mobile Suit Gundam 0083 Card Builder // 2007.10 Mobile Suit Gundam 0083 Card Builder Ryouyuu Gekitotsu @@ -5798,7 +5811,7 @@ airtrix // 2001.02 Air Trix triforce // 2002.?? Triforce BIOS vs2002ex // 2002.07.30 Virtua Striker 2002 (Export) vs2002j // 2002.10 Virtua Striker 2002 (Japan) -fzeroaxc // 2003.06.11 F-Zero AX (Rev. C) +fzeroaxc // 2003.06.11 F-Zero AX (Rev C) avalonsc // 2003.07 The Key Of Avalon: The Wizard Master (server) (Rev C) avalonse // 2003.08 The Key Of Avalon: The Wizard Master (server) (Rev E) avalonce // 2003.08 The Key Of Avalon: The Wizard Master (client) (Rev E) @@ -5809,7 +5822,7 @@ gekpurya // 2003.10 Gekitou Pro Yakyuu Mizushima Shinji All Stars vs. Pro // 2003.10 The Key Of Avalon 1.01 avalons // 2003.11 The Key Of Avalon: The Wizard Master (server) (Rev G) avalonc // 2003.11 The Key Of Avalon: The Wizard Master (client) (Rev G) -fzeroax // 2003.12 F-Zero AX (Rev. E) +fzeroax // 2003.12 F-Zero AX (Rev E) // 2003.12 The Key Of Avalon 1.10 avalns12 // 2004.03 The Key Of Avalon 1.20 - Summon The New Monsters (server) (Rev A) avalnc12 // 2004.03 The Key Of Avalon 1.20 - Summon The New Monsters (client) (Rev A) @@ -6269,8 +6282,9 @@ boogwinga // MBD (c) 1992 (Asia, v1.5) ragtime // MBD (c) 1992 (Japan, v1.5) ragtimea // MBD (c) 1992 (Japan, v1.3) dblewing // MBE (c) 1993 Mitchell -fghthist // MBF (c) 1993 Data East Corporation (World) DE-0380-2 PCB +fghthist // MBF (c) 1993 Data East Corporation (World) DE-0395-1 PCB fghthista // MBF (c) 1993 Data East Corporation (World) DE-0380-2 PCB +fghthistb // MBF (c) 1993 Data East Corporation (World) DE-0380-2 PCB fghthistu // MBF (c) 1993 Data East Corporation (US) DE-0396-0 PCB fghthistua // MBF (c) 1993 Data East Corporation (US) DE-0395-1 PCB fghthistub // MBF (c) 1993 Data East Corporation (US) DE-0395-1 PCB @@ -6624,7 +6638,7 @@ vendettaj // GX081 (c) 1991 (Japan) mogura // GX141 (c) 1991 wecleman // GX602 (c) 1986 weclemana // GX602?(c) 1988 -weclemanb // GX602 (c) 1986 +weclemanb // GX602 (c) 1986 hotchase // GX763 (c) 1988 hotchasea chqflag // GX717 (c) 1988 @@ -9076,7 +9090,7 @@ vastar4 // (c) 1983 Sesame Japan // Gaelco 2D games mastboy // (c) 1987 - No Ref on the PCB mastboyi // (c) 1987 - No Ref on the PCB -mastboyia // (c) 1987 - No Ref on the PCB +mastboyia // (c) 1987 - No Ref on the PCB xorworld // (c) 1990 - prototype bigkarnk // (c) 1991 - Ref 901112-1 // Master Boy 2 // (c) 1991 - Ref ??? @@ -9718,7 +9732,7 @@ pclubysa // (c) 2000 Yun Sung garogun // (c) 2000 Yun Sung 7ordi // (c) 2002 Yun Sung wondstck // (c) ???? Yun Sung -wondstcka // (c) ???? Yun Sung +wondstcka // (c) ???? Yun Sung // Zilec games blueprnt // (c) 1982 Bally Midway (Zilec in ROM 3U, and the programmer names) @@ -9967,7 +9981,7 @@ pyenaget // (c) 2000 Sammy tdoboon // (c) 2000 Sammy haekaka // (c) 2001 Sammy -// IGS games ( www.igs.com.tw +// IGS games (www.igs.com.tw) goldstar // (c) 198? IGS goldstbl // (c) 198? IGS moonlght // bootleg @@ -10176,8 +10190,16 @@ svg // (c) 2003 Spectral vs Generation svgtw svgpcb // ket // (c) 2002 Ketsui +ket1 // keta // ketb // +ketarr // hack +ketarr151 // hack +ketarr15 // hack +ketarr10 // hack +ketarrs151 // hack +ketarrs15 // hack +ketarrf // hack ddpdoj // (c) 2002 DoDonPachi Dai-Ou-Jou ddpdoja // ddpdojb // @@ -11170,7 +11192,7 @@ lastfght // (c) 2000 Subsino xplan // (c) 2006 Subsino sliver // (c) 1996 Hollow Corp -slivera // +slivera // intrscti // ???? pasha2 // (c) 1998 Dong Sung trvmadns // (c) 1985 Thunderhead Inc. @@ -11305,12 +11327,15 @@ brasil89a // 1989, Unknown brasil93 // 1993, Unknown poker91 // 1991, Unknown genie // (c) 198? Video Fun Games Ltd. +geniea // 198?, Unknown silverga // 1983, Unknown pokerdub // 198?, Unknown pokerduc // 198?, Unknown bchancep // 198?, Unknown pokermon // 1987, Unknown pokersis // 198?, Sisteme France. +super98 + // Cal Omega comg074 // (c) 1981 Cal Omega Inc. @@ -11380,6 +11405,7 @@ pepp0045 // (c) 1987 IGT - International Game Technology pepp0045a // (c) 1987 IGT - International Game Technology pepp0045b // (c) 1987 IGT - International Game Technology pepp0045c // (c) 1987 IGT - International Game Technology +pepp0045d // (c) 1987 IGT - International Game Technology pepp0046 // (c) 1987 IGT - International Game Technology pepp0046a // (c) 1987 IGT - International Game Technology pepp0046b // (c) 1987 IGT - International Game Technology @@ -11996,6 +12022,7 @@ cmasterf // (c) 1991 Dyna Electronics cmast91 // (c) 1991 Dyna Electronics cmast92 // (c) 1992 Dyna Electronics cmast97 // (c) 1996 Dyna Electronics +cmast99 // 1999? tonypok // (c) 1991 Corsica jkrmast // (c) 199? unknown @@ -12052,18 +12079,37 @@ coralr2 // (c) 2002 aristmk5 // (c) 1995, USA platform set chips swthrt2v // (c) 1995 enchfrst // (c) 1995 +minemine // (c) 1996 dolphntr // (c) 1996 dolphtra // (c) 1996 -dmdtouch // (c) 1997 +dolphtre // (c) 1996 +cashcham // (c) 1996 +enchfore // (c) 1997 +mgarden // (c) 1997 goldprmd // (c) 1997 qotn // (c) 1997 +qotna // (c) 1997 +goldpyra // (c) 1997 +dmdtouch // (c) 1997 +wldcougr // (c) 1997 +bumblbug // (c) 1997 +pengpays // (c) 1997 +chickena // (c) 1998 adonis // (c) 1998 +adonisa // (c) 1998 reelrock // (c) 1998 indiandr // (c) 1998 +chariotc // (c) 1998 +wtiger // (c) 1999 +bootsctn // (c) 1999 +cuckoo // (c) 2000 magicmsk // (c) 2000 +magicmska // (c) 2000 margmgc // (c) 2000 geishanz // (c) 2001 -wtiger // (c) 2001 +adonise // (c) 2001 +koalamnt // (c) 2001 +partygrs // (c) 2001 // Aristocrat Mk6 hardware aristmk6 @@ -13179,6 +13225,7 @@ tmspoker kas89 // 1989, SFC S.R.L. caspoker // 1987, PM / Beck Elektronik. wildpkr // 199?, TAB Austria. +subhuntr // 1979 Model Racing manohman // 199?, Merkur. diff --git a/src/mame/audio/hng64.c b/src/mame/audio/hng64.c index 11caed9b98b..220afc56240 100644 --- a/src/mame/audio/hng64.c +++ b/src/mame/audio/hng64.c @@ -277,7 +277,7 @@ WRITE16_MEMBER(hng64_state::sound_comms_w) /* correct? */ m_audiocpu->set_input_line(5, CLEAR_LINE); //if(data) - // printf("IRQ ACK %02x?\n",data); + // printf("IRQ ACK %02x?\n",data); return; } diff --git a/src/mame/audio/midway.c b/src/mame/audio/midway.c index a02e8a22540..ba7d9008087 100644 --- a/src/mame/audio/midway.c +++ b/src/mame/audio/midway.c @@ -114,7 +114,7 @@ WRITE_LINE_MEMBER(midway_ssio_device::reset_write) READ8_MEMBER(midway_ssio_device::ioport_read) { static const char *const port[] = { "IP0", "IP1", "IP2", "IP3", "IP4" }; - UINT8 result = ioport(port[offset])->read_safe(0xff); + UINT8 result = read_safe(ioport(port[offset]), 0xff); if (!m_custom_input[offset].isnull()) result = (result & ~m_custom_input_mask[offset]) | (m_custom_input[offset](space, offset, 0xff) & m_custom_input_mask[offset]); diff --git a/src/mame/drivers/39in1.c b/src/mame/drivers/39in1.c index a82e646440f..2007b4a17c6 100644 --- a/src/mame/drivers/39in1.c +++ b/src/mame/drivers/39in1.c @@ -103,7 +103,7 @@ public: #define VERBOSE_LEVEL ( 3 ) -INLINE void ATTR_PRINTF(3,4) verboselog( running_machine& machine, int n_level, const char* s_fmt, ... ) +INLINE void ATTR_PRINTF(3,4) verboselog( device_t& device, int n_level, const char* s_fmt, ... ) { if( VERBOSE_LEVEL >= n_level ) { @@ -112,8 +112,8 @@ INLINE void ATTR_PRINTF(3,4) verboselog( running_machine& machine, int n_level, va_start( v, s_fmt ); vsprintf( buf, s_fmt, v ); va_end( v ); - logerror( "%s: %s", machine.describe_context(), buf ); - //printf( "%s: %s", machine.describe_context(), buf ); + device.logerror( "%s: %s", device.machine().describe_context(), buf ); + //printf( "%s: %s", device.machine().describe_context(), buf ); } } @@ -132,28 +132,28 @@ READ32_MEMBER(_39in1_state::pxa255_i2s_r) switch(PXA255_I2S_BASE_ADDR | (offset << 2)) { case PXA255_SACR0: - verboselog( machine(), 3, "pxa255_i2s_r: Serial Audio Controller Global Control Register: %08x & %08x\n", i2s_regs->sacr0, mem_mask ); + verboselog(*this, 3, "pxa255_i2s_r: Serial Audio Controller Global Control Register: %08x & %08x\n", i2s_regs->sacr0, mem_mask ); return i2s_regs->sacr0; case PXA255_SACR1: - verboselog( machine(), 3, "pxa255_i2s_r: Serial Audio Controller I2S/MSB-Justified Control Register: %08x & %08x\n", i2s_regs->sacr1, mem_mask ); + verboselog(*this, 3, "pxa255_i2s_r: Serial Audio Controller I2S/MSB-Justified Control Register: %08x & %08x\n", i2s_regs->sacr1, mem_mask ); return i2s_regs->sacr1; case PXA255_SASR0: - verboselog( machine(), 3, "pxa255_i2s_r: Serial Audio Controller I2S/MSB-Justified Status Register: %08x & %08x\n", i2s_regs->sasr0, mem_mask ); + verboselog(*this, 3, "pxa255_i2s_r: Serial Audio Controller I2S/MSB-Justified Status Register: %08x & %08x\n", i2s_regs->sasr0, mem_mask ); return i2s_regs->sasr0; case PXA255_SAIMR: - verboselog( machine(), 3, "pxa255_i2s_r: Serial Audio Interrupt Mask Register: %08x & %08x\n", i2s_regs->saimr, mem_mask ); + verboselog(*this, 3, "pxa255_i2s_r: Serial Audio Interrupt Mask Register: %08x & %08x\n", i2s_regs->saimr, mem_mask ); return i2s_regs->saimr; case PXA255_SAICR: - verboselog( machine(), 3, "pxa255_i2s_r: Serial Audio Interrupt Clear Register: %08x & %08x\n", i2s_regs->saicr, mem_mask ); + verboselog(*this, 3, "pxa255_i2s_r: Serial Audio Interrupt Clear Register: %08x & %08x\n", i2s_regs->saicr, mem_mask ); return i2s_regs->saicr; case PXA255_SADIV: - verboselog( machine(), 3, "pxa255_i2s_r: Serial Audio Clock Divider Register: %08x & %08x\n", i2s_regs->sadiv, mem_mask ); + verboselog(*this, 3, "pxa255_i2s_r: Serial Audio Clock Divider Register: %08x & %08x\n", i2s_regs->sadiv, mem_mask ); return i2s_regs->sadiv; case PXA255_SADR: - verboselog( machine(), 5, "pxa255_i2s_r: Serial Audio Data Register: %08x & %08x\n", i2s_regs->sadr, mem_mask ); + verboselog(*this, 5, "pxa255_i2s_r: Serial Audio Data Register: %08x & %08x\n", i2s_regs->sadr, mem_mask ); return i2s_regs->sadr; default: - verboselog( machine(), 0, "pxa255_i2s_r: Unknown address: %08x\n", PXA255_I2S_BASE_ADDR | (offset << 2)); + verboselog(*this, 0, "pxa255_i2s_r: Unknown address: %08x\n", PXA255_I2S_BASE_ADDR | (offset << 2)); break; } return 0; @@ -181,23 +181,23 @@ WRITE32_MEMBER(_39in1_state::pxa255_i2s_w) switch(PXA255_I2S_BASE_ADDR | (offset << 2)) { case PXA255_SACR0: - verboselog( machine(), 3, "pxa255_i2s_w: Serial Audio Controller Global Control Register: %08x & %08x\n", data, mem_mask ); + verboselog(*this, 3, "pxa255_i2s_w: Serial Audio Controller Global Control Register: %08x & %08x\n", data, mem_mask ); i2s_regs->sacr0 = data & 0x0000ff3d; break; case PXA255_SACR1: - verboselog( machine(), 3, "pxa255_i2s_w: Serial Audio Controller I2S/MSB-Justified Control Register: %08x & %08x\n", data, mem_mask ); + verboselog(*this, 3, "pxa255_i2s_w: Serial Audio Controller I2S/MSB-Justified Control Register: %08x & %08x\n", data, mem_mask ); i2s_regs->sacr1 = data & 0x00000039; break; case PXA255_SASR0: - verboselog( machine(), 3, "pxa255_i2s_w: Serial Audio Controller I2S/MSB-Justified Status Register: %08x & %08x\n", data, mem_mask ); + verboselog(*this, 3, "pxa255_i2s_w: Serial Audio Controller I2S/MSB-Justified Status Register: %08x & %08x\n", data, mem_mask ); i2s_regs->sasr0 = data & 0x0000ff7f; break; case PXA255_SAIMR: - verboselog( machine(), 3, "pxa255_i2s_w: Serial Audio Interrupt Mask Register: %08x & %08x\n", data, mem_mask ); + verboselog(*this, 3, "pxa255_i2s_w: Serial Audio Interrupt Mask Register: %08x & %08x\n", data, mem_mask ); i2s_regs->saimr = data & 0x00000078; break; case PXA255_SAICR: - verboselog( machine(), 3, "pxa255_i2s_w: Serial Audio Interrupt Clear Register: %08x & %08x\n", data, mem_mask ); + verboselog(*this, 3, "pxa255_i2s_w: Serial Audio Interrupt Clear Register: %08x & %08x\n", data, mem_mask ); if(i2s_regs->saicr & PXA255_SAICR_ROR) { i2s_regs->sasr0 &= ~PXA255_SASR0_ROR; @@ -208,13 +208,13 @@ WRITE32_MEMBER(_39in1_state::pxa255_i2s_w) } break; case PXA255_SADIV: - verboselog( machine(), 3, "pxa255_i2s_w: Serial Audio Clock Divider Register: %08x & %08x\n", data, mem_mask ); + verboselog(*this, 3, "pxa255_i2s_w: Serial Audio Clock Divider Register: %08x & %08x\n", data, mem_mask ); i2s_regs->sadiv = data & 0x0000007f; dmadac_set_frequency(&m_dmadac[0], 2, ((double)147600000 / (double)i2s_regs->sadiv) / 256.0); dmadac_enable(&m_dmadac[0], 2, 1); break; case PXA255_SADR: - verboselog( machine(), 4, "pxa255_i2s_w: Serial Audio Data Register: %08x & %08x\n", data, mem_mask ); + verboselog(*this, 4, "pxa255_i2s_w: Serial Audio Data Register: %08x & %08x\n", data, mem_mask ); i2s_regs->sadr = data; #if 0 if(audio_dump) @@ -224,7 +224,7 @@ WRITE32_MEMBER(_39in1_state::pxa255_i2s_w) #endif break; default: - verboselog( machine(), 0, "pxa255_i2s_w: Unknown address: %08x = %08x & %08x\n", PXA255_I2S_BASE_ADDR | (offset << 2), data, mem_mask); + verboselog(*this, 0, "pxa255_i2s_w: Unknown address: %08x = %08x & %08x\n", PXA255_I2S_BASE_ADDR | (offset << 2), data, mem_mask); break; } } @@ -421,10 +421,10 @@ READ32_MEMBER(_39in1_state::pxa255_dma_r) case PXA255_DCSR4: case PXA255_DCSR5: case PXA255_DCSR6: case PXA255_DCSR7: case PXA255_DCSR8: case PXA255_DCSR9: case PXA255_DCSR10: case PXA255_DCSR11: case PXA255_DCSR12: case PXA255_DCSR13: case PXA255_DCSR14: case PXA255_DCSR15: - verboselog( machine(), 4, "pxa255_dma_r: DMA Channel Control/Status Register %d: %08x & %08x\n", offset, dma_regs->dcsr[offset], mem_mask ); + verboselog(*this, 4, "pxa255_dma_r: DMA Channel Control/Status Register %d: %08x & %08x\n", offset, dma_regs->dcsr[offset], mem_mask ); return dma_regs->dcsr[offset]; case PXA255_DINT: - if (0) verboselog( machine(), 3, "pxa255_dma_r: DMA Interrupt Register: %08x & %08x\n", dma_regs->dint, mem_mask ); + if (0) verboselog(*this, 3, "pxa255_dma_r: DMA Interrupt Register: %08x & %08x\n", dma_regs->dint, mem_mask ); return dma_regs->dint; case PXA255_DRCMR0: case PXA255_DRCMR1: case PXA255_DRCMR2: case PXA255_DRCMR3: case PXA255_DRCMR4: case PXA255_DRCMR5: case PXA255_DRCMR6: case PXA255_DRCMR7: @@ -436,34 +436,34 @@ READ32_MEMBER(_39in1_state::pxa255_dma_r) case PXA255_DRCMR28: case PXA255_DRCMR29: case PXA255_DRCMR30: case PXA255_DRCMR31: case PXA255_DRCMR32: case PXA255_DRCMR33: case PXA255_DRCMR34: case PXA255_DRCMR35: case PXA255_DRCMR36: case PXA255_DRCMR37: case PXA255_DRCMR38: case PXA255_DRCMR39: - verboselog( machine(), 3, "pxa255_dma_r: DMA Request to Channel Map Register %d: %08x & %08x\n", offset - (0x100 >> 2), 0, mem_mask ); + verboselog(*this, 3, "pxa255_dma_r: DMA Request to Channel Map Register %d: %08x & %08x\n", offset - (0x100 >> 2), 0, mem_mask ); return dma_regs->drcmr[offset - (0x100 >> 2)]; case PXA255_DDADR0: case PXA255_DDADR1: case PXA255_DDADR2: case PXA255_DDADR3: case PXA255_DDADR4: case PXA255_DDADR5: case PXA255_DDADR6: case PXA255_DDADR7: case PXA255_DDADR8: case PXA255_DDADR9: case PXA255_DDADR10: case PXA255_DDADR11: case PXA255_DDADR12: case PXA255_DDADR13: case PXA255_DDADR14: case PXA255_DDADR15: - verboselog( machine(), 3, "pxa255_dma_r: DMA Descriptor Address Register %d: %08x & %08x\n", (offset - (0x200 >> 2)) >> 2, 0, mem_mask ); + verboselog(*this, 3, "pxa255_dma_r: DMA Descriptor Address Register %d: %08x & %08x\n", (offset - (0x200 >> 2)) >> 2, 0, mem_mask ); return dma_regs->ddadr[(offset - (0x200 >> 2)) >> 2]; case PXA255_DSADR0: case PXA255_DSADR1: case PXA255_DSADR2: case PXA255_DSADR3: case PXA255_DSADR4: case PXA255_DSADR5: case PXA255_DSADR6: case PXA255_DSADR7: case PXA255_DSADR8: case PXA255_DSADR9: case PXA255_DSADR10: case PXA255_DSADR11: case PXA255_DSADR12: case PXA255_DSADR13: case PXA255_DSADR14: case PXA255_DSADR15: - verboselog( machine(), 3, "pxa255_dma_r: DMA Source Address Register %d: %08x & %08x\n", (offset - (0x200 >> 2)) >> 2, 0, mem_mask ); + verboselog(*this, 3, "pxa255_dma_r: DMA Source Address Register %d: %08x & %08x\n", (offset - (0x200 >> 2)) >> 2, 0, mem_mask ); return dma_regs->dsadr[(offset - (0x200 >> 2)) >> 2]; case PXA255_DTADR0: case PXA255_DTADR1: case PXA255_DTADR2: case PXA255_DTADR3: case PXA255_DTADR4: case PXA255_DTADR5: case PXA255_DTADR6: case PXA255_DTADR7: case PXA255_DTADR8: case PXA255_DTADR9: case PXA255_DTADR10: case PXA255_DTADR11: case PXA255_DTADR12: case PXA255_DTADR13: case PXA255_DTADR14: case PXA255_DTADR15: - verboselog( machine(), 3, "pxa255_dma_r: DMA Target Address Register %d: %08x & %08x\n", (offset - (0x200 >> 2)) >> 2, 0, mem_mask ); + verboselog(*this, 3, "pxa255_dma_r: DMA Target Address Register %d: %08x & %08x\n", (offset - (0x200 >> 2)) >> 2, 0, mem_mask ); return dma_regs->dtadr[(offset - (0x200 >> 2)) >> 2]; case PXA255_DCMD0: case PXA255_DCMD1: case PXA255_DCMD2: case PXA255_DCMD3: case PXA255_DCMD4: case PXA255_DCMD5: case PXA255_DCMD6: case PXA255_DCMD7: case PXA255_DCMD8: case PXA255_DCMD9: case PXA255_DCMD10: case PXA255_DCMD11: case PXA255_DCMD12: case PXA255_DCMD13: case PXA255_DCMD14: case PXA255_DCMD15: - verboselog( machine(), 3, "pxa255_dma_r: DMA Command Register %d: %08x & %08x\n", (offset - (0x200 >> 2)) >> 2, 0, mem_mask ); + verboselog(*this, 3, "pxa255_dma_r: DMA Command Register %d: %08x & %08x\n", (offset - (0x200 >> 2)) >> 2, 0, mem_mask ); return dma_regs->dcmd[(offset - (0x200 >> 2)) >> 2]; default: - verboselog( machine(), 0, "pxa255_dma_r: Unknown address: %08x\n", PXA255_DMA_BASE_ADDR | (offset << 2)); + verboselog(*this, 0, "pxa255_dma_r: Unknown address: %08x\n", PXA255_DMA_BASE_ADDR | (offset << 2)); break; } return 0; @@ -479,7 +479,7 @@ WRITE32_MEMBER(_39in1_state::pxa255_dma_w) case PXA255_DCSR4: case PXA255_DCSR5: case PXA255_DCSR6: case PXA255_DCSR7: case PXA255_DCSR8: case PXA255_DCSR9: case PXA255_DCSR10: case PXA255_DCSR11: case PXA255_DCSR12: case PXA255_DCSR13: case PXA255_DCSR14: case PXA255_DCSR15: - if (0) verboselog( machine(), 3, "pxa255_dma_w: DMA Channel Control/Status Register %d: %08x & %08x\n", offset, data, mem_mask ); + if (0) verboselog(*this, 3, "pxa255_dma_w: DMA Channel Control/Status Register %d: %08x & %08x\n", offset, data, mem_mask ); dma_regs->dcsr[offset] &= ~(data & 0x00000007); dma_regs->dcsr[offset] &= ~0x60000000; dma_regs->dcsr[offset] |= data & 0x60000000; @@ -488,7 +488,7 @@ WRITE32_MEMBER(_39in1_state::pxa255_dma_w) dma_regs->dcsr[offset] |= PXA255_DCSR_RUN; if(data & PXA255_DCSR_NODESCFETCH) { - verboselog( machine(), 0, " No-Descriptor-Fetch mode is not supported.\n" ); + verboselog(*this, 0, " No-Descriptor-Fetch mode is not supported.\n" ); break; } @@ -502,7 +502,7 @@ WRITE32_MEMBER(_39in1_state::pxa255_dma_w) pxa255_dma_irq_check(); break; case PXA255_DINT: - verboselog( machine(), 3, "pxa255_dma_w: DMA Interrupt Register: %08x & %08x\n", data, mem_mask ); + verboselog(*this, 3, "pxa255_dma_w: DMA Interrupt Register: %08x & %08x\n", data, mem_mask ); dma_regs->dint &= ~data; break; case PXA255_DRCMR0: case PXA255_DRCMR1: case PXA255_DRCMR2: case PXA255_DRCMR3: @@ -515,39 +515,39 @@ WRITE32_MEMBER(_39in1_state::pxa255_dma_w) case PXA255_DRCMR28: case PXA255_DRCMR29: case PXA255_DRCMR30: case PXA255_DRCMR31: case PXA255_DRCMR32: case PXA255_DRCMR33: case PXA255_DRCMR34: case PXA255_DRCMR35: case PXA255_DRCMR36: case PXA255_DRCMR37: case PXA255_DRCMR38: case PXA255_DRCMR39: - verboselog( machine(), 3, "pxa255_dma_w: DMA Request to Channel Map Register %d: %08x & %08x\n", offset - (0x100 >> 2), data, mem_mask ); + verboselog(*this, 3, "pxa255_dma_w: DMA Request to Channel Map Register %d: %08x & %08x\n", offset - (0x100 >> 2), data, mem_mask ); dma_regs->drcmr[offset - (0x100 >> 2)] = data & 0x0000008f; break; case PXA255_DDADR0: case PXA255_DDADR1: case PXA255_DDADR2: case PXA255_DDADR3: case PXA255_DDADR4: case PXA255_DDADR5: case PXA255_DDADR6: case PXA255_DDADR7: case PXA255_DDADR8: case PXA255_DDADR9: case PXA255_DDADR10: case PXA255_DDADR11: case PXA255_DDADR12: case PXA255_DDADR13: case PXA255_DDADR14: case PXA255_DDADR15: - verboselog( machine(), 3, "pxa255_dma_w: DMA Descriptor Address Register %d: %08x & %08x\n", (offset - (0x200 >> 2)) >> 2, data, mem_mask ); + verboselog(*this, 3, "pxa255_dma_w: DMA Descriptor Address Register %d: %08x & %08x\n", (offset - (0x200 >> 2)) >> 2, data, mem_mask ); dma_regs->ddadr[(offset - (0x200 >> 2)) >> 2] = data & 0xfffffff1; break; case PXA255_DSADR0: case PXA255_DSADR1: case PXA255_DSADR2: case PXA255_DSADR3: case PXA255_DSADR4: case PXA255_DSADR5: case PXA255_DSADR6: case PXA255_DSADR7: case PXA255_DSADR8: case PXA255_DSADR9: case PXA255_DSADR10: case PXA255_DSADR11: case PXA255_DSADR12: case PXA255_DSADR13: case PXA255_DSADR14: case PXA255_DSADR15: - verboselog( machine(), 3, "pxa255_dma_w: DMA Source Address Register %d: %08x & %08x\n", (offset - (0x200 >> 2)) >> 2, data, mem_mask ); + verboselog(*this, 3, "pxa255_dma_w: DMA Source Address Register %d: %08x & %08x\n", (offset - (0x200 >> 2)) >> 2, data, mem_mask ); dma_regs->dsadr[(offset - (0x200 >> 2)) >> 2] = data & 0xfffffffc; break; case PXA255_DTADR0: case PXA255_DTADR1: case PXA255_DTADR2: case PXA255_DTADR3: case PXA255_DTADR4: case PXA255_DTADR5: case PXA255_DTADR6: case PXA255_DTADR7: case PXA255_DTADR8: case PXA255_DTADR9: case PXA255_DTADR10: case PXA255_DTADR11: case PXA255_DTADR12: case PXA255_DTADR13: case PXA255_DTADR14: case PXA255_DTADR15: - verboselog( machine(), 3, "pxa255_dma_w: DMA Target Address Register %d: %08x & %08x\n", (offset - (0x200 >> 2)) >> 2, data, mem_mask ); + verboselog(*this, 3, "pxa255_dma_w: DMA Target Address Register %d: %08x & %08x\n", (offset - (0x200 >> 2)) >> 2, data, mem_mask ); dma_regs->dtadr[(offset - (0x200 >> 2)) >> 2] = data & 0xfffffffc; break; case PXA255_DCMD0: case PXA255_DCMD1: case PXA255_DCMD2: case PXA255_DCMD3: case PXA255_DCMD4: case PXA255_DCMD5: case PXA255_DCMD6: case PXA255_DCMD7: case PXA255_DCMD8: case PXA255_DCMD9: case PXA255_DCMD10: case PXA255_DCMD11: case PXA255_DCMD12: case PXA255_DCMD13: case PXA255_DCMD14: case PXA255_DCMD15: - verboselog( machine(), 3, "pxa255_dma_w: DMA Command Register %d: %08x & %08x\n", (offset - (0x200 >> 2)) >> 2, data, mem_mask ); + verboselog(*this, 3, "pxa255_dma_w: DMA Command Register %d: %08x & %08x\n", (offset - (0x200 >> 2)) >> 2, data, mem_mask ); dma_regs->dcmd[(offset - (0x200 >> 2)) >> 2] = data & 0xf067dfff; break; default: - verboselog( machine(), 0, "pxa255_dma_w: Unknown address: %08x = %08x & %08x\n", PXA255_DMA_BASE_ADDR | (offset << 2), data, mem_mask); + verboselog(*this, 0, "pxa255_dma_w: Unknown address: %08x = %08x & %08x\n", PXA255_DMA_BASE_ADDR | (offset << 2), data, mem_mask); break; } } @@ -574,7 +574,7 @@ TIMER_CALLBACK_MEMBER(_39in1_state::pxa255_ostimer_match) { PXA255_OSTMR_Regs *ostimer_regs = &m_ostimer_regs; - if (0) verboselog(machine(), 3, "pxa255_ostimer_match channel %d\n", param); + if (0) verboselog(*this, 3, "pxa255_ostimer_match channel %d\n", param); ostimer_regs->ossr |= (1 << param); ostimer_regs->oscr = ostimer_regs->osmr[param]; pxa255_ostimer_irq_check(); @@ -587,33 +587,33 @@ READ32_MEMBER(_39in1_state::pxa255_ostimer_r) switch(PXA255_OSTMR_BASE_ADDR | (offset << 2)) { case PXA255_OSMR0: - if (0) verboselog( machine(), 3, "pxa255_ostimer_r: OS Timer Match Register 0: %08x & %08x\n", ostimer_regs->osmr[0], mem_mask ); + if (0) verboselog(*this, 3, "pxa255_ostimer_r: OS Timer Match Register 0: %08x & %08x\n", ostimer_regs->osmr[0], mem_mask ); return ostimer_regs->osmr[0]; case PXA255_OSMR1: - if (0) verboselog( machine(), 3, "pxa255_ostimer_r: OS Timer Match Register 1: %08x & %08x\n", ostimer_regs->osmr[1], mem_mask ); + if (0) verboselog(*this, 3, "pxa255_ostimer_r: OS Timer Match Register 1: %08x & %08x\n", ostimer_regs->osmr[1], mem_mask ); return ostimer_regs->osmr[1]; case PXA255_OSMR2: - if (0) verboselog( machine(), 3, "pxa255_ostimer_r: OS Timer Match Register 2: %08x & %08x\n", ostimer_regs->osmr[2], mem_mask ); + if (0) verboselog(*this, 3, "pxa255_ostimer_r: OS Timer Match Register 2: %08x & %08x\n", ostimer_regs->osmr[2], mem_mask ); return ostimer_regs->osmr[2]; case PXA255_OSMR3: - if (0) verboselog( machine(), 3, "pxa255_ostimer_r: OS Timer Match Register 3: %08x & %08x\n", ostimer_regs->osmr[3], mem_mask ); + if (0) verboselog(*this, 3, "pxa255_ostimer_r: OS Timer Match Register 3: %08x & %08x\n", ostimer_regs->osmr[3], mem_mask ); return ostimer_regs->osmr[3]; case PXA255_OSCR: - if (0) verboselog( machine(), 4, "pxa255_ostimer_r: OS Timer Count Register: %08x & %08x\n", ostimer_regs->oscr, mem_mask ); + if (0) verboselog(*this, 4, "pxa255_ostimer_r: OS Timer Count Register: %08x & %08x\n", ostimer_regs->oscr, mem_mask ); // free-running 3.something MHz counter. this is a complete hack. ostimer_regs->oscr += 0x300; return ostimer_regs->oscr; case PXA255_OSSR: - if (0) verboselog( machine(), 3, "pxa255_ostimer_r: OS Timer Status Register: %08x & %08x\n", ostimer_regs->ossr, mem_mask ); + if (0) verboselog(*this, 3, "pxa255_ostimer_r: OS Timer Status Register: %08x & %08x\n", ostimer_regs->ossr, mem_mask ); return ostimer_regs->ossr; case PXA255_OWER: - if (0) verboselog( machine(), 3, "pxa255_ostimer_r: OS Timer Watchdog Match Enable Register: %08x & %08x\n", ostimer_regs->ower, mem_mask ); + if (0) verboselog(*this, 3, "pxa255_ostimer_r: OS Timer Watchdog Match Enable Register: %08x & %08x\n", ostimer_regs->ower, mem_mask ); return ostimer_regs->ower; case PXA255_OIER: - if (0) verboselog( machine(), 3, "pxa255_ostimer_r: OS Timer Interrupt Enable Register: %08x & %08x\n", ostimer_regs->oier, mem_mask ); + if (0) verboselog(*this, 3, "pxa255_ostimer_r: OS Timer Interrupt Enable Register: %08x & %08x\n", ostimer_regs->oier, mem_mask ); return ostimer_regs->oier; default: - if (0) verboselog( machine(), 0, "pxa255_ostimer_r: Unknown address: %08x\n", PXA255_OSTMR_BASE_ADDR | (offset << 2)); + if (0) verboselog(*this, 0, "pxa255_ostimer_r: Unknown address: %08x\n", PXA255_OSTMR_BASE_ADDR | (offset << 2)); break; } return 0; @@ -626,7 +626,7 @@ WRITE32_MEMBER(_39in1_state::pxa255_ostimer_w) switch(PXA255_OSTMR_BASE_ADDR | (offset << 2)) { case PXA255_OSMR0: - if (0) verboselog( machine(), 3, "pxa255_ostimer_w: OS Timer Match Register 0: %08x & %08x\n", data, mem_mask ); + if (0) verboselog(*this, 3, "pxa255_ostimer_w: OS Timer Match Register 0: %08x & %08x\n", data, mem_mask ); ostimer_regs->osmr[0] = data; if(ostimer_regs->oier & PXA255_OIER_E0) { @@ -637,7 +637,7 @@ WRITE32_MEMBER(_39in1_state::pxa255_ostimer_w) } break; case PXA255_OSMR1: - if (0) verboselog( machine(), 3, "pxa255_ostimer_w: OS Timer Match Register 1: %08x & %08x\n", data, mem_mask ); + if (0) verboselog(*this, 3, "pxa255_ostimer_w: OS Timer Match Register 1: %08x & %08x\n", data, mem_mask ); ostimer_regs->osmr[1] = data; if(ostimer_regs->oier & PXA255_OIER_E1) { @@ -647,7 +647,7 @@ WRITE32_MEMBER(_39in1_state::pxa255_ostimer_w) } break; case PXA255_OSMR2: - if (0) verboselog( machine(), 3, "pxa255_ostimer_w: OS Timer Match Register 2: %08x & %08x\n", data, mem_mask ); + if (0) verboselog(*this, 3, "pxa255_ostimer_w: OS Timer Match Register 2: %08x & %08x\n", data, mem_mask ); ostimer_regs->osmr[2] = data; if(ostimer_regs->oier & PXA255_OIER_E2) { @@ -657,7 +657,7 @@ WRITE32_MEMBER(_39in1_state::pxa255_ostimer_w) } break; case PXA255_OSMR3: - if (0) verboselog( machine(), 3, "pxa255_ostimer_w: OS Timer Match Register 3: %08x & %08x\n", data, mem_mask ); + if (0) verboselog(*this, 3, "pxa255_ostimer_w: OS Timer Match Register 3: %08x & %08x\n", data, mem_mask ); ostimer_regs->osmr[3] = data; if(ostimer_regs->oier & PXA255_OIER_E3) { @@ -667,22 +667,22 @@ WRITE32_MEMBER(_39in1_state::pxa255_ostimer_w) } break; case PXA255_OSCR: - if (0) verboselog( machine(), 3, "pxa255_ostimer_w: OS Timer Count Register: %08x & %08x\n", data, mem_mask ); + if (0) verboselog(*this, 3, "pxa255_ostimer_w: OS Timer Count Register: %08x & %08x\n", data, mem_mask ); ostimer_regs->oscr = data; break; case PXA255_OSSR: - if (0) verboselog( machine(), 3, "pxa255_ostimer_w: OS Timer Status Register: %08x & %08x\n", data, mem_mask ); + if (0) verboselog(*this, 3, "pxa255_ostimer_w: OS Timer Status Register: %08x & %08x\n", data, mem_mask ); ostimer_regs->ossr &= ~data; pxa255_ostimer_irq_check(); break; case PXA255_OWER: - if (0) verboselog( machine(), 3, "pxa255_ostimer_w: OS Timer Watchdog Enable Register: %08x & %08x\n", data, mem_mask ); + if (0) verboselog(*this, 3, "pxa255_ostimer_w: OS Timer Watchdog Enable Register: %08x & %08x\n", data, mem_mask ); ostimer_regs->ower = data & 0x00000001; break; case PXA255_OIER: { int index = 0; - if (0) verboselog( machine(), 3, "pxa255_ostimer_w: OS Timer Interrupt Enable Register: %08x & %08x\n", data, mem_mask ); + if (0) verboselog(*this, 3, "pxa255_ostimer_w: OS Timer Interrupt Enable Register: %08x & %08x\n", data, mem_mask ); ostimer_regs->oier = data & 0x0000000f; for(index = 0; index < 4; index++) { @@ -697,7 +697,7 @@ WRITE32_MEMBER(_39in1_state::pxa255_ostimer_w) break; } default: - verboselog( machine(), 0, "pxa255_ostimer_w: Unknown address: %08x = %08x & %08x\n", PXA255_OSTMR_BASE_ADDR | (offset << 2), data, mem_mask); + verboselog(*this, 0, "pxa255_ostimer_w: Unknown address: %08x = %08x & %08x\n", PXA255_OSTMR_BASE_ADDR | (offset << 2), data, mem_mask); break; } } @@ -737,25 +737,25 @@ READ32_MEMBER(_39in1_state::pxa255_intc_r) switch(PXA255_INTC_BASE_ADDR | (offset << 2)) { case PXA255_ICIP: - if (0) verboselog( machine(), 3, "pxa255_intc_r: Interrupt Controller IRQ Pending Register: %08x & %08x\n", intc_regs->icip, mem_mask ); + if (0) verboselog(*this, 3, "pxa255_intc_r: Interrupt Controller IRQ Pending Register: %08x & %08x\n", intc_regs->icip, mem_mask ); return intc_regs->icip; case PXA255_ICMR: - if (0) verboselog( machine(), 3, "pxa255_intc_r: Interrupt Controller Mask Register: %08x & %08x\n", intc_regs->icmr, mem_mask ); + if (0) verboselog(*this, 3, "pxa255_intc_r: Interrupt Controller Mask Register: %08x & %08x\n", intc_regs->icmr, mem_mask ); return intc_regs->icmr; case PXA255_ICLR: - if (0) verboselog( machine(), 3, "pxa255_intc_r: Interrupt Controller Level Register: %08x & %08x\n", intc_regs->iclr, mem_mask ); + if (0) verboselog(*this, 3, "pxa255_intc_r: Interrupt Controller Level Register: %08x & %08x\n", intc_regs->iclr, mem_mask ); return intc_regs->iclr; case PXA255_ICFP: - if (0) verboselog( machine(), 3, "pxa255_intc_r: Interrupt Controller FIQ Pending Register: %08x & %08x\n", intc_regs->icfp, mem_mask ); + if (0) verboselog(*this, 3, "pxa255_intc_r: Interrupt Controller FIQ Pending Register: %08x & %08x\n", intc_regs->icfp, mem_mask ); return intc_regs->icfp; case PXA255_ICPR: - if (0) verboselog( machine(), 3, "pxa255_intc_r: Interrupt Controller Pending Register: %08x & %08x\n", intc_regs->icpr, mem_mask ); + if (0) verboselog(*this, 3, "pxa255_intc_r: Interrupt Controller Pending Register: %08x & %08x\n", intc_regs->icpr, mem_mask ); return intc_regs->icpr; case PXA255_ICCR: - if (0) verboselog( machine(), 3, "pxa255_intc_r: Interrupt Controller Control Register: %08x & %08x\n", intc_regs->iccr, mem_mask ); + if (0) verboselog(*this, 3, "pxa255_intc_r: Interrupt Controller Control Register: %08x & %08x\n", intc_regs->iccr, mem_mask ); return intc_regs->iccr; default: - verboselog( machine(), 0, "pxa255_intc_r: Unknown address: %08x\n", PXA255_INTC_BASE_ADDR | (offset << 2)); + verboselog(*this, 0, "pxa255_intc_r: Unknown address: %08x\n", PXA255_INTC_BASE_ADDR | (offset << 2)); break; } return 0; @@ -768,28 +768,28 @@ WRITE32_MEMBER(_39in1_state::pxa255_intc_w) switch(PXA255_INTC_BASE_ADDR | (offset << 2)) { case PXA255_ICIP: - verboselog( machine(), 3, "pxa255_intc_w: (Invalid Write) Interrupt Controller IRQ Pending Register: %08x & %08x\n", data, mem_mask ); + verboselog(*this, 3, "pxa255_intc_w: (Invalid Write) Interrupt Controller IRQ Pending Register: %08x & %08x\n", data, mem_mask ); break; case PXA255_ICMR: - if (0) verboselog( machine(), 3, "pxa255_intc_w: Interrupt Controller Mask Register: %08x & %08x\n", data, mem_mask ); + if (0) verboselog(*this, 3, "pxa255_intc_w: Interrupt Controller Mask Register: %08x & %08x\n", data, mem_mask ); intc_regs->icmr = data & 0xfffe7f00; break; case PXA255_ICLR: - if (0) verboselog( machine(), 3, "pxa255_intc_w: Interrupt Controller Level Register: %08x & %08x\n", data, mem_mask ); + if (0) verboselog(*this, 3, "pxa255_intc_w: Interrupt Controller Level Register: %08x & %08x\n", data, mem_mask ); intc_regs->iclr = data & 0xfffe7f00; break; case PXA255_ICFP: - if (0) verboselog( machine(), 3, "pxa255_intc_w: (Invalid Write) Interrupt Controller FIQ Pending Register: %08x & %08x\n", data, mem_mask ); + if (0) verboselog(*this, 3, "pxa255_intc_w: (Invalid Write) Interrupt Controller FIQ Pending Register: %08x & %08x\n", data, mem_mask ); break; case PXA255_ICPR: - if (0) verboselog( machine(), 3, "pxa255_intc_w: (Invalid Write) Interrupt Controller Pending Register: %08x & %08x\n", data, mem_mask ); + if (0) verboselog(*this, 3, "pxa255_intc_w: (Invalid Write) Interrupt Controller Pending Register: %08x & %08x\n", data, mem_mask ); break; case PXA255_ICCR: - if (0) verboselog( machine(), 3, "pxa255_intc_w: Interrupt Controller Control Register: %08x & %08x\n", data, mem_mask ); + if (0) verboselog(*this, 3, "pxa255_intc_w: Interrupt Controller Control Register: %08x & %08x\n", data, mem_mask ); intc_regs->iccr = data & 0x00000001; break; default: - verboselog( machine(), 0, "pxa255_intc_w: Unknown address: %08x = %08x & %08x\n", PXA255_INTC_BASE_ADDR | (offset << 2), data, mem_mask); + verboselog(*this, 0, "pxa255_intc_w: Unknown address: %08x = %08x & %08x\n", PXA255_INTC_BASE_ADDR | (offset << 2), data, mem_mask); break; } } @@ -809,91 +809,91 @@ READ32_MEMBER(_39in1_state::pxa255_gpio_r) switch(PXA255_GPIO_BASE_ADDR | (offset << 2)) { case PXA255_GPLR0: - verboselog( machine(), 3, "pxa255_gpio_r: GPIO Pin-Level Register 0: %08x & %08x\n", gpio_regs->gplr0 | (1 << 1), mem_mask ); + verboselog(*this, 3, "pxa255_gpio_r: GPIO Pin-Level Register 0: %08x & %08x\n", gpio_regs->gplr0 | (1 << 1), mem_mask ); return gpio_regs->gplr0 | (1 << 1) | (m_eeprom->do_read() << 5); // Must be on. Probably a DIP switch. case PXA255_GPLR1: - verboselog( machine(), 3, "pxa255_gpio_r: *Not Yet Implemented* GPIO Pin-Level Register 1: %08x & %08x\n", gpio_regs->gplr1, mem_mask ); + verboselog(*this, 3, "pxa255_gpio_r: *Not Yet Implemented* GPIO Pin-Level Register 1: %08x & %08x\n", gpio_regs->gplr1, mem_mask ); return 0xff9fffff; /* 0x200000 = flip screen */ case PXA255_GPLR2: - verboselog( machine(), 3, "pxa255_gpio_r: *Not Yet Implemented* GPIO Pin-Level Register 2: %08x & %08x\n", gpio_regs->gplr2, mem_mask ); + verboselog(*this, 3, "pxa255_gpio_r: *Not Yet Implemented* GPIO Pin-Level Register 2: %08x & %08x\n", gpio_regs->gplr2, mem_mask ); return gpio_regs->gplr2; case PXA255_GPDR0: - verboselog( machine(), 3, "pxa255_gpio_r: GPIO Pin Direction Register 0: %08x & %08x\n", gpio_regs->gpdr0, mem_mask ); + verboselog(*this, 3, "pxa255_gpio_r: GPIO Pin Direction Register 0: %08x & %08x\n", gpio_regs->gpdr0, mem_mask ); return gpio_regs->gpdr0; case PXA255_GPDR1: - verboselog( machine(), 3, "pxa255_gpio_r: GPIO Pin Direction Register 1: %08x & %08x\n", gpio_regs->gpdr1, mem_mask ); + verboselog(*this, 3, "pxa255_gpio_r: GPIO Pin Direction Register 1: %08x & %08x\n", gpio_regs->gpdr1, mem_mask ); return gpio_regs->gpdr1; case PXA255_GPDR2: - verboselog( machine(), 3, "pxa255_gpio_r: GPIO Pin Direction Register 2: %08x & %08x\n", gpio_regs->gpdr2, mem_mask ); + verboselog(*this, 3, "pxa255_gpio_r: GPIO Pin Direction Register 2: %08x & %08x\n", gpio_regs->gpdr2, mem_mask ); return gpio_regs->gpdr2; case PXA255_GPSR0: - verboselog( machine(), 3, "pxa255_gpio_r: (Invalid Read) GPIO Pin Output Set Register 0: %08x & %08x\n", machine().rand(), mem_mask ); + verboselog(*this, 3, "pxa255_gpio_r: (Invalid Read) GPIO Pin Output Set Register 0: %08x & %08x\n", machine().rand(), mem_mask ); return machine().rand(); case PXA255_GPSR1: - verboselog( machine(), 3, "pxa255_gpio_r: (Invalid Read) GPIO Pin Output Set Register 1: %08x & %08x\n", machine().rand(), mem_mask ); + verboselog(*this, 3, "pxa255_gpio_r: (Invalid Read) GPIO Pin Output Set Register 1: %08x & %08x\n", machine().rand(), mem_mask ); return machine().rand(); case PXA255_GPSR2: - verboselog( machine(), 3, "pxa255_gpio_r: (Invalid Read) GPIO Pin Output Set Register 2: %08x & %08x\n", machine().rand(), mem_mask ); + verboselog(*this, 3, "pxa255_gpio_r: (Invalid Read) GPIO Pin Output Set Register 2: %08x & %08x\n", machine().rand(), mem_mask ); return machine().rand(); case PXA255_GPCR0: - verboselog( machine(), 3, "pxa255_gpio_r: (Invalid Read) GPIO Pin Output Clear Register 0: %08x & %08x\n", machine().rand(), mem_mask ); + verboselog(*this, 3, "pxa255_gpio_r: (Invalid Read) GPIO Pin Output Clear Register 0: %08x & %08x\n", machine().rand(), mem_mask ); return machine().rand(); case PXA255_GPCR1: - verboselog( machine(), 3, "pxa255_gpio_r: (Invalid Read) GPIO Pin Output Clear Register 1: %08x & %08x\n", machine().rand(), mem_mask ); + verboselog(*this, 3, "pxa255_gpio_r: (Invalid Read) GPIO Pin Output Clear Register 1: %08x & %08x\n", machine().rand(), mem_mask ); return machine().rand(); case PXA255_GPCR2: - verboselog( machine(), 3, "pxa255_gpio_r: (Invalid Read) GPIO Pin Output Clear Register 2: %08x & %08x\n", machine().rand(), mem_mask ); + verboselog(*this, 3, "pxa255_gpio_r: (Invalid Read) GPIO Pin Output Clear Register 2: %08x & %08x\n", machine().rand(), mem_mask ); return machine().rand(); case PXA255_GRER0: - verboselog( machine(), 3, "pxa255_gpio_r: GPIO Rising Edge Detect Enable Register 0: %08x & %08x\n", gpio_regs->grer0, mem_mask ); + verboselog(*this, 3, "pxa255_gpio_r: GPIO Rising Edge Detect Enable Register 0: %08x & %08x\n", gpio_regs->grer0, mem_mask ); return gpio_regs->grer0; case PXA255_GRER1: - verboselog( machine(), 3, "pxa255_gpio_r: GPIO Rising Edge Detect Enable Register 1: %08x & %08x\n", gpio_regs->grer1, mem_mask ); + verboselog(*this, 3, "pxa255_gpio_r: GPIO Rising Edge Detect Enable Register 1: %08x & %08x\n", gpio_regs->grer1, mem_mask ); return gpio_regs->grer1; case PXA255_GRER2: - verboselog( machine(), 3, "pxa255_gpio_r: GPIO Rising Edge Detect Enable Register 2: %08x & %08x\n", gpio_regs->grer2, mem_mask ); + verboselog(*this, 3, "pxa255_gpio_r: GPIO Rising Edge Detect Enable Register 2: %08x & %08x\n", gpio_regs->grer2, mem_mask ); return gpio_regs->grer2; case PXA255_GFER0: - verboselog( machine(), 3, "pxa255_gpio_r: GPIO Falling Edge Detect Enable Register 0: %08x & %08x\n", gpio_regs->gfer0, mem_mask ); + verboselog(*this, 3, "pxa255_gpio_r: GPIO Falling Edge Detect Enable Register 0: %08x & %08x\n", gpio_regs->gfer0, mem_mask ); return gpio_regs->gfer0; case PXA255_GFER1: - verboselog( machine(), 3, "pxa255_gpio_r: GPIO Falling Edge Detect Enable Register 1: %08x & %08x\n", gpio_regs->gfer1, mem_mask ); + verboselog(*this, 3, "pxa255_gpio_r: GPIO Falling Edge Detect Enable Register 1: %08x & %08x\n", gpio_regs->gfer1, mem_mask ); return gpio_regs->gfer1; case PXA255_GFER2: - verboselog( machine(), 3, "pxa255_gpio_r: GPIO Falling Edge Detect Enable Register 2: %08x & %08x\n", gpio_regs->gfer2, mem_mask ); + verboselog(*this, 3, "pxa255_gpio_r: GPIO Falling Edge Detect Enable Register 2: %08x & %08x\n", gpio_regs->gfer2, mem_mask ); return gpio_regs->gfer2; case PXA255_GEDR0: - verboselog( machine(), 3, "pxa255_gpio_r: GPIO Edge Detect Status Register 0: %08x & %08x\n", gpio_regs->gedr0, mem_mask ); + verboselog(*this, 3, "pxa255_gpio_r: GPIO Edge Detect Status Register 0: %08x & %08x\n", gpio_regs->gedr0, mem_mask ); return gpio_regs->gedr0; case PXA255_GEDR1: - verboselog( machine(), 3, "pxa255_gpio_r: GPIO Edge Detect Status Register 1: %08x & %08x\n", gpio_regs->gedr1, mem_mask ); + verboselog(*this, 3, "pxa255_gpio_r: GPIO Edge Detect Status Register 1: %08x & %08x\n", gpio_regs->gedr1, mem_mask ); return gpio_regs->gedr1; case PXA255_GEDR2: - verboselog( machine(), 3, "pxa255_gpio_r: GPIO Edge Detect Status Register 2: %08x & %08x\n", gpio_regs->gedr2, mem_mask ); + verboselog(*this, 3, "pxa255_gpio_r: GPIO Edge Detect Status Register 2: %08x & %08x\n", gpio_regs->gedr2, mem_mask ); return gpio_regs->gedr2; case PXA255_GAFR0_L: - verboselog( machine(), 3, "pxa255_gpio_r: GPIO Alternate Function Register 0 Lower: %08x & %08x\n", gpio_regs->gafr0l, mem_mask ); + verboselog(*this, 3, "pxa255_gpio_r: GPIO Alternate Function Register 0 Lower: %08x & %08x\n", gpio_regs->gafr0l, mem_mask ); return gpio_regs->gafr0l; case PXA255_GAFR0_U: - verboselog( machine(), 3, "pxa255_gpio_r: GPIO Alternate Function Register 0 Upper: %08x & %08x\n", gpio_regs->gafr0u, mem_mask ); + verboselog(*this, 3, "pxa255_gpio_r: GPIO Alternate Function Register 0 Upper: %08x & %08x\n", gpio_regs->gafr0u, mem_mask ); return gpio_regs->gafr0u; case PXA255_GAFR1_L: - verboselog( machine(), 3, "pxa255_gpio_r: GPIO Alternate Function Register 1 Lower: %08x & %08x\n", gpio_regs->gafr1l, mem_mask ); + verboselog(*this, 3, "pxa255_gpio_r: GPIO Alternate Function Register 1 Lower: %08x & %08x\n", gpio_regs->gafr1l, mem_mask ); return gpio_regs->gafr1l; case PXA255_GAFR1_U: - verboselog( machine(), 3, "pxa255_gpio_r: GPIO Alternate Function Register 1 Upper: %08x & %08x\n", gpio_regs->gafr1u, mem_mask ); + verboselog(*this, 3, "pxa255_gpio_r: GPIO Alternate Function Register 1 Upper: %08x & %08x\n", gpio_regs->gafr1u, mem_mask ); return gpio_regs->gafr1u; case PXA255_GAFR2_L: - verboselog( machine(), 3, "pxa255_gpio_r: GPIO Alternate Function Register 2 Lower: %08x & %08x\n", gpio_regs->gafr2l, mem_mask ); + verboselog(*this, 3, "pxa255_gpio_r: GPIO Alternate Function Register 2 Lower: %08x & %08x\n", gpio_regs->gafr2l, mem_mask ); return gpio_regs->gafr2l; case PXA255_GAFR2_U: - verboselog( machine(), 3, "pxa255_gpio_r: GPIO Alternate Function Register 2 Upper: %08x & %08x\n", gpio_regs->gafr2u, mem_mask ); + verboselog(*this, 3, "pxa255_gpio_r: GPIO Alternate Function Register 2 Upper: %08x & %08x\n", gpio_regs->gafr2u, mem_mask ); return gpio_regs->gafr2u; default: - verboselog( machine(), 0, "pxa255_gpio_r: Unknown address: %08x\n", PXA255_GPIO_BASE_ADDR | (offset << 2)); + verboselog(*this, 0, "pxa255_gpio_r: Unknown address: %08x\n", PXA255_GPIO_BASE_ADDR | (offset << 2)); break; } return 0; @@ -906,28 +906,28 @@ WRITE32_MEMBER(_39in1_state::pxa255_gpio_w) switch(PXA255_GPIO_BASE_ADDR | (offset << 2)) { case PXA255_GPLR0: - verboselog( machine(), 3, "pxa255_gpio_w: (Invalid Write) GPIO Pin-Level Register 0: %08x & %08x\n", data, mem_mask ); + verboselog(*this, 3, "pxa255_gpio_w: (Invalid Write) GPIO Pin-Level Register 0: %08x & %08x\n", data, mem_mask ); break; case PXA255_GPLR1: - verboselog( machine(), 3, "pxa255_gpio_w: (Invalid Write) GPIO Pin-Level Register 1: %08x & %08x\n", data, mem_mask ); + verboselog(*this, 3, "pxa255_gpio_w: (Invalid Write) GPIO Pin-Level Register 1: %08x & %08x\n", data, mem_mask ); break; case PXA255_GPLR2: - verboselog( machine(), 3, "pxa255_gpio_w: (Invalid Write) GPIO Pin-Level Register 2: %08x & %08x\n", data, mem_mask ); + verboselog(*this, 3, "pxa255_gpio_w: (Invalid Write) GPIO Pin-Level Register 2: %08x & %08x\n", data, mem_mask ); break; case PXA255_GPDR0: - verboselog( machine(), 3, "pxa255_gpio_w: GPIO Pin Direction Register 0: %08x & %08x\n", data, mem_mask ); + verboselog(*this, 3, "pxa255_gpio_w: GPIO Pin Direction Register 0: %08x & %08x\n", data, mem_mask ); gpio_regs->gpdr0 = data; break; case PXA255_GPDR1: - verboselog( machine(), 3, "pxa255_gpio_w: GPIO Pin Direction Register 1: %08x & %08x\n", data, mem_mask ); + verboselog(*this, 3, "pxa255_gpio_w: GPIO Pin Direction Register 1: %08x & %08x\n", data, mem_mask ); gpio_regs->gpdr1 = data; break; case PXA255_GPDR2: - verboselog( machine(), 3, "pxa255_gpio_w: GPIO Pin Direction Register 2: %08x & %08x\n", data, mem_mask ); + verboselog(*this, 3, "pxa255_gpio_w: GPIO Pin Direction Register 2: %08x & %08x\n", data, mem_mask ); gpio_regs->gpdr2 = data; break; case PXA255_GPSR0: - verboselog( machine(), 3, "pxa255_gpio_w: GPIO Pin Output Set Register 0: %08x & %08x\n", data, mem_mask ); + verboselog(*this, 3, "pxa255_gpio_w: GPIO Pin Output Set Register 0: %08x & %08x\n", data, mem_mask ); gpio_regs->gpsr0 |= data & gpio_regs->gpdr0; if(data & 0x00000004) { @@ -943,15 +943,15 @@ WRITE32_MEMBER(_39in1_state::pxa255_gpio_w) } break; case PXA255_GPSR1: - verboselog( machine(), 3, "pxa255_gpio_w: GPIO Pin Output Set Register 1: %08x & %08x\n", data, mem_mask ); + verboselog(*this, 3, "pxa255_gpio_w: GPIO Pin Output Set Register 1: %08x & %08x\n", data, mem_mask ); gpio_regs->gpsr1 |= data & gpio_regs->gpdr1; break; case PXA255_GPSR2: - verboselog( machine(), 3, "pxa255_gpio_w: GPIO Pin Output Set Register 2: %08x & %08x\n", data, mem_mask ); + verboselog(*this, 3, "pxa255_gpio_w: GPIO Pin Output Set Register 2: %08x & %08x\n", data, mem_mask ); gpio_regs->gpsr2 |= data & gpio_regs->gpdr2; break; case PXA255_GPCR0: - verboselog( machine(), 3, "pxa255_gpio_w: GPIO Pin Output Clear Register 0: %08x & %08x\n", data, mem_mask ); + verboselog(*this, 3, "pxa255_gpio_w: GPIO Pin Output Clear Register 0: %08x & %08x\n", data, mem_mask ); gpio_regs->gpsr0 &= ~(data & gpio_regs->gpdr0); if(data & 0x00000004) { @@ -967,75 +967,75 @@ WRITE32_MEMBER(_39in1_state::pxa255_gpio_w) } break; case PXA255_GPCR1: - verboselog( machine(), 3, "pxa255_gpio_w: GPIO Pin Output Clear Register 1: %08x & %08x\n", data, mem_mask ); + verboselog(*this, 3, "pxa255_gpio_w: GPIO Pin Output Clear Register 1: %08x & %08x\n", data, mem_mask ); gpio_regs->gpsr1 &= ~(data & gpio_regs->gpdr1); break; case PXA255_GPCR2: - verboselog( machine(), 3, "pxa255_gpio_w: GPIO Pin Output Clear Register 2: %08x & %08x\n", data, mem_mask ); + verboselog(*this, 3, "pxa255_gpio_w: GPIO Pin Output Clear Register 2: %08x & %08x\n", data, mem_mask ); gpio_regs->gpsr2 &= ~(data & gpio_regs->gpdr2); break; case PXA255_GRER0: - verboselog( machine(), 3, "pxa255_gpio_w: GPIO Rising Edge Detect Enable Register 0: %08x & %08x\n", data, mem_mask ); + verboselog(*this, 3, "pxa255_gpio_w: GPIO Rising Edge Detect Enable Register 0: %08x & %08x\n", data, mem_mask ); gpio_regs->grer0 = data; break; case PXA255_GRER1: - verboselog( machine(), 3, "pxa255_gpio_w: GPIO Rising Edge Detect Enable Register 1: %08x & %08x\n", data, mem_mask ); + verboselog(*this, 3, "pxa255_gpio_w: GPIO Rising Edge Detect Enable Register 1: %08x & %08x\n", data, mem_mask ); gpio_regs->grer1 = data; break; case PXA255_GRER2: - verboselog( machine(), 3, "pxa255_gpio_w: GPIO Rising Edge Detect Enable Register 2: %08x & %08x\n", data, mem_mask ); + verboselog(*this, 3, "pxa255_gpio_w: GPIO Rising Edge Detect Enable Register 2: %08x & %08x\n", data, mem_mask ); gpio_regs->grer2 = data; break; case PXA255_GFER0: - verboselog( machine(), 3, "pxa255_gpio_w: GPIO Falling Edge Detect Enable Register 0: %08x & %08x\n", data, mem_mask ); + verboselog(*this, 3, "pxa255_gpio_w: GPIO Falling Edge Detect Enable Register 0: %08x & %08x\n", data, mem_mask ); gpio_regs->gfer0 = data; break; case PXA255_GFER1: - verboselog( machine(), 3, "pxa255_gpio_w: GPIO Falling Edge Detect Enable Register 1: %08x & %08x\n", data, mem_mask ); + verboselog(*this, 3, "pxa255_gpio_w: GPIO Falling Edge Detect Enable Register 1: %08x & %08x\n", data, mem_mask ); gpio_regs->gfer1 = data; break; case PXA255_GFER2: - verboselog( machine(), 3, "pxa255_gpio_w: GPIO Falling Edge Detect Enable Register 2: %08x & %08x\n", data, mem_mask ); + verboselog(*this, 3, "pxa255_gpio_w: GPIO Falling Edge Detect Enable Register 2: %08x & %08x\n", data, mem_mask ); gpio_regs->gfer2 = data; break; case PXA255_GEDR0: - verboselog( machine(), 3, "pxa255_gpio_w: GPIO Edge Detect Status Register 0: %08x & %08x\n", gpio_regs->gedr0, mem_mask ); + verboselog(*this, 3, "pxa255_gpio_w: GPIO Edge Detect Status Register 0: %08x & %08x\n", gpio_regs->gedr0, mem_mask ); gpio_regs->gedr0 &= ~data; break; case PXA255_GEDR1: - verboselog( machine(), 3, "pxa255_gpio_w: GPIO Edge Detect Status Register 1: %08x & %08x\n", gpio_regs->gedr1, mem_mask ); + verboselog(*this, 3, "pxa255_gpio_w: GPIO Edge Detect Status Register 1: %08x & %08x\n", gpio_regs->gedr1, mem_mask ); gpio_regs->gedr1 &= ~data; break; case PXA255_GEDR2: - verboselog( machine(), 3, "pxa255_gpio_w: GPIO Edge Detect Status Register 2: %08x & %08x\n", gpio_regs->gedr2, mem_mask ); + verboselog(*this, 3, "pxa255_gpio_w: GPIO Edge Detect Status Register 2: %08x & %08x\n", gpio_regs->gedr2, mem_mask ); gpio_regs->gedr2 &= ~data; break; case PXA255_GAFR0_L: - verboselog( machine(), 3, "pxa255_gpio_w: GPIO Alternate Function Register 0 Lower: %08x & %08x\n", gpio_regs->gafr0l, mem_mask ); + verboselog(*this, 3, "pxa255_gpio_w: GPIO Alternate Function Register 0 Lower: %08x & %08x\n", gpio_regs->gafr0l, mem_mask ); gpio_regs->gafr0l = data; break; case PXA255_GAFR0_U: - verboselog( machine(), 3, "pxa255_gpio_w: GPIO Alternate Function Register 0 Upper: %08x & %08x\n", gpio_regs->gafr0u, mem_mask ); + verboselog(*this, 3, "pxa255_gpio_w: GPIO Alternate Function Register 0 Upper: %08x & %08x\n", gpio_regs->gafr0u, mem_mask ); gpio_regs->gafr0u = data; break; case PXA255_GAFR1_L: - verboselog( machine(), 3, "pxa255_gpio_w: GPIO Alternate Function Register 1 Lower: %08x & %08x\n", gpio_regs->gafr1l, mem_mask ); + verboselog(*this, 3, "pxa255_gpio_w: GPIO Alternate Function Register 1 Lower: %08x & %08x\n", gpio_regs->gafr1l, mem_mask ); gpio_regs->gafr1l = data; break; case PXA255_GAFR1_U: - verboselog( machine(), 3, "pxa255_gpio_w: GPIO Alternate Function Register 1 Upper: %08x & %08x\n", gpio_regs->gafr1u, mem_mask ); + verboselog(*this, 3, "pxa255_gpio_w: GPIO Alternate Function Register 1 Upper: %08x & %08x\n", gpio_regs->gafr1u, mem_mask ); gpio_regs->gafr1u = data; break; case PXA255_GAFR2_L: - verboselog( machine(), 3, "pxa255_gpio_w: GPIO Alternate Function Register 2 Lower: %08x & %08x\n", gpio_regs->gafr2l, mem_mask ); + verboselog(*this, 3, "pxa255_gpio_w: GPIO Alternate Function Register 2 Lower: %08x & %08x\n", gpio_regs->gafr2l, mem_mask ); gpio_regs->gafr2l = data; break; case PXA255_GAFR2_U: - verboselog( machine(), 3, "pxa255_gpio_w: GPIO Alternate Function Register 2 Upper: %08x & %08x\n", gpio_regs->gafr2u, mem_mask ); + verboselog(*this, 3, "pxa255_gpio_w: GPIO Alternate Function Register 2 Upper: %08x & %08x\n", gpio_regs->gafr2u, mem_mask ); gpio_regs->gafr2u = data; break; default: - verboselog( machine(), 0, "pxa255_gpio_w: Unknown address: %08x = %08x & %08x\n", PXA255_GPIO_BASE_ADDR | (offset << 2), data, mem_mask); + verboselog(*this, 0, "pxa255_gpio_w: Unknown address: %08x = %08x & %08x\n", PXA255_GPIO_BASE_ADDR | (offset << 2), data, mem_mask); break; } } @@ -1056,11 +1056,11 @@ void _39in1_state::pxa255_lcd_load_dma_descriptor(address_space & space, UINT32 lcd_regs->dma[channel].fsadr = space.read_dword(address + 0x04); lcd_regs->dma[channel].fidr = space.read_dword(address + 0x08); lcd_regs->dma[channel].ldcmd = space.read_dword(address + 0x0c); - verboselog( space.machine(), 4, "pxa255_lcd_load_dma_descriptor, address = %08x, channel = %d\n", address, channel); - verboselog( space.machine(), 4, " DMA Frame Descriptor: %08x\n", lcd_regs->dma[channel].fdadr ); - verboselog( space.machine(), 4, " DMA Frame Source Address: %08x\n", lcd_regs->dma[channel].fsadr ); - verboselog( space.machine(), 4, " DMA Frame ID: %08x\n", lcd_regs->dma[channel].fidr ); - verboselog( space.machine(), 4, " DMA Command: %08x\n", lcd_regs->dma[channel].ldcmd ); + verboselog(*this, 4, "pxa255_lcd_load_dma_descriptor, address = %08x, channel = %d\n", address, channel); + verboselog(*this, 4, " DMA Frame Descriptor: %08x\n", lcd_regs->dma[channel].fdadr ); + verboselog(*this, 4, " DMA Frame Source Address: %08x\n", lcd_regs->dma[channel].fsadr ); + verboselog(*this, 4, " DMA Frame ID: %08x\n", lcd_regs->dma[channel].fidr ); + verboselog(*this, 4, " DMA Command: %08x\n", lcd_regs->dma[channel].ldcmd ); } void _39in1_state::pxa255_lcd_irq_check() @@ -1127,7 +1127,7 @@ void _39in1_state::pxa255_lcd_check_load_next_branch(int channel) if(lcd_regs->fbr[channel] & 1) { - verboselog( machine(), 4, "pxa255_lcd_check_load_next_branch: Taking branch\n" ); + verboselog(*this, 4, "pxa255_lcd_check_load_next_branch: Taking branch\n" ); lcd_regs->fbr[channel] &= ~1; address_space &space = m_maincpu->space(AS_PROGRAM); //lcd_regs->fbr[channel] = (space.read_dword(lcd_regs->fbr[channel] & 0xfffffff0) & 0xfffffff0) | (lcd_regs->fbr[channel] & 0x00000003); @@ -1146,7 +1146,7 @@ void _39in1_state::pxa255_lcd_check_load_next_branch(int channel) } else { - if (0) verboselog( machine(), 3, "pxa255_lcd_check_load_next_branch: Not taking branch\n" ); + if (0) verboselog(*this, 3, "pxa255_lcd_check_load_next_branch: Not taking branch\n" ); } } @@ -1154,7 +1154,7 @@ TIMER_CALLBACK_MEMBER(_39in1_state::pxa255_lcd_dma_eof) { PXA255_LCD_Regs *lcd_regs = &m_lcd_regs; - if (0) verboselog( machine(), 3, "End of frame callback\n" ); + if (0) verboselog(*this, 3, "End of frame callback\n" ); if(lcd_regs->dma[param].ldcmd & PXA255_LDCMD_EOFINT) { lcd_regs->liidr = lcd_regs->dma[param].fidr; @@ -1171,61 +1171,61 @@ READ32_MEMBER(_39in1_state::pxa255_lcd_r) switch(PXA255_LCD_BASE_ADDR | (offset << 2)) { case PXA255_LCCR0: // 0x44000000 - verboselog( machine(), 3, "pxa255_lcd_r: LCD Control 0: %08x & %08x\n", lcd_regs->lccr0, mem_mask ); + verboselog(*this, 3, "pxa255_lcd_r: LCD Control 0: %08x & %08x\n", lcd_regs->lccr0, mem_mask ); return lcd_regs->lccr0; case PXA255_LCCR1: // 0x44000004 - verboselog( machine(), 3, "pxa255_lcd_r: LCD Control 1: %08x & %08x\n", lcd_regs->lccr1, mem_mask ); + verboselog(*this, 3, "pxa255_lcd_r: LCD Control 1: %08x & %08x\n", lcd_regs->lccr1, mem_mask ); return lcd_regs->lccr1; case PXA255_LCCR2: // 0x44000008 - verboselog( machine(), 3, "pxa255_lcd_r: LCD Control 2: %08x & %08x\n", lcd_regs->lccr2, mem_mask ); + verboselog(*this, 3, "pxa255_lcd_r: LCD Control 2: %08x & %08x\n", lcd_regs->lccr2, mem_mask ); return lcd_regs->lccr2; case PXA255_LCCR3: // 0x4400000c - verboselog( machine(), 3, "pxa255_lcd_r: LCD Control 3: %08x & %08x\n", lcd_regs->lccr3, mem_mask ); + verboselog(*this, 3, "pxa255_lcd_r: LCD Control 3: %08x & %08x\n", lcd_regs->lccr3, mem_mask ); return lcd_regs->lccr3; case PXA255_FBR0: // 0x44000020 - verboselog( machine(), 4, "pxa255_lcd_r: LCD Frame Branch Register 0: %08x & %08x\n", lcd_regs->fbr[0], mem_mask ); + verboselog(*this, 4, "pxa255_lcd_r: LCD Frame Branch Register 0: %08x & %08x\n", lcd_regs->fbr[0], mem_mask ); return lcd_regs->fbr[0]; case PXA255_FBR1: // 0x44000024 - verboselog( machine(), 3, "pxa255_lcd_r: LCD Frame Branch Register 1: %08x & %08x\n", lcd_regs->fbr[1], mem_mask ); + verboselog(*this, 3, "pxa255_lcd_r: LCD Frame Branch Register 1: %08x & %08x\n", lcd_regs->fbr[1], mem_mask ); return lcd_regs->fbr[1]; case PXA255_LCSR: // 0x44000038 - verboselog( machine(), 4, "pxa255_lcd_r: LCD Status Register: %08x & %08x\n", lcd_regs->lcsr, mem_mask ); + verboselog(*this, 4, "pxa255_lcd_r: LCD Status Register: %08x & %08x\n", lcd_regs->lcsr, mem_mask ); return lcd_regs->lcsr; case PXA255_LIIDR: // 0x4400003c - verboselog( machine(), 3, "pxa255_lcd_r: LCD Interrupt ID Register: %08x & %08x\n", lcd_regs->liidr, mem_mask ); + verboselog(*this, 3, "pxa255_lcd_r: LCD Interrupt ID Register: %08x & %08x\n", lcd_regs->liidr, mem_mask ); return lcd_regs->liidr; case PXA255_TRGBR: // 0x44000040 - verboselog( machine(), 3, "pxa255_lcd_r: TMED RGB Seed Register: %08x & %08x\n", lcd_regs->trgbr, mem_mask ); + verboselog(*this, 3, "pxa255_lcd_r: TMED RGB Seed Register: %08x & %08x\n", lcd_regs->trgbr, mem_mask ); return lcd_regs->trgbr; case PXA255_TCR: // 0x44000044 - verboselog( machine(), 3, "pxa255_lcd_r: TMED RGB Seed Register: %08x & %08x\n", lcd_regs->tcr, mem_mask ); + verboselog(*this, 3, "pxa255_lcd_r: TMED RGB Seed Register: %08x & %08x\n", lcd_regs->tcr, mem_mask ); return lcd_regs->tcr; case PXA255_FDADR0: // 0x44000200 - if (0) verboselog( machine(), 3, "pxa255_lcd_r: LCD DMA Frame Descriptor Address Register 0: %08x & %08x\n", lcd_regs->dma[0].fdadr, mem_mask ); + if (0) verboselog(*this, 3, "pxa255_lcd_r: LCD DMA Frame Descriptor Address Register 0: %08x & %08x\n", lcd_regs->dma[0].fdadr, mem_mask ); return lcd_regs->dma[0].fdadr; case PXA255_FSADR0: // 0x44000204 - verboselog( machine(), 3, "pxa255_lcd_r: LCD DMA Frame Source Address Register 0: %08x & %08x\n", lcd_regs->dma[0].fsadr, mem_mask ); + verboselog(*this, 3, "pxa255_lcd_r: LCD DMA Frame Source Address Register 0: %08x & %08x\n", lcd_regs->dma[0].fsadr, mem_mask ); return lcd_regs->dma[0].fsadr; case PXA255_FIDR0: // 0x44000208 - verboselog( machine(), 3, "pxa255_lcd_r: LCD DMA Frame ID Register 0: %08x & %08x\n", lcd_regs->dma[0].fidr, mem_mask ); + verboselog(*this, 3, "pxa255_lcd_r: LCD DMA Frame ID Register 0: %08x & %08x\n", lcd_regs->dma[0].fidr, mem_mask ); return lcd_regs->dma[0].fidr; case PXA255_LDCMD0: // 0x4400020c - if (0) verboselog( machine(), 3, "pxa255_lcd_r: LCD DMA Command Register 0: %08x & %08x\n", lcd_regs->dma[0].ldcmd & 0xfff00000, mem_mask ); + if (0) verboselog(*this, 3, "pxa255_lcd_r: LCD DMA Command Register 0: %08x & %08x\n", lcd_regs->dma[0].ldcmd & 0xfff00000, mem_mask ); return lcd_regs->dma[0].ldcmd & 0xfff00000; case PXA255_FDADR1: // 0x44000210 - verboselog( machine(), 3, "pxa255_lcd_r: LCD DMA Frame Descriptor Address Register 1: %08x & %08x\n", lcd_regs->dma[1].fdadr, mem_mask ); + verboselog(*this, 3, "pxa255_lcd_r: LCD DMA Frame Descriptor Address Register 1: %08x & %08x\n", lcd_regs->dma[1].fdadr, mem_mask ); return lcd_regs->dma[1].fdadr; case PXA255_FSADR1: // 0x44000214 - verboselog( machine(), 3, "pxa255_lcd_r: LCD DMA Frame Source Address Register 1: %08x & %08x\n", lcd_regs->dma[1].fsadr, mem_mask ); + verboselog(*this, 3, "pxa255_lcd_r: LCD DMA Frame Source Address Register 1: %08x & %08x\n", lcd_regs->dma[1].fsadr, mem_mask ); return lcd_regs->dma[1].fsadr; case PXA255_FIDR1: // 0x44000218 - verboselog( machine(), 3, "pxa255_lcd_r: LCD DMA Frame ID Register 1: %08x & %08x\n", lcd_regs->dma[1].fidr, mem_mask ); + verboselog(*this, 3, "pxa255_lcd_r: LCD DMA Frame ID Register 1: %08x & %08x\n", lcd_regs->dma[1].fidr, mem_mask ); return lcd_regs->dma[1].fidr; case PXA255_LDCMD1: // 0x4400021c - verboselog( machine(), 3, "pxa255_lcd_r: LCD DMA Command Register 1: %08x & %08x\n", lcd_regs->dma[1].ldcmd & 0xfff00000, mem_mask ); + verboselog(*this, 3, "pxa255_lcd_r: LCD DMA Command Register 1: %08x & %08x\n", lcd_regs->dma[1].ldcmd & 0xfff00000, mem_mask ); return lcd_regs->dma[1].ldcmd & 0xfff00000; default: - verboselog( machine(), 0, "pxa255_lcd_r: Unknown address: %08x\n", PXA255_LCD_BASE_ADDR | (offset << 2)); + verboselog(*this, 0, "pxa255_lcd_r: Unknown address: %08x\n", PXA255_LCD_BASE_ADDR | (offset << 2)); break; } return 0; @@ -1238,59 +1238,59 @@ WRITE32_MEMBER(_39in1_state::pxa255_lcd_w) switch(PXA255_LCD_BASE_ADDR | (offset << 2)) { case PXA255_LCCR0: // 0x44000000 - verboselog( machine(), 3, "pxa255_lcd_w: LCD Control 0: %08x & %08x\n", data, mem_mask ); + verboselog(*this, 3, "pxa255_lcd_w: LCD Control 0: %08x & %08x\n", data, mem_mask ); lcd_regs->lccr0 = data & 0x00fffeff; break; case PXA255_LCCR1: // 0x44000004 - verboselog( machine(), 3, "pxa255_lcd_w: LCD Control 1: %08x & %08x\n", data, mem_mask ); + verboselog(*this, 3, "pxa255_lcd_w: LCD Control 1: %08x & %08x\n", data, mem_mask ); lcd_regs->lccr1 = data; break; case PXA255_LCCR2: // 0x44000008 - verboselog( machine(), 3, "pxa255_lcd_w: LCD Control 2: %08x & %08x\n", data, mem_mask ); + verboselog(*this, 3, "pxa255_lcd_w: LCD Control 2: %08x & %08x\n", data, mem_mask ); lcd_regs->lccr2 = data; break; case PXA255_LCCR3: // 0x4400000c - verboselog( machine(), 3, "pxa255_lcd_w: LCD Control 3: %08x & %08x\n", data, mem_mask ); + verboselog(*this, 3, "pxa255_lcd_w: LCD Control 3: %08x & %08x\n", data, mem_mask ); lcd_regs->lccr3 = data; break; case PXA255_FBR0: // 0x44000020 - verboselog( machine(), 4l, "pxa255_lcd_w: LCD Frame Branch Register 0: %08x & %08x\n", data, mem_mask ); + verboselog(*this, 4l, "pxa255_lcd_w: LCD Frame Branch Register 0: %08x & %08x\n", data, mem_mask ); lcd_regs->fbr[0] = data & 0xfffffff3; if(!lcd_regs->dma[0].eof->enabled()) { - if (0) verboselog( machine(), 3, "ch0 EOF timer is not enabled, taking branch now\n" ); + if (0) verboselog(*this, 3, "ch0 EOF timer is not enabled, taking branch now\n" ); pxa255_lcd_check_load_next_branch(0); pxa255_lcd_irq_check(); } break; case PXA255_FBR1: // 0x44000024 - verboselog( machine(), 3, "pxa255_lcd_w: LCD Frame Branch Register 1: %08x & %08x\n", data, mem_mask ); + verboselog(*this, 3, "pxa255_lcd_w: LCD Frame Branch Register 1: %08x & %08x\n", data, mem_mask ); lcd_regs->fbr[1] = data & 0xfffffff3; if(!lcd_regs->dma[1].eof->enabled()) { - verboselog( machine(), 3, "ch1 EOF timer is not enabled, taking branch now\n" ); + verboselog(*this, 3, "ch1 EOF timer is not enabled, taking branch now\n" ); pxa255_lcd_check_load_next_branch(1); pxa255_lcd_irq_check(); } break; case PXA255_LCSR: // 0x44000038 - verboselog( machine(), 4, "pxa255_lcd_w: LCD Controller Status Register: %08x & %08x\n", data, mem_mask ); + verboselog(*this, 4, "pxa255_lcd_w: LCD Controller Status Register: %08x & %08x\n", data, mem_mask ); lcd_regs->lcsr &= ~data; pxa255_lcd_irq_check(); break; case PXA255_LIIDR: // 0x4400003c - verboselog( machine(), 3, "pxa255_lcd_w: LCD Controller Interrupt ID Register: %08x & %08x\n", data, mem_mask ); + verboselog(*this, 3, "pxa255_lcd_w: LCD Controller Interrupt ID Register: %08x & %08x\n", data, mem_mask ); break; case PXA255_TRGBR: // 0x44000040 - verboselog( machine(), 3, "pxa255_lcd_w: TMED RGB Seed Register: %08x & %08x\n", data, mem_mask ); + verboselog(*this, 3, "pxa255_lcd_w: TMED RGB Seed Register: %08x & %08x\n", data, mem_mask ); lcd_regs->trgbr = data & 0x00ffffff; break; case PXA255_TCR: // 0x44000044 - verboselog( machine(), 3, "pxa255_lcd_w: TMED Control Register: %08x & %08x\n", data, mem_mask ); + verboselog(*this, 3, "pxa255_lcd_w: TMED Control Register: %08x & %08x\n", data, mem_mask ); lcd_regs->tcr = data & 0x00004fff; break; case PXA255_FDADR0: // 0x44000200 - verboselog( machine(), 4, "pxa255_lcd_w: LCD DMA Frame Descriptor Address Register 0: %08x & %08x\n", data, mem_mask ); + verboselog(*this, 4, "pxa255_lcd_w: LCD DMA Frame Descriptor Address Register 0: %08x & %08x\n", data, mem_mask ); if(!lcd_regs->dma[0].eof->enabled()) { pxa255_lcd_load_dma_descriptor(space, data & 0xfffffff0, 0); @@ -1302,16 +1302,16 @@ WRITE32_MEMBER(_39in1_state::pxa255_lcd_w) } break; case PXA255_FSADR0: // 0x44000204 - verboselog( machine(), 4, "pxa255_lcd_w: (Invalid Write) LCD DMA Frame Source Address Register 0: %08x & %08x\n", data, mem_mask ); + verboselog(*this, 4, "pxa255_lcd_w: (Invalid Write) LCD DMA Frame Source Address Register 0: %08x & %08x\n", data, mem_mask ); break; case PXA255_FIDR0: // 0x44000208 - verboselog( machine(), 4, "pxa255_lcd_w: (Invalid Write) LCD DMA Frame ID Register 0: %08x & %08x\n", data, mem_mask ); + verboselog(*this, 4, "pxa255_lcd_w: (Invalid Write) LCD DMA Frame ID Register 0: %08x & %08x\n", data, mem_mask ); break; case PXA255_LDCMD0: // 0x4400020c - verboselog( machine(), 4, "pxa255_lcd_w: (Invalid Write) LCD DMA Command Register 0: %08x & %08x\n", data, mem_mask ); + verboselog(*this, 4, "pxa255_lcd_w: (Invalid Write) LCD DMA Command Register 0: %08x & %08x\n", data, mem_mask ); break; case PXA255_FDADR1: // 0x44000210 - verboselog( machine(), 4, "pxa255_lcd_w: LCD DMA Frame Descriptor Address Register 1: %08x & %08x\n", data, mem_mask ); + verboselog(*this, 4, "pxa255_lcd_w: LCD DMA Frame Descriptor Address Register 1: %08x & %08x\n", data, mem_mask ); if(!lcd_regs->dma[1].eof->enabled()) { pxa255_lcd_load_dma_descriptor(space, data & 0xfffffff0, 1); @@ -1323,16 +1323,16 @@ WRITE32_MEMBER(_39in1_state::pxa255_lcd_w) } break; case PXA255_FSADR1: // 0x44000214 - verboselog( machine(), 4, "pxa255_lcd_w: (Invalid Write) LCD DMA Frame Source Address Register 1: %08x & %08x\n", data, mem_mask ); + verboselog(*this, 4, "pxa255_lcd_w: (Invalid Write) LCD DMA Frame Source Address Register 1: %08x & %08x\n", data, mem_mask ); break; case PXA255_FIDR1: // 0x44000218 - verboselog( machine(), 4, "pxa255_lcd_w: (Invalid Write) LCD DMA Frame ID Register 1: %08x & %08x\n", data, mem_mask ); + verboselog(*this, 4, "pxa255_lcd_w: (Invalid Write) LCD DMA Frame ID Register 1: %08x & %08x\n", data, mem_mask ); break; case PXA255_LDCMD1: // 0x4400021c - verboselog( machine(), 4, "pxa255_lcd_w: (Invalid Write) LCD DMA Command Register 1: %08x & %08x\n", data, mem_mask ); + verboselog(*this, 4, "pxa255_lcd_w: (Invalid Write) LCD DMA Command Register 1: %08x & %08x\n", data, mem_mask ); break; default: - verboselog( machine(), 0, "pxa255_lcd_w: Unknown address: %08x = %08x & %08x\n", PXA255_LCD_BASE_ADDR | (offset << 2), data, mem_mask); + verboselog(*this, 0, "pxa255_lcd_w: Unknown address: %08x = %08x & %08x\n", PXA255_LCD_BASE_ADDR | (offset << 2), data, mem_mask); break; } } diff --git a/src/mame/drivers/8080bw.c b/src/mame/drivers/8080bw.c index a17fe5f1665..58ac6f7deba 100644 --- a/src/mame/drivers/8080bw.c +++ b/src/mame/drivers/8080bw.c @@ -2936,8 +2936,8 @@ INPUT_CHANGED_MEMBER(_8080bw_state::claybust_gun_trigger) ana a rz */ - UINT8 gunx = ioport("GUNX")->read_safe(0x00); - UINT8 guny = ioport("GUNY")->read_safe(0x20); + UINT8 const gunx = read_safe(ioport("GUNX"), 0x00); + UINT8 const guny = read_safe(ioport("GUNY"), 0x20); m_claybust_gun_pos = ((gunx >> 3) | (guny << 5)) + 2; m_claybust_gun_on->adjust(attotime::from_msec(250)); // timing is a guess } diff --git a/src/mame/drivers/a2600.c b/src/mame/drivers/a2600.c index cf61e133b62..ca65c12feb4 100644 --- a/src/mame/drivers/a2600.c +++ b/src/mame/drivers/a2600.c @@ -12,12 +12,13 @@ TODO: #include "emu.h" #include "machine/mos6530n.h" -#include "cpu/m6502/m6502.h" +#include "cpu/m6502/m6507.h" #include "sound/tiaintf.h" #include "video/tia.h" #include "bus/vcs/vcs_slot.h" #include "bus/vcs/rom.h" #include "bus/vcs/dpc.h" +#include "bus/vcs/harmony_melody.h" #include "bus/vcs/scharger.h" #include "bus/vcs/compumat.h" #include "bus/vcs_ctrl/ctrl.h" @@ -38,7 +39,8 @@ public: m_tia(*this, "tia_video"), m_maincpu(*this, "maincpu"), m_screen(*this, "screen"), - m_swb(*this, "SWB") + m_swb(*this, "SWB"), + m_riot(*this,"riot") { } required_shared_ptr<UINT8> m_riot_ram; @@ -58,6 +60,8 @@ public: // investigate how the carts mapped here (Mapper JVP) interact with the RIOT device DECLARE_READ8_MEMBER(cart_over_riot_r); DECLARE_WRITE8_MEMBER(cart_over_riot_w); + DECLARE_READ8_MEMBER(cart_over_all_r); + DECLARE_WRITE8_MEMBER(cart_over_all_w); protected: required_device<vcs_control_port_device> m_joy1; @@ -66,9 +70,10 @@ protected: required_device<tia_video_device> m_tia; unsigned long detect_2600controllers(); - required_device<m6502_device> m_maincpu; + required_device<m6507_device> m_maincpu; required_device<screen_device> m_screen; required_ioport m_swb; + required_device<mos6532_t> m_riot; }; @@ -80,14 +85,78 @@ protected: static const UINT16 supported_screen_heights[4] = { 262, 312, 328, 342 }; -static ADDRESS_MAP_START(a2600_mem, AS_PROGRAM, 8, a2600_state ) - ADDRESS_MAP_GLOBAL_MASK(0x1fff) +static ADDRESS_MAP_START(a2600_mem, AS_PROGRAM, 8, a2600_state ) // 6507 has 13-bit address space, 0x0000 - 0x1fff AM_RANGE(0x0000, 0x007f) AM_MIRROR(0x0f00) AM_DEVREADWRITE("tia_video", tia_video_device, read, write) AM_RANGE(0x0080, 0x00ff) AM_MIRROR(0x0d00) AM_RAM AM_SHARE("riot_ram") AM_RANGE(0x0280, 0x029f) AM_MIRROR(0x0d00) AM_DEVICE("riot", mos6532_t, io_map) // AM_RANGE(0x1000, 0x1fff) is cart data and it is configured at reset time, depending on the mounted cart! ADDRESS_MAP_END + +READ8_MEMBER(a2600_state::cart_over_all_r) +{ + if (!space.debugger_access()) + m_cart->write_bank(space, offset, 0); + + int masked_offset = offset &~ 0x0d00; + UINT8 ret = 0x00; + + if (masked_offset < 0x80) + { + ret = m_tia->read(space, masked_offset&0x7f); + } + else if (masked_offset < 0x100) + { + ret = m_riot_ram[masked_offset & 0x7f]; + } + /* 0x100 - 0x1ff already masked out */ + else if (masked_offset < 0x280) + { + ret = m_tia->read(space, masked_offset&0x7f); + } + else if (masked_offset < 0x2a0) + { + ret = m_riot->io_r(space, masked_offset); + } + else if (masked_offset < 0x300) + { + /* 0x2a0 - 0x2ff nothing? */ + } + /* 0x300 - 0x3ff already masked out */ + + return ret; +} + +WRITE8_MEMBER(a2600_state::cart_over_all_w) +{ + m_cart->write_bank(space, offset, 0); + + int masked_offset = offset &~ 0x0d00; + + if (masked_offset < 0x80) + { + m_tia->write(space, masked_offset & 0x7f, data); + } + else if (masked_offset < 0x100) + { + m_riot_ram[masked_offset & 0x7f] = data; + } + /* 0x100 - 0x1ff already masked out */ + else if (masked_offset < 0x280) + { + m_tia->write(space, masked_offset & 0x7f, data); + } + else if (masked_offset < 0x2a0) + { + m_riot->io_w(space, masked_offset, data); + } + else if (masked_offset < 0x300) + { + /* 0x2a0 - 0x2ff nothing? */ + } + /* 0x300 - 0x3ff already masked out */ +} + WRITE8_MEMBER(a2600_state::switch_A_w) { /* Left controller port */ @@ -317,6 +386,13 @@ MACHINE_START_MEMBER(a2600_state,a2600) case A26_CM: m_maincpu->space(AS_PROGRAM).install_read_handler(0x1000, 0x1fff, read8_delegate(FUNC(vcs_cart_slot_device::read_rom),(vcs_cart_slot_device*)m_cart)); break; + case A26_X07: + m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x1000, 0x1fff, read8_delegate(FUNC(vcs_cart_slot_device::read_rom),(vcs_cart_slot_device*)m_cart), write8_delegate(FUNC(vcs_cart_slot_device::write_bank),(vcs_cart_slot_device*)m_cart)); + m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x0000, 0x0fff, read8_delegate(FUNC(a2600_state::cart_over_all_r), this), write8_delegate(FUNC(a2600_state::cart_over_all_w), this)); + break; + case A26_HARMONY: + m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x1000, 0x1fff, read8_delegate(FUNC(vcs_cart_slot_device::read_rom),(vcs_cart_slot_device*)m_cart), write8_delegate(FUNC(vcs_cart_slot_device::write_bank),(vcs_cart_slot_device*)m_cart)); + break; } /* Banks may have changed, reset the cpu so it uses the correct reset vector */ @@ -450,6 +526,8 @@ static SLOT_INTERFACE_START(a2600_cart) SLOT_INTERFACE_INTERNAL("a26_4in1", A26_ROM_4IN1) SLOT_INTERFACE_INTERNAL("a26_8in1", A26_ROM_8IN1) SLOT_INTERFACE_INTERNAL("a26_32in1", A26_ROM_32IN1) + SLOT_INTERFACE_INTERNAL("a26_x07", A26_ROM_X07) + SLOT_INTERFACE_INTERNAL("a26_harmony", A26_ROM_HARMONY) SLOT_INTERFACE_END static MACHINE_CONFIG_FRAGMENT(a2600_cartslot) @@ -462,7 +540,7 @@ MACHINE_CONFIG_END static MACHINE_CONFIG_START( a2600, a2600_state ) /* basic machine hardware */ - MCFG_CPU_ADD("maincpu", M6502, MASTER_CLOCK_NTSC / 3) /* actually M6507 */ + MCFG_CPU_ADD("maincpu", M6507, MASTER_CLOCK_NTSC / 3) MCFG_M6502_DISABLE_DIRECT() MCFG_CPU_PROGRAM_MAP(a2600_mem) @@ -502,7 +580,7 @@ MACHINE_CONFIG_END static MACHINE_CONFIG_START( a2600p, a2600_state ) /* basic machine hardware */ - MCFG_CPU_ADD("maincpu", M6502, MASTER_CLOCK_PAL / 3) /* actually M6507 */ + MCFG_CPU_ADD("maincpu", M6507, MASTER_CLOCK_PAL / 3) MCFG_CPU_PROGRAM_MAP(a2600_mem) MCFG_M6502_DISABLE_DIRECT() diff --git a/src/mame/drivers/amiga.c b/src/mame/drivers/amiga.c index d464a27591e..4fb24380477 100644 --- a/src/mame/drivers/amiga.c +++ b/src/mame/drivers/amiga.c @@ -1811,7 +1811,7 @@ static MACHINE_CONFIG_DERIVED_CLASS( cd32, amiga_base, cd32_state ) MCFG_CDROM_ADD("cdrom") MCFG_CDROM_INTERFACE("cd32_cdrom") - + MCFG_SOFTWARE_LIST_ADD("cd_list", "cd32") MCFG_DEVICE_REMOVE("kbd") MACHINE_CONFIG_END diff --git a/src/mame/drivers/amstrad.c b/src/mame/drivers/amstrad.c index 8e88e135151..8db6bd65304 100644 --- a/src/mame/drivers/amstrad.c +++ b/src/mame/drivers/amstrad.c @@ -814,6 +814,7 @@ SLOT_INTERFACE_START(cpc464_exp_cards) SLOT_INTERFACE("smartwatch", CPC_SMARTWATCH) SLOT_INTERFACE("brunword4", CPC_BRUNWORD_MK4) SLOT_INTERFACE("hd20", CPC_HD20) + SLOT_INTERFACE("doubler", CPC_DOUBLER) SLOT_INTERFACE_END SLOT_INTERFACE_START(cpc_exp_cards) @@ -830,6 +831,7 @@ SLOT_INTERFACE_START(cpc_exp_cards) SLOT_INTERFACE("smartwatch", CPC_SMARTWATCH) SLOT_INTERFACE("brunword4", CPC_BRUNWORD_MK4) SLOT_INTERFACE("hd20", CPC_HD20) + SLOT_INTERFACE("doubler", CPC_DOUBLER) SLOT_INTERFACE_END SLOT_INTERFACE_START(cpcplus_exp_cards) @@ -844,6 +846,7 @@ SLOT_INTERFACE_START(cpcplus_exp_cards) SLOT_INTERFACE("playcity", CPC_PLAYCITY) SLOT_INTERFACE("smartwatch", CPC_SMARTWATCH) SLOT_INTERFACE("hd20", CPC_HD20) + SLOT_INTERFACE("doubler", CPC_DOUBLER) SLOT_INTERFACE_END SLOT_INTERFACE_START(aleste_exp_cards) @@ -860,6 +863,7 @@ SLOT_INTERFACE_START(aleste_exp_cards) SLOT_INTERFACE("smartwatch", CPC_SMARTWATCH) SLOT_INTERFACE("brunword4", CPC_BRUNWORD_MK4) SLOT_INTERFACE("hd20", CPC_HD20) + SLOT_INTERFACE("doubler", CPC_DOUBLER) SLOT_INTERFACE("magicsound", AL_MAGICSOUND) SLOT_INTERFACE_END diff --git a/src/mame/drivers/apollo.c b/src/mame/drivers/apollo.c index 1c41ed2c7d9..c5c90f1ffa7 100644 --- a/src/mame/drivers/apollo.c +++ b/src/mame/drivers/apollo.c @@ -109,11 +109,6 @@ static int parity_error_handler_install_counter = 0; static UINT16 latch_page_on_parity_error_register = 0x0000; static UINT16 master_req_register = 0x0000; -// DN3000: Node Id 1D117 at 0x9600 - 0x961f -// DN3500: Node Id 2616D at 0x11200 - 0x1121f - -static UINT32 node_id = DEFAULT_NODE_ID; - static UINT32 ram_base_address; static UINT32 ram_end_address; @@ -211,14 +206,6 @@ UINT8 apollo_get_ram_config_byte(void) { } /*************************************************************************** - apollo_get_node_id - get the node id - ***************************************************************************/ - -UINT32 apollo_get_node_id(void) { - return node_id; -} - -/*************************************************************************** apollo_instruction_hook must be called by the CPU core before executing each instruction ***************************************************************************/ @@ -326,11 +313,11 @@ READ8_MEMBER(apollo_state::cache_status_register_r){ return data; } -void apollo_set_cache_status_register(UINT8 mask, UINT8 data) { +void apollo_set_cache_status_register(device_t *device,UINT8 mask, UINT8 data) { UINT16 new_value = (cache_status_register & ~mask) | (data & mask); if (new_value != cache_status_register) { cache_status_register = new_value; - LOG2(("setting Cache Status Register with data=%02x and mask=%02x to %02x", + DLOG2(("setting Cache Status Register with data=%02x and mask=%02x to %02x", data, mask, cache_status_register)); } } @@ -341,7 +328,7 @@ void apollo_set_cache_status_register(UINT8 mask, UINT8 data) { WRITE8_MEMBER(apollo_state::task_alias_register_w){ task_alias_register = data; - apollo_set_cache_status_register(0x07, data); + apollo_set_cache_status_register(this,0x07, data); SLOG(("writing Task Alias Register at offset %02x = %02x",offset, data)); } @@ -352,38 +339,6 @@ READ8_MEMBER(apollo_state::task_alias_register_r){ } /*************************************************************************** - DN3000/DN3500 Node Id PROM at 0x9600/0x11200 - ***************************************************************************/ - -WRITE16_MEMBER(apollo_state::apollo_node_id_w){ - SLOG1(("Error: writing node id ROM at offset %02x = %04x & %04x", offset, data, mem_mask)); -} - -READ16_MEMBER(apollo_state::apollo_node_id_r){ - UINT16 data; - switch (offset & 0x0f) { - case 1: // msb - data = (node_id >> 16) & 0xff; - break; - case 2: - data = (node_id >> 8) & 0xff; - break; - case 3: // lsb - data = node_id & 0xff; - break; - case 15: // checksum - data = ((node_id >> 16) + (node_id >> 8) + node_id) & 0xff; - break; - default: - data = 0; - break; - } - data <<= 8; - SLOG2(("reading node id ROM at offset %02x = %04x & %04x", offset, data, mem_mask)); - return data; -} - -/*************************************************************************** DN3000/DN3500 Latch Page on Parity Error Register at 0x9300/0x11300 ***************************************************************************/ @@ -576,7 +531,7 @@ READ16_MEMBER(apollo_state::apollo_atbus_io_r) // Motorola CPU is MSB first, ISA Bus is LSB first UINT16 data = m_isa->io16_swap_r(space, isa_addr, mem_mask); - SLOG2(("apollo_atbus_io_r at %08x -> %04x = %04x & %04x", offset*2, isa_addr*2, data, mem_mask)); + SLOG2(("apollo_atbus_io_r at %08x -> %04x = %04x & %04x", ATBUS_IO_BASE + offset*2, isa_addr*2, data, mem_mask)); return data; } @@ -585,7 +540,7 @@ WRITE16_MEMBER(apollo_state::apollo_atbus_io_w) { UINT32 isa_addr = (offset & 3) + ((offset & ~0x1ff) >> 7); - SLOG2(("apollo_atbus_io_w at %08x -> %04x = %04x & %04x", offset*2, isa_addr*2, data, mem_mask)); + SLOG2(("apollo_atbus_io_w at %08x -> %04x = %04x & %04x", ATBUS_IO_BASE + offset*2, isa_addr*2, data, mem_mask)); // Motorola CPU is MSB first, ISA Bus is LSB first m_isa->io16_swap_w(space, isa_addr, data, mem_mask); @@ -597,23 +552,56 @@ WRITE16_MEMBER(apollo_state::apollo_atbus_io_w) READ16_MEMBER(apollo_state::apollo_atbus_memory_r) { - // Motorola CPU is MSB first, ISA Bus is LSB first - UINT16 data = m_isa->prog16_swap_r(space, offset, mem_mask); + UINT16 data; - SLOG2(("apollo_atbus_memory_r at %08x = %04x & %04x", offset*2, data, mem_mask)); + // Motorola CPU is MSB first, ISA Bus is LSB first + data = m_isa->prog16_swap_r(space, offset, mem_mask); + SLOG2(("apollo_atbus_memory_r at %08x = %04x & %04x", ATBUS_MEMORY_BASE + offset * 2, data, mem_mask)); return data; } WRITE16_MEMBER(apollo_state::apollo_atbus_memory_w) { - SLOG2(("apollo_atbus_memory_w at %08x = %04x & %04x", offset*2, data, mem_mask)); + SLOG2(("apollo_atbus_memory_w at %08x = %04x & %04x", ATBUS_MEMORY_BASE + offset*2, data, mem_mask)); // Motorola CPU is MSB first, ISA Bus is LSB first m_isa->prog16_swap_w(space, offset, data, mem_mask); } /*************************************************************************** + DN3000/DN3500 AT Bus unmapped read/write + ***************************************************************************/ + +READ16_MEMBER(apollo_state::apollo_atbus_unmap_io_r) +{ + // ISA bus has 0xff for unmapped addresses + UINT16 data = 0xffff; + UINT32 isa_addr = (offset & 3) + ((offset & ~0x1ff) >> 7); + SLOG1(("apollo_atbus_unmap_io_r at %08x -> %04x = %04x & %04x", ATBUS_IO_BASE + offset*2, isa_addr*2, data, mem_mask)); + return data; +} + +WRITE16_MEMBER(apollo_state::apollo_atbus_unmap_io_w) +{ + UINT32 isa_addr = (offset & 3) + ((offset & ~0x1ff) >> 7); + SLOG1(("apollo_atbus_unmap_io_w at %08x -> %04x = %04x & %04x", ATBUS_IO_BASE + offset*2, isa_addr*2, data, mem_mask)); +} + +READ8_MEMBER(apollo_state::apollo_atbus_unmap_r) +{ + // ISA bus has 0xff for unmapped addresses + UINT8 data = 0xff; + SLOG2(("apollo_atbus_unmap_r at %08x = %02x & %02x", ATBUS_MEMORY_BASE + offset, data, mem_mask)); + return data; +} + +WRITE8_MEMBER(apollo_state::apollo_atbus_unmap_w) +{ + SLOG1(("apollo_atbus_unmap_w at %08x = %02x & %02x", ATBUS_MEMORY_BASE + offset, data, mem_mask)); +} + +/*************************************************************************** DN5500 Memory Present Register at 0x11400-0x114ff Strange: documented but not used ***************************************************************************/ @@ -697,7 +685,7 @@ static ADDRESS_MAP_START(dn3500_map, AS_PROGRAM, 32, apollo_state ) AM_RANGE(0x010d00, 0x010dff) AM_READWRITE8(/*"dma2",*/apollo_dma_2_r, apollo_dma_2_w, 0xffffffff ) AM_RANGE(0x011000, 0x0110ff) AM_DEVREADWRITE8(APOLLO_PIC1_TAG, pic8259_device, read, write, 0xffffffff) AM_RANGE(0x011100, 0x0111ff) AM_DEVREADWRITE8(APOLLO_PIC2_TAG, pic8259_device, read, write, 0xffffffff) - AM_RANGE(0x011200, 0x0112ff) AM_READWRITE16(apollo_node_id_r, apollo_node_id_w, 0xffffffff) + AM_RANGE(0x011200, 0x0112ff) AM_DEVREADWRITE16(APOLLO_NI_TAG, apollo_ni, read, write, 0xffffffff) AM_RANGE(0x011300, 0x0113ff) AM_READWRITE16(latch_page_on_parity_error_register_r, latch_page_on_parity_error_register_w, 0xffffffff ) AM_RANGE(0x011600, 0x0116ff) AM_READWRITE8(master_req_register_r, master_req_register_w, 0xffffffff) @@ -741,7 +729,7 @@ static ADDRESS_MAP_START(dsp3500_map, AS_PROGRAM, 32, apollo_state ) AM_RANGE(0x010d00, 0x010dff) AM_READWRITE8(/*"dma2",*/apollo_dma_2_r, apollo_dma_2_w, 0xffffffff ) AM_RANGE(0x011000, 0x0110ff) AM_DEVREADWRITE8(APOLLO_PIC1_TAG, pic8259_device, read, write, 0xffffffff) AM_RANGE(0x011100, 0x0111ff) AM_DEVREADWRITE8(APOLLO_PIC2_TAG, pic8259_device, read, write, 0xffffffff) - AM_RANGE(0x011200, 0x0112ff) AM_READWRITE16(apollo_node_id_r, apollo_node_id_w, 0xffffffff) + AM_RANGE(0x011200, 0x0112ff) AM_DEVREADWRITE16(APOLLO_NI_TAG, apollo_ni, read, write, 0xffffffff) AM_RANGE(0x011300, 0x0113ff) AM_READWRITE16(latch_page_on_parity_error_register_r, latch_page_on_parity_error_register_w, 0xffffffff ) AM_RANGE(0x011600, 0x0116ff) AM_READWRITE8(master_req_register_r, master_req_register_w, 0xffffffff) @@ -772,7 +760,7 @@ static ADDRESS_MAP_START(dn3000_map, AS_PROGRAM, 32, apollo_state ) AM_RANGE(0x009300, 0x0093ff) AM_READWRITE16(latch_page_on_parity_error_register_r, latch_page_on_parity_error_register_w, 0xffffffff ) AM_RANGE(0x009400, 0x0094ff) AM_DEVREADWRITE8(APOLLO_PIC1_TAG, pic8259_device, read, write, 0xffffffff) AM_RANGE(0x009500, 0x0095ff) AM_DEVREADWRITE8(APOLLO_PIC2_TAG, pic8259_device, read, write, 0xffffffff) - AM_RANGE(0x009600, 0x0096ff) AM_READWRITE16(apollo_node_id_r, apollo_node_id_w, 0xffffffff) + AM_RANGE(0x009600, 0x0096ff) AM_DEVREADWRITE16(APOLLO_NI_TAG, apollo_ni, read, write, 0xffffffff) AM_RANGE(0x05d800, 0x05dc07) AM_DEVREADWRITE8(APOLLO_SCREEN_TAG, apollo_graphics_15i, apollo_mcr_r, apollo_mcr_w, 0xffffffff) AM_RANGE(0xfa0000, 0xfdffff) AM_DEVREADWRITE16(APOLLO_SCREEN_TAG, apollo_graphics_15i, apollo_mgm_r, apollo_mgm_w, 0xffffffff) @@ -806,7 +794,7 @@ static ADDRESS_MAP_START(dsp3000_map, AS_PROGRAM, 32, apollo_state ) AM_RANGE(0x009300, 0x0093ff) AM_READWRITE16(latch_page_on_parity_error_register_r, latch_page_on_parity_error_register_w, 0xffffffff ) AM_RANGE(0x009400, 0x0094ff) AM_DEVREADWRITE8(APOLLO_PIC1_TAG, pic8259_device, read, write, 0xffffffff) AM_RANGE(0x009500, 0x0095ff) AM_DEVREADWRITE8(APOLLO_PIC2_TAG, pic8259_device, read, write, 0xffffffff) - AM_RANGE(0x009600, 0x0096ff) AM_READWRITE16(apollo_node_id_r, apollo_node_id_w, 0xffffffff) + AM_RANGE(0x009600, 0x0096ff) AM_DEVREADWRITE16(APOLLO_NI_TAG, apollo_ni, read, write, 0xffffffff) AM_RANGE(ATBUS_IO_BASE, ATBUS_IO_END) AM_READWRITE16(apollo_atbus_io_r, apollo_atbus_io_w, 0xffffffff) @@ -835,7 +823,7 @@ static ADDRESS_MAP_START(dn5500_map, AS_PROGRAM, 32, apollo_state ) AM_RANGE(0x010d00, 0x010dff) AM_READWRITE8(/*"dma2",*/apollo_dma_2_r, apollo_dma_2_w, 0xffffffff ) AM_RANGE(0x011000, 0x0110ff) AM_DEVREADWRITE8(APOLLO_PIC1_TAG, pic8259_device, read, write, 0xffffffff) AM_RANGE(0x011100, 0x0111ff) AM_DEVREADWRITE8(APOLLO_PIC2_TAG, pic8259_device, read, write, 0xffffffff) - AM_RANGE(0x011200, 0x0112ff) AM_READWRITE16(apollo_node_id_r, apollo_node_id_w, 0xffffffff) + AM_RANGE(0x011200, 0x0112ff) AM_DEVREADWRITE16(APOLLO_NI_TAG, apollo_ni, read, write, 0xffffffff) AM_RANGE(0x011300, 0x0113ff) AM_READWRITE16(latch_page_on_parity_error_register_r, latch_page_on_parity_error_register_w, 0xffffffff ) AM_RANGE(0x011400, 0x0114ff) AM_READWRITE8(dn5500_memory_present_register_r, dn5500_memory_present_register_w, 0xffffffff ) AM_RANGE(0x011500, 0x0115ff) AM_READWRITE8(dn5500_11500_r, dn5500_11500_w, 0xffffffff ) @@ -882,7 +870,7 @@ static ADDRESS_MAP_START(dsp5500_map, AS_PROGRAM, 32, apollo_state ) AM_RANGE(0x010d00, 0x010dff) AM_READWRITE8(/*"dma2",*/apollo_dma_2_r, apollo_dma_2_w, 0xffffffff ) AM_RANGE(0x011000, 0x0110ff) AM_DEVREADWRITE8(APOLLO_PIC1_TAG, pic8259_device, read, write, 0xffffffff) AM_RANGE(0x011100, 0x0111ff) AM_DEVREADWRITE8(APOLLO_PIC2_TAG, pic8259_device, read, write, 0xffffffff) - AM_RANGE(0x011200, 0x0112ff) AM_READWRITE16(apollo_node_id_r, apollo_node_id_w, 0xffffffff) + AM_RANGE(0x011200, 0x0112ff) AM_DEVREADWRITE16(APOLLO_NI_TAG, apollo_ni, read, write, 0xffffffff) AM_RANGE(0x011300, 0x0113ff) AM_READWRITE16(latch_page_on_parity_error_register_r, latch_page_on_parity_error_register_w, 0xffffffff ) AM_RANGE(0x011400, 0x0114ff) AM_READWRITE8(dn5500_memory_present_register_r, dn5500_memory_present_register_w, 0xffffffff ) AM_RANGE(0x011500, 0x0115ff) AM_READWRITE8(dn5500_11500_r, dn5500_11500_w, 0xffffffff ) @@ -909,34 +897,21 @@ ADDRESS_MAP_END void apollo_state::machine_reset() { - //MLOG1(("machine_reset_dn3500")); + MLOG1(("machine_reset")); MACHINE_RESET_CALL_MEMBER(apollo); - // we can't do this any more - #if 0 +#ifdef APOLLO_XXL // set configuration omti8621_device::set_verbose(apollo_config(APOLLO_CONF_DISK_TRACE)); threecom3c505_device::set_verbose(apollo_config(APOLLO_CONF_NET_TRACE)); if (apollo_config(APOLLO_CONF_NODE_ID)) { - UINT8 db[0x50]; - UINT16 sector1 = apollo_is_dn5500() ? 4 : 1; - - // check label of physical volume and get sector data of logical volume 1 - // Note: sector data starts with 32 byte block header - if (omti8621_get_sector(machine().device(APOLLO_WDC_TAG), 0, db, sizeof(db), 0) == sizeof(db) && - memcmp (db+0x22, "APOLLO", 6) == 0 && - omti8621_get_sector(machine().device(APOLLO_WDC_TAG), sector1, db, sizeof(db), 0) == sizeof(db)) - { - // set node_id from UID of logical volume 1 of logical unit 0 - node_id = (((db[0x49] << 8) | db[0x4a]) << 8) | db[0x4b]; - - MLOG2(("machine_reset_dn3500: node ID is %06X (from disk)", node_id)); - } + // set node ID from UID of logical volume 1 of logical unit 0 + m_node_id->set_node_id_from_disk(); } - #endif +#endif m_maincpu->set_instruction_hook(read32_delegate(FUNC(apollo_state::apollo_instruction_hook),this)); } @@ -955,6 +930,9 @@ WRITE_LINE_MEMBER(apollo_state::apollo_reset_instr_callback) { machine().device(APOLLO_SCREEN_TAG)->reset(); machine().device(APOLLO_KBD_TAG )->reset(); +#ifdef APOLLO_XXL + machine().device(APOLLO_STDIO_TAG )->reset(); +#endif } } @@ -970,6 +948,10 @@ void apollo_state::machine_start(){ memset(messram->ptr(), 0x55, messram->bytes()); MACHINE_START_CALL_MEMBER(apollo); + + // install nop handlers for unmapped ISA bus addresses + m_isa->install16_device(0, ATBUS_IO_END, 0, 0, read16_delegate(FUNC(apollo_state::apollo_atbus_unmap_io_r), this), write16_delegate(FUNC(apollo_state::apollo_atbus_unmap_io_w), this)); + m_isa->install_memory(0, ATBUS_MEMORY_END, 0, 0, read8_delegate(FUNC(apollo_state::apollo_atbus_unmap_r), this), write8_delegate(FUNC(apollo_state::apollo_atbus_unmap_w), this)); } /*************************************************************************** @@ -1078,6 +1060,11 @@ static MACHINE_CONFIG_START( dn3500, apollo_state ) MCFG_RAM_ADD("messram") MCFG_RAM_DEFAULT_SIZE("8M") MCFG_RAM_EXTRA_OPTIONS("4M,8M,16M,32M") + +#ifdef APOLLO_XXL + MCFG_DEVICE_ADD(APOLLO_STDIO_TAG, APOLLO_STDIO, 0) + MCFG_APOLLO_STDIO_TX_CALLBACK(DEVWRITELINE(APOLLO_SIO_TAG, apollo_sio, rx_b_w)) +#endif MACHINE_CONFIG_END static MACHINE_CONFIG_START( dsp3500, apollo_state ) @@ -1220,8 +1207,6 @@ ROM_START( dn3500 ) // Note: this duplicates boot rom md7c-rev-8.00-1989-08-16-17-23-52.bin ROM_SYSTEM_BIOS( 0, "md7c-rev-8.00", "MD7C REV 8.00, 1989/08/16.17:23:52" ) ROMX_LOAD( "3500_boot_12191_7.bin", 0x00000, 0x10000, CRC(3132067d) SHA1(36f3c83d9f2df42f2537b09ca2f051a8c9dfbfc2) , ROM_BIOS(1) ) - - ROM_LOAD_OPTIONAL( "3000_3c505_010728-00.bin", 0x80000, 0x02000, CRC(69b77ec6) SHA1(7ac36cc6fc90b90ddfc56c45303b514cbe18ae58) ) ROM_END ROM_START( dn5500 ) @@ -1230,8 +1215,6 @@ ROM_START( dn5500 ) ROM_SYSTEM_BIOS( 0, "md7c-rev-8.00", "MD7C REV 8.00, 1989/08/16.17:23:52" ) ROMX_LOAD( "5500_boot_a1631-80046_1-30-92.bin", 0x00000, 0x10000, CRC(7b9ed610) SHA1(7315a884ec4551c44433c6079cc06509223cb02b) , ROM_BIOS(1) ) - - ROM_LOAD_OPTIONAL( "3000_3c505_010728-00.bin", 0x80000, 0x02000, CRC(69b77ec6) SHA1(7ac36cc6fc90b90ddfc56c45303b514cbe18ae58) ) ROM_END ROM_START( dn3000) @@ -1239,8 +1222,6 @@ ROM_START( dn3000) ROM_SYSTEM_BIOS( 0, "md8-rev-7.0", "MD8 REV 7.0, 1988/08/16.15:14:39" ) ROMX_LOAD( "3000_boot_8475_7.bin", 0x00000, 0x08000, CRC(0fe2d471) SHA1(6c383d2266719a3d069b7bf015f6945179395e7a), ROM_BIOS(1) ) - - ROM_LOAD_OPTIONAL( "3000_3c505_010728-00.bin", 0x80000, 0x02000, CRC(69b77ec6) SHA1(7ac36cc6fc90b90ddfc56c45303b514cbe18ae58) ) ROM_END #define rom_dsp3500 rom_dn3500 diff --git a/src/mame/drivers/apple2.c b/src/mame/drivers/apple2.c index 8cf74588ffc..9ce873d5048 100644 --- a/src/mame/drivers/apple2.c +++ b/src/mame/drivers/apple2.c @@ -324,9 +324,6 @@ TIMER_DEVICE_CALLBACK_MEMBER(napple2_state::apple2_interrupt) { int scanline = param; - if((scanline % 8) == 0) - machine().first_screen()->update_partial(machine().first_screen()->vpos()); - // update the video system's shadow copy of the system config at the end of the frame if (scanline == 192) { @@ -450,31 +447,39 @@ void napple2_state::do_io(address_space &space, int offset) break; case 0x50: // graphics mode + machine().first_screen()->update_now(); m_video->m_graphics = true; break; case 0x51: // text mode + machine().first_screen()->update_now(); m_video->m_graphics = false; break; case 0x52: // no mix + machine().first_screen()->update_now(); m_video->m_mix = false; break; case 0x53: // mixed mode + machine().first_screen()->update_now(); m_video->m_mix = true; break; case 0x54: // set page 1 + machine().first_screen()->update_now(); m_page2 = false; m_video->m_page2 = false; break; case 0x55: // set page 2 + machine().first_screen()->update_now(); m_page2 = true; m_video->m_page2 = true; break; case 0x56: // select lo-res + machine().first_screen()->update_now(); m_video->m_hires = false; break; case 0x57: // select hi-res + machine().first_screen()->update_now(); m_video->m_hires = true; break; case 0x58: // AN0 off diff --git a/src/mame/drivers/apple2e.c b/src/mame/drivers/apple2e.c index e5eb2193aa8..426eed983aa 100644 --- a/src/mame/drivers/apple2e.c +++ b/src/mame/drivers/apple2e.c @@ -779,11 +779,6 @@ TIMER_DEVICE_CALLBACK_MEMBER(apple2e_state::apple2_interrupt) { int scanline = param; - if((scanline % 8) == 0) - { - machine().first_screen()->update_partial(machine().first_screen()->vpos()); - } - if (m_isiic) { update_iic_mouse(); @@ -1101,10 +1096,12 @@ void apple2e_state::do_io(address_space &space, int offset, bool is_iic) switch (offset) { case 0x5e: // SETDHIRES + machine().first_screen()->update_now(); m_video->m_dhires = true; break; case 0x5f: // CLRDHIRES + machine().first_screen()->update_now(); m_video->m_dhires = false; break; } @@ -1155,35 +1152,47 @@ void apple2e_state::do_io(address_space &space, int offset, bool is_iic) break; case 0x50: // graphics mode - m_video->m_graphics = true; break; + machine().first_screen()->update_now(); + m_video->m_graphics = true; + break; case 0x51: // text mode - m_video->m_graphics = false; break; + machine().first_screen()->update_now(); + m_video->m_graphics = false; + break; case 0x52: // no mix - m_video->m_mix = false; break; + machine().first_screen()->update_now(); + m_video->m_mix = false; + break; case 0x53: // mixed mode - m_video->m_mix = true; break; + machine().first_screen()->update_now(); + m_video->m_mix = true; + break; case 0x54: // set page 1 + machine().first_screen()->update_now(); m_page2 = false; m_video->m_page2 = false; auxbank_update(); break; case 0x55: // set page 2 + machine().first_screen()->update_now(); m_page2 = true; m_video->m_page2 = true; auxbank_update(); break; case 0x56: // select lo-res + machine().first_screen()->update_now(); m_video->m_hires = false; auxbank_update(); break; case 0x57: // select hi-res + machine().first_screen()->update_now(); m_video->m_hires = true; auxbank_update(); break; diff --git a/src/mame/drivers/aristmk5.c b/src/mame/drivers/aristmk5.c index 8c64c6d31ba..2db333a2eec 100644 --- a/src/mame/drivers/aristmk5.c +++ b/src/mame/drivers/aristmk5.c @@ -1,19 +1,21 @@ // license:BSD-3-Clause -// copyright-holders:David Haywood, Palindrome -/* +// copyright-holders:David Haywood, Palindrome, Roberto Fresca +/**************************************************************************************************************** Aristocrat MK5 / MKV hardware possibly 'Acorn Archimedes on a chip' hardware Note: ARM250 mapping is not identical to plain AA - BIOS ROMs are actually nowhere to be found on a regular MK5 system. They can be used to change the system configurations on a PCB board - by swapping them with the game ROMs u7/u11 locations. + BIOS ROMs are actually nowhere to be found on a regular MK5 system. They can be used + to change the system configurations on a PCB board by swapping them with the game ROMs + u7/u11 locations. TODO (MK-5 specific): - Fix remaining errors - If all tests passes, this msg is printed on the keyboard serial port: - "System Startup Code Entered \n Gos_create could not allocate stack for the new process \n Unrecoverable error occurred. System will now restart" + "System Startup Code Entered \n Gos_create could not allocate stack for the new process \n + Unrecoverable error occurred. System will now restart" Apparently it looks like some sort of protection device ... code DASMing of POST (adonis): @@ -49,15 +51,122 @@ bp 3400640: checks 2MByte DRAM - writes from 0x1000 to 0x100000, with 0x400 bytes index increment and 0xfb data increment - writes from 0x100000 to 0x200000, with 0x400 bytes index increment and 0xfb data increment - - bp 3400720 checks if the aforementioned checks are ok (currently fails at the very first work RAM check at 0x1000, it returns the - value that actually should be at 0x141000) + - bp 3400720 checks if the aforementioned checks are ok (currently fails at the very first work RAM check + at 0x1000, it returns the value that actually should be at 0x141000) bp 340064c: if R0 == 0 2MB DRAM is ok, otherwise there's an error set chip (BIOS): same as goldprmd (serial + ext video crystal check) bp 3400110: External Video Crystal test -*/ +***************************************************************************************************************** + + MKV S2 Mainboard, PCB Layout: + + +--------------------------------------------------------------------------------------------------------+ + | | 96-pin male connector | | 96-pin male connector | | 96-pin male connector | | + | +------------------------------+ +------------------------------+ +------------------------------+ | + | +---+ +--+ +---+ +---+ +---+ | + +-+ |VR1| | |U89 +------+ +------+ |AA | |AB | |AC | | + | | | | | | |AMP | |U35 | +---+ +---+ +---+ | + |S| | | | | +------+ +------+ +---+ +---+ +---+ | + |I| +---+ +--+ +--+ |U46| |U21| |U66| | + |M| | |U52 ARISTOCRAT +---+ +---+ +---+ | + |M| +----+ | | MKV S2 MAINBOARD +------------+ | + | | +---------+ |U47 | | | PCB 0801-410091 | 3V BATTERY | | + |S| |U72 | +----+ +--+ ASSY 2501-410389 | | | + |O| | | +-----+ ISSUE A01 +------------+ | + |C| | | |U23 | +----+ | + |K| | | | | |U53 | | + |E| +---------+ +-----+ +------------+ +----+ | + |T| |U85 | +----+ +----+ +--+ +--+ +----+ +----+ +--+ +--+ | + | | +---------+ | | |U58 | |U54 | |U | |U | |U59 | |U61 | |U | |U | | + | | |U71 | | CPU | +----+ +----+ |1 | |4 | +----+ +----+ |1 | |4 | | + | | | | | | +----+ |4 | |8 | +------+ |5 | |9 | | + | | | | +-----+ | | |U56 | |9 | | | |U36 | |2 | | | | + | | | | |U65 | | | +----+ +--+ +--+ | | +--+ +--+ | + | | +---------+ | | +------------+ +------+ | + | | +-----+ +-----+ +---+ | + +-+ +---+ |U73 | |X2 | +----------------+ +----------------+ | + | |U26| | | +---+ +---+ |U14 | |U10 | | + | +---+ +-----+ |U50| | | | | | + | |U27| +-----+ +---+ +----------------+ +----------------+ | + | +---+ |U5 | |U40| |U13 | |U9 | | + | | | +---+ | | | | | + | +-----+ |U41| +----------------+ +----------------+ | + | +---+ |U12 | |U8 | | + | +---+ | | | | | + | |VR2| +-----+ +-----+ +----------------+ +----------------+ | + | | | |U24 | |U22 | |U11 | |U7 | | + | | | | | | | | | | | | + | | | +-----+ +-----+ +----------------+ +----------------+ | + | +---+ +----------------------------------+ | + | | 96-pin female connector | | + +--------------------------------------------------------------------------------------------------------+ + + U5: 48 MHz crystal (unpopulated from factory). + + U7: 27C4096 ROM socket (bank 0). + U8: 27C4096 ROM socket (bank 1). + U9: 27C4096 ROM socket (bank 2). + U10: 27C4096 ROM socket (bank 3). + + U11: 27C4096 ROM socket (bank 0). + U12: 27C4096 ROM socket (bank 1). + U13: 27C4096 ROM socket (bank 2). + U14: 27C4096 ROM socket (bank 3). + + U21: NEC D43256BGU-70LL (32k x 8bit CMOS Static RAM). + U22: LATTICE GAL20V8B-15LJ (High Performance E2CMOS PLD Generic Array Logic, 28-Lead PLCC). + U23: LATTICE GAL16V8D-25LJ (High Performance E2CMOS PLD Generic Array Logic, 20-Lead PLCC). + U24: LATTICE GAL16V8D-25LJ (High Performance E2CMOS PLD Generic Array Logic, 20-Lead PLCC). + U26: SGS THOMSON ST93C46 (1K (64 x 16 or 128 x 8) Serial EEPROM). + U27: SGS THOMSON ST93C46 (1K (64 x 16 or 128 x 8) Serial EEPROM). + + U35: PHILIPS 74HC273. + U36: LATTICE GAL20V8B-15LJ (High Performance E2CMOS PLD Generic Array Logic, 28-Lead PLCC). + U40: Dallas Semiconductor DS1202S (Serial Timekeeping Chip). + U41: Maxim Integrated MAX705CSA (MPU Supervisory Circuits). + U46: NEC D43256BGU-70LL (32k x 8bit CMOS Static RAM). + U47: Maxim Integrated MAX202CWE (RS-232 Interface IC). + U48: ISSI IS41C16257-60K (256K x 16bit (4-MBIT) Dynamic RAM With Fast Page Mode). + U49: ISSI IS41C16257-60K (256K x 16bit (4-MBIT) Dynamic RAM With Fast Page Mode). + U50: Dallas Semiconductor DS1620 (Digital Thermometer and Thermostat). + U52: Allegro MicroSystems UDN2543B (Protected quad power driver). + U53: SGS THOMSON 74HC244 (Octal buffer/line driver, 3-state). + U54: Motorola AC244 (Octal Buffer/Line Driver with 3-State Outputs). + U56: SGS THOMSON 74HC244 (Octal buffer/line driver, 3-state). + U58: Motorola AC244 (Octal Buffer/Line Driver with 3-State Outputs). + U59: Motorola AC244 (Octal Buffer/Line Driver with 3-State Outputs). + U61: Motorola AC244 (Octal Buffer/Line Driver with 3-State Outputs). + U65: LATTICE GAL20V8B-15LJ (High Performance E2CMOS PLD Generic Array Logic, 28-Lead PLCC). + U66: NEC D43256BGU-70LL (32k x 8bit CMOS Static RAM). + U71: Texas Instruments TL16C452FN (UART Interface IC Dual UART w/Prl Port & w/o FIFO). + U72: Texas Instruments TL16C452FN (UART Interface IC Dual UART w/Prl Port & w/o FIFO). + U73: CX0826 72 MHz crystal. + U85: ARM250: Computer system on a chip. ARM 32bit RISC processor with memory, video, and I/O controllers. + U89: Allegro MicroSystems UDN2543B (Protected quad power driver). + U149: ISSI IS41C16257-60K (256K x 16bit (4-MBIT) Dynamic RAM With Fast Page Mode). + U152: ISSI IS41C16257-60K (256K x 16bit (4-MBIT) Dynamic RAM With Fast Page Mode). + + AA: SGS THOMSON 74HC244 (Octal buffer/line driver, 3-state). + AB: SGS THOMSON 74HC244 (Octal buffer/line driver, 3-state). + AC: PHILIPS 74HC245D (Octal bus transceiver, 3-state). + + AMP: TDA 2006 (12W Audio Amplifier). + + VR1: Motorola 7805 (3-Terminal 1A Positive Voltage Regulator). + VR2: SGS THOMSON L4975A (5A stepdown monolithic power switching regulator at 5.1V-40V). + + X2: Unpopulated crystal (from factory). + + The 96-pin female connector at the bottom of the ROM banks is intended for a sub board + with two ROM sockets, that once plugged switch the ROM bank 0 with the sub board bank. + Just to place the clear chips without removing the U7 & U11 EPROMS. + +*****************************************************************************************************************/ + +#define MASTER_CLOCK XTAL_72MHz /* confirmed */ #include "emu.h" #include "cpu/arm/arm.h" @@ -418,7 +527,7 @@ void aristmk5_state::machine_reset() static MACHINE_CONFIG_START( aristmk5, aristmk5_state ) - MCFG_CPU_ADD("maincpu", ARM, 12000000) + MCFG_CPU_ADD("maincpu", ARM, MASTER_CLOCK/6) // 12000000 MCFG_CPU_PROGRAM_MAP(aristmk5_drame_map) MCFG_WATCHDOG_TIME_INIT(attotime::from_seconds(2)) /* 1.6 - 2 seconds */ @@ -464,7 +573,7 @@ static MACHINE_CONFIG_START( aristmk5, aristmk5_state ) MACHINE_CONFIG_END static MACHINE_CONFIG_START( aristmk5_usa, aristmk5_state ) - MCFG_CPU_ADD("maincpu", ARM, 12000000) + MCFG_CPU_ADD("maincpu", ARM, MASTER_CLOCK/6) // 12000000 MCFG_CPU_PROGRAM_MAP(aristmk5_map) MCFG_WATCHDOG_TIME_INIT(attotime::from_seconds(2)) /* 1.6 - 2 seconds */ @@ -608,6 +717,25 @@ ROM_START( qotn ) ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END +// MV4091 - 10 Credit Multiplier / 9 Line Multiline. +// QUEEN OF THE NILE - NSW/ACT B - 13/05/97. +// Marked as GHG409102 +// All devices are 27c4002 instead of 27c4096. +// Even when it's a NSW/ACT, the program seems to be for US-Export platforms... +ROM_START( qotna ) + ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_LOAD32_WORD( "mv4091_qotn.u7", 0x000000, 0x80000, CRC(a00ab2cf) SHA1(eb3120fe4b1d0554c224c7646e727e86fd35975e) ) + ROM_LOAD32_WORD( "mv4091_qotn.u11", 0x000002, 0x80000, CRC(c4a35337) SHA1(d469ed154caed1f0a4cf89e67d852924c95172ed) ) + ROM_LOAD32_WORD( "mv4091_qotn.u8", 0x100000, 0x80000, CRC(16a629e1) SHA1(0dee11a2f1b2068a86b3e0b6c01d115555a657c9) ) + ROM_LOAD32_WORD( "mv4091_qotn.u12", 0x100002, 0x80000, CRC(7871a846) SHA1(ac1d741092afda842e1864f1a7a14137a9ee46d9) ) + + ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ + + ROM_REGION( 0x200000, "vram", ROMREGION_ERASE00 ) + + ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) +ROM_END + ROM_START( swthrt2v ) ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "01j01986.u7", 0x000000, 0x80000, CRC(f51b2faa) SHA1(dbcfdbee92af5f89a8a2611bbc687ee0cc907642) ) @@ -648,6 +776,8 @@ ROM_START( margmgc ) ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END +// 0200751V - 10 Credit Multiplier / 20 Line Multiline. +// ADONIS - NSW/ACT A - 25/05/98 Revision: 10 602/9. ROM_START( adonis ) ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0200751v.u7", 0x000000, 0x80000, CRC(ab386ab0) SHA1(56c5baea4272866a9fe18bdc371a49f155251f86) ) @@ -660,6 +790,61 @@ ROM_START( adonis ) ROM_REGION( 0x200000, "vram", ROMREGION_ERASE00 ) ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) + + ROM_REGION( 0x100, "eeproms", 0 ) + ROM_LOAD( "st93c46.u26", 0x0000, 0x0080, NO_DUMP ) + ROM_LOAD( "st93c46.u27", 0x0080, 0x0080, NO_DUMP ) + + ROM_REGION( 0x0005, "plds", 0 ) + ROM_LOAD( "gal20v8b.u22", 0x0000, 0x0001, NO_DUMP ) /* 28-Lead PLCC package. Unable to read */ + ROM_LOAD( "gal16v8d.u23", 0x0000, 0x0001, NO_DUMP ) /* 20-Lead PLCC package. Unable to read */ + ROM_LOAD( "gal16v8d.u24", 0x0000, 0x0001, NO_DUMP ) /* 20-Lead PLCC package. Unable to read */ + ROM_LOAD( "gal20v8b.u36", 0x0000, 0x0001, NO_DUMP ) /* 28-Lead PLCC package. Unable to read */ + ROM_LOAD( "gal20v8b.u65", 0x0000, 0x0001, NO_DUMP ) /* 28-Lead PLCC package. Unable to read */ +ROM_END + +// 0100751V - 10 Credit Multiplier / 20 Line Multiline. +// ADONIS - NSW/ACT A - 25/05/98 Revision: 9 602/9. +ROM_START( adonisa ) + ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_LOAD32_WORD( "0100751v.u7", 0x000000, 0x80000, CRC(ca3e97db) SHA1(bd0a4402e57891899d92ea85a87fb8925a44f706) ) + ROM_LOAD32_WORD( "0100751v.u11", 0x000002, 0x80000, CRC(cfe3f792) SHA1(aa1bf77101404c2018a5e5b808f1d683e29ae942) ) + ROM_LOAD32_WORD( "0100751v.u8", 0x100000, 0x80000, CRC(d55204bd) SHA1(208c089d435ea4af25d0b9b3d5e79fea397bc885) ) + ROM_LOAD32_WORD( "0100751v.u12", 0x100002, 0x80000, CRC(77090858) SHA1(76ebc15b26f378ac95276f0aa26d077e3646a6f1) ) + + ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ + + ROM_REGION( 0x200000, "vram", ROMREGION_ERASE00 ) + + ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) + + ROM_REGION( 0x100, "eeproms", 0 ) + ROM_LOAD( "st93c46.u27", 0x0000, 0x0080, CRC(115c305a) SHA1(684a70d74ec92564e17c4292cd357e603842c485) ) + ROM_LOAD( "st93c46.u26", 0x0080, 0x0080, CRC(652d544c) SHA1(cd5bd20e9a0f22d7367cc169e2844a02751c7c91) ) // blank... all 0xff's + + ROM_REGION( 0x0005, "plds", 0 ) + ROM_LOAD( "gal20v8b.u22", 0x0000, 0x0001, NO_DUMP ) /* 28-Lead PLCC package. Unable to read */ + ROM_LOAD( "gal16v8d.u23", 0x0000, 0x0001, NO_DUMP ) /* 20-Lead PLCC package. Unable to read */ + ROM_LOAD( "gal16v8d.u24", 0x0000, 0x0001, NO_DUMP ) /* 20-Lead PLCC package. Unable to read */ + ROM_LOAD( "gal20v8b.u36", 0x0000, 0x0001, NO_DUMP ) /* 28-Lead PLCC package. Unable to read */ + ROM_LOAD( "gal20v8b.u65", 0x0000, 0x0001, NO_DUMP ) /* 28-Lead PLCC package. Unable to read */ +ROM_END + +// 630 - 10 Credit Multiplier / 9 Line Multiline. +// The Chariot Challenge - NSW/ACT - A - 10/08/98. +// 04J00714 +ROM_START( chariotc ) + ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_LOAD32_WORD( "04j00714_chariot_challenge.u7", 0x000000, 0x80000, CRC(2f3a1af7) SHA1(e1448116a81687cb79dd380dfbc8decf1f83e649) ) + ROM_LOAD32_WORD( "04j00714_chariot_challenge.u11", 0x000002, 0x80000, CRC(ef4f49e8) SHA1(8ff21f679a55cdfebcf22c109dfd3b41773293bd) ) + ROM_LOAD32_WORD( "04j00714_chariot_challenge.u8", 0x100000, 0x80000, CRC(fa24cfde) SHA1(1725c38a8a15915d8aa8e59afef9ce1d6e8d01c5) ) + ROM_LOAD32_WORD( "04j00714_chariot_challenge.u12", 0x100002, 0x80000, CRC(b8d4a5ec) SHA1(097e44cdb30b9aafd7f5358c8f0cdd130ec0615e) ) + + ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ + + ROM_REGION( 0x200000, "vram", ROMREGION_ERASE00 ) + + ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END ROM_START( wtiger ) @@ -706,7 +891,98 @@ ROM_START( geishanz ) ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END -/*********************** US games (requires set chips) ***********************/ +/*********************** US and Export games (requires set chips) ***********************/ + +// 559/2 - 10 Credit Multiplier / 9 Line Multiline. +// Mine, Mine, Mine - Export E - 14/02/96. +// All devices are 27c4002 instead of 27c4096. +ROM_START( minemine ) + ARISTOCRAT_MK5_BIOS + ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_LOAD32_WORD( "mine_export.u7", 0x000000, 0x80000, CRC(41bc3714) SHA1(5a8f7d24a6a697524af7997dcedd214fcaf48768) ) + ROM_LOAD32_WORD( "mine_export.u11", 0x000002, 0x80000, CRC(75803b10) SHA1(2ff3d966da2992ddcc7e229d979cc1ee623b4900) ) + ROM_LOAD32_WORD( "mine_export.u8", 0x100000, 0x80000, CRC(0a3e2baf) SHA1(b9ab989cf383cd6ea0aa1ead137558a1a6f5901d) ) + ROM_LOAD32_WORD( "mine_export.u12", 0x100002, 0x80000, CRC(26c01532) SHA1(ec68ad44b703609c7bc27275f8d9250a16d9067c) ) + + ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ + + ROM_REGION( 0x200000, "vram", ROMREGION_ERASE00 ) + + ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) +ROM_END + +// 602/1 - 10 Credit Multiplier / 9 Line Multiline. +// Dolphin Treasure - Export B - 06/12/96. +// All devices are 27c4002 instead of 27c4096. +ROM_START( dolphtre ) + ARISTOCRAT_MK5_BIOS + ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_LOAD32_WORD( "dolphin_treasure_export.u7", 0x000000, 0x80000, CRC(97e3e4d0) SHA1(211b9b9e0f25dfaf9d1dfe1d3d88592522aa6f07) ) + ROM_LOAD32_WORD( "dolphin_treasure_export.u11", 0x000002, 0x80000, CRC(de221eb5) SHA1(0e550e90b7fd5670f3f3a8589239c342ed70dc3d) ) + ROM_LOAD32_WORD( "dolphin_treasure_export.u8", 0x100000, 0x80000, CRC(cb3ca8b6) SHA1(dba8bdaa406c07870f95241466359e39a012a70b) ) + ROM_LOAD32_WORD( "dolphin_treasure_export.u12", 0x100002, 0x80000, CRC(8ee1c2d3) SHA1(e6ecaaac0cb4518ecc0d36532ab532f46e3e628b) ) + + ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ + + ROM_REGION( 0x200000, "vram", ROMREGION_ERASE00 ) + + ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) +ROM_END + +// 603(a) - 3,5,10,25,50 Credit Multiplier / 20 Line Multiline. +// Cash Chameleon 100cm - Export B - 06/12/96. +// Marked as DHG4078. +ROM_START( cashcham ) + ARISTOCRAT_MK5_BIOS + ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_LOAD32_WORD( "dhg4078_cash_chameleon.u7", 0x000000, 0x80000, CRC(cb407a19) SHA1(d98421d6548e48b413f6dfcab4e240e98fcc9a69) ) + ROM_LOAD32_WORD( "dhg4078_cash_chameleon.u11", 0x000002, 0x80000, CRC(94d73843) SHA1(ab236750c67e7fff3af831f1d03f45c45f280fd1) ) + ROM_LOAD32_WORD( "dhg4078_cash_chameleon.u8", 0x100000, 0x80000, CRC(4cae8a5d) SHA1(3232461afd75ce71f8a2cb4ac7e9a3caeb8aabcd) ) + ROM_LOAD32_WORD( "dhg4078_cash_chameleon.u12", 0x100002, 0x80000, CRC(39e17f0b) SHA1(25a0364fa45e4e78d6c365b0739606e71597bd71) ) + + ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ + + ROM_REGION( 0x200000, "vram", ROMREGION_ERASE00 ) + + ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) +ROM_END + +// MV4033 - 10 Credit Multiplier / 9 Line Multiline. +// Enchanted Forest - Export B - 10/02/97. +// Marked as 94.97% +// All devices are 27c4002 instead of 27c4096. +ROM_START( enchfore ) + ARISTOCRAT_MK5_BIOS + ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_LOAD32_WORD( "jhg041503_enchanted_forest.u7", 0x000000, 0x80000, CRC(cae1fb55) SHA1(386913ddf9be406f46aab06cf3e27c3c38a4d52d) ) // 94.97% + ROM_LOAD32_WORD( "jhg041503_enchanted_forest.u11", 0x000002, 0x80000, CRC(a71b7b3c) SHA1(26c3438398b6a3cc9946a1cd1c92d317a8e2738e) ) // 94.97% + ROM_LOAD32_WORD( "jhg041503_enchanted_forest.u8", 0x100000, 0x80000, CRC(002dec6c) SHA1(fb3f4ce9cd8cd9e0e3133376ed014db83db041c5) ) // base + ROM_LOAD32_WORD( "jhg041503_enchanted_forest.u12", 0x100002, 0x80000, CRC(c968471f) SHA1(9d54a5c396e6f83690db2fcb7ddcc8a47a7dd777) ) // base + + ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ + + ROM_REGION( 0x200000, "vram", ROMREGION_ERASE00 ) + + ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) +ROM_END + +// MV4033 - 10 Credit Multiplier / 9 Line Multiline. +// Magic Garden - Export B - 10/02/97. +// Marked as AHG1211 and 88.26% +ROM_START( mgarden ) + ARISTOCRAT_MK5_BIOS + ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_LOAD32_WORD( "ahg1211-99_magic_garden.u7", 0x000000, 0x80000, CRC(4fe50505) SHA1(6cde87a8a6748af792a1fb101829491367bd4487) ) + ROM_LOAD32_WORD( "ahg1211-99_magic_garden.u11", 0x000002, 0x80000, CRC(723ffeee) SHA1(9eab33c9dbf656489914e539a28da5ae289e8df7) ) + ROM_LOAD32_WORD( "ahg1211-99_magic_garden.u8", 0x100000, 0x80000, CRC(a315ca28) SHA1(0309789362a945d592ee2eda912e4fc2e6ea5be6) ) + ROM_LOAD32_WORD( "ahg1211-99_magic_garden.u12", 0x100002, 0x80000, CRC(4b252c2c) SHA1(8be41fb2b8f8d2829c18ea123a02f3e61c136206) ) + + ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ + + ROM_REGION( 0x200000, "vram", ROMREGION_ERASE00 ) + + ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) +ROM_END ROM_START( goldprmd ) ARISTOCRAT_MK5_BIOS @@ -723,6 +999,145 @@ ROM_START( goldprmd ) ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END +// 602/2 - 10 Credit Multiplier / 20 Line Multiline. +// QUEEN OF THE NILE - NSW/ACT - B - 13/05/97. +// Marked as AHG1206-99, Golden Pyramids, and 87.928% +// Queen of The Nile and Golden Pyramids are +// both the same game with different title. +ROM_START( goldpyra ) + ARISTOCRAT_MK5_BIOS + ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_LOAD32_WORD( "ahg1206-99_golden_pyramids.u7", 0x000000, 0x80000, CRC(e6c80f67) SHA1(901cf8f8fd46c1c4a70e1954d2d2d88e7acd07a8) ) + ROM_LOAD32_WORD( "ahg1206-99_golden_pyramids.u11", 0x000002, 0x80000, CRC(3cc221ea) SHA1(a71d16b818110f5b632e996e9f2fcb8be17b2aee) ) + ROM_LOAD32_WORD( "ahg1206-99_golden_pyramids.u8", 0x100000, 0x80000, CRC(df1ffb31) SHA1(1cf9d008b1f8fdb06ba050c97dae79f272c8063c) ) + ROM_LOAD32_WORD( "ahg1206-99_golden_pyramids.u12", 0x100002, 0x80000, CRC(d2c8f786) SHA1(a9efa35c8f2833a2b77f092398ca959d5fe6194e) ) + + ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ + + ROM_REGION( 0x200000, "vram", ROMREGION_ERASE00 ) + + ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) +ROM_END + +// 569/8 - 10 Credit Multiplier / 9 Line Multiline. +// Wild Cougar - Export D - 19/05/97. +// All devices are 27c4002 instead of 27c4096. +ROM_START( wldcougr ) + ARISTOCRAT_MK5_BIOS + ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_LOAD32_WORD( "wild_cougar_export.u7", 0x000000, 0x80000, CRC(7ada053f) SHA1(5102b0b9db505454624750a3fd6db455682538f3) ) + ROM_LOAD32_WORD( "wild_cougar_export.u11", 0x000002, 0x80000, CRC(69a78695) SHA1(1ed89cf38dc85f752449a858cd9558bed235af58) ) + ROM_LOAD32_WORD( "wild_cougar_export.u8", 0x100000, 0x80000, CRC(496b0295) SHA1(237183a192ad9b4bc133014cc83149d4a7062785) ) + ROM_LOAD32_WORD( "wild_cougar_export.u12", 0x100002, 0x80000, CRC(fe2bafdc) SHA1(e8b454db44a532d75b3aff323855340695688f0f) ) + + ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ + + ROM_REGION( 0x200000, "vram", ROMREGION_ERASE00 ) + + ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) +ROM_END + +// 593 - 10 Credit Multiplier / 9 Line Multiline. +// Bumble Bugs - Export D - 05/07/97. +// All devices are 27c4002 instead of 27c4096. +// Marked as CHG029604 and 92.691% +ROM_START( bumblbug ) + ARISTOCRAT_MK5_BIOS + ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_LOAD32_WORD( "bumble_bugs_export.u7", 0x000000, 0x80000, CRC(ec605a36) SHA1(114e0840cfbd0c64645a5a33065db85462a0ba2d) ) // 92.691% + ROM_LOAD32_WORD( "bumble_bugs_export.u11", 0x000002, 0x80000, CRC(17b154bd) SHA1(efdf307670a3d74f7980fec2d2197d837d4c26e2) ) // 92.691% + ROM_LOAD32_WORD( "bumble_bugs_export.u8", 0x100000, 0x80000, CRC(e0c01d01) SHA1(9153129fd348a97da7cccf002e5d03e4b4db9264) ) // base + ROM_LOAD32_WORD( "bumble_bugs_export.u12", 0x100002, 0x80000, CRC(28700d5d) SHA1(87a583cd487da6cb4c2da5f62297f0e577269fae) ) // base + + ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ + + ROM_REGION( 0x200000, "vram", ROMREGION_ERASE00 ) + + ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) +ROM_END + +// 586/7(b) - 10 Credit Multiplier / 9 Line Multiline. +// Penguin Pays - Export B - 14/07/97. +// All devices are 27c4002 instead of 27c4096. +ROM_START( pengpays ) + ARISTOCRAT_MK5_BIOS + ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_LOAD32_WORD( "penguin_pays_export.u7", 0x000000, 0x80000, CRC(19d75260) SHA1(798472b1b5d8f5ca99d8bfe57e99a76686f0aa3f) ) + ROM_LOAD32_WORD( "penguin_pays_export.u11", 0x000002, 0x80000, CRC(2b010813) SHA1(a383997308881a3ac35de56fe10e3852fa89fdf6) ) + ROM_LOAD32_WORD( "penguin_pays_export.u8", 0x100000, 0x80000, CRC(6aeaebc8) SHA1(6f70b14e9f4e9940512bd6e89bc9ccbfe1f4a81f) ) + ROM_LOAD32_WORD( "penguin_pays_export.u12", 0x100002, 0x80000, CRC(d959a048) SHA1(92f69090d599f95b48e79213e5b7d486e083d8f4) ) + + ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ + + ROM_REGION( 0x200000, "vram", ROMREGION_ERASE00 ) + + ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) +ROM_END + +// 596 - 10 Credit Multiplier / 9 Line Multiline. (touch) +// Chicken - Export C - 23/02/98. +// Marked as RHG0730 and 92.588% +// All devices are 27c4002 instead of 27c4096. +ROM_START( chickena ) + ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_LOAD32_WORD( "rhg0730_chicken.u7", 0x000000, 0x80000, CRC(ca196b37) SHA1(6b204204c1574439ccea1b6145d867a73bad304f) ) // 92.588% + ROM_LOAD32_WORD( "rhg0730_chicken.u11", 0x000002, 0x80000, CRC(b0d7be28) SHA1(6998dce808bf7970500b9e1ce6efed3940ee2d63) ) // 92.588% + ROM_LOAD32_WORD( "rhg0730_chicken.u8", 0x100000, 0x80000, CRC(80e3e34c) SHA1(3ad73c5fc21c4d9647ea514bf367073bbeb981a9) ) // base + ROM_LOAD32_WORD( "rhg0730_chicken.u12", 0x100002, 0x80000, CRC(63d5ec8e) SHA1(dca76342ecee6843e6fc656aafc8ee2e4d19fd65) ) // base + ROM_LOAD32_WORD( "rhg0730_chicken.u9", 0x200000, 0x80000, CRC(662ff210) SHA1(bbd2410fa2cd67e327981c3b2e16342fb9393401) ) // base + ROM_LOAD32_WORD( "rhg0730_chicken.u13", 0x200002, 0x80000, CRC(c3cef8ae) SHA1(4e65787d61387b511972e514047528495e1de11c) ) // base + ROM_LOAD32_WORD( "rhg0730_chicken.u10", 0x300000, 0x80000, CRC(8b3f7d6b) SHA1(7f1a04556c448976145652b05b690142376764d4) ) // base + ROM_LOAD32_WORD( "rhg0730_chicken.u14", 0x300002, 0x80000, CRC(240f7759) SHA1(1fa5ba0185b027101dae207ec5d28b07d3d73fc2) ) // base + + ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ + + ROM_REGION( 0x200000, "vram", ROMREGION_ERASE00 ) + + ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) +ROM_END + +// MV4098 - 10 Credit Multiplier / 9 Line Multiline. +// BOOT SCOOTIN' - Export A - 25/08/99. +// All devices are 27c4002 instead of 27c4096. +// Marked as GHG1012 and 92.767% +ROM_START( bootsctn ) + ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_LOAD32_WORD( "ghg1012_boot_scootin.u7", 0x000000, 0x80000, CRC(ca26f31e) SHA1(e8da31cc8d12bf8a28f1ca4d796259ae9010f8af) ) // 92.767% + ROM_LOAD32_WORD( "ghg1012_boot_scootin.u11", 0x000002, 0x80000, CRC(61da1767) SHA1(83d4df1060975f03f291b9119c0d2b8debb0fb60) ) // 92.767% + ROM_LOAD32_WORD( "ghg1012_boot_scootin.u8", 0x100000, 0x80000, CRC(9ae4d616) SHA1(60d4d36f75685dfe21f914fa4682cd6a64fcfa58) ) // base + ROM_LOAD32_WORD( "ghg1012_boot_scootin.u12", 0x100002, 0x80000, CRC(2c50c083) SHA1(ae3b01200d152df9b2966b5308c71e9d1ad43d78) ) // base + ROM_LOAD32_WORD( "ghg1012_boot_scootin.u9", 0x200000, 0x80000, CRC(c0a4920d) SHA1(d2c6d259d2e067b6e5ad72a6ef164aac7d72bc5a) ) // base + ROM_LOAD32_WORD( "ghg1012_boot_scootin.u13", 0x200002, 0x80000, CRC(55716d82) SHA1(5b9982a49201842e9551a9c763a6babbb47a863e) ) // base + ROM_LOAD32_WORD( "ghg1012_boot_scootin.u10", 0x300000, 0x80000, CRC(3ecdf7ee) SHA1(9d658a22da737daafdf6cb0d49009796036d04b1) ) // base + ROM_LOAD32_WORD( "ghg1012_boot_scootin.u14", 0x300002, 0x80000, CRC(18934c51) SHA1(f7c9c95c687dbfe89747e7877157fde37bc1119e) ) // base + + ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ + + ROM_REGION( 0x200000, "vram", ROMREGION_ERASE00 ) + + ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) +ROM_END + +// MV4104 3,5,10,20,25,50 Credit Multiplier / 9-20 Line Multiline. +// CUCKOO - Export C - 02/02/00. +// All devices are 27c4002 instead of 27c4096. +ROM_START( cuckoo ) + ARISTOCRAT_MK5_BIOS + ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_LOAD32_WORD( "mv4104_cuckoo.u7", 0x000000, 0x80000, CRC(0bd17338) SHA1(b8f467bdf8d76533a2b7d44fe93be414f25a3c31) ) + ROM_LOAD32_WORD( "mv4104_cuckoo.u11", 0x000002, 0x80000, CRC(4c407deb) SHA1(57589e61a376ddff99cd420eb47bf8c902c6a249) ) + ROM_LOAD32_WORD( "mv4104_cuckoo.u8", 0x100000, 0x80000, CRC(33f52052) SHA1(89cbfe588d91244adff4c520fa94962d69ff20bf) ) + ROM_LOAD32_WORD( "mv4104_cuckoo.u12", 0x100002, 0x80000, CRC(00bb7597) SHA1(f4d6b21091e320a82d59477469340633b001ed0d) ) + + ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ + + ROM_REGION( 0x200000, "vram", ROMREGION_ERASE00 ) + + ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) +ROM_END + +// MV4115 - 5,10,20 Credit Multiplier / 9 Line Multiline. +// Magic Mask [Reel Game] - Export A - 09/05/2000. ROM_START( magicmsk ) ARISTOCRAT_MK5_BIOS ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) @@ -738,20 +1153,128 @@ ROM_START( magicmsk ) ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END -GAME( 1995, aristmk5, 0, aristmk5, aristmk5, aristmk5_state, aristmk5, ROT0, "Aristocrat", "MKV Set/Clear Chips (USA)", MACHINE_NOT_WORKING|MACHINE_IS_BIOS_ROOT ) +// MV4115 - 5,10,20 Credit Multiplier / 9 Line Multiline. +// Magic Mask [Reel Game] - Export A - 09/05/2000. +// Alternate set with identical description, but way different +// than the parent. All devices are 27c4002 instead of 27c4096. +// +// romcmp magicmsk.zip magicmska.zip +// 4 and 4 files +// magicmsk.u12 mv4115_magic_mask.u12 21.547699% +// magicmsk.u8 mv4115_magic_mask.u8 21.138954% +// magicmsk.u11 mv4115_magic_mask.u11 17.786026% +// magicmsk.u7 mv4115_magic_mask.u7 16.893578% +ROM_START( magicmska ) + ARISTOCRAT_MK5_BIOS + ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_LOAD32_WORD( "mv4115_magic_mask.u7", 0x000000, 0x80000, CRC(452a19c9) SHA1(aab1f4ccfc6cdb382f7a0e85491614cc58811a08) ) + ROM_LOAD32_WORD( "mv4115_magic_mask.u11", 0x000002, 0x80000, CRC(c57601f3) SHA1(1616a424b41ad6fea6383a08d5352e8240433374) ) + ROM_LOAD32_WORD( "mv4115_magic_mask.u8", 0x100000, 0x80000, CRC(607d7447) SHA1(064dbfe8b52eebe1be7a41735da3fa01eacd1686) ) + ROM_LOAD32_WORD( "mv4115_magic_mask.u12", 0x100002, 0x80000, CRC(cf4cd569) SHA1(408edcd746587d249c4286f7a99f33ad94214f7c) ) + + ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ + + ROM_REGION( 0x200000, "vram", ROMREGION_ERASE00 ) + + ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) +ROM_END + +// MV4124/1 - 5,10,25,50 Credit Multiplier / 20 Line Multiline. +// Adonis [Reel Game] - Export B - 31/07/01. +// Marked as BHG1284. +ROM_START( adonise ) + ARISTOCRAT_MK5_BIOS + ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_LOAD32_WORD( "bhg1284_mv4124_adonis.u7", 0x000000, 0x80000, CRC(ed6254d7) SHA1(d2b790fdd7f5fc7b78fcfc4c96d0fc272ccf8da6) ) + ROM_LOAD32_WORD( "bhg1284_mv4124_adonis.u11", 0x000002, 0x80000, CRC(1f629286) SHA1(bce380a6a76c77bc790436bd6f94474a1db0c231) ) + ROM_LOAD32_WORD( "bhg1284_mv4124_adonis.u8", 0x100000, 0x80000, CRC(b756c96d) SHA1(494df20090d415e83d599023203c13273e7925ad) ) + ROM_LOAD32_WORD( "bhg1284_mv4124_adonis.u12", 0x100002, 0x80000, CRC(1d3b6b8f) SHA1(1ddcfd7323cc7e79d3e39d913fdb5cf5cd53d56d) ) + + ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ + + ROM_REGION( 0x200000, "vram", ROMREGION_ERASE00 ) + + ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) +ROM_END + +// MV4137 - 5,10,25,50 Credit Multiplier / 20 Line Multiline. +// Koala Mint [Reel Game] - Export A - 12/09/01. +// Marked as CHG1573. +ROM_START( koalamnt ) + ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_LOAD32_WORD( "chg1573_koala_mint.u7", 0x000000, 0x80000, CRC(fa690af0) SHA1(9e1e5171e9da602c025bfb2aefad397a537794cb) ) + ROM_LOAD32_WORD( "chg1573_koala_mint.u11", 0x000002, 0x80000, CRC(c33bed43) SHA1(2c8f35ca08b4d6ac56de5ab7c2515f34e04cf6c8) ) + ROM_LOAD32_WORD( "chg1573_koala_mint.u8", 0x100000, 0x80000, CRC(4aeb2e54) SHA1(74002cd12d93352310a864a2ed434c7f43d26534) ) // base + ROM_LOAD32_WORD( "chg1573_koala_mint.u12", 0x100002, 0x80000, CRC(2bf5786f) SHA1(f0693bbd2e6d2e110535205a1ad0b73a0ebd2f53) ) // base + ROM_LOAD32_WORD( "chg1573_koala_mint.u9", 0x200000, 0x80000, CRC(1a2650e7) SHA1(55a8604ef19836880f53d44a035a49b009acbb5a) ) // base + ROM_LOAD32_WORD( "chg1573_koala_mint.u13", 0x200002, 0x80000, CRC(51c78f63) SHA1(ef51e45d67a5684c35150747c186493258cb4549) ) // base + ROM_LOAD32_WORD( "chg1573_koala_mint.u10", 0x300000, 0x80000, CRC(a0fb61fe) SHA1(2a77ed082bc6829905f83a3cb3c4c120fa4ba0f9) ) // base + ROM_LOAD32_WORD( "chg1573_koala_mint.u14", 0x300002, 0x80000, CRC(5e4776e9) SHA1(d44851cbfaa054cd5675a841a3089a8f4fdc8421) ) // base + + ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ + + ROM_REGION( 0x200000, "vram", ROMREGION_ERASE00 ) + + ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) +ROM_END + +// MV4115/6 - 9/20 Line Multiline Multiplier. +// Party Gras [Reel Game] - Export A - 10/11/2001. +// All devices are 27c4002 instead of 27c4096. +ROM_START( partygrs ) + ARISTOCRAT_MK5_BIOS + ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_LOAD32_WORD( "mv4115-6_party_gras.u7", 0x000000, 0x80000, CRC(53047385) SHA1(efe50e8785047986513f2de63d2425ba80417481) ) + ROM_LOAD32_WORD( "mv4115-6_party_gras.u11", 0x000002, 0x80000, CRC(f8bd9f7f) SHA1(a8c67a644f9090890e8f33e620fe0bb4633bd6e8) ) + ROM_LOAD32_WORD( "mv4115-6_party_gras.u8", 0x100000, 0x80000, CRC(0b98a0fa) SHA1(c9ada21e39472f28cd9b8ec19be7235410ad3e7a) ) + ROM_LOAD32_WORD( "mv4115-6_party_gras.u12", 0x100002, 0x80000, CRC(00d1395c) SHA1(d9a66d6cdb5aa4f583d8c23306b1416646cbde93) ) + + ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ + + ROM_REGION( 0x200000, "vram", ROMREGION_ERASE00 ) + + ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) +ROM_END + + +/************************* +* Game Drivers * +*************************/ + +// YEAR NAME PARENT MACHINE INPUT STATE INIT ROT COMPANY FULLNAME FLAGS +GAME( 1995, aristmk5, 0, aristmk5, aristmk5, aristmk5_state, aristmk5, ROT0, "Aristocrat", "MKV Set/Clear Chips (USA)", MACHINE_NOT_WORKING|MACHINE_IS_BIOS_ROOT ) // Dates listed below are for the combination (reel layout), not release dates -GAME( 1995, enchfrst, 0, aristmk5, aristmk5, aristmk5_state, aristmk5, ROT0, "Aristocrat", "Enchanted Forest (0400122V, Local)", MACHINE_NOT_WORKING|MACHINE_IMPERFECT_SOUND ) // 570/3, E - 23/06/95 -GAME( 1995, swthrt2v, 0, aristmk5, aristmk5, aristmk5_state, aristmk5, ROT0, "Aristocrat", "Sweet Hearts II (01J01986, Venezuela)", MACHINE_NOT_WORKING|MACHINE_IMPERFECT_SOUND ) // 577/1, C - 07/09/95 -GAME( 1996, dolphntr, 0, aristmk5, aristmk5, aristmk5_state, aristmk5, ROT0, "Aristocrat", "Dolphin Treasure (0200424V, NSW/ACT)", MACHINE_NOT_WORKING|MACHINE_IMPERFECT_SOUND ) // 602/1, B - 06/12/96 -GAME( 1996, dolphtra, dolphntr, aristmk5, aristmk5, aristmk5_state, aristmk5, ROT0, "Aristocrat", "Dolphin Treasure (0100424V, NSW/ACT)", MACHINE_NOT_WORKING|MACHINE_IMPERFECT_SOUND ) // 602/1, B - 06/12/96 -GAME( 1997, goldprmd, aristmk5, aristmk5_usa, aristmk5, aristmk5_state, aristmk5, ROT0, "Aristocrat", "Golden Pyramids (MV4091, USA)", MACHINE_NOT_WORKING|MACHINE_IMPERFECT_SOUND ) // MV4091, B - 13/05/97 -GAME( 1997, qotn, 0, aristmk5, aristmk5, aristmk5_state, aristmk5, ROT0, "Aristocrat", "Queen of the Nile (0200439V, NSW/ACT)", MACHINE_NOT_WORKING|MACHINE_IMPERFECT_SOUND ) // 602/4, B - 13/05/97 -GAME( 1997, dmdtouch, 0, aristmk5, aristmk5, aristmk5_state, aristmk5, ROT0, "Aristocrat", "Diamond Touch (0400433V, Local)", MACHINE_NOT_WORKING|MACHINE_IMPERFECT_SOUND ) // 604, E - 30/06/97 -GAME( 1998, adonis, 0, aristmk5, aristmk5, aristmk5_state, aristmk5, ROT0, "Aristocrat", "Adonis (0200751V, NSW/ACT)", MACHINE_NOT_WORKING|MACHINE_IMPERFECT_SOUND ) // 602/9, A - 25/05/98 -GAME( 1998, reelrock, 0, aristmk5, aristmk5, aristmk5_state, aristmk5, ROT0, "Aristocrat", "Reelin-n-Rockin (0100779V, Local)", MACHINE_NOT_WORKING|MACHINE_IMPERFECT_SOUND ) // 628, A - 13/07/98 -GAME( 1998, indiandr, 0, aristmk5, aristmk5, aristmk5_state, aristmk5, ROT0, "Aristocrat", "Indian Dreaming (0100845V, Local)", MACHINE_NOT_WORKING|MACHINE_IMPERFECT_SOUND ) // 628/1, B - 15/12/98 -GAME( 1999, wtiger, 0, aristmk5, aristmk5, aristmk5_state, aristmk5, ROT0, "Aristocrat", "White Tiger Classic (0200954V, NSW/ACT)", MACHINE_NOT_WORKING|MACHINE_IMPERFECT_SOUND ) // 638/1, B - 08/07/99 -GAME( 2000, magicmsk, aristmk5, aristmk5_usa, aristmk5, aristmk5_state, aristmk5, ROT0, "Aristocrat", "Magic Mask (MV4115, Export)", MACHINE_NOT_WORKING|MACHINE_IMPERFECT_SOUND ) // MV4115, A - 09/05/2000 -GAME( 2000, margmgc, 0, aristmk5, aristmk5, aristmk5_state, aristmk5, ROT0, "Aristocrat", "Margarita Magic (01J00101, NSW/ACT)", MACHINE_NOT_WORKING|MACHINE_IMPERFECT_SOUND ) // JB005, A - 07/07/2000 -GAME( 2001, geishanz, 0, aristmk5, aristmk5, aristmk5_state, aristmk5, ROT0, "Aristocrat", "Geisha (0101408V, New Zealand)", MACHINE_NOT_WORKING|MACHINE_IMPERFECT_SOUND ) // MV4127, A - 05/03/01 +GAME( 1995, enchfrst, 0, aristmk5, aristmk5, aristmk5_state, aristmk5, ROT0, "Aristocrat", "Enchanted Forest (0400122V, Local)", MACHINE_NOT_WORKING|MACHINE_IMPERFECT_SOUND ) // 570/3, E - 23/06/95 +GAME( 1995, swthrt2v, 0, aristmk5, aristmk5, aristmk5_state, aristmk5, ROT0, "Aristocrat", "Sweet Hearts II (01J01986, Venezuela)", MACHINE_NOT_WORKING|MACHINE_IMPERFECT_SOUND ) // 577/1, C - 07/09/95 +GAME( 1996, minemine, aristmk5, aristmk5_usa, aristmk5, aristmk5_state, aristmk5, ROT0, "Aristocrat", "Mine, Mine, Mine (Export)", MACHINE_NOT_WORKING|MACHINE_IMPERFECT_SOUND ) // 559/2, E - 14/02/96 +GAME( 1996, dolphntr, 0, aristmk5, aristmk5, aristmk5_state, aristmk5, ROT0, "Aristocrat", "Dolphin Treasure (0200424V, NSW/ACT)", MACHINE_NOT_WORKING|MACHINE_IMPERFECT_SOUND ) // 602/1, B - 06/12/96, Rev 3 +GAME( 1996, dolphtra, dolphntr, aristmk5, aristmk5, aristmk5_state, aristmk5, ROT0, "Aristocrat", "Dolphin Treasure (0100424V, NSW/ACT)", MACHINE_NOT_WORKING|MACHINE_IMPERFECT_SOUND ) // 602/1, B - 06/12/96, Rev 1.24.4.0 +GAME( 1996, dolphtre, aristmk5, aristmk5_usa, aristmk5, aristmk5_state, aristmk5, ROT0, "Aristocrat", "Dolphin Treasure (Export)", MACHINE_NOT_WORKING|MACHINE_IMPERFECT_SOUND ) // 602/1, B - 06/12/96 +GAME( 1996, cashcham, aristmk5, aristmk5_usa, aristmk5, aristmk5_state, aristmk5, ROT0, "Aristocrat", "Cash Chameleon (Export)", MACHINE_NOT_WORKING|MACHINE_IMPERFECT_SOUND ) // 603(a), B - 06/12/96 +GAME( 1997, enchfore, aristmk5, aristmk5_usa, aristmk5, aristmk5_state, aristmk5, ROT0, "Aristocrat", "Enchanted Forest (MV4033, Export, 94.97%)", MACHINE_NOT_WORKING|MACHINE_IMPERFECT_SOUND ) // MV4033, B - 10/02/97 +GAME( 1997, mgarden, aristmk5, aristmk5_usa, aristmk5, aristmk5_state, aristmk5, ROT0, "Aristocrat", "Magic Garden (AHG1211, Export, 88.26%)", MACHINE_NOT_WORKING|MACHINE_IMPERFECT_SOUND ) // MV4033, B - 10/02/97 +GAME( 1997, goldprmd, aristmk5, aristmk5_usa, aristmk5, aristmk5_state, aristmk5, ROT0, "Aristocrat", "Golden Pyramids (MV4091, USA)", MACHINE_NOT_WORKING|MACHINE_IMPERFECT_SOUND ) // MV4091, B - 13/05/97 +GAME( 1997, goldpyra, aristmk5, aristmk5_usa, aristmk5, aristmk5_state, aristmk5, ROT0, "Aristocrat", "Golden Pyramids (AHG1206-99, NSW/ACT, 87.928%)", MACHINE_NOT_WORKING|MACHINE_IMPERFECT_SOUND ) // 602/2, B - 13/05/97 +GAME( 1997, qotn, 0, aristmk5, aristmk5, aristmk5_state, aristmk5, ROT0, "Aristocrat", "Queen of the Nile (0200439V, NSW/ACT)", MACHINE_NOT_WORKING|MACHINE_IMPERFECT_SOUND ) // 602/4, B - 13/05/97 +GAME( 1997, qotna, aristmk5, aristmk5_usa, aristmk5, aristmk5_state, aristmk5, ROT0, "Aristocrat", "Queen of the Nile (MV4091, NSW/ACT)", MACHINE_NOT_WORKING|MACHINE_IMPERFECT_SOUND ) // MV4091, B - 13/05/97 (US-Export HW?) +GAME( 1997, wldcougr, aristmk5, aristmk5_usa, aristmk5, aristmk5_state, aristmk5, ROT0, "Aristocrat", "Wild Cougar (Export)", MACHINE_NOT_WORKING|MACHINE_IMPERFECT_SOUND ) // 569/8, D - 19/05/97 +GAME( 1997, dmdtouch, 0, aristmk5, aristmk5, aristmk5_state, aristmk5, ROT0, "Aristocrat", "Diamond Touch (0400433V, Local)", MACHINE_NOT_WORKING|MACHINE_IMPERFECT_SOUND ) // 604, E - 30/06/97 +GAME( 1997, bumblbug, aristmk5, aristmk5_usa, aristmk5, aristmk5_state, aristmk5, ROT0, "Aristocrat", "Bumble Bugs (Export, 92.691%)", MACHINE_NOT_WORKING|MACHINE_IMPERFECT_SOUND ) // 593, D - 05/07/97 +GAME( 1997, pengpays, aristmk5, aristmk5_usa, aristmk5, aristmk5_state, aristmk5, ROT0, "Aristocrat", "Penguin Pays (Export)", MACHINE_NOT_WORKING|MACHINE_IMPERFECT_SOUND ) // 586/7(b) B - 14/07/97 +GAME( 1998, chickena, aristmk5, aristmk5_usa, aristmk5, aristmk5_state, aristmk5, ROT0, "Aristocrat", "Chicken (RHG0730, Export, 92.588%)", MACHINE_NOT_WORKING|MACHINE_IMPERFECT_SOUND ) // 596, C - 23/02/98 +GAME( 1998, adonis, 0, aristmk5, aristmk5, aristmk5_state, aristmk5, ROT0, "Aristocrat", "Adonis (0200751V, NSW/ACT)", MACHINE_NOT_WORKING|MACHINE_IMPERFECT_SOUND ) // 602/9, A - 25/05/98, Rev 10 +GAME( 1998, adonisa, adonis, aristmk5, aristmk5, aristmk5_state, aristmk5, ROT0, "Aristocrat", "Adonis (0100751V, NSW/ACT)", MACHINE_NOT_WORKING|MACHINE_IMPERFECT_SOUND ) // 602/9, A - 25/05/98, Rev 9 +GAME( 1998, reelrock, 0, aristmk5, aristmk5, aristmk5_state, aristmk5, ROT0, "Aristocrat", "Reelin-n-Rockin (0100779V, Local)", MACHINE_NOT_WORKING|MACHINE_IMPERFECT_SOUND ) // 628, A - 13/07/98 +GAME( 1998, indiandr, 0, aristmk5, aristmk5, aristmk5_state, aristmk5, ROT0, "Aristocrat", "Indian Dreaming (0100845V, Local)", MACHINE_NOT_WORKING|MACHINE_IMPERFECT_SOUND ) // 628/1, B - 15/12/98 +GAME( 1998, chariotc, 0, aristmk5, aristmk5, aristmk5_state, aristmk5, ROT0, "Aristocrat", "The Chariot Challenge (04J00714, NSW/ACT)", MACHINE_NOT_WORKING|MACHINE_IMPERFECT_SOUND ) // 630, A - 10/08/98, Rev 12 +GAME( 1999, wtiger, 0, aristmk5, aristmk5, aristmk5_state, aristmk5, ROT0, "Aristocrat", "White Tiger Classic (0200954V, NSW/ACT)", MACHINE_NOT_WORKING|MACHINE_IMPERFECT_SOUND ) // 638/1, B - 08/07/99 +GAME( 1999, bootsctn, aristmk5, aristmk5_usa, aristmk5, aristmk5_state, aristmk5, ROT0, "Aristocrat", "Boot Scootin' (Export, 92.767%)", MACHINE_NOT_WORKING|MACHINE_IMPERFECT_SOUND ) // MV4098, A - 25/08/99 +GAME( 2000, cuckoo, aristmk5, aristmk5_usa, aristmk5, aristmk5_state, aristmk5, ROT0, "Aristocrat", "Cuckoo (MV4104, Export)", MACHINE_NOT_WORKING|MACHINE_IMPERFECT_SOUND ) // MV4104, C - 02/02/00 +GAME( 2000, magicmsk, aristmk5, aristmk5_usa, aristmk5, aristmk5_state, aristmk5, ROT0, "Aristocrat", "Magic Mask (MV4115, Export, set 1)", MACHINE_NOT_WORKING|MACHINE_IMPERFECT_SOUND ) // MV4115, A - 09/05/00 +GAME( 2000, magicmska, magicmsk, aristmk5_usa, aristmk5, aristmk5_state, aristmk5, ROT0, "Aristocrat", "Magic Mask (MV4115, Export, set 2)", MACHINE_NOT_WORKING|MACHINE_IMPERFECT_SOUND ) // MV4115, A - 09/05/00 +GAME( 2000, margmgc, 0, aristmk5, aristmk5, aristmk5_state, aristmk5, ROT0, "Aristocrat", "Margarita Magic (01J00101, NSW/ACT)", MACHINE_NOT_WORKING|MACHINE_IMPERFECT_SOUND ) // JB005, A - 07/07/00 +GAME( 2001, geishanz, 0, aristmk5, aristmk5, aristmk5_state, aristmk5, ROT0, "Aristocrat", "Geisha (0101408V, New Zealand)", MACHINE_NOT_WORKING|MACHINE_IMPERFECT_SOUND ) // MV4127, A - 05/03/01 +GAME( 2001, adonise, aristmk5, aristmk5_usa, aristmk5, aristmk5_state, aristmk5, ROT0, "Aristocrat", "Adonis (MV4124/1, Export)", MACHINE_NOT_WORKING|MACHINE_IMPERFECT_SOUND ) // MV4124/1, B - 31/07/01 +GAME( 2001, koalamnt, aristmk5, aristmk5_usa, aristmk5, aristmk5_state, aristmk5, ROT0, "Aristocrat", "Koala Mint (MV4137, Export)", MACHINE_NOT_WORKING|MACHINE_IMPERFECT_SOUND ) // MV4137, A - 12/09/01 +GAME( 2001, partygrs, aristmk5, aristmk5_usa, aristmk5, aristmk5_state, aristmk5, ROT0, "Aristocrat", "Party Gras (MV4115/6, Export)", MACHINE_NOT_WORKING|MACHINE_IMPERFECT_SOUND ) // MV4115/6, A - 10/11/01 diff --git a/src/mame/drivers/astrof.c b/src/mame/drivers/astrof.c index ddab7938b15..76e0dbed3f4 100644 --- a/src/mame/drivers/astrof.c +++ b/src/mame/drivers/astrof.c @@ -198,7 +198,7 @@ void astrof_state::astrof_get_pens( pen_t *pens ) { offs_t i; UINT8 bank = (m_astrof_palette_bank ? 0x10 : 0x00); - UINT8 config = ioport("FAKE")->read_safe(0x00); + UINT8 config = read_safe(ioport("FAKE"), 0x00); UINT8 *prom = memregion("proms")->base(); /* a common wire hack to the pcb causes the prom halves to be inverted */ @@ -234,7 +234,7 @@ void astrof_state::tomahawk_get_pens( pen_t *pens ) { offs_t i; UINT8 *prom = memregion("proms")->base(); - UINT8 config = ioport("FAKE")->read_safe(0x00); + UINT8 config = read_safe(ioport("FAKE"), 0x00); for (i = 0; i < TOMAHAWK_NUM_PENS; i++) { diff --git a/src/mame/drivers/atari400.c b/src/mame/drivers/atari400.c index 73844078019..2d14ee25974 100644 --- a/src/mame/drivers/atari400.c +++ b/src/mame/drivers/atari400.c @@ -739,7 +739,7 @@ static INPUT_PORTS_START( atari_keyboard ) PORT_START("keyboard.1") PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_O) PORT_CHAR('o') PORT_CHAR('O') - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) // None! + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_UNUSED) PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_P) PORT_CHAR('p') PORT_CHAR('P') PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_U) PORT_CHAR('u') PORT_CHAR('U') PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Return") PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13) diff --git a/src/mame/drivers/barata.c b/src/mame/drivers/barata.c index f41391919e8..0953db8959d 100644 --- a/src/mame/drivers/barata.c +++ b/src/mame/drivers/barata.c @@ -153,26 +153,26 @@ const char* mode_strings[] = { "Set counter values" }; -static void fpga_send(unsigned char cmd){ +static void fpga_send(device_t *device, unsigned char cmd){ static unsigned char byte = 0; static unsigned char mode = FPGA_WAITING_FOR_NEW_CMD; static unsigned char lamp_data = 0; - logerror("FPGA CMD: %d\n", cmd); + device->logerror("FPGA CMD: %d\n", cmd); if (mode == FPGA_WAITING_FOR_NEW_CMD){ if (cmd < FPGA_WAITING_FOR_NEW_CMD){ mode = cmd; byte=1; - logerror("SET FPGA MODE: %s\n", mode_strings[mode]); + device->logerror("SET FPGA MODE: %s\n", mode_strings[mode]); if (mode == FPGA_PLAY_BGM){ - logerror("PLAY_BGM.\n"); + device->logerror("PLAY_BGM.\n"); mode = FPGA_WAITING_FOR_NEW_CMD; } if (mode == FPGA_STOP_BGM){ - logerror("STOP_BGM.\n"); + device->logerror("STOP_BGM.\n"); mode = FPGA_WAITING_FOR_NEW_CMD; } } @@ -248,7 +248,7 @@ static void fpga_send(unsigned char cmd){ break; case 2: sample_index = (sample_index << 3) | cmd; - logerror("PLAY_SAMPLE #%d.\n", sample_index); + device->logerror("PLAY_SAMPLE #%d.\n", sample_index); default: mode = FPGA_WAITING_FOR_NEW_CMD; break; @@ -263,7 +263,7 @@ WRITE8_MEMBER(barata_state::fpga_w) static unsigned char old_data = 0; if (!BIT(old_data, 5) && BIT(data, 5)){ //process the command sent to the FPGA - fpga_send((data >> 2) & 7); + fpga_send(this, (data >> 2) & 7); } old_data = data; } diff --git a/src/mame/drivers/bbc.c b/src/mame/drivers/bbc.c index 8438eb87289..c658dbc0020 100644 --- a/src/mame/drivers/bbc.c +++ b/src/mame/drivers/bbc.c @@ -30,14 +30,6 @@ ARM1 - ARM Evaluation System ADB20 - Master Compact - - MESS Driver By: - - Gordon Jefferyes - mess_bbc@romvault.com - Nigel Barnes - ngbarnes@hotmail.com - ******************************************************************************/ /* Core includes */ @@ -57,6 +49,7 @@ /* Devices */ #include "imagedev/flopdrv.h" #include "formats/bbc_dsk.h" +//#include "formats/fsd_dsk.h" #include "imagedev/cassette.h" #include "formats/uef_cas.h" #include "formats/csw_cas.h" @@ -175,7 +168,7 @@ static ADDRESS_MAP_START( bbc_base, AS_PROGRAM, 8, bbc_state ) AM_RANGE(0xfe08, 0xfe08) AM_MIRROR(0x06) AM_DEVREADWRITE("acia6850", acia6850_device, status_r, control_w) /* fe08-fe0F 6850 ACIA Serial controller */ AM_RANGE(0xfe09, 0xfe09) AM_MIRROR(0x06) AM_DEVREADWRITE("acia6850", acia6850_device, data_r, data_w) AM_RANGE(0xfe10, 0xfe17) AM_READWRITE(bbc_fe_r, bbc_SerialULA_w) /* fe10-fe17 Serial ULA Serial system chip */ - AM_RANGE(0xfe18, 0xfe1f) AM_READ_PORT("S11") /* fe18-fe1f INTOFF/STATID ECONET Interrupt Off / ID No. */ + AM_RANGE(0xfe18, 0xfe1f) AM_READ_PORT("STATID") /* fe18-fe1f INTOFF/STATID ECONET Interrupt Off / ID No. */ AM_RANGE(0xfe20, 0xfe2f) AM_WRITE(bbc_videoULA_w) /* R: fe20-fe2f INTON ECONET Interrupt On */ /* W: fe20-fe2f Video ULA Video system chip */ AM_RANGE(0xfe40, 0xfe5f) AM_DEVREADWRITE("via6522_0", via6522_device, read, write) /* fe40-fe5f 6522 VIA SYSTEM VIA */ @@ -194,8 +187,8 @@ static ADDRESS_MAP_START( bbcb_mem, AS_PROGRAM, 8, bbc_state ) AM_RANGE(0x8000, 0xbfff) AM_READ_BANK("bank4") AM_WRITE(bbc_memoryb4_w) /* 8000-bfff Paged ROM */ AM_RANGE(0xfe30, 0xfe3f) AM_READWRITE(bbc_fe_r, bbc_page_selectb_w) /* R: fe30-fe3f NC Not Connected */ /* W: fe30-fe3f 84LS161 Paged ROM selector */ - AM_RANGE(0xfe80, 0xfe83) AM_DEVICE("i8271" , i8271_device, map) /* fe80-fe9f 8271 FDC Floppy disc controller */ - AM_RANGE(0xfe84, 0xfe9f) AM_DEVREADWRITE("i8271", i8271_device, data_r, data_w) /* fe80-fe9f 8271 FDC Floppy disc controller */ + AM_RANGE(0xfe80, 0xfe83) AM_DEVICE("i8271", i8271_device, map) /* fe80-fe83 8271 FDC Floppy disc controller */ + AM_RANGE(0xfe84, 0xfe9f) AM_DEVREADWRITE("i8271", i8271_device, data_r, data_w) /* fe84-fe9f 8271 FDC Floppy disc controller */ AM_IMPORT_FROM(bbc_base) ADDRESS_MAP_END @@ -286,24 +279,6 @@ static ADDRESS_MAP_START(bbcm_mem, AS_PROGRAM, 8, bbc_state ) ADDRESS_MAP_END -static const rgb_t bbc_palette[8]= -{ - rgb_t(0x0ff,0x0ff,0x0ff), - rgb_t(0x000,0x0ff,0x0ff), - rgb_t(0x0ff,0x000,0x0ff), - rgb_t(0x000,0x000,0x0ff), - rgb_t(0x0ff,0x0ff,0x000), - rgb_t(0x000,0x0ff,0x000), - rgb_t(0x0ff,0x000,0x000), - rgb_t(0x000,0x000,0x000) -}; - -PALETTE_INIT_MEMBER(bbc_state, bbc) -{ - palette.set_pen_colors(0, bbc_palette, ARRAY_LENGTH(bbc_palette)); -} - - INPUT_CHANGED_MEMBER(bbc_state::trigger_reset) { m_maincpu->set_input_line(INPUT_LINE_RESET, newval ? CLEAR_LINE : ASSERT_LINE); @@ -488,24 +463,82 @@ static INPUT_PORTS_START(bbc_dipswitch) PORT_MODIFY("COL7") PORT_DIPNAME(0x01, 0x01, "Screen Mode") PORT_DIPLOCATION("KBD:6") - PORT_DIPSETTING( 0x00, "+0" ) - PORT_DIPSETTING( 0x01, "+4" ) + PORT_DIPSETTING( 0x00, "0" ) + PORT_DIPSETTING( 0x01, "4" ) PORT_MODIFY("COL8") PORT_DIPNAME(0x01, 0x01, "Screen Mode") PORT_DIPLOCATION("KBD:7") - PORT_DIPSETTING( 0x00, "+0" ) - PORT_DIPSETTING( 0x01, "+2" ) + PORT_DIPSETTING( 0x00, "0" ) + PORT_DIPSETTING( 0x01, "2" ) PORT_MODIFY("COL9") PORT_DIPNAME(0x01, 0x01, "Screen Mode") PORT_DIPLOCATION("KBD:8") - PORT_DIPSETTING( 0x00, "+0" ) - PORT_DIPSETTING( 0x01, "+1" ) + PORT_DIPSETTING( 0x00, "0" ) + PORT_DIPSETTING( 0x01, "1" ) +INPUT_PORTS_END + + +static INPUT_PORTS_START(bbcb_links) + PORT_START("STATID") + PORT_DIPNAME(0xff, 0xfe, "Econet ID") PORT_DIPLOCATION("S11:0,1,2,3,4,5,6,7") + PORT_DIPSETTING( 0x00, "0" ) PORT_DIPSETTING( 0x01, "1" ) PORT_DIPSETTING( 0x02, "2" ) PORT_DIPSETTING( 0x03, "3" ) PORT_DIPSETTING( 0x04, "4" ) + PORT_DIPSETTING( 0x05, "5" ) PORT_DIPSETTING( 0x06, "6" ) PORT_DIPSETTING( 0x07, "7" ) PORT_DIPSETTING( 0x08, "8" ) PORT_DIPSETTING( 0x09, "9" ) + PORT_DIPSETTING( 0x0a, "10" ) PORT_DIPSETTING( 0x0b, "11" ) PORT_DIPSETTING( 0x0c, "12" ) PORT_DIPSETTING( 0x0d, "13" ) PORT_DIPSETTING( 0x0e, "14" ) + PORT_DIPSETTING( 0x0f, "15" ) PORT_DIPSETTING( 0x10, "16" ) PORT_DIPSETTING( 0x11, "17" ) PORT_DIPSETTING( 0x12, "18" ) PORT_DIPSETTING( 0x13, "19" ) + PORT_DIPSETTING( 0x14, "20" ) PORT_DIPSETTING( 0x15, "21" ) PORT_DIPSETTING( 0x16, "22" ) PORT_DIPSETTING( 0x17, "23" ) PORT_DIPSETTING( 0x18, "24" ) + PORT_DIPSETTING( 0x19, "25" ) PORT_DIPSETTING( 0x1a, "26" ) PORT_DIPSETTING( 0x1b, "27" ) PORT_DIPSETTING( 0x1c, "28" ) PORT_DIPSETTING( 0x1d, "29" ) + PORT_DIPSETTING( 0x1e, "30" ) PORT_DIPSETTING( 0x1f, "31" ) PORT_DIPSETTING( 0x20, "32" ) PORT_DIPSETTING( 0x21, "33" ) PORT_DIPSETTING( 0x22, "34" ) + PORT_DIPSETTING( 0x23, "35" ) PORT_DIPSETTING( 0x24, "36" ) PORT_DIPSETTING( 0x25, "37" ) PORT_DIPSETTING( 0x26, "38" ) PORT_DIPSETTING( 0x27, "39" ) + PORT_DIPSETTING( 0x28, "40" ) PORT_DIPSETTING( 0x29, "41" ) PORT_DIPSETTING( 0x2a, "42" ) PORT_DIPSETTING( 0x2b, "43" ) PORT_DIPSETTING( 0x2c, "44" ) + PORT_DIPSETTING( 0x2d, "45" ) PORT_DIPSETTING( 0x2e, "46" ) PORT_DIPSETTING( 0x2f, "47" ) PORT_DIPSETTING( 0x30, "48" ) PORT_DIPSETTING( 0x31, "49" ) + PORT_DIPSETTING( 0x32, "50" ) PORT_DIPSETTING( 0x33, "51" ) PORT_DIPSETTING( 0x34, "52" ) PORT_DIPSETTING( 0x35, "53" ) PORT_DIPSETTING( 0x36, "54" ) + PORT_DIPSETTING( 0x37, "15" ) PORT_DIPSETTING( 0x38, "56" ) PORT_DIPSETTING( 0x39, "57" ) PORT_DIPSETTING( 0x3a, "58" ) PORT_DIPSETTING( 0x3b, "59" ) + PORT_DIPSETTING( 0x3c, "60" ) PORT_DIPSETTING( 0x3d, "61" ) PORT_DIPSETTING( 0x3e, "62" ) PORT_DIPSETTING( 0x3f, "63" ) PORT_DIPSETTING( 0x40, "64" ) + PORT_DIPSETTING( 0x41, "65" ) PORT_DIPSETTING( 0x42, "66" ) PORT_DIPSETTING( 0x43, "67" ) PORT_DIPSETTING( 0x44, "68" ) PORT_DIPSETTING( 0x45, "69" ) + PORT_DIPSETTING( 0x46, "70" ) PORT_DIPSETTING( 0x47, "71" ) PORT_DIPSETTING( 0x48, "72" ) PORT_DIPSETTING( 0x49, "73" ) PORT_DIPSETTING( 0x4a, "74" ) + PORT_DIPSETTING( 0x4b, "75" ) PORT_DIPSETTING( 0x4c, "76" ) PORT_DIPSETTING( 0x4d, "77" ) PORT_DIPSETTING( 0x4e, "78" ) PORT_DIPSETTING( 0x4f, "79" ) + PORT_DIPSETTING( 0x50, "80" ) PORT_DIPSETTING( 0x51, "81" ) PORT_DIPSETTING( 0x52, "82" ) PORT_DIPSETTING( 0x53, "83" ) PORT_DIPSETTING( 0x54, "84" ) + PORT_DIPSETTING( 0x55, "85" ) PORT_DIPSETTING( 0x56, "86" ) PORT_DIPSETTING( 0x57, "87" ) PORT_DIPSETTING( 0x58, "88" ) PORT_DIPSETTING( 0x59, "89" ) + PORT_DIPSETTING( 0x5a, "90" ) PORT_DIPSETTING( 0x5b, "91" ) PORT_DIPSETTING( 0x5c, "92" ) PORT_DIPSETTING( 0x5d, "93" ) PORT_DIPSETTING( 0x5e, "94" ) + PORT_DIPSETTING( 0x5f, "95" ) PORT_DIPSETTING( 0x60, "96" ) PORT_DIPSETTING( 0x61, "97" ) PORT_DIPSETTING( 0x62, "98" ) PORT_DIPSETTING( 0x63, "99" ) + PORT_DIPSETTING( 0x64, "100" ) PORT_DIPSETTING( 0x65, "101" ) PORT_DIPSETTING( 0x66, "102" ) PORT_DIPSETTING( 0x67, "103" ) PORT_DIPSETTING( 0x68, "104" ) + PORT_DIPSETTING( 0x69, "105" ) PORT_DIPSETTING( 0x6a, "106" ) PORT_DIPSETTING( 0x6b, "107" ) PORT_DIPSETTING( 0x6c, "108" ) PORT_DIPSETTING( 0x6d, "109" ) + PORT_DIPSETTING( 0x6e, "110" ) PORT_DIPSETTING( 0x6f, "111" ) PORT_DIPSETTING( 0x70, "112" ) PORT_DIPSETTING( 0x71, "113" ) PORT_DIPSETTING( 0x72, "114" ) + PORT_DIPSETTING( 0x73, "115" ) PORT_DIPSETTING( 0x74, "116" ) PORT_DIPSETTING( 0x75, "117" ) PORT_DIPSETTING( 0x76, "118" ) PORT_DIPSETTING( 0x77, "119" ) + PORT_DIPSETTING( 0x78, "120" ) PORT_DIPSETTING( 0x79, "121" ) PORT_DIPSETTING( 0x7a, "122" ) PORT_DIPSETTING( 0x7b, "123" ) PORT_DIPSETTING( 0x7c, "124" ) + PORT_DIPSETTING( 0x7d, "125" ) PORT_DIPSETTING( 0x7e, "126" ) PORT_DIPSETTING( 0x7f, "127" ) PORT_DIPSETTING( 0x80, "128" ) PORT_DIPSETTING( 0x81, "129" ) + PORT_DIPSETTING( 0x82, "130" ) PORT_DIPSETTING( 0x83, "131" ) PORT_DIPSETTING( 0x84, "132" ) PORT_DIPSETTING( 0x85, "133" ) PORT_DIPSETTING( 0x86, "134" ) + PORT_DIPSETTING( 0x87, "135" ) PORT_DIPSETTING( 0x88, "136" ) PORT_DIPSETTING( 0x89, "137" ) PORT_DIPSETTING( 0x8a, "138" ) PORT_DIPSETTING( 0x8b, "139" ) + PORT_DIPSETTING( 0x8c, "140" ) PORT_DIPSETTING( 0x8d, "141" ) PORT_DIPSETTING( 0x8e, "142" ) PORT_DIPSETTING( 0x8f, "143" ) PORT_DIPSETTING( 0x90, "144" ) + PORT_DIPSETTING( 0x91, "145" ) PORT_DIPSETTING( 0x92, "146" ) PORT_DIPSETTING( 0x93, "147" ) PORT_DIPSETTING( 0x94, "148" ) PORT_DIPSETTING( 0x95, "149" ) + PORT_DIPSETTING( 0x96, "150" ) PORT_DIPSETTING( 0x97, "151" ) PORT_DIPSETTING( 0x98, "152" ) PORT_DIPSETTING( 0x99, "153" ) PORT_DIPSETTING( 0x9a, "154" ) + PORT_DIPSETTING( 0x9b, "155" ) PORT_DIPSETTING( 0x9c, "156" ) PORT_DIPSETTING( 0x9d, "157" ) PORT_DIPSETTING( 0x9e, "158" ) PORT_DIPSETTING( 0x9f, "159" ) + PORT_DIPSETTING( 0xa0, "160" ) PORT_DIPSETTING( 0xa1, "161" ) PORT_DIPSETTING( 0xa2, "162" ) PORT_DIPSETTING( 0xa3, "163" ) PORT_DIPSETTING( 0xa4, "164" ) + PORT_DIPSETTING( 0xa5, "165" ) PORT_DIPSETTING( 0xa6, "166" ) PORT_DIPSETTING( 0xa7, "167" ) PORT_DIPSETTING( 0xa8, "168" ) PORT_DIPSETTING( 0xa9, "169" ) + PORT_DIPSETTING( 0xaa, "170" ) PORT_DIPSETTING( 0xab, "171" ) PORT_DIPSETTING( 0xac, "172" ) PORT_DIPSETTING( 0xad, "173" ) PORT_DIPSETTING( 0xae, "174" ) + PORT_DIPSETTING( 0xaf, "175" ) PORT_DIPSETTING( 0xb0, "176" ) PORT_DIPSETTING( 0xb1, "177" ) PORT_DIPSETTING( 0xb2, "178" ) PORT_DIPSETTING( 0xb3, "179" ) + PORT_DIPSETTING( 0xb4, "180" ) PORT_DIPSETTING( 0xb5, "181" ) PORT_DIPSETTING( 0xb6, "182" ) PORT_DIPSETTING( 0xb7, "183" ) PORT_DIPSETTING( 0xb8, "184" ) + PORT_DIPSETTING( 0xb9, "185" ) PORT_DIPSETTING( 0xba, "186" ) PORT_DIPSETTING( 0xbb, "187" ) PORT_DIPSETTING( 0xbc, "188" ) PORT_DIPSETTING( 0xbd, "189" ) + PORT_DIPSETTING( 0xbe, "190" ) PORT_DIPSETTING( 0xbf, "191" ) PORT_DIPSETTING( 0xc0, "192" ) PORT_DIPSETTING( 0xc1, "193" ) PORT_DIPSETTING( 0xc2, "194" ) + PORT_DIPSETTING( 0xc3, "195" ) PORT_DIPSETTING( 0xc4, "196" ) PORT_DIPSETTING( 0xc5, "197" ) PORT_DIPSETTING( 0xc6, "198" ) PORT_DIPSETTING( 0xc7, "199" ) + PORT_DIPSETTING( 0xc8, "200" ) PORT_DIPSETTING( 0xc9, "201" ) PORT_DIPSETTING( 0xca, "202" ) PORT_DIPSETTING( 0xcb, "203" ) PORT_DIPSETTING( 0xcc, "204" ) + PORT_DIPSETTING( 0xcd, "205" ) PORT_DIPSETTING( 0xce, "206" ) PORT_DIPSETTING( 0xcf, "207" ) PORT_DIPSETTING( 0xd0, "208" ) PORT_DIPSETTING( 0xd1, "209" ) + PORT_DIPSETTING( 0xd2, "210" ) PORT_DIPSETTING( 0xd3, "211" ) PORT_DIPSETTING( 0xd4, "212" ) PORT_DIPSETTING( 0xd5, "213" ) PORT_DIPSETTING( 0xd6, "214" ) + PORT_DIPSETTING( 0xd7, "215" ) PORT_DIPSETTING( 0xd8, "216" ) PORT_DIPSETTING( 0xd9, "217" ) PORT_DIPSETTING( 0xda, "218" ) PORT_DIPSETTING( 0xdb, "219" ) + PORT_DIPSETTING( 0xdc, "220" ) PORT_DIPSETTING( 0xdd, "221" ) PORT_DIPSETTING( 0xde, "222" ) PORT_DIPSETTING( 0xdf, "223" ) PORT_DIPSETTING( 0xe0, "224" ) + PORT_DIPSETTING( 0xe1, "225" ) PORT_DIPSETTING( 0xe2, "226" ) PORT_DIPSETTING( 0xe3, "227" ) PORT_DIPSETTING( 0xe4, "228" ) PORT_DIPSETTING( 0xe5, "229" ) + PORT_DIPSETTING( 0xe6, "230" ) PORT_DIPSETTING( 0xe7, "231" ) PORT_DIPSETTING( 0xe8, "232" ) PORT_DIPSETTING( 0xe9, "233" ) PORT_DIPSETTING( 0xea, "234" ) + PORT_DIPSETTING( 0xeb, "235" ) PORT_DIPSETTING( 0xec, "236" ) PORT_DIPSETTING( 0xed, "237" ) PORT_DIPSETTING( 0xee, "238" ) PORT_DIPSETTING( 0xef, "239" ) + PORT_DIPSETTING( 0xf0, "240" ) PORT_DIPSETTING( 0xf1, "241" ) PORT_DIPSETTING( 0xf2, "242" ) PORT_DIPSETTING( 0xf3, "243" ) PORT_DIPSETTING( 0xf4, "244" ) + PORT_DIPSETTING( 0xf5, "245" ) PORT_DIPSETTING( 0xf6, "246" ) PORT_DIPSETTING( 0xf7, "247" ) PORT_DIPSETTING( 0xf8, "248" ) PORT_DIPSETTING( 0xf9, "249" ) + PORT_DIPSETTING( 0xfa, "250" ) PORT_DIPSETTING( 0xfb, "251" ) PORT_DIPSETTING( 0xfc, "252" ) PORT_DIPSETTING( 0xfd, "253" ) PORT_DIPSETTING( 0xfe, "254" ) + PORT_DIPSETTING( 0xff, "255" ) INPUT_PORTS_END -static INPUT_PORTS_START(bbc_links) - PORT_START("S11") - PORT_DIPNAME(0xff, 0xfe, "Econet ID") PORT_DIPLOCATION("S11:1,2,3,4,5,6,7,8") +static INPUT_PORTS_START(bbcbp_links) + PORT_START("STATID") + PORT_DIPNAME(0xff, 0xfe, "Econet ID") PORT_DIPLOCATION("S23:0,1,2,3,4,5,6,7") PORT_DIPSETTING( 0x00, "0" ) PORT_DIPSETTING( 0x01, "1" ) PORT_DIPSETTING( 0x02, "2" ) PORT_DIPSETTING( 0x03, "3" ) PORT_DIPSETTING( 0x04, "4" ) PORT_DIPSETTING( 0x05, "5" ) PORT_DIPSETTING( 0x06, "6" ) PORT_DIPSETTING( 0x07, "7" ) PORT_DIPSETTING( 0x08, "8" ) PORT_DIPSETTING( 0x09, "9" ) PORT_DIPSETTING( 0x0a, "10" ) PORT_DIPSETTING( 0x0b, "11" ) PORT_DIPSETTING( 0x0c, "12" ) PORT_DIPSETTING( 0x0d, "13" ) PORT_DIPSETTING( 0x0e, "14" ) @@ -600,15 +633,22 @@ static INPUT_PORTS_START(bbcb) PORT_INCLUDE(bbc_config) PORT_INCLUDE(bbc_keyboard) PORT_INCLUDE(bbc_dipswitch) - PORT_INCLUDE(bbc_links) + PORT_INCLUDE(bbcb_links) + PORT_INCLUDE(bbc_joy) +INPUT_PORTS_END + +static INPUT_PORTS_START(bbcbp) + PORT_INCLUDE(bbc_config) + PORT_INCLUDE(bbc_keyboard) + PORT_INCLUDE(bbc_dipswitch) + PORT_INCLUDE(bbcbp_links) PORT_INCLUDE(bbc_joy) INPUT_PORTS_END static INPUT_PORTS_START(abc) PORT_INCLUDE(bbc_keyboard) PORT_INCLUDE(bbc_keypad) - PORT_INCLUDE(bbc_dipswitch) - PORT_INCLUDE(bbc_links) + PORT_INCLUDE(bbcbp_links) PORT_INCLUDE(bbc_joy) INPUT_PORTS_END @@ -635,19 +675,22 @@ WRITE_LINE_MEMBER(bbc_state::bbcb_acia6850_irq_w) } -FLOPPY_FORMATS_MEMBER( bbc_state::floppy_formats_525sd ) - FLOPPY_BBC_SSD_525_FORMAT, - FLOPPY_BBC_DSD_525_FORMAT +FLOPPY_FORMATS_MEMBER( bbc_state::floppy_formats_bbc ) + FLOPPY_BBC_DFS_FORMAT, + FLOPPY_BBC_CPM_FORMAT + //FLOPPY_FSD_FORMAT FLOPPY_FORMATS_END -FLOPPY_FORMATS_MEMBER( bbc_state::floppy_formats_525dd ) - FLOPPY_BBC_SSD_525_FORMAT, - FLOPPY_BBC_DSD_525_FORMAT, - FLOPPY_BBC_ADF_525_FORMAT +FLOPPY_FORMATS_MEMBER( bbc_state::floppy_formats_bbcm ) + FLOPPY_BBC_DFS_FORMAT, + FLOPPY_BBC_ADFS_FORMAT, + FLOPPY_BBC_CPM_FORMAT, + FLOPPY_BBC_DOS_FORMAT + //FLOPPY_FSD_FORMAT FLOPPY_FORMATS_END -FLOPPY_FORMATS_MEMBER( bbc_state::floppy_formats_35dd ) - FLOPPY_BBC_ADF_35_FORMAT +FLOPPY_FORMATS_MEMBER( bbc_state::floppy_formats_bbcmc ) + FLOPPY_BBC_ADFS_FORMAT FLOPPY_FORMATS_END static SLOT_INTERFACE_START( bbc_floppies_525 ) @@ -698,7 +741,7 @@ MACHINE_CONFIG_END static MACHINE_CONFIG_START( bbca, bbc_state ) /* basic machine hardware */ - MCFG_CPU_ADD("maincpu", M6502, 2000000) /* 2.00 MHz */ + MCFG_CPU_ADD("maincpu", M6502, XTAL_16MHz/8) /* 2.00 MHz */ MCFG_CPU_PROGRAM_MAP(bbca_mem) MCFG_CPU_VBLANK_INT_DRIVER("screen", bbc_state, bbcb_vsync) /* screen refresh interrupts */ MCFG_CPU_PERIODIC_INT_DRIVER(bbc_state, bbcb_keyscan, 1000) /* scan keyboard */ @@ -725,13 +768,15 @@ static MACHINE_CONFIG_START( bbca, bbc_state ) MCFG_PALETTE_INIT_OWNER(bbc_state,bbc) MCFG_DEVICE_ADD("saa5050", SAA5050, XTAL_12MHz/2) - MCFG_SAA5050_SCREEN_SIZE(40, 24, 40) + MCFG_SAA5050_SCREEN_SIZE(40, 25, 40) /* crtc */ MCFG_MC6845_ADD("mc6845", MC6845, "screen", 2000000) MCFG_MC6845_SHOW_BORDER_AREA(false) - MCFG_MC6845_CHAR_WIDTH(8) + MCFG_MC6845_CHAR_WIDTH(12) MCFG_MC6845_UPDATE_ROW_CB(bbc_state, crtc_update_row) + //MCFG_MC6845_OUT_DE_CB(WRITELINE(bbc_state, bbc_de_changed)) + //MCFG_MC6845_OUT_HSYNC_CB(WRITELINE(bbc_state, bbc_hsync)) MCFG_MC6845_OUT_VSYNC_CB(WRITELINE(bbc_state, bbc_vsync)) MCFG_VIDEO_START_OVERRIDE(bbc_state, bbca) @@ -740,7 +785,7 @@ static MACHINE_CONFIG_START( bbca, bbc_state ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") - MCFG_SOUND_ADD("sn76489", SN76489, 4000000) /* 4 MHz */ + MCFG_SOUND_ADD("sn76489", SN76489, XTAL_16MHz/4) /* 4 MHz */ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) /* cassette */ @@ -767,7 +812,7 @@ static MACHINE_CONFIG_START( bbca, bbc_state ) MCFG_CLOCK_SIGNAL_HANDLER(WRITELINE(bbc_state, write_acia_clock)) /* system via */ - MCFG_DEVICE_ADD("via6522_0", VIA6522, 1000000) + MCFG_DEVICE_ADD("via6522_0", VIA6522, XTAL_16MHz / 16) MCFG_VIA6522_READPA_HANDLER(READ8(bbc_state, bbcb_via_system_read_porta)) MCFG_VIA6522_READPB_HANDLER(READ8(bbc_state, bbcb_via_system_read_portb)) MCFG_VIA6522_WRITEPA_HANDLER(WRITE8(bbc_state, bbcb_via_system_write_porta)) @@ -797,9 +842,10 @@ static MACHINE_CONFIG_DERIVED( bbcb, bbca ) MCFG_DEVICE_ADD("vsm", SPEECHROM, 0) MCFG_SOUND_ADD("tms5220", TMS5220, 640000) MCFG_TMS52XX_SPEECHROM("vsm") + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) /* user via */ - MCFG_DEVICE_ADD("via6522_1", VIA6522, 1000000) + MCFG_DEVICE_ADD("via6522_1", VIA6522, XTAL_16MHz / 16) MCFG_VIA6522_READPB_HANDLER(READ8(bbc_state, bbcb_via_user_read_portb)) MCFG_VIA6522_WRITEPA_HANDLER(DEVWRITE8("cent_data_out", output_latch_device, write)) MCFG_VIA6522_WRITEPB_HANDLER(WRITE8(bbc_state, bbcb_via_user_write_portb)) @@ -818,16 +864,19 @@ static MACHINE_CONFIG_DERIVED( bbcb, bbca ) /* fdc */ MCFG_DEVICE_ADD("i8271" , I8271 , 0) - MCFG_I8271_IRQ_CALLBACK(WRITELINE(bbc_state, bbc_i8271_interrupt)) + MCFG_I8271_IRQ_CALLBACK(INPUTLINE("maincpu", INPUT_LINE_NMI)) MCFG_I8271_HDL_CALLBACK(WRITELINE(bbc_state, motor_w)) MCFG_I8271_OPT_CALLBACK(WRITELINE(bbc_state, side_w)) - MCFG_FLOPPY_DRIVE_ADD("i8271:0", bbc_floppies_525, "qd", bbc_state::floppy_formats_525sd) - MCFG_FLOPPY_DRIVE_ADD("i8271:1", bbc_floppies_525, "qd", bbc_state::floppy_formats_525sd) + MCFG_FLOPPY_DRIVE_ADD("i8271:0", bbc_floppies_525, "qd", bbc_state::floppy_formats_bbc) + MCFG_FLOPPY_DRIVE_SOUND(true) + MCFG_FLOPPY_DRIVE_ADD("i8271:1", bbc_floppies_525, "qd", bbc_state::floppy_formats_bbc) + MCFG_FLOPPY_DRIVE_SOUND(true) /* software lists */ - MCFG_DEVICE_REMOVE("cass_ls_a") MCFG_SOFTWARE_LIST_ADD("cass_ls_b", "bbcb_cass") - MCFG_SOFTWARE_LIST_COMPATIBLE_ADD("cass_ls_a", "bbca_cass") + MCFG_SOFTWARE_LIST_ADD("flop_ls_b", "bbcb_flop") + MCFG_SOFTWARE_LIST_ADD("flop_ls_z80", "bbc_z80_flop") + MCFG_SOFTWARE_LIST_ADD("flop_ls_32016", "bbc_32016_flop") MACHINE_CONFIG_END @@ -840,21 +889,19 @@ static MACHINE_CONFIG_DERIVED(bbcb1770, bbcb) MCFG_DEVICE_REMOVE("i8271") MCFG_WD1770_ADD("wd1770", XTAL_16MHz / 2) - MCFG_WD_FDC_INTRQ_CALLBACK(WRITELINE(bbc_state, bbc_wd177x_intrq_w)) - MCFG_WD_FDC_DRQ_CALLBACK(WRITELINE(bbc_state, bbc_wd177x_drq_w)) + MCFG_WD_FDC_INTRQ_CALLBACK(WRITELINE(bbc_state, fdc_intrq_w)) + MCFG_WD_FDC_DRQ_CALLBACK(WRITELINE(bbc_state, fdc_drq_w)) - MCFG_FLOPPY_DRIVE_ADD("wd1770:0", bbc_floppies_525, "qd", bbc_state::floppy_formats_525dd) + MCFG_FLOPPY_DRIVE_ADD("wd1770:0", bbc_floppies_525, "qd", bbc_state::floppy_formats_bbcm) MCFG_FLOPPY_DRIVE_SOUND(true) - MCFG_FLOPPY_DRIVE_ADD("wd1770:1", bbc_floppies_525, "qd", bbc_state::floppy_formats_525dd) + MCFG_FLOPPY_DRIVE_ADD("wd1770:1", bbc_floppies_525, "qd", bbc_state::floppy_formats_bbcm) MCFG_FLOPPY_DRIVE_SOUND(true) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( bbcb_de, bbcb ) /* software lists */ - MCFG_DEVICE_REMOVE("cass_ls_b") MCFG_SOFTWARE_LIST_ADD("flop_ls_b_de", "bbcb_de_cass") - MCFG_SOFTWARE_LIST_COMPATIBLE_ADD("cass_ls_b", "bbcb_cass") MACHINE_CONFIG_END @@ -866,9 +913,7 @@ static MACHINE_CONFIG_DERIVED( bbcb_us, bbcb ) MCFG_SCREEN_REFRESH_RATE(60) /* software lists */ - MCFG_DEVICE_REMOVE("cass_ls_b") MCFG_SOFTWARE_LIST_ADD("flop_ls_b_us", "bbcb_us_flop") - MCFG_SOFTWARE_LIST_COMPATIBLE_ADD("cass_ls_b", "bbcb_cass") MACHINE_CONFIG_END @@ -921,10 +966,15 @@ static MACHINE_CONFIG_DERIVED( abc110, bbcbp ) /* Add 10MB ST-412 Winchester */ + /* software lists */ + MCFG_SOFTWARE_LIST_REMOVE("cass_ls_a") + MCFG_SOFTWARE_LIST_REMOVE("cass_ls_b") + MCFG_SOFTWARE_LIST_REMOVE("flop_ls_b") + MCFG_SOFTWARE_LIST_REMOVE("flop_ls_32016") MACHINE_CONFIG_END -static MACHINE_CONFIG_DERIVED( abc210, bbcbp ) +static MACHINE_CONFIG_DERIVED( acw443, bbcbp ) /* fdc */ MCFG_DEVICE_REMOVE("wd1770:1") @@ -936,6 +986,11 @@ static MACHINE_CONFIG_DERIVED( abc210, bbcbp ) /* Add 20MB ST-412 Winchester Cambridge */ + /* software lists */ + MCFG_SOFTWARE_LIST_REMOVE("cass_ls_a") + MCFG_SOFTWARE_LIST_REMOVE("cass_ls_b") + MCFG_SOFTWARE_LIST_REMOVE("flop_ls_b") + MCFG_SOFTWARE_LIST_REMOVE("flop_ls_z80") MACHINE_CONFIG_END @@ -949,6 +1004,12 @@ static MACHINE_CONFIG_DERIVED( abc310, bbcbp ) /* Add 10MB ST-412 Winchester */ + /* software lists */ + MCFG_SOFTWARE_LIST_REMOVE("cass_ls_a") + MCFG_SOFTWARE_LIST_REMOVE("cass_ls_b") + MCFG_SOFTWARE_LIST_REMOVE("flop_ls_b") + MCFG_SOFTWARE_LIST_REMOVE("flop_ls_z80") + MCFG_SOFTWARE_LIST_REMOVE("flop_ls_32016") MACHINE_CONFIG_END @@ -977,8 +1038,11 @@ static MACHINE_CONFIG_DERIVED( reutapm, bbcbp ) MCFG_DEVICE_REMOVE("wd1770") /* software lists */ - MCFG_DEVICE_REMOVE("cass_ls_a") - MCFG_DEVICE_REMOVE("cass_ls_b") + MCFG_SOFTWARE_LIST_REMOVE("cass_ls_a") + MCFG_SOFTWARE_LIST_REMOVE("cass_ls_b") + MCFG_SOFTWARE_LIST_REMOVE("flop_ls_b") + MCFG_SOFTWARE_LIST_REMOVE("flop_ls_z80") + MCFG_SOFTWARE_LIST_REMOVE("flop_ls_32016") MACHINE_CONFIG_END @@ -991,7 +1055,7 @@ MACHINE_CONFIG_END static MACHINE_CONFIG_START( bbcm, bbc_state ) /* basic machine hardware */ - MCFG_CPU_ADD("maincpu", M65SC02, 2000000) /* 2.00 MHz */ + MCFG_CPU_ADD("maincpu", M65SC02, XTAL_16MHz/8) /* 2.00 MHz */ MCFG_CPU_PROGRAM_MAP(bbcm_mem) MCFG_CPU_VBLANK_INT_DRIVER("screen", bbc_state, bbcb_vsync) /* screen refresh interrupts */ MCFG_CPU_PERIODIC_INT_DRIVER(bbc_state, bbcb_keyscan, 1000) /* scan keyboard */ @@ -1018,12 +1082,12 @@ static MACHINE_CONFIG_START( bbcm, bbc_state ) MCFG_PALETTE_INIT_OWNER(bbc_state,bbc) MCFG_DEVICE_ADD("saa5050", SAA5050, XTAL_12MHz/2) - MCFG_SAA5050_SCREEN_SIZE(40, 24, 40) + MCFG_SAA5050_SCREEN_SIZE(40, 25, 40) /* crtc */ MCFG_MC6845_ADD("mc6845", MC6845, "screen", 2000000) MCFG_MC6845_SHOW_BORDER_AREA(false) - MCFG_MC6845_CHAR_WIDTH(8) + MCFG_MC6845_CHAR_WIDTH(12) MCFG_MC6845_UPDATE_ROW_CB(bbc_state, crtc_update_row) MCFG_MC6845_OUT_VSYNC_CB(WRITELINE(bbc_state, bbc_vsync)) @@ -1031,7 +1095,7 @@ static MACHINE_CONFIG_START( bbcm, bbc_state ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") - MCFG_SOUND_ADD("sn76489", SN76489, 4000000) /* 4 MHz */ + MCFG_SOUND_ADD("sn76489", SN76489, XTAL_16MHz/4) /* 4 MHz */ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) /* rtc and cmos */ @@ -1057,9 +1121,13 @@ static MACHINE_CONFIG_START( bbcm, bbc_state ) /* software lists */ MCFG_SOFTWARE_LIST_ADD("cass_ls_m", "bbcm_cass") + MCFG_SOFTWARE_LIST_ADD("flop_ls_m", "bbcm_flop") + MCFG_SOFTWARE_LIST_ADD("cart_ls_m", "bbcm_cart") + MCFG_SOFTWARE_LIST_ADD("flop_ls_z80", "bbc_z80_flop") + MCFG_SOFTWARE_LIST_ADD("flop_ls_32016", "bbc_32016_flop") MCFG_SOFTWARE_LIST_COMPATIBLE_ADD("cass_ls_a", "bbca_cass") MCFG_SOFTWARE_LIST_COMPATIBLE_ADD("cass_ls_b", "bbcb_cass") - MCFG_SOFTWARE_LIST_ADD("cart_ls_m", "bbcm_cart") + MCFG_SOFTWARE_LIST_COMPATIBLE_ADD("flop_ls_b", "bbcb_flop") /* acia */ MCFG_DEVICE_ADD("acia6850", ACIA6850, 0) @@ -1081,7 +1149,7 @@ static MACHINE_CONFIG_START( bbcm, bbc_state ) MCFG_UPD7002_EOC_CB(bbc_state, BBC_uPD7002_EOC) /* system via */ - MCFG_DEVICE_ADD("via6522_0", VIA6522, 1000000) + MCFG_DEVICE_ADD("via6522_0", VIA6522, XTAL_16MHz / 16) MCFG_VIA6522_READPA_HANDLER(READ8(bbc_state, bbcb_via_system_read_porta)) MCFG_VIA6522_READPB_HANDLER(READ8(bbc_state, bbcb_via_system_read_portb)) MCFG_VIA6522_WRITEPA_HANDLER(WRITE8(bbc_state, bbcb_via_system_write_porta)) @@ -1089,7 +1157,7 @@ static MACHINE_CONFIG_START( bbcm, bbc_state ) MCFG_VIA6522_IRQ_HANDLER(WRITELINE(bbc_state, bbcb_via_system_irq_w)) /* user via */ - MCFG_DEVICE_ADD("via6522_1", VIA6522, 1000000) + MCFG_DEVICE_ADD("via6522_1", VIA6522, XTAL_16MHz / 16) MCFG_VIA6522_READPB_HANDLER(READ8(bbc_state, bbcb_via_user_read_portb)) MCFG_VIA6522_WRITEPA_HANDLER(DEVWRITE8("cent_data_out", output_latch_device, write)) MCFG_VIA6522_WRITEPB_HANDLER(WRITE8(bbc_state, bbcb_via_user_write_portb)) @@ -1098,12 +1166,12 @@ static MACHINE_CONFIG_START( bbcm, bbc_state ) /* fdc */ MCFG_WD1770_ADD("wd1770", XTAL_16MHz / 2) - MCFG_WD_FDC_INTRQ_CALLBACK(WRITELINE(bbc_state, bbc_wd177x_intrq_w)) - MCFG_WD_FDC_DRQ_CALLBACK(WRITELINE(bbc_state, bbc_wd177x_drq_w)) + MCFG_WD_FDC_INTRQ_CALLBACK(WRITELINE(bbc_state, fdc_intrq_w)) + MCFG_WD_FDC_DRQ_CALLBACK(WRITELINE(bbc_state, fdc_drq_w)) - MCFG_FLOPPY_DRIVE_ADD("wd1770:0", bbc_floppies_525, "qd", bbc_state::floppy_formats_525dd) + MCFG_FLOPPY_DRIVE_ADD("wd1770:0", bbc_floppies_525, "qd", bbc_state::floppy_formats_bbcm) MCFG_FLOPPY_DRIVE_SOUND(true) - MCFG_FLOPPY_DRIVE_ADD("wd1770:1", bbc_floppies_525, "qd", bbc_state::floppy_formats_525dd) + MCFG_FLOPPY_DRIVE_ADD("wd1770:1", bbc_floppies_525, "qd", bbc_state::floppy_formats_bbcm) MCFG_FLOPPY_DRIVE_SOUND(true) /* econet */ @@ -1120,6 +1188,8 @@ static MACHINE_CONFIG_DERIVED( bbcmt, bbcm ) /* Add 65C102 co-processor */ + /* software lists */ + MCFG_SOFTWARE_LIST_ADD("flop_ls_65c102", "bbc_65c102_flop") MACHINE_CONFIG_END @@ -1135,10 +1205,6 @@ MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( bbcmet, bbcm ) - /* sound hardware */ - MCFG_DEVICE_REMOVE("mono") - MCFG_DEVICE_REMOVE("sn76489") - /* printer */ MCFG_DEVICE_REMOVE("centronics") @@ -1149,6 +1215,10 @@ static MACHINE_CONFIG_DERIVED( bbcmet, bbcm ) MCFG_SOFTWARE_LIST_REMOVE("cass_ls_m") MCFG_SOFTWARE_LIST_REMOVE("cass_ls_a") MCFG_SOFTWARE_LIST_REMOVE("cass_ls_b") + MCFG_SOFTWARE_LIST_REMOVE("flop_ls_m") + MCFG_SOFTWARE_LIST_REMOVE("flop_ls_b") + MCFG_SOFTWARE_LIST_REMOVE("flop_ls_z80") + MCFG_SOFTWARE_LIST_REMOVE("flop_ls_32016") /* acia */ MCFG_DEVICE_REMOVE("acia6850") @@ -1168,6 +1238,8 @@ static MACHINE_CONFIG_DERIVED( bbcm512, bbcm ) /* Add Intel 80186 co-processor */ + /* software lists */ + MCFG_SOFTWARE_LIST_ADD("flop_ls_80186", "bbc_80186_flop") MACHINE_CONFIG_END @@ -1175,6 +1247,8 @@ static MACHINE_CONFIG_DERIVED( bbcmarm, bbcm ) /* Add ARM co-processor */ + /* software lists */ + MCFG_SOFTWARE_LIST_ADD("flop_ls_arm", "bbc_arm_flop") MACHINE_CONFIG_END @@ -1193,12 +1267,12 @@ static MACHINE_CONFIG_DERIVED( bbcmc, bbcm ) MCFG_DEVICE_REMOVE("wd1770") MCFG_WD1772_ADD("wd1772", XTAL_16MHz / 2) - MCFG_WD_FDC_INTRQ_CALLBACK(WRITELINE(bbc_state, bbc_wd177x_intrq_w)) - MCFG_WD_FDC_DRQ_CALLBACK(WRITELINE(bbc_state, bbc_wd177x_drq_w)) + MCFG_WD_FDC_INTRQ_CALLBACK(WRITELINE(bbc_state, fdc_intrq_w)) + MCFG_WD_FDC_DRQ_CALLBACK(WRITELINE(bbc_state, fdc_drq_w)) - MCFG_FLOPPY_DRIVE_ADD("wd1772:0", bbc_floppies_35, "qd", bbc_state::floppy_formats_35dd) + MCFG_FLOPPY_DRIVE_ADD("wd1772:0", bbc_floppies_35, "qd", bbc_state::floppy_formats_bbcmc) MCFG_FLOPPY_DRIVE_SOUND(true) - MCFG_FLOPPY_DRIVE_ADD("wd1772:1", bbc_floppies_35, NULL, bbc_state::floppy_formats_35dd) + MCFG_FLOPPY_DRIVE_ADD("wd1772:1", bbc_floppies_35, NULL, bbc_state::floppy_formats_bbcmc) MCFG_FLOPPY_DRIVE_SOUND(true) /* eeprom pcd8572 */ @@ -1208,14 +1282,20 @@ static MACHINE_CONFIG_DERIVED( bbcmc, bbcm ) MCFG_SOFTWARE_LIST_REMOVE("cass_ls_m") MCFG_SOFTWARE_LIST_REMOVE("cass_ls_a") MCFG_SOFTWARE_LIST_REMOVE("cass_ls_b") + MCFG_SOFTWARE_LIST_REMOVE("flop_ls_m") + MCFG_SOFTWARE_LIST_REMOVE("flop_ls_b") + MCFG_SOFTWARE_LIST_REMOVE("flop_ls_z80") + MCFG_SOFTWARE_LIST_REMOVE("flop_ls_32016") MCFG_SOFTWARE_LIST_REMOVE("cart_ls_m") MCFG_SOFTWARE_LIST_ADD("flop_ls_mc", "bbcmc_flop") + MCFG_SOFTWARE_LIST_COMPATIBLE_ADD("flop_ls_pro128s", "pro128s_flop") MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED(pro128s, bbcmc) /* software lists */ MCFG_SOFTWARE_LIST_REMOVE("flop_ls_mc") + MCFG_SOFTWARE_LIST_REMOVE("flop_ls_pro128s") MCFG_SOFTWARE_LIST_ADD("flop_ls_pro128s", "pro128s_flop") MCFG_SOFTWARE_LIST_COMPATIBLE_ADD("flop_ls_mc", "bbcmc_flop") MACHINE_CONFIG_END @@ -1229,10 +1309,10 @@ ROM_START(bbca) ROM_REGION(0x08000,"maincpu",ROMREGION_ERASEFF) /* RAM */ ROM_REGION(0x14000,"option",0) /* ROM */ - /* rom page 0 00000 SPARE SOCKET */ - /* rom page 1 04000 SPARE SOCKET */ - /* rom page 2 08000 SPARE SOCKET */ - /* rom page 3 0c000 BASIC */ + /* rom page 12 00000 IC52 SPARE SOCKET */ + /* rom page 13 04000 IC88 SPARE SOCKET */ + /* rom page 14 08000 IC100 SPARE SOCKET */ + /* rom page 15 0c000 IC101 BASIC */ ROM_DEFAULT_BIOS("os12b2") ROM_SYSTEM_BIOS( 0, "os12b2", "OS 1.20 / BASIC2" ) ROMX_LOAD("os12.rom", 0x10000, 0x4000, CRC(3c14fc70) SHA1(0d9bcaf6a393c9ce2359ed700ddb53c232c2c45d), ROM_BIOS(1)) /* os */ @@ -1246,19 +1326,13 @@ ROM_START(bbca) ROM_SYSTEM_BIOS( 3, "os10b1", "OS 1.00 / BASIC1" ) ROMX_LOAD("os10.rom", 0x10000, 0x4000, CRC(9679b8f8) SHA1(d35f6723132aabe3c4d00fc16fd9ecc6768df753), ROM_BIOS(4)) /* os */ ROMX_LOAD("basic1.rom", 0x0c000, 0x4000, CRC(b3364108) SHA1(890f6e3e7fab3340f75b85e93ff29332bc9ecb2e), ROM_BIOS(4)) /* rom page 3 0c000 */ - /* OS0.1 does not support rom paging, load BASIC into all pages */ - ROM_SYSTEM_BIOS( 4, "os01b2", "OS 0.10 / BASIC2" ) + ROM_SYSTEM_BIOS( 4, "os01b1", "OS 0.10 / BASIC1" ) ROMX_LOAD("os01.rom", 0x10000, 0x4000, CRC(45ee0980) SHA1(4b0ece6dc139d5d3f4fabd023716fb6f25149b80), ROM_BIOS(5)) /* os */ - ROMX_LOAD("basic2.rom", 0x00000, 0x4000, CRC(79434781) SHA1(4a7393f3a45ea309f744441c16723e2ef447a281), ROM_BIOS(5)) /* rom page 0 00000 */ - ROMX_LOAD("basic2.rom", 0x04000, 0x4000, CRC(79434781) SHA1(4a7393f3a45ea309f744441c16723e2ef447a281), ROM_BIOS(5)) /* rom page 1 04000 */ - ROMX_LOAD("basic2.rom", 0x08000, 0x4000, CRC(79434781) SHA1(4a7393f3a45ea309f744441c16723e2ef447a281), ROM_BIOS(5)) /* rom page 2 08000 */ - ROMX_LOAD("basic2.rom", 0x0c000, 0x4000, CRC(79434781) SHA1(4a7393f3a45ea309f744441c16723e2ef447a281), ROM_BIOS(5)) /* rom page 3 0c000 */ - ROM_SYSTEM_BIOS( 5, "os01b1", "OS 0.10 / BASIC1" ) - ROMX_LOAD("os01.rom", 0x10000, 0x4000, CRC(45ee0980) SHA1(4b0ece6dc139d5d3f4fabd023716fb6f25149b80), ROM_BIOS(6)) /* os */ - ROMX_LOAD("basic1.rom", 0x00000, 0x4000, CRC(b3364108) SHA1(890f6e3e7fab3340f75b85e93ff29332bc9ecb2e), ROM_BIOS(6)) /* rom page 0 00000 */ - ROMX_LOAD("basic1.rom", 0x04000, 0x4000, CRC(b3364108) SHA1(890f6e3e7fab3340f75b85e93ff29332bc9ecb2e), ROM_BIOS(6)) /* rom page 1 04000 */ - ROMX_LOAD("basic1.rom", 0x08000, 0x4000, CRC(b3364108) SHA1(890f6e3e7fab3340f75b85e93ff29332bc9ecb2e), ROM_BIOS(6)) /* rom page 2 08000 */ - ROMX_LOAD("basic1.rom", 0x0c000, 0x4000, CRC(b3364108) SHA1(890f6e3e7fab3340f75b85e93ff29332bc9ecb2e), ROM_BIOS(6)) /* rom page 3 0c000 */ + /* OS0.1 does not support rom paging, load BASIC into all pages */ + ROMX_LOAD("basic1.rom", 0x00000, 0x4000, CRC(b3364108) SHA1(890f6e3e7fab3340f75b85e93ff29332bc9ecb2e), ROM_BIOS(5)) /* rom page 0 00000 */ + ROM_RELOAD( 0x04000, 0x4000 ) + ROM_RELOAD( 0x08000, 0x4000 ) + ROM_RELOAD( 0x0c000, 0x4000 ) ROM_REGION(0x4000, "os", 0) ROM_COPY("option", 0x10000, 0, 0x4000) @@ -1286,10 +1360,10 @@ ROM_START(bbcb) /* rom page 9 24000 */ /* rom page 10 28000 */ /* rom page 11 2c000 */ - /* rom page 12 30000 SPARE SOCKET */ - /* rom page 13 34000 SPARE SOCKET */ - /* rom page 14 38000 DFS */ - /* rom page 15 3c000 BASIC */ + /* rom page 12 30000 IC52 SPARE SOCKET */ + /* rom page 13 34000 IC88 SPARE SOCKET */ + /* rom page 14 38000 IC100 DFS */ + /* rom page 15 3c000 IC101 BASIC */ ROM_DEFAULT_BIOS("os12b2") ROM_SYSTEM_BIOS( 0, "os12b2", "OS 1.20 / BASIC2" ) ROMX_LOAD("os12.rom", 0x40000, 0x4000, CRC(3c14fc70) SHA1(0d9bcaf6a393c9ce2359ed700ddb53c232c2c45d), ROM_BIOS(1)) /* os */ @@ -1303,8 +1377,15 @@ ROM_START(bbcb) ROM_SYSTEM_BIOS( 3, "os10b1", "OS 1.00 / BASIC1" ) ROMX_LOAD("os10.rom", 0x40000, 0x4000, CRC(9679b8f8) SHA1(d35f6723132aabe3c4d00fc16fd9ecc6768df753), ROM_BIOS(4)) /* os */ ROMX_LOAD("basic1.rom", 0x3c000, 0x4000, CRC(b3364108) SHA1(890f6e3e7fab3340f75b85e93ff29332bc9ecb2e), ROM_BIOS(4)) /* rom page 15 3c000 */ + ROM_SYSTEM_BIOS( 4, "os01b1", "OS 0.10 / BASIC1" ) + ROMX_LOAD("os01.rom", 0x40000, 0x4000, CRC(45ee0980) SHA1(4b0ece6dc139d5d3f4fabd023716fb6f25149b80), ROM_BIOS(5)) /* os */ + /* OS0.1 does not support rom paging, load BASIC into all pages */ + ROMX_LOAD("basic1.rom", 0x00000, 0x4000, CRC(b3364108) SHA1(890f6e3e7fab3340f75b85e93ff29332bc9ecb2e), ROM_BIOS(5)) /* rom page 0 00000 */ + ROM_RELOAD( 0x04000, 0x4000 ) + ROM_RELOAD( 0x08000, 0x4000 ) + ROM_RELOAD( 0x0c000, 0x4000 ) - ROM_LOAD("dnfs.rom", 0x38000, 0x4000, CRC(8ccd2157) SHA1(7e3c536baeae84d6498a14e8405319e01ee78232)) + ROM_LOAD("dnfs120-201666.rom", 0x38000, 0x4000, CRC(8ccd2157) SHA1(7e3c536baeae84d6498a14e8405319e01ee78232)) ROM_REGION(0x4000, "os", 0) ROM_COPY("option", 0x40000, 0, 0x4000) @@ -1330,10 +1411,10 @@ ROM_START(bbcb1770) /* rom page 9 24000 */ /* rom page 10 28000 */ /* rom page 11 2c000 */ - /* rom page 12 30000 SPARE SOCKET */ - /* rom page 13 34000 SPARE SOCKET */ - /* rom page 14 38000 DDFS */ - /* rom page 15 3c000 BASIC */ + /* rom page 12 30000 IC52 SPARE SOCKET */ + /* rom page 13 34000 IC88 SPARE SOCKET */ + /* rom page 14 38000 IC100 DDFS */ + /* rom page 15 3c000 IC101 BASIC */ ROM_DEFAULT_BIOS("os12b2") ROM_SYSTEM_BIOS( 0, "os12b2", "OS 1.20 / BASIC2" ) ROMX_LOAD("os12.rom", 0x40000, 0x4000, CRC(3c14fc70) SHA1(0d9bcaf6a393c9ce2359ed700ddb53c232c2c45d), ROM_BIOS(1)) /* os */ @@ -1374,10 +1455,10 @@ ROM_START(bbcb_de) /* rom page 9 24000 */ /* rom page 10 28000 */ /* rom page 11 2c000 */ - /* rom page 12 30000 SPARE SOCKET */ - /* rom page 13 34000 SPARE SOCKET */ - /* rom page 14 38000 DFS */ - /* rom page 15 3c000 BASIC */ + /* rom page 12 30000 IC72 SPARE SOCKET */ + /* rom page 13 34000 IC73 SPARE SOCKET */ + /* rom page 14 38000 IC74 DFS */ + /* rom page 15 3c000 IC75 BASIC */ ROM_DEFAULT_BIOS("os12") ROM_SYSTEM_BIOS( 0, "os12", "OS 1.20 / BASIC2" ) ROMX_LOAD("os_de.rom", 0x40000, 0x4000, CRC(b7262caf) SHA1(aadf90338ee9d1c85dfa73beba50e930c2a38f10), ROM_BIOS(1)) @@ -1409,16 +1490,17 @@ ROM_START(bbcb_us) /* rom page 9 24000 */ /* rom page 10 28000 */ /* rom page 11 2c000 */ - /* rom page 12 30000 SPARE SOCKET */ - /* rom page 13 34000 SPARE SOCKET */ - /* rom page 14 38000 DFS */ - /* rom page 15 3c000 BASIC */ + /* rom page 12 30000 IC72 VIEW */ + /* rom page 13 34000 IC73 US DNFS */ + /* rom page 14 38000 IC74 US BASIC */ + /* rom page 15 3c000 IC75 SPARE SOCKET */ ROM_DEFAULT_BIOS("os10b3") ROM_SYSTEM_BIOS( 0, "os10b3", "OS A1.0 / BASIC3" ) - ROMX_LOAD("os10_us.rom", 0x40000, 0x4000, CRC(c8e946a9) SHA1(83d91d089dca092d2c8b7c3650ff8143c9069b89), ROM_BIOS(1)) - ROMX_LOAD("basic3.rom", 0x3c000, 0x4000, CRC(161b9539) SHA1(b39014610a968789afd7695aa04d1277d874405c), ROM_BIOS(1)) /* rom page 15 3c000 */ + ROMX_LOAD("usmos10.rom", 0x40000, 0x4000, CRC(c8e946a9) SHA1(83d91d089dca092d2c8b7c3650ff8143c9069b89), ROM_BIOS(1)) + ROMX_LOAD("usbasic3.rom", 0x3c000, 0x4000, CRC(161b9539) SHA1(b39014610a968789afd7695aa04d1277d874405c), ROM_BIOS(1)) /* rom page 15 3c000 */ - ROM_LOAD("dfs10.rom", 0x38000, 0x4000, CRC(7e367e8c) SHA1(161f585dc45665ea77433c84afd2f95049f7f5a0)) + ROM_LOAD("viewa210.rom", 0x30000, 0x4000, CRC(4345359f) SHA1(88c93df1854f5fbe6cd6e5f0e29a8bf4ea3b5614)) + ROM_LOAD("usdnfs10.rom", 0x38000, 0x4000, CRC(7e367e8c) SHA1(161f585dc45665ea77433c84afd2f95049f7f5a0)) ROM_REGION(0x4000, "os", 0) ROM_COPY("option", 0x40000, 0, 0x4000) @@ -1436,22 +1518,22 @@ ROM_START(bbcbp) ROM_SYSTEM_BIOS( 0, "os20", "OS 2.00" ) ROMX_LOAD("bpos2.ic71", 0x3c000, 0x4000, CRC(9f356396) SHA1(ea7d3a7e3ee1ecfaa1483af994048057362b01f2), ROM_BIOS(1)) /* rom page 15 3C000 BASIC */ ROM_CONTINUE( 0x40000, 0x4000) /* OS */ - /* rom page 0 00000 */ - /* rom page 1 04000 */ - /* rom page 2 08000 32K IN PAGE 3 */ - /* rom page 3 0c000 SPARE SOCKET */ - /* rom page 4 10000 32K IN PAGE 5 */ - /* rom page 5 14000 ADFS */ - /* rom page 6 18000 32K IN PAGE 7 */ - /* rom page 7 1c000 DDFS */ - /* rom page 8 20000 32K IN PAGE 9 */ - /* rom page 9 24000 SPARE SOCKET */ - /* rom page 10 28000 32K IN PAGE 11 */ - /* rom page 11 2c000 SPARE SOCKET */ - /* rom page 12 30000 */ - /* rom page 13 34000 */ + /* rom page 0 00000 SWRAM (B+ 128K only) */ + /* rom page 1 04000 SWRAM (B+ 128K only) */ + /* rom page 2 08000 IC35 32K IN PAGE 3 */ + /* rom page 3 0c000 IC35 SPARE SOCKET */ + /* rom page 4 10000 IC44 32K IN PAGE 5 */ + /* rom page 5 14000 IC44 ADFS */ + /* rom page 6 18000 IC57 32K IN PAGE 7 */ + /* rom page 7 1c000 IC57 DDFS */ + /* rom page 8 20000 IC62 32K IN PAGE 9 */ + /* rom page 9 24000 IC62 SPARE SOCKET */ + /* rom page 10 28000 IC68 32K IN PAGE 11 */ + /* rom page 11 2c000 IC68 SPARE SOCKET */ + /* rom page 12 30000 SWRAM (B+ 128K only) */ + /* rom page 13 34000 SWRAM (B+ 128K only) */ /* rom page 14 38000 32K IN PAGE 15 */ - /* rom page 15 3C000 BASIC */ + /* rom page 15 3C000 IC71 BASIC */ ROM_LOAD("adfs130.rom", 0x14000, 0x4000, CRC(d3855588) SHA1(301fd05c475a629c4bec70510d4507256a5b00d8)) ROM_LOAD("ddfs223.rom", 0x1c000, 0x4000, CRC(7891f9b7) SHA1(0d7ed0b0b3852cb61970ada1993244f2896896aa)) @@ -1463,39 +1545,7 @@ ROM_START(bbcbp) ROM_END -ROM_START(bbcbp128) - ROM_REGION(0x10000,"maincpu",ROMREGION_ERASEFF) /* ROM MEMORY */ - - ROM_REGION(0x44000,"option",0) /* ROM */ - ROM_DEFAULT_BIOS("os20") - ROM_SYSTEM_BIOS( 0, "os20", "OS 2.00" ) - ROMX_LOAD("bpos2.ic71", 0x3c000, 0x4000, CRC(9f356396) SHA1(ea7d3a7e3ee1ecfaa1483af994048057362b01f2), ROM_BIOS(1)) /* rom page 15 3C000 BASIC */ - ROM_CONTINUE( 0x40000, 0x4000) /* OS */ - /* rom page 0 00000 */ - /* rom page 1 04000 */ - /* rom page 2 08000 32K IN PAGE 3 */ - /* rom page 3 0c000 SPARE SOCKET */ - /* rom page 4 10000 32K IN PAGE 5 */ - /* rom page 5 14000 ADFS */ - /* rom page 6 18000 32K IN PAGE 7 */ - /* rom page 7 1c000 DDFS */ - /* rom page 8 20000 32K IN PAGE 9 */ - /* rom page 9 24000 SPARE SOCKET */ - /* rom page 10 28000 32K IN PAGE 11 */ - /* rom page 11 2c000 SPARE SOCKET */ - /* rom page 12 30000 */ - /* rom page 13 34000 */ - /* rom page 14 38000 32K IN PAGE 15 */ - /* rom page 15 3C000 BASIC */ - ROM_LOAD("adfs130.rom", 0x14000, 0x4000, CRC(d3855588) SHA1(301fd05c475a629c4bec70510d4507256a5b00d8)) - ROM_LOAD("ddfs223.rom", 0x1c000, 0x4000, CRC(7891f9b7) SHA1(0d7ed0b0b3852cb61970ada1993244f2896896aa)) - - ROM_REGION(0x4000, "os", 0) - ROM_COPY("option", 0x40000, 0, 0x4000) - - ROM_REGION(0x8000, "vsm", 0) /* system speech PHROM */ - ROM_LOAD("phroma.bin", 0x0000, 0x4000, CRC(98e1bf9e) SHA1(b369809275cb67dfd8a749265e91adb2d2558ae6)) -ROM_END +#define rom_bbcbp128 rom_bbcbp ROM_START(abc110) @@ -1505,29 +1555,35 @@ ROM_START(abc110) ROM_DEFAULT_BIOS("mos200") ROM_SYSTEM_BIOS( 0, "mos200", "MOS2.00" ) ROMX_LOAD("mos200.rom", 0x40000, 0x4000, CRC(5e88f994) SHA1(76235ff15d736f5def338f73ac7497c41b916505), ROM_BIOS(1)) - ROM_SYSTEM_BIOS( 1, "mos123", "MOS1.23" ) - ROMX_LOAD("mos123.rom", 0x40000, 0x4000, CRC(90d31d08) SHA1(42a01892cf8bd2ada4db1c8b36aff80c85eb5dcb), ROM_BIOS(2)) - ROM_SYSTEM_BIOS( 2, "mos120", "MOS1.20" ) - ROMX_LOAD("mos120.rom", 0x40000, 0x4000, CRC(0a1e83a0) SHA1(21dc3a94eef7c003b194686730fb461779f44925), ROM_BIOS(3)) + ROMX_LOAD("basic200.rom", 0x3c000, 0x4000, CRC(79434781) SHA1(4a7393f3a45ea309f744441c16723e2ef447a281), ROM_BIOS(1)) + ROM_SYSTEM_BIOS( 1, "mos123stor", "MOS1.23 + ViewStore" ) + ROMX_LOAD("mos123stor.rom", 0x3c000, 0x4000, CRC(4e84f452) SHA1(145ee54f04b3eb4d0e5afaabe21915be48db3c54), ROM_BIOS(2)) /* rom page 15 3C000 ViewStore */ + ROM_CONTINUE( 0x40000, 0x4000) /* OS */ + ROM_SYSTEM_BIOS( 2, "mos123", "MOS1.23" ) + ROMX_LOAD("mos123.rom", 0x40000, 0x4000, CRC(90d31d08) SHA1(42a01892cf8bd2ada4db1c8b36aff80c85eb5dcb), ROM_BIOS(3)) + ROMX_LOAD("basic200.rom", 0x3c000, 0x4000, CRC(79434781) SHA1(4a7393f3a45ea309f744441c16723e2ef447a281), ROM_BIOS(3)) + ROM_SYSTEM_BIOS( 3, "mos120", "MOS1.20" ) + ROMX_LOAD("mos120.rom", 0x40000, 0x4000, CRC(0a1e83a0) SHA1(21dc3a94eef7c003b194686730fb461779f44925), ROM_BIOS(4)) + ROMX_LOAD("basic200.rom", 0x3c000, 0x4000, CRC(79434781) SHA1(4a7393f3a45ea309f744441c16723e2ef447a281), ROM_BIOS(4)) /* rom page 0 00000 */ - /* rom page 1 04000 */ - /* rom page 2 08000 32K IN PAGE 3 */ - /* rom page 3 0c000 SPARE SOCKET */ - /* rom page 4 10000 32K IN PAGE 5 */ - /* rom page 5 14000 DDFS */ - /* rom page 6 18000 32K IN PAGE 7 */ - /* rom page 7 1c000 ADFS */ - /* rom page 8 20000 32K IN PAGE 9 */ - /* rom page 9 24000 SPARE SOCKET */ - /* rom page 10 28000 32K IN PAGE 11 */ - /* rom page 11 2c000 SPARE SOCKET */ + /* rom page 1 04000 IC71 selectable with link S13 */ + /* rom page 2 08000 IC35 32K IN PAGE 3 */ + /* rom page 3 0c000 IC35 SPARE SOCKET */ + /* rom page 4 10000 IC44 32K IN PAGE 5 */ + /* rom page 5 14000 IC44 DDFS */ + /* rom page 6 18000 IC57 32K IN PAGE 7 */ + /* rom page 7 1c000 IC57 ADFS */ + /* rom page 8 20000 IC62 32K IN PAGE 9 */ + /* rom page 9 24000 IC62 SPARE SOCKET */ + /* rom page 10 28000 IC68 32K IN PAGE 11 */ + /* rom page 11 2c000 IC68 SPARE SOCKET */ /* rom page 12 30000 */ /* rom page 13 34000 */ - /* rom page 14 38000 32K IN PAGE 15 */ - /* rom page 15 3C000 BASIC */ - ROM_LOAD("ddfs223.rom", 0x14000, 0x4000, CRC(7891f9b7) SHA1(0d7ed0b0b3852cb61970ada1993244f2896896aa)) + /* rom page 14 38000 */ + /* rom page 15 3C000 IC71 BASIC */ + //ROM_LOAD("ddfs223.rom", 0x14000, 0x4000, CRC(7891f9b7) SHA1(0d7ed0b0b3852cb61970ada1993244f2896896aa)) + ROM_LOAD("acwddfs225.rom", 0x14000, 0x4000, CRC(7d0f9016) SHA1(bdfe44c79e18142d747436627e71a362a04cf746)) ROM_LOAD("adfs130.rom", 0x1c000, 0x4000, CRC(d3855588) SHA1(301fd05c475a629c4bec70510d4507256a5b00d8)) - ROM_LOAD("basic200.rom", 0x3c000, 0x4000, CRC(79434781) SHA1(4a7393f3a45ea309f744441c16723e2ef447a281)) ROM_REGION(0x4000, "os", 0) ROM_COPY("option", 0x40000, 0, 0x4000) @@ -1537,75 +1593,39 @@ ROM_START(abc110) ROM_END -ROM_START(abc210) - ROM_REGION(0x10000,"maincpu",ROMREGION_ERASEFF) /* ROM MEMORY */ +#define rom_abc310 rom_abc110 - ROM_REGION(0x44000,"option",0) /* ROM */ - ROM_DEFAULT_BIOS("mos200") - ROM_SYSTEM_BIOS( 0, "mos200", "MOS2.00" ) - ROMX_LOAD("mos200.rom", 0x40000, 0x4000, CRC(5e88f994) SHA1(76235ff15d736f5def338f73ac7497c41b916505), ROM_BIOS(1)) - ROM_SYSTEM_BIOS( 1, "mos123", "MOS1.23" ) - ROMX_LOAD("mos123.rom", 0x40000, 0x4000, CRC(90d31d08) SHA1(42a01892cf8bd2ada4db1c8b36aff80c85eb5dcb), ROM_BIOS(2)) - ROM_SYSTEM_BIOS( 2, "mos120", "MOS1.20" ) - ROMX_LOAD("mos120.rom", 0x40000, 0x4000, CRC(0a1e83a0) SHA1(21dc3a94eef7c003b194686730fb461779f44925), ROM_BIOS(3)) - /* rom page 0 00000 */ - /* rom page 1 04000 */ - /* rom page 2 08000 32K IN PAGE 3 */ - /* rom page 3 0c000 SPARE SOCKET */ - /* rom page 4 10000 32K IN PAGE 5 */ - /* rom page 5 14000 DDFS */ - /* rom page 6 18000 32K IN PAGE 7 */ - /* rom page 7 1c000 ADFS */ - /* rom page 8 20000 32K IN PAGE 9 */ - /* rom page 9 24000 SPARE SOCKET */ - /* rom page 10 28000 32K IN PAGE 11 */ - /* rom page 11 2c000 SPARE SOCKET */ - /* rom page 12 30000 */ - /* rom page 13 34000 */ - /* rom page 14 38000 32K IN PAGE 15 */ - /* rom page 15 3C000 BASIC */ - ROM_LOAD("ddfs223.rom", 0x14000, 0x4000, CRC(7891f9b7) SHA1(0d7ed0b0b3852cb61970ada1993244f2896896aa)) - ROM_LOAD("adfs130.rom", 0x1c000, 0x4000, CRC(d3855588) SHA1(301fd05c475a629c4bec70510d4507256a5b00d8)) - ROM_LOAD("basic200.rom", 0x3c000, 0x4000, CRC(79434781) SHA1(4a7393f3a45ea309f744441c16723e2ef447a281)) - - ROM_REGION(0x4000, "os", 0) - ROM_COPY("option", 0x40000, 0, 0x4000) - ROM_REGION(0x8000, "vsm", 0) /* system speech PHROM */ - ROM_LOAD("phroma.bin", 0x0000, 0x4000, CRC(98e1bf9e) SHA1(b369809275cb67dfd8a749265e91adb2d2558ae6)) -ROM_END - - -ROM_START(abc310) +ROM_START(acw443) ROM_REGION(0x10000,"maincpu",ROMREGION_ERASEFF) /* ROM MEMORY */ ROM_REGION(0x44000,"option",0) /* ROM */ - ROM_DEFAULT_BIOS("mos200") - ROM_SYSTEM_BIOS( 0, "mos200", "MOS2.00" ) - ROMX_LOAD("mos200.rom", 0x40000, 0x4000, CRC(5e88f994) SHA1(76235ff15d736f5def338f73ac7497c41b916505), ROM_BIOS(1)) - ROM_SYSTEM_BIOS( 1, "mos123", "MOS1.23" ) - ROMX_LOAD("mos123.rom", 0x40000, 0x4000, CRC(90d31d08) SHA1(42a01892cf8bd2ada4db1c8b36aff80c85eb5dcb), ROM_BIOS(2)) - ROM_SYSTEM_BIOS( 2, "mos120", "MOS1.20" ) - ROMX_LOAD("mos120.rom", 0x40000, 0x4000, CRC(0a1e83a0) SHA1(21dc3a94eef7c003b194686730fb461779f44925), ROM_BIOS(3)) + ROM_DEFAULT_BIOS("mos210") + ROM_SYSTEM_BIOS( 0, "mos210", "MOS2.10" ) + ROMX_LOAD("acwmos210.rom", 0x40000, 0x4000, CRC(168d6753) SHA1(dcd01d8f5f6e0cd92ae626ca52a3db71abf5d282), ROM_BIOS(1)) + ROM_SYSTEM_BIOS( 1, "mos200", "MOS2.00" ) + ROMX_LOAD("mos200.rom", 0x40000, 0x4000, CRC(5e88f994) SHA1(76235ff15d736f5def338f73ac7497c41b916505), ROM_BIOS(2)) /* rom page 0 00000 */ - /* rom page 1 04000 */ - /* rom page 2 08000 32K IN PAGE 3 */ - /* rom page 3 0c000 SPARE SOCKET */ - /* rom page 4 10000 32K IN PAGE 5 */ - /* rom page 5 14000 DDFS */ - /* rom page 6 18000 32K IN PAGE 7 */ - /* rom page 7 1c000 ADFS */ - /* rom page 8 20000 32K IN PAGE 9 */ - /* rom page 9 24000 SPARE SOCKET */ - /* rom page 10 28000 32K IN PAGE 11 */ - /* rom page 11 2c000 SPARE SOCKET */ + /* rom page 1 04000 IC71 selectable with link S13 */ + /* rom page 2 08000 IC35 32K IN PAGE 3 */ + /* rom page 3 0c000 IC35 DNFS */ + /* rom page 4 10000 IC44 32K IN PAGE 5 */ + /* rom page 5 14000 IC44 ACW DFS */ + /* rom page 6 18000 IC57 32K IN PAGE 7 */ + /* rom page 7 1c000 IC57 TERMINAL */ + /* rom page 8 20000 IC62 32K IN PAGE 9 */ + /* rom page 9 24000 IC62 ADFS */ + /* rom page 10 28000 IC68 BASIC */ + /* rom page 11 2c000 IC68 Unused OS? */ /* rom page 12 30000 */ /* rom page 13 34000 */ - /* rom page 14 38000 32K IN PAGE 15 */ - /* rom page 15 3C000 BASIC */ - ROM_LOAD("ddfs223.rom", 0x14000, 0x4000, CRC(7891f9b7) SHA1(0d7ed0b0b3852cb61970ada1993244f2896896aa)) - ROM_LOAD("adfs130.rom", 0x1c000, 0x4000, CRC(d3855588) SHA1(301fd05c475a629c4bec70510d4507256a5b00d8)) - ROM_LOAD("basic200.rom", 0x3c000, 0x4000, CRC(79434781) SHA1(4a7393f3a45ea309f744441c16723e2ef447a281)) + /* rom page 14 38000 */ + /* rom page 15 3C000 IC71 selectable with link S13 */ + ROM_LOAD("dnfs120-201666.rom", 0x0c000, 0x4000, CRC(8ccd2157) SHA1(7e3c536baeae84d6498a14e8405319e01ee78232)) + ROM_LOAD("acwddfs225.rom", 0x14000, 0x4000, CRC(7d0f9016) SHA1(bdfe44c79e18142d747436627e71a362a04cf746)) + ROM_LOAD("acwterminal.rom", 0x1c000, 0x4000, CRC(81afaeb9) SHA1(6618ed9158776b4b8aa030957bd19ba77e4a993c)) + ROM_LOAD("adfs130.rom", 0x24000, 0x4000, CRC(d3855588) SHA1(301fd05c475a629c4bec70510d4507256a5b00d8)) + ROM_LOAD("basic200.rom", 0x28000, 0x4000, CRC(79434781) SHA1(4a7393f3a45ea309f744441c16723e2ef447a281)) ROM_REGION(0x4000, "os", 0) ROM_COPY("option", 0x40000, 0, 0x4000) @@ -1651,26 +1671,26 @@ ROM_START(bbcm) ROM_SYSTEM_BIOS( 0, "mos350", "Enhanced MOS 3.50" ) ROMX_LOAD("mos350.ic24", 0x20000, 0x20000, CRC(141027b9) SHA1(85211b5bc7c7a269952d2b063b7ec0e1f0196803), ROM_BIOS(1)) ROM_SYSTEM_BIOS( 1, "mos320", "Original MOS 3.20" ) - ROMX_LOAD("mos320.ic24", 0x20000, 0x20000, CRC(0cfad2ce) SHA1(0275719aa7746dd3b627f95ccc4362b564063a5e), ROM_BIOS(2)) + ROMX_LOAD("mos320.ic24", 0x20000, 0x20000, CRC(0f747ebe) SHA1(eacacbec3892dc4809ad5800e6c8299ff9eb528f), ROM_BIOS(2)) ROM_COPY("option", 0x20000, 0x40000, 0x4000) /* Move loaded roms into place */ ROM_FILL(0x20000, 0x4000, 0xFFFF) - /* 00000 rom 0 Rear Cartridge bottom 16K */ - /* 04000 rom 1 Rear Cartridge top 16K */ - /* 08000 rom 2 Front Cartridge bottom 16K */ - /* 0c000 rom 3 Front Cartridge top 16K */ - /* 10000 rom 4 SWRAM */ - /* 14000 rom 5 SWRAM */ - /* 18000 rom 6 SWRAM */ - /* 1c000 rom 7 SWRAM */ - /* 20000 rom 8 SPARE SOCKET */ - /* 24000 rom 9 DFS + SRAM */ - /* 28000 rom 10 Viewsheet */ - /* 2c000 rom 11 Edit */ - /* 30000 rom 12 BASIC */ - /* 34000 rom 13 ADFS */ - /* 38000 rom 14 View + MOS code */ - /* 3c000 rom 15 Terminal + Tube host + CFS */ -// ROM_LOAD("anfs424.rom", 0x20000, 0x4000, CRC(1b9f75fd) SHA1(875f71edd48f87c3a55371409d0cc2015d8b5853) ) // TODO where to load this? + /* 00000 rom 0 SK3 Rear Cartridge bottom 16K */ + /* 04000 rom 1 SK3 Rear Cartridge top 16K */ + /* 08000 rom 2 SK4 Front Cartridge bottom 16K */ + /* 0c000 rom 3 SK4 Front Cartridge top 16K */ + /* 10000 rom 4 IC41 SWRAM or bottom 16K */ + /* 14000 rom 5 IC41 SWRAM or top 16K */ + /* 18000 rom 6 IC37 SWRAM or bottom 16K */ + /* 1c000 rom 7 IC37 SWRAM or top 16K */ + /* 20000 rom 8 IC27 ANFS */ + /* 24000 rom 9 IC24 DFS + SRAM */ + /* 28000 rom 10 IC24 Viewsheet */ + /* 2c000 rom 11 IC24 Edit */ + /* 30000 rom 12 IC24 BASIC */ + /* 34000 rom 13 IC24 ADFS */ + /* 38000 rom 14 IC24 View + MOS code */ + /* 3c000 rom 15 IC24 Terminal + Tube host + CFS */ + //ROM_LOAD("anfs424.rom", 0x20000, 0x4000, CRC(1b9f75fd) SHA1(875f71edd48f87c3a55371409d0cc2015d8b5853)) ROM_REGION(0x4000, "os", 0) ROM_COPY("option", 0x40000, 0, 0x4000) @@ -1682,43 +1702,8 @@ ROM_START(bbcm) ROM_END -ROM_START(bbcmt) - ROM_REGION(0x10000,"maincpu",ROMREGION_ERASEFF) /* ROM MEMORY */ - - ROM_REGION(0x44000,"option",0) /* ROM */ - ROM_DEFAULT_BIOS("mos350") - ROM_SYSTEM_BIOS( 0, "mos350", "Enhanced MOS 3.50" ) - ROMX_LOAD("mos350.ic24", 0x20000, 0x20000, CRC(141027b9) SHA1(85211b5bc7c7a269952d2b063b7ec0e1f0196803), ROM_BIOS(1)) - ROM_SYSTEM_BIOS( 1, "mos320", "Original MOS 3.20" ) - ROMX_LOAD("mos320.ic24", 0x20000, 0x20000, CRC(0cfad2ce) SHA1(0275719aa7746dd3b627f95ccc4362b564063a5e), ROM_BIOS(2)) - ROM_COPY("option", 0x20000, 0x40000, 0x4000) /* Move loaded roms into place */ - ROM_FILL(0x20000, 0x4000, 0xFFFF) - /* 00000 rom 0 Rear Cartridge bottom 16K */ - /* 04000 rom 1 Rear Cartridge top 16K */ - /* 08000 rom 2 Front Cartridge bottom 16K */ - /* 0c000 rom 3 Front Cartridge top 16K */ - /* 10000 rom 4 SWRAM */ - /* 14000 rom 5 SWRAM */ - /* 18000 rom 6 SWRAM */ - /* 1c000 rom 7 SWRAM */ - /* 20000 rom 8 SPARE SOCKET */ - /* 24000 rom 9 DFS + SRAM */ - /* 28000 rom 10 Viewsheet */ - /* 2c000 rom 11 Edit */ - /* 30000 rom 12 BASIC */ - /* 34000 rom 13 ADFS */ - /* 38000 rom 14 View + MOS code */ - /* 3c000 rom 15 Terminal + Tube host + CFS */ -// ROM_LOAD("anfs424.ic27", 0x20000, 0x4000, CRC(1b9f75fd) SHA1(875f71edd48f87c3a55371409d0cc2015d8b5853) ) // TODO where to load this? - - ROM_REGION(0x4000, "os", 0) - ROM_COPY("option", 0x40000, 0, 0x4000) - - ROM_REGION(0x40,"rtc",0) /* mc146818 */ - /* Factory defaulted CMOS RAM, sets default language ROM, etc. */ - ROMX_LOAD("mos350.cmos", 0x00, 0x40, CRC(e84c1854) SHA1(f3cb7f12b7432caba28d067f01af575779220aac), ROM_BIOS(1)) - ROMX_LOAD("mos320.cmos", 0x00, 0x40, CRC(c7f9e85a) SHA1(f24cc9db0525910689219f7204bf8b864033ee94), ROM_BIOS(2)) -ROM_END +#define rom_bbcmt rom_bbcm +#define rom_bbcm512 rom_bbcm ROM_START(bbcmaiv) @@ -1727,25 +1712,25 @@ ROM_START(bbcmaiv) ROM_REGION(0x44000,"option",0) /* ROM */ ROM_DEFAULT_BIOS("mos320") ROM_SYSTEM_BIOS( 0, "mos320", "MOS 3.20" ) - ROMX_LOAD("mos320.ic24", 0x20000, 0x20000, CRC(0cfad2ce) SHA1(0275719aa7746dd3b627f95ccc4362b564063a5e), ROM_BIOS(1)) + ROMX_LOAD("mos320.ic24", 0x20000, 0x20000, CRC(0f747ebe) SHA1(eacacbec3892dc4809ad5800e6c8299ff9eb528f), ROM_BIOS(1)) ROM_COPY("option", 0x20000, 0x40000, 0x4000) /* Move loaded roms into place */ ROM_FILL(0x20000, 0x4000, 0xFFFF) - /* 00000 rom 0 Rear Cartridge bottom 16K */ - /* 04000 rom 1 Rear Cartridge top 16K */ - /* 08000 rom 2 Front Cartridge bottom 16K */ - /* 0c000 rom 3 Front Cartridge top 16K */ - /* 10000 rom 4 SWRAM */ - /* 14000 rom 5 SWRAM */ - /* 18000 rom 6 SWRAM */ - /* 1c000 rom 7 SWRAM */ - /* 20000 rom 8 VFS */ - /* 24000 rom 9 DFS + SRAM */ - /* 28000 rom 10 Viewsheet */ - /* 2c000 rom 11 Edit */ - /* 30000 rom 12 BASIC */ - /* 34000 rom 13 ADFS */ - /* 38000 rom 14 View + MOS code */ - /* 3c000 rom 15 Terminal + Tube host + CFS */ + /* 00000 rom 0 SK3 Rear Cartridge bottom 16K */ + /* 04000 rom 1 SK3 Rear Cartridge top 16K */ + /* 08000 rom 2 SK4 Front Cartridge bottom 16K */ + /* 0c000 rom 3 SK4 Front Cartridge top 16K */ + /* 10000 rom 4 IC41 SWRAM or bottom 16K */ + /* 14000 rom 5 IC41 SWRAM or top 16K */ + /* 18000 rom 6 IC37 SWRAM or bottom 16K */ + /* 1c000 rom 7 IC37 SWRAM or top 16K */ + /* 20000 rom 8 IC27 VFS */ + /* 24000 rom 9 IC24 DFS + SRAM */ + /* 28000 rom 10 IC24 Viewsheet */ + /* 2c000 rom 11 IC24 Edit */ + /* 30000 rom 12 IC24 BASIC */ + /* 34000 rom 13 IC24 ADFS */ + /* 38000 rom 14 IC24 View + MOS code */ + /* 3c000 rom 15 IC24 Terminal + Tube host + CFS */ ROM_LOAD("vfs170.rom", 0x20000, 0x4000, CRC(b124a0bb) SHA1(ba31c757815cf470402d7829a70a0e1d3fb1355b) ) ROM_REGION(0x4000, "os", 0) @@ -1763,26 +1748,26 @@ ROM_START(bbcmet) ROM_REGION(0x44000,"option",0) /* ROM */ ROM_DEFAULT_BIOS("mos400") ROM_SYSTEM_BIOS( 0, "mos400", "Econet MOS 4.00" ) - ROMX_LOAD("mos400.ic24", 0x30000, 0x10000, BAD_DUMP CRC(81729034) SHA1(d4bc2c7f5e66b5298786138f395908e70c772971), ROM_BIOS(1)) /* Merged individual ROM bank dumps */ + ROMX_LOAD("mos400.ic24", 0x30000, 0x10000, CRC(81729034) SHA1(d4bc2c7f5e66b5298786138f395908e70c772971), ROM_BIOS(1)) ROM_COPY("option", 0x34000, 0x24000, 0xC000) /* Mirror */ ROM_COPY("option", 0x30000, 0x40000, 0x4000) /* Move loaded roms into place */ ROM_FILL(0x30000, 0x4000, 0xFFFF) - /* 00000 rom 0 Rear Cartridge bottom 16K */ - /* 04000 rom 1 Rear Cartridge top 16K */ - /* 08000 rom 2 Front Cartridge bottom 16K */ - /* 0c000 rom 3 Front Cartridge top 16K */ - /* 10000 rom 4 SWRAM */ - /* 14000 rom 5 SWRAM */ - /* 18000 rom 6 SWRAM */ - /* 1c000 rom 7 SWRAM */ + /* 00000 rom 0 SK3 Rear Cartridge bottom 16K */ + /* 04000 rom 1 SK3 Rear Cartridge top 16K */ + /* 08000 rom 2 SK4 Front Cartridge bottom 16K */ + /* 0c000 rom 3 SK4 Front Cartridge top 16K */ + /* 10000 rom 4 IC41 SWRAM or bottom 16K */ + /* 14000 rom 5 IC41 SWRAM or top 16K */ + /* 18000 rom 6 IC37 SWRAM or bottom 16K */ + /* 1c000 rom 7 IC37 SWRAM or top 16K */ /* 20000 rom 8 NO SOCKET */ - /* 24000 rom 9 BASIC */ - /* 28000 rom 10 ANFS */ - /* 2c000 rom 11 MOS code */ - /* 30000 rom 12 UNUSED */ - /* 34000 rom 13 BASIC */ - /* 38000 rom 14 ANFS */ - /* 3c000 rom 15 MOS code */ + /* 24000 rom 9 IC24 BASIC */ + /* 28000 rom 10 IC24 ANFS */ + /* 2c000 rom 11 IC24 MOS code */ + /* 30000 rom 12 IC24 UNUSED */ + /* 34000 rom 13 IC24 BASIC */ + /* 38000 rom 14 IC24 ANFS */ + /* 3c000 rom 15 IC24 MOS code */ ROM_REGION(0x4000, "os", 0) ROM_COPY("option", 0x40000, 0, 0x4000) @@ -1793,71 +1778,32 @@ ROM_START(bbcmet) ROM_END -ROM_START(bbcm512) - ROM_REGION(0x10000,"maincpu",ROMREGION_ERASEFF) /* ROM MEMORY */ - - ROM_REGION(0x44000,"option",0) /* ROM */ - ROM_DEFAULT_BIOS("mos350") - ROM_SYSTEM_BIOS( 0, "mos350", "Enhanced MOS 3.50" ) - ROMX_LOAD("mos350.ic24", 0x20000, 0x20000, CRC(141027b9) SHA1(85211b5bc7c7a269952d2b063b7ec0e1f0196803), ROM_BIOS(1)) - ROM_SYSTEM_BIOS( 1, "mos320", "Original MOS 3.20" ) - ROMX_LOAD("mos320.ic24", 0x20000, 0x20000, CRC(0cfad2ce) SHA1(0275719aa7746dd3b627f95ccc4362b564063a5e), ROM_BIOS(2)) - ROM_COPY("option", 0x20000, 0x40000, 0x4000) /* Move loaded roms into place */ - ROM_FILL(0x20000, 0x4000, 0xFFFF) - /* 00000 rom 0 Rear Cartridge bottom 16K */ - /* 04000 rom 1 Rear Cartridge top 16K */ - /* 08000 rom 2 Front Cartridge bottom 16K */ - /* 0c000 rom 3 Front Cartridge top 16K */ - /* 10000 rom 4 SWRAM */ - /* 14000 rom 5 SWRAM */ - /* 18000 rom 6 SWRAM */ - /* 1c000 rom 7 SWRAM */ - /* 20000 rom 8 SPARE SOCKET */ - /* 24000 rom 9 DFS + SRAM */ - /* 28000 rom 10 Viewsheet */ - /* 2c000 rom 11 Edit */ - /* 30000 rom 12 BASIC */ - /* 34000 rom 13 ADFS */ - /* 38000 rom 14 View + MOS code */ - /* 3c000 rom 15 Terminal + Tube host + CFS */ -// ROM_LOAD("anfs424.ic27", 0x20000, 0x4000, CRC(1b9f75fd) SHA1(875f71edd48f87c3a55371409d0cc2015d8b5853) ) - - ROM_REGION(0x4000, "os", 0) - ROM_COPY("option", 0x40000, 0, 0x4000) - - ROM_REGION(0x40,"rtc",0) /* mc146818 */ - /* Factory defaulted CMOS RAM, sets default language ROM, etc. */ - ROMX_LOAD("mos350.cmos", 0x00, 0x40, CRC(e84c1854) SHA1(f3cb7f12b7432caba28d067f01af575779220aac), ROM_BIOS(1)) - ROMX_LOAD("mos320.cmos", 0x00, 0x40, CRC(c7f9e85a) SHA1(f24cc9db0525910689219f7204bf8b864033ee94), ROM_BIOS(2)) -ROM_END - - ROM_START(bbcmarm) ROM_REGION(0x10000,"maincpu",ROMREGION_ERASEFF) /* ROM MEMORY */ ROM_REGION(0x44000,"option",0) /* ROM */ ROM_DEFAULT_BIOS("mos320") ROM_SYSTEM_BIOS( 0, "mos320", "Original MOS 3.20" ) - ROMX_LOAD("mos320.ic24", 0x20000, 0x20000, CRC(0cfad2ce) SHA1(0275719aa7746dd3b627f95ccc4362b564063a5e), ROM_BIOS(1)) + ROMX_LOAD("mos320.ic24", 0x20000, 0x20000, CRC(0f747ebe) SHA1(eacacbec3892dc4809ad5800e6c8299ff9eb528f), ROM_BIOS(1)) ROM_COPY("option", 0x20000, 0x40000, 0x4000) /* Move loaded roms into place */ ROM_FILL(0x20000, 0x4000, 0xFFFF) - /* 00000 rom 0 Rear Cartridge bottom 16K */ - /* 04000 rom 1 Rear Cartridge top 16K */ - /* 08000 rom 2 Front Cartridge bottom 16K */ - /* 0c000 rom 3 Front Cartridge top 16K */ - /* 10000 rom 4 SWRAM */ - /* 14000 rom 5 SWRAM */ - /* 18000 rom 6 SWRAM */ - /* 1c000 rom 7 SWRAM */ - /* 20000 rom 8 SPARE SOCKET */ - /* 24000 rom 9 DFS + SRAM */ - /* 28000 rom 10 Viewsheet */ - /* 2c000 rom 11 Edit */ - /* 30000 rom 12 BASIC */ - /* 34000 rom 13 ADFS */ - /* 38000 rom 14 View + MOS code */ - /* 3c000 rom 15 Terminal + Tube host + CFS */ -// ROM_LOAD("anfs424.ic27", 0x20000, 0x4000, CRC(1b9f75fd) SHA1(875f71edd48f87c3a55371409d0cc2015d8b5853) ) + /* 00000 rom 0 SK3 Rear Cartridge bottom 16K */ + /* 04000 rom 1 SK3 Rear Cartridge top 16K */ + /* 08000 rom 2 SK4 Front Cartridge bottom 16K */ + /* 0c000 rom 3 SK4 Front Cartridge top 16K */ + /* 10000 rom 4 IC41 SWRAM or bottom 16K */ + /* 14000 rom 5 IC41 SWRAM or top 16K */ + /* 18000 rom 6 IC37 SWRAM or bottom 16K */ + /* 1c000 rom 7 IC37 SWRAM or top 16K */ + /* 20000 rom 8 IC27 ANFS */ + /* 24000 rom 9 IC24 DFS + SRAM */ + /* 28000 rom 10 IC24 Viewsheet */ + /* 2c000 rom 11 IC24 Edit */ + /* 30000 rom 12 IC24 BASIC */ + /* 34000 rom 13 IC24 ADFS */ + /* 38000 rom 14 IC24 View + MOS code */ + /* 3c000 rom 15 IC24 Terminal + Tube host + CFS */ + //ROM_LOAD("anfs424.rom", 0x20000, 0x4000, CRC(1b9f75fd) SHA1(875f71edd48f87c3a55371409d0cc2015d8b5853)) ROM_REGION(0x4000, "os", 0) ROM_COPY("option", 0x40000, 0, 0x4000) @@ -1876,25 +1822,25 @@ ROM_START(bbcmc) ROM_SYSTEM_BIOS( 0, "mos510", "Enhanced MOS 5.10" ) ROMX_LOAD("mos510.ic49", 0x30000, 0x10000, BAD_DUMP CRC(9a2a6086) SHA1(094ab37b0b6437c4f1653eaa0602ef102737adb6), ROM_BIOS(1)) /* Merged individual ROM bank dumps */ ROM_SYSTEM_BIOS( 1, "mos500", "Original MOS 5.00" ) - ROMX_LOAD("mos500.ic49", 0x30000, 0x10000, BAD_DUMP CRC(f6170023) SHA1(140d002d2d9cd34b47197a2ba823505af2a84633), ROM_BIOS(2)) /* Merged individual ROM bank dumps */ + ROMX_LOAD("mos500.ic49", 0x30000, 0x10000, CRC(f6170023) SHA1(140d002d2d9cd34b47197a2ba823505af2a84633), ROM_BIOS(2)) ROM_COPY("option", 0x30000, 0x40000, 0x4000) /* Move loaded roms into place */ ROM_FILL(0x30000, 0x4000, 0xFFFF) /* 00000 rom 0 EXTERNAL */ /* 04000 rom 1 EXTERNAL */ - /* 08000 rom 2 SPARE SOCKET */ - /* 0c000 rom 3 SPARE SOCKET */ + /* 08000 rom 2 IC23 SPARE SOCKET */ + /* 0c000 rom 3 IC17 SPARE SOCKET */ /* 10000 rom 4 SWRAM */ /* 14000 rom 5 SWRAM */ /* 18000 rom 6 SWRAM */ /* 1c000 rom 7 SWRAM */ - /* 20000 rom 8 SPARE SOCKET */ + /* 20000 rom 8 IC29 SPARE SOCKET */ /* 24000 rom 9 UNUSED */ /* 28000 rom 10 UNUSED */ /* 2c000 rom 11 UNUSED */ /* 30000 rom 12 UNUSED */ - /* 34000 rom 13 ADFS */ - /* 38000 rom 14 BASIC */ - /* 3c000 rom 15 Utils */ + /* 34000 rom 13 IC16 ADFS */ + /* 38000 rom 14 IC16 BASIC */ + /* 3c000 rom 15 IC16 Utils */ ROM_REGION(0x4000, "os", 0) ROM_COPY("option", 0x40000, 0, 0x4000) @@ -1916,20 +1862,20 @@ ROM_START(bbcmc_ar) ROM_FILL(0x30000, 0x4000, 0xFFFF) /* 00000 rom 0 EXTERNAL */ /* 04000 rom 1 EXTERNAL */ - /* 08000 rom 2 International */ - /* 0c000 rom 3 SPARE SOCKET */ + /* 08000 rom 2 IC23 International */ + /* 0c000 rom 3 IC17 SPARE SOCKET */ /* 10000 rom 4 SWRAM */ /* 14000 rom 5 SWRAM */ /* 18000 rom 6 SWRAM */ /* 1c000 rom 7 SWRAM */ - /* 20000 rom 8 Arabian */ + /* 20000 rom 8 IC29 Arabian */ /* 24000 rom 9 UNUSED */ /* 28000 rom 10 UNUSED */ /* 2c000 rom 11 UNUSED */ /* 30000 rom 12 UNUSED */ - /* 34000 rom 13 ADFS */ - /* 38000 rom 14 BASIC */ - /* 3c000 rom 15 Utils */ + /* 34000 rom 13 IC16 ADFS */ + /* 38000 rom 14 IC16 BASIC */ + /* 3c000 rom 15 IC16 Utils */ ROM_LOAD("international16.rom", 0x8000 , 0x4000, CRC(0ef527b1) SHA1(dc5149ccf588cd591a6ad47727474ef3313272ce) ) ROM_LOAD("arabian-c22.rom" , 0x20000, 0x4000, CRC(4f3aadff) SHA1(2bbf61ba68264ce5845aab9c54e750b0efe219c8) ) @@ -1953,20 +1899,20 @@ ROM_START(pro128s) ROM_FILL(0x30000, 0x4000, 0xFFFF) /* 00000 rom 0 EXTERNAL */ /* 04000 rom 1 EXTERNAL */ - /* 08000 rom 2 SPARE SOCKET */ - /* 0c000 rom 3 SPARE SOCKET */ + /* 08000 rom 2 IC23 SPARE SOCKET */ + /* 0c000 rom 3 IC17 SPARE SOCKET */ /* 10000 rom 4 SWRAM */ /* 14000 rom 5 SWRAM */ /* 18000 rom 6 SWRAM */ /* 1c000 rom 7 SWRAM */ - /* 20000 rom 8 SPARE SOCKET */ + /* 20000 rom 8 IC29 SPARE SOCKET */ /* 24000 rom 9 UNUSED */ /* 28000 rom 10 UNUSED */ /* 2c000 rom 11 UNUSED */ /* 30000 rom 12 UNUSED */ - /* 34000 rom 13 ADFS */ - /* 38000 rom 14 BASIC */ - /* 3c000 rom 15 Utils */ + /* 34000 rom 13 IC16 ADFS */ + /* 38000 rom 14 IC16 BASIC */ + /* 3c000 rom 15 IC16 Utils */ ROM_REGION(0x4000, "os", 0) ROM_COPY("option", 0x40000, 0, 0x4000) @@ -1979,19 +1925,19 @@ ROM_END /* YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS */ COMP ( 1981, bbcb, 0, bbca, bbcb, bbcb, bbc_state, bbc, "Acorn", "BBC Micro Model B w/8271 FDC", MACHINE_IMPERFECT_GRAPHICS) COMP ( 1981, bbca, bbcb, 0, bbca, bbca, bbc_state, bbc, "Acorn", "BBC Micro Model A", MACHINE_IMPERFECT_GRAPHICS) -COMP ( 1981, bbcb_de, bbcb, 0, bbcb_de, bbcb, bbc_state, bbc, "Acorn", "BBC Micro Model B (German)", MACHINE_IMPERFECT_GRAPHICS) +COMP ( 1982, bbcb_de, bbcb, 0, bbcb_de, bbcb, bbc_state, bbc, "Acorn", "BBC Micro Model B (German)", MACHINE_IMPERFECT_GRAPHICS) COMP ( 1983, bbcb_us, bbcb, 0, bbcb_us, bbcb, bbc_state, bbc, "Acorn", "BBC Micro Model B (US)", MACHINE_IMPERFECT_GRAPHICS) -COMP ( 1985, bbcb1770, bbcb, 0, bbcb1770, bbcb, bbc_state, bbc, "Acorn", "BBC Micro Model B w/1770 FDC", MACHINE_IMPERFECT_GRAPHICS) -COMP ( 1985, bbcbp, 0, bbcb, bbcbp, bbcb, bbc_state, bbc, "Acorn", "BBC Micro Model B+ 64K", MACHINE_IMPERFECT_GRAPHICS) -COMP ( 1985, bbcbp128, bbcbp, 0, bbcbp128, bbcb, bbc_state, bbc, "Acorn", "BBC Micro Model B+ 128K", MACHINE_IMPERFECT_GRAPHICS) -COMP ( 1985, abc110, abc210, 0, abc110, abc, bbc_state, bbc, "Acorn", "ABC 110", MACHINE_NOT_WORKING) -COMP ( 1985, abc210, 0, 0, abc210, abc, bbc_state, bbc, "Acorn", "ABC 210/Cambridge Workstation", MACHINE_NOT_WORKING) -COMP ( 1985, abc310, abc210, 0, abc310, abc, bbc_state, bbc, "Acorn", "ABC 310", MACHINE_NOT_WORKING) +COMP ( 1984, bbcb1770, bbcb, 0, bbcb1770, bbcb, bbc_state, bbc, "Acorn", "BBC Micro Model B w/1770 FDC", MACHINE_IMPERFECT_GRAPHICS) +COMP ( 1985, bbcbp, 0, bbcb, bbcbp, bbcbp, bbc_state, bbc, "Acorn", "BBC Micro Model B+ 64K", MACHINE_IMPERFECT_GRAPHICS) +COMP ( 1985, bbcbp128, bbcbp, 0, bbcbp128, bbcbp, bbc_state, bbc, "Acorn", "BBC Micro Model B+ 128K", MACHINE_IMPERFECT_GRAPHICS) +COMP ( 1985, acw443, 0, 0, acw443, abc, bbc_state, bbc, "Acorn", "ABC 210/Cambridge Workstation", MACHINE_NOT_WORKING) +COMP ( 1985, abc110, acw443, 0, abc110, abc, bbc_state, bbc, "Acorn", "ABC 110", MACHINE_NOT_WORKING) +COMP ( 1985, abc310, acw443, 0, abc310, abc, bbc_state, bbc, "Acorn", "ABC 310", MACHINE_NOT_WORKING) COMP ( 1985, reutapm, 0, 0, reutapm, bbcb, bbc_state, bbc, "Acorn", "Reuters APM", MACHINE_NO_SOUND | MACHINE_NOT_WORKING) COMP ( 1986, bbcm, 0, bbcb, bbcm, bbcm, bbc_state, bbc, "Acorn", "BBC Master 128", MACHINE_IMPERFECT_GRAPHICS) COMP ( 1986, bbcmt, bbcm, 0, bbcmt, bbcm, bbc_state, bbc, "Acorn", "BBC Master Turbo", MACHINE_NOT_WORKING) COMP ( 1986, bbcmaiv, bbcm, 0, bbcmaiv, bbcm, bbc_state, bbc, "Acorn", "BBC Master AIV", MACHINE_NOT_WORKING) -COMP ( 1986, bbcmet, bbcm, 0, bbcmet, bbcm, bbc_state, bbc, "Acorn", "BBC Master ET", MACHINE_NO_SOUND | MACHINE_IMPERFECT_GRAPHICS) +COMP ( 1986, bbcmet, bbcm, 0, bbcmet, bbcm, bbc_state, bbc, "Acorn", "BBC Master ET", MACHINE_IMPERFECT_GRAPHICS) COMP ( 1986, bbcm512, bbcm, 0, bbcm512, bbcm, bbc_state, bbc, "Acorn", "BBC Master 512", MACHINE_NOT_WORKING) COMP ( 1986, bbcmarm, bbcm, 0, bbcmarm, bbcm, bbc_state, bbc, "Acorn", "ARM Evaluation System", MACHINE_NOT_WORKING) COMP ( 1986, bbcmc, 0, bbcm, bbcmc, bbcm, bbc_state, bbc, "Acorn", "BBC Master Compact", MACHINE_IMPERFECT_GRAPHICS) diff --git a/src/mame/drivers/beathead.c b/src/mame/drivers/beathead.c index 66f981626c4..2f7b18f674f 100644 --- a/src/mame/drivers/beathead.c +++ b/src/mame/drivers/beathead.c @@ -120,7 +120,8 @@ TIMER_DEVICE_CALLBACK_MEMBER(beathead_state::scanline_callback) int scanline = param; /* update the video */ - m_screen->update_now(); +// m_screen->update_now(); + m_screen->update_partial(m_screen->vpos()); /* on scanline zero, clear any halt condition */ if (scanline == 0) diff --git a/src/mame/drivers/bfm_sc45_helper.c b/src/mame/drivers/bfm_sc45_helper.c index 8a5d3c38998..991f3894e59 100644 --- a/src/mame/drivers/bfm_sc45_helper.c +++ b/src/mame/drivers/bfm_sc45_helper.c @@ -8,7 +8,7 @@ #include "emu.h" //#define sc45helperlog printf -#define sc45helperlog logerror +#define sc45helperlog machine.logerror // addrxor used for endianness stuff, mode used for when we have a missing pair half int find_project_string(running_machine &machine, int addrxor, int mode) diff --git a/src/mame/drivers/bfm_sc4h.c b/src/mame/drivers/bfm_sc4h.c index ec728bc160a..f6298442371 100644 --- a/src/mame/drivers/bfm_sc4h.c +++ b/src/mame/drivers/bfm_sc4h.c @@ -69,13 +69,9 @@ UINT8 sc4_state::read_input_matrix(int row) UINT8 value; if (row<4) - { - value = ((portnames[row])->read_safe(0x00) & 0x1f) + (((portnames[row+8])->read_safe(0x00) & 0x07) << 5); - } + value = (read_safe(portnames[row], 0x00) & 0x1f) + ((read_safe(portnames[row+8], 0x00) & 0x07) << 5); else - { - value = ((portnames[row])->read_safe(0x00) & 0x1f) + (((portnames[row+4])->read_safe(0x00) & 0x18) << 2); - } + value = (read_safe(portnames[row], 0x00) & 0x1f) + ((read_safe(portnames[row+4], 0x00) & 0x18) << 2); return value; } diff --git a/src/mame/drivers/bublbobl.c b/src/mame/drivers/bublbobl.c index 28c720a8ddc..f2fba272e1d 100644 --- a/src/mame/drivers/bublbobl.c +++ b/src/mame/drivers/bublbobl.c @@ -266,6 +266,11 @@ TODO: accesses done by the CPU, including to the YM2203 I/O ports. At the very least, there should be some filters. + there are also Bubble Bobble bootlegs with a P8749H MCU, however the MCU + is protected against reading and the main code only differs by 1 byte from + Bubble Bobble. If the MCU were to be dumped that would also make for + interesting comparisons. + ***************************************************************************/ #include "emu.h" @@ -556,6 +561,19 @@ static INPUT_PORTS_START( boblbobl ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) INPUT_PORTS_END + +static INPUT_PORTS_START( boblcave ) + PORT_INCLUDE( boblbobl ) + + PORT_MODIFY( "DSW1" ) // not monster speed on this, causes startup hangs just like original bublbobl + PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW-B:7") + PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) // must be off (see notes) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x80, 0x80, "ROM Type" ) PORT_DIPLOCATION("DSW-B:8") + PORT_DIPSETTING( 0x80, "IC52=512kb, IC53=none" ) // will hang on startup if set to wrong type + PORT_DIPSETTING( 0x00, "IC52=256kb, IC53=256kb" ) +INPUT_PORTS_END + static INPUT_PORTS_START( sboblboblb ) PORT_INCLUDE( boblbobl ) @@ -1359,6 +1377,44 @@ ROM_START( boblbobl ) ROM_LOAD( "pal16l8.u4", 0x0400, 0x0104, CRC(077d20a8) SHA1(8e568ffd6f66c3dd61708dd0f3be9c2ed488ae4b) ) ROM_END +ROM_START( bbredux ) + ROM_REGION( 0x30000, "maincpu", 0 ) + ROM_LOAD( "redux_bb3", 0x00000, 0x8000, CRC(d51de9f3) SHA1(dc6bc93692145563a88c146eeb1d0361e25af840) ) + /* ROMs banked at 8000-bfff */ + ROM_LOAD( "redux_bb5", 0x10000, 0x8000, CRC(d29d3444) SHA1(3db694a6ba2ba2ed85d31c2bc4c7c94911b99b85) ) + ROM_LOAD( "redux_bb4", 0x18000, 0x8000, CRC(984149bd) SHA1(9a0f96eee038712277f652545a343587f711b9aa) ) + + ROM_REGION( 0x10000, "slave", 0 ) /* 64k for the second CPU */ + ROM_LOAD( "a78-08.37", 0x0000, 0x08000, CRC(ae11a07b) SHA1(af7a335c8da637103103cc274e077f123908ebb7) ) + + ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for the third CPU */ + ROM_LOAD( "a78-07.46", 0x0000, 0x08000, CRC(4f9a26e8) SHA1(3105b34b88a7134493c2b3f584729f8b0407a011) ) + + ROM_REGION( 0x80000, "gfx1", ROMREGION_INVERT ) + ROM_LOAD( "a78-09.12", 0x00000, 0x8000, CRC(20358c22) SHA1(2297af6c53d5807bf90a8e081075b8c72a994fc5) ) /* 1st plane */ + ROM_LOAD( "a78-10.13", 0x08000, 0x8000, CRC(930168a9) SHA1(fd358c3c3b424bca285f67a1589eb98a345ff670) ) + ROM_LOAD( "a78-11.14", 0x10000, 0x8000, CRC(9773e512) SHA1(33c1687ee575d66bf0e98add45d06da827813765) ) + ROM_LOAD( "a78-12.15", 0x18000, 0x8000, CRC(d045549b) SHA1(0c12077d3ddc2ce6aa45a0224ad5540f3f218446) ) + ROM_LOAD( "a78-13.16", 0x20000, 0x8000, CRC(d0af35c5) SHA1(c5a89f4d73acc0db86654540b3abfd77b3757db5) ) + ROM_LOAD( "a78-14.17", 0x28000, 0x8000, CRC(7b5369a8) SHA1(1307b26d80e6f36ebe6c442bebec41d20066eaf9) ) + /* 0x30000-0x3ffff empty */ + ROM_LOAD( "a78-15.30", 0x40000, 0x8000, CRC(6b61a413) SHA1(44eddf12fb46fceca2addbe6da929aaea7636b13) ) /* 2nd plane */ + ROM_LOAD( "a78-16.31", 0x48000, 0x8000, CRC(b5492d97) SHA1(d5b045e3ebaa44809757a4220cefb3c6815470da) ) + ROM_LOAD( "a78-17.32", 0x50000, 0x8000, CRC(d69762d5) SHA1(3326fef4e0bd86681a3047dc11886bb171ecb609) ) + ROM_LOAD( "a78-18.33", 0x58000, 0x8000, CRC(9f243b68) SHA1(32dce8d311a4be003693182a999e4053baa6bb0a) ) + ROM_LOAD( "a78-19.34", 0x60000, 0x8000, CRC(66e9438c) SHA1(b94e62b6fbe7f4e08086d0365afc5cff6e0ccafd) ) + ROM_LOAD( "a78-20.35", 0x68000, 0x8000, CRC(9ef863ad) SHA1(29f91b5a3765e4d6e6c3382db1d8d8297b6e56c8) ) + /* 0x70000-0x7ffff empty */ + + ROM_REGION( 0x0100, "proms", 0 ) + ROM_LOAD( "a71-25.41", 0x0000, 0x0100, CRC(2d0f8545) SHA1(089c31e2f614145ef2743164f7b52ae35bc06808) ) /* video timing */ + + ROM_REGION( 0x0600, "plds", 0 ) + ROM_LOAD( "pal16r4.u36", 0x0000, 0x0104, CRC(22fe26ac) SHA1(bbbfcbe6faded4af7ceec57b800297c054a997da) ) + ROM_LOAD( "pal16l8.u38", 0x0200, 0x0104, CRC(c02d9663) SHA1(5d23cfd96f072981fd5fcf0dd7e98459da58b662) ) + ROM_LOAD( "pal16l8.u4", 0x0400, 0x0104, CRC(077d20a8) SHA1(8e568ffd6f66c3dd61708dd0f3be9c2ed488ae4b) ) +ROM_END + ROM_START( sboblbobl ) ROM_REGION( 0x30000, "maincpu", 0 ) ROM_LOAD( "cpu2-3.bin", 0x00000, 0x08000, CRC(2d9107b6) SHA1(ab1a4a20f4b533cd06cc458668f407a8a14c9d70) ) @@ -1459,6 +1515,41 @@ ROM_END +ROM_START( sboblboblc ) + ROM_REGION( 0x30000, "maincpu", 0 ) + ROM_LOAD( "3", 0x00000, 0x08000, CRC(f2d44846) SHA1(dd1a29f2ff1938c31d4c6199cf970483ceb52485) ) + /* ROMs banked at 8000-bfff */ + ROM_LOAD( "5", 0x10000, 0x08000, CRC(3c5e4441) SHA1(b85da9d7e0148e950b76036d3f9a3d4a9dfa039c) ) + ROM_LOAD( "4", 0x18000, 0x08000, CRC(1f29b5c0) SHA1(c15c84ca11cc10edac6340468bca463ecb2d89e6) ) + /* 20000-2ffff empty */ + + ROM_REGION( 0x10000, "slave", 0 ) /* 64k for the second CPU */ + ROM_LOAD( "1", 0x0000, 0x08000, CRC(ae11a07b) SHA1(af7a335c8da637103103cc274e077f123908ebb7) ) + + ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for the third CPU */ + ROM_LOAD( "2", 0x0000, 0x08000, CRC(4f9a26e8) SHA1(3105b34b88a7134493c2b3f584729f8b0407a011) ) + + ROM_REGION( 0x80000, "gfx1", ROMREGION_INVERT ) + ROM_LOAD( "12", 0x00000, 0x8000, CRC(20358c22) SHA1(2297af6c53d5807bf90a8e081075b8c72a994fc5) ) /* 1st plane */ + ROM_LOAD( "13", 0x08000, 0x8000, CRC(930168a9) SHA1(fd358c3c3b424bca285f67a1589eb98a345ff670) ) + ROM_LOAD( "14", 0x10000, 0x8000, CRC(9773e512) SHA1(33c1687ee575d66bf0e98add45d06da827813765) ) + ROM_LOAD( "15", 0x18000, 0x8000, CRC(d045549b) SHA1(0c12077d3ddc2ce6aa45a0224ad5540f3f218446) ) + ROM_LOAD( "16", 0x20000, 0x8000, CRC(d0af35c5) SHA1(c5a89f4d73acc0db86654540b3abfd77b3757db5) ) + ROM_LOAD( "17", 0x28000, 0x8000, CRC(7b5369a8) SHA1(1307b26d80e6f36ebe6c442bebec41d20066eaf9) ) + /* 0x30000-0x3ffff empty */ + ROM_LOAD( "6", 0x40000, 0x8000, CRC(6b61a413) SHA1(44eddf12fb46fceca2addbe6da929aaea7636b13) ) /* 2nd plane */ + ROM_LOAD( "7", 0x48000, 0x8000, CRC(b5492d97) SHA1(d5b045e3ebaa44809757a4220cefb3c6815470da) ) + ROM_LOAD( "8", 0x50000, 0x8000, CRC(d69762d5) SHA1(3326fef4e0bd86681a3047dc11886bb171ecb609) ) + ROM_LOAD( "9", 0x58000, 0x8000, CRC(9f243b68) SHA1(32dce8d311a4be003693182a999e4053baa6bb0a) ) + ROM_LOAD( "10", 0x60000, 0x8000, CRC(66e9438c) SHA1(b94e62b6fbe7f4e08086d0365afc5cff6e0ccafd) ) + ROM_LOAD( "11", 0x68000, 0x8000, CRC(9ef863ad) SHA1(29f91b5a3765e4d6e6c3382db1d8d8297b6e56c8) ) + /* 0x70000-0x7ffff empty */ + + ROM_REGION( 0x0100, "proms", 0 ) + ROM_LOAD( "a71-25.41", 0x0000, 0x0100, CRC(2d0f8545) SHA1(089c31e2f614145ef2743164f7b52ae35bc06808) ) /* video timing */ + +ROM_END + ROM_START( bub68705 ) ROM_REGION( 0x30000, "maincpu", 0 ) /* Program roms match Bubble Bobble (older) */ ROM_LOAD( "2.bin", 0x00000, 0x08000, CRC(32c8305b) SHA1(6bf69b3edfbefd33cd670a762b4bf0b39629a220) ) @@ -1526,6 +1617,178 @@ ROM_START( dland ) ROM_END +ROM_START( bublcave ) + ROM_REGION( 0x30000, "maincpu", 0 ) + ROM_LOAD( "bublcave-06.51", 0x00000, 0x08000, CRC(e8b9af5e) SHA1(dec44e47634a402df212806e84e3a810f8442776) ) + ROM_LOAD( "bublcave-05.52", 0x10000, 0x10000, CRC(cfe14cb8) SHA1(17d463c755f630ae9d05943515fa4828972bd7b0) ) + + ROM_REGION( 0x10000, "slave", 0 ) + ROM_LOAD( "bublcave-08.37", 0x0000, 0x08000, CRC(a9384086) SHA1(26e686671d6d3ba3759716bf46e7f951bbb8a291) ) + + ROM_REGION( 0x10000, "audiocpu", 0 ) + ROM_LOAD( "a78-07.46", 0x0000, 0x08000, CRC(4f9a26e8) SHA1(3105b34b88a7134493c2b3f584729f8b0407a011) ) + + ROM_REGION( 0x10000, "mcu", 0 ) + ROM_LOAD( "a78-01.17", 0xf000, 0x1000, CRC(b1bfb53d) SHA1(31b8f31acd3aa394acd80db362774749842e1285) ) + + ROM_REGION( 0x80000, "gfx1", ROMREGION_INVERT ) + ROM_LOAD( "bublcave-09.12", 0x00000, 0x8000, CRC(b90b7eef) SHA1(de72e4635843ad76248aa3b4aa8f8a0bfd53879e) ) /* 1st plane */ + ROM_LOAD( "bublcave-10.13", 0x08000, 0x8000, CRC(4fb22f05) SHA1(880104e86dbd00ae657cbc768722427503b6a59f) ) + ROM_LOAD( "bublcave-11.14", 0x10000, 0x8000, CRC(9773e512) SHA1(33c1687ee575d66bf0e98add45d06da827813765) ) + ROM_LOAD( "bublcave-12.15", 0x18000, 0x8000, CRC(e49eb49e) SHA1(2e05dc8833e10bef1a317d238c39fb9f362e9997) ) + ROM_LOAD( "bublcave-13.16", 0x20000, 0x8000, CRC(61919734) SHA1(2c07e29f3dcc972d5eb47679ad81a0d7656b0cb2) ) + ROM_LOAD( "bublcave-14.17", 0x28000, 0x8000, CRC(7e3a13bd) SHA1(bd4dba799340fa599f11cc68e03efe70ba6ba99b) ) + ROM_LOAD( "bublcave-15.30", 0x40000, 0x8000, CRC(c253c73a) SHA1(3e187f6b9ca769772990068abe7b309417147d39) ) /* 2nd plane */ + ROM_LOAD( "bublcave-16.31", 0x48000, 0x8000, CRC(e66c92ee) SHA1(12ea193c54121d08ad110c94cc075e29fef3ff85) ) + ROM_LOAD( "bublcave-17.32", 0x50000, 0x8000, CRC(d69762d5) SHA1(3326fef4e0bd86681a3047dc11886bb171ecb609) ) + ROM_LOAD( "bublcave-18.33", 0x58000, 0x8000, CRC(47ee2544) SHA1(c6946e824043a312ed437e548a64ef599effbd42) ) + ROM_LOAD( "bublcave-19.34", 0x60000, 0x8000, CRC(1ceeb1fa) SHA1(eb29ff896d149f7ab4cf38a338df39df14ccc20c) ) + ROM_LOAD( "bublcave-20.35", 0x68000, 0x8000, CRC(64322e24) SHA1(acff8a9fcaf74f198653080759898d15cccf04e8) ) + + ROM_REGION( 0x0100, "proms", 0 ) + ROM_LOAD( "a71-25.41", 0x0000, 0x0100, CRC(2d0f8545) SHA1(089c31e2f614145ef2743164f7b52ae35bc06808) ) /* video timing */ +ROM_END + + +ROM_START( boblcave ) + ROM_REGION( 0x30000, "maincpu", 0 ) + ROM_LOAD( "lc12_bb3", 0x00000, 0x08000, CRC(dddc9a24) SHA1(c0b31dd64d7359ae0ea5067db6ac8b54f9415e5a) ) + /* ROMs banked at 8000-bfff */ + ROM_LOAD( "lc12_bb5", 0x10000, 0x08000, CRC(0bc4de52) SHA1(55581a557dfd60d93642b89eb702c7170458b826) ) + ROM_LOAD( "lc12_bb4", 0x18000, 0x08000, CRC(bd7afdf4) SHA1(a9bcdc857b1f252c36a5a70f5027a11737f8dd59) ) + /* 20000-2ffff empty */ + + ROM_REGION( 0x10000, "slave", 0 ) /* 64k for the second CPU */ + ROM_LOAD( "bublcave-08.37", 0x0000, 0x08000, CRC(a9384086) SHA1(26e686671d6d3ba3759716bf46e7f951bbb8a291) ) + + ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for the third CPU */ + ROM_LOAD( "a78-07.46", 0x0000, 0x08000, CRC(4f9a26e8) SHA1(3105b34b88a7134493c2b3f584729f8b0407a011) ) + + ROM_REGION( 0x80000, "gfx1", ROMREGION_INVERT ) + ROM_LOAD( "bublcave-09.12", 0x00000, 0x8000, CRC(b90b7eef) SHA1(de72e4635843ad76248aa3b4aa8f8a0bfd53879e) ) /* 1st plane */ + ROM_LOAD( "bublcave-10.13", 0x08000, 0x8000, CRC(4fb22f05) SHA1(880104e86dbd00ae657cbc768722427503b6a59f) ) + ROM_LOAD( "bublcave-11.14", 0x10000, 0x8000, CRC(9773e512) SHA1(33c1687ee575d66bf0e98add45d06da827813765) ) + ROM_LOAD( "bublcave-12.15", 0x18000, 0x8000, CRC(e49eb49e) SHA1(2e05dc8833e10bef1a317d238c39fb9f362e9997) ) + ROM_LOAD( "bublcave-13.16", 0x20000, 0x8000, CRC(61919734) SHA1(2c07e29f3dcc972d5eb47679ad81a0d7656b0cb2) ) + ROM_LOAD( "bublcave-14.17", 0x28000, 0x8000, CRC(7e3a13bd) SHA1(bd4dba799340fa599f11cc68e03efe70ba6ba99b) ) + ROM_LOAD( "bublcave-15.30", 0x40000, 0x8000, CRC(c253c73a) SHA1(3e187f6b9ca769772990068abe7b309417147d39) ) /* 2nd plane */ + ROM_LOAD( "bublcave-16.31", 0x48000, 0x8000, CRC(e66c92ee) SHA1(12ea193c54121d08ad110c94cc075e29fef3ff85) ) + ROM_LOAD( "bublcave-17.32", 0x50000, 0x8000, CRC(d69762d5) SHA1(3326fef4e0bd86681a3047dc11886bb171ecb609) ) + ROM_LOAD( "bublcave-18.33", 0x58000, 0x8000, CRC(47ee2544) SHA1(c6946e824043a312ed437e548a64ef599effbd42) ) + ROM_LOAD( "bublcave-19.34", 0x60000, 0x8000, CRC(1ceeb1fa) SHA1(eb29ff896d149f7ab4cf38a338df39df14ccc20c) ) + ROM_LOAD( "bublcave-20.35", 0x68000, 0x8000, CRC(64322e24) SHA1(acff8a9fcaf74f198653080759898d15cccf04e8) ) + + ROM_REGION( 0x0100, "proms", 0 ) + ROM_LOAD( "a71-25.41", 0x0000, 0x0100, CRC(2d0f8545) SHA1(089c31e2f614145ef2743164f7b52ae35bc06808) ) /* video timing */ + + ROM_REGION( 0x0600, "plds", 0 ) + ROM_LOAD( "pal16r4.u36", 0x0000, 0x0104, CRC(22fe26ac) SHA1(bbbfcbe6faded4af7ceec57b800297c054a997da) ) + ROM_LOAD( "pal16l8.u38", 0x0200, 0x0104, CRC(c02d9663) SHA1(5d23cfd96f072981fd5fcf0dd7e98459da58b662) ) + ROM_LOAD( "pal16l8.u4", 0x0400, 0x0104, CRC(077d20a8) SHA1(8e568ffd6f66c3dd61708dd0f3be9c2ed488ae4b) ) +ROM_END + + +ROM_START( bublcave11 ) + ROM_REGION( 0x30000, "maincpu", 0 ) + ROM_LOAD( "bublcave10-06.51", 0x00000, 0x08000, CRC(185cc219) SHA1(dfb312f144fb01c07581cb8ea55ab0dc92ccd5b2) ) + ROM_LOAD( "bublcave11-05.52", 0x10000, 0x10000, CRC(b6b02df3) SHA1(542589544216a54f84c213b161d7145934875d2b) ) + + ROM_REGION( 0x10000, "slave", 0 ) + ROM_LOAD( "bublcave11-08.37", 0x0000, 0x08000, CRC(c5d14e62) SHA1(b32b1ca76b54755a69a7a346d01545f2699e1363) ) + + ROM_REGION( 0x10000, "audiocpu", 0 ) + ROM_LOAD( "a78-07.46", 0x0000, 0x08000, CRC(4f9a26e8) SHA1(3105b34b88a7134493c2b3f584729f8b0407a011) ) + + ROM_REGION( 0x10000, "mcu", 0 ) + ROM_LOAD( "a78-01.17", 0xf000, 0x1000, CRC(b1bfb53d) SHA1(31b8f31acd3aa394acd80db362774749842e1285) ) + + ROM_REGION( 0x80000, "gfx1", ROMREGION_INVERT ) + ROM_LOAD( "bublcave-09.12", 0x00000, 0x8000, CRC(b90b7eef) SHA1(de72e4635843ad76248aa3b4aa8f8a0bfd53879e) ) /* 1st plane */ + ROM_LOAD( "bublcave-10.13", 0x08000, 0x8000, CRC(4fb22f05) SHA1(880104e86dbd00ae657cbc768722427503b6a59f) ) + ROM_LOAD( "bublcave-11.14", 0x10000, 0x8000, CRC(9773e512) SHA1(33c1687ee575d66bf0e98add45d06da827813765) ) + ROM_LOAD( "bublcave-12.15", 0x18000, 0x8000, CRC(e49eb49e) SHA1(2e05dc8833e10bef1a317d238c39fb9f362e9997) ) + ROM_LOAD( "bublcave-13.16", 0x20000, 0x8000, CRC(61919734) SHA1(2c07e29f3dcc972d5eb47679ad81a0d7656b0cb2) ) + ROM_LOAD( "bublcave-14.17", 0x28000, 0x8000, CRC(7e3a13bd) SHA1(bd4dba799340fa599f11cc68e03efe70ba6ba99b) ) + ROM_LOAD( "bublcave-15.30", 0x40000, 0x8000, CRC(c253c73a) SHA1(3e187f6b9ca769772990068abe7b309417147d39) ) /* 2nd plane */ + ROM_LOAD( "bublcave-16.31", 0x48000, 0x8000, CRC(e66c92ee) SHA1(12ea193c54121d08ad110c94cc075e29fef3ff85) ) + ROM_LOAD( "bublcave-17.32", 0x50000, 0x8000, CRC(d69762d5) SHA1(3326fef4e0bd86681a3047dc11886bb171ecb609) ) + ROM_LOAD( "bublcave-18.33", 0x58000, 0x8000, CRC(47ee2544) SHA1(c6946e824043a312ed437e548a64ef599effbd42) ) + ROM_LOAD( "bublcave-19.34", 0x60000, 0x8000, CRC(1ceeb1fa) SHA1(eb29ff896d149f7ab4cf38a338df39df14ccc20c) ) + ROM_LOAD( "bublcave-20.35", 0x68000, 0x8000, CRC(64322e24) SHA1(acff8a9fcaf74f198653080759898d15cccf04e8) ) + + ROM_REGION( 0x0100, "proms", 0 ) + ROM_LOAD( "a71-25.41", 0x0000, 0x0100, CRC(2d0f8545) SHA1(089c31e2f614145ef2743164f7b52ae35bc06808) ) /* video timing */ +ROM_END + +ROM_START( bublcave10 ) + ROM_REGION( 0x30000, "maincpu", 0 ) + ROM_LOAD( "bublcave10-06.51", 0x00000, 0x08000, CRC(185cc219) SHA1(dfb312f144fb01c07581cb8ea55ab0dc92ccd5b2) ) + ROM_LOAD( "bublcave10-05.52", 0x10000, 0x10000, CRC(381cdde7) SHA1(0c9de44d7dbad754e873af8ddb5a2736f5ec2096) ) + + ROM_REGION( 0x10000, "slave", 0 ) + ROM_LOAD( "bublcave10-08.37", 0x0000, 0x08000, CRC(026a68e1) SHA1(9e54310a9f1f5187ea6eb49d9189865b44708a7e) ) + + ROM_REGION( 0x10000, "audiocpu", 0 ) + ROM_LOAD( "a78-07.46", 0x0000, 0x08000, CRC(4f9a26e8) SHA1(3105b34b88a7134493c2b3f584729f8b0407a011) ) + + ROM_REGION( 0x10000, "mcu", 0 ) + ROM_LOAD( "a78-01.17", 0xf000, 0x1000, CRC(b1bfb53d) SHA1(31b8f31acd3aa394acd80db362774749842e1285) ) + + ROM_REGION( 0x80000, "gfx1", ROMREGION_INVERT ) + ROM_LOAD( "bublcave-09.12", 0x00000, 0x8000, CRC(b90b7eef) SHA1(de72e4635843ad76248aa3b4aa8f8a0bfd53879e) ) /* 1st plane */ + ROM_LOAD( "bublcave-10.13", 0x08000, 0x8000, CRC(4fb22f05) SHA1(880104e86dbd00ae657cbc768722427503b6a59f) ) + ROM_LOAD( "bublcave-11.14", 0x10000, 0x8000, CRC(9773e512) SHA1(33c1687ee575d66bf0e98add45d06da827813765) ) + ROM_LOAD( "bublcave-12.15", 0x18000, 0x8000, CRC(e49eb49e) SHA1(2e05dc8833e10bef1a317d238c39fb9f362e9997) ) + ROM_LOAD( "bublcave-13.16", 0x20000, 0x8000, CRC(61919734) SHA1(2c07e29f3dcc972d5eb47679ad81a0d7656b0cb2) ) + ROM_LOAD( "bublcave-14.17", 0x28000, 0x8000, CRC(7e3a13bd) SHA1(bd4dba799340fa599f11cc68e03efe70ba6ba99b) ) + ROM_LOAD( "bublcave-15.30", 0x40000, 0x8000, CRC(c253c73a) SHA1(3e187f6b9ca769772990068abe7b309417147d39) ) /* 2nd plane */ + ROM_LOAD( "bublcave-16.31", 0x48000, 0x8000, CRC(e66c92ee) SHA1(12ea193c54121d08ad110c94cc075e29fef3ff85) ) + ROM_LOAD( "bublcave-17.32", 0x50000, 0x8000, CRC(d69762d5) SHA1(3326fef4e0bd86681a3047dc11886bb171ecb609) ) + ROM_LOAD( "bublcave-18.33", 0x58000, 0x8000, CRC(47ee2544) SHA1(c6946e824043a312ed437e548a64ef599effbd42) ) + ROM_LOAD( "bublcave-19.34", 0x60000, 0x8000, CRC(1ceeb1fa) SHA1(eb29ff896d149f7ab4cf38a338df39df14ccc20c) ) + ROM_LOAD( "bublcave-20.35", 0x68000, 0x8000, CRC(64322e24) SHA1(acff8a9fcaf74f198653080759898d15cccf04e8) ) + + ROM_REGION( 0x0100, "proms", 0 ) + ROM_LOAD( "a71-25.41", 0x0000, 0x0100, CRC(2d0f8545) SHA1(089c31e2f614145ef2743164f7b52ae35bc06808) ) /* video timing */ +ROM_END + +ROM_START( bublboblb ) + ROM_REGION( 0x30000, "maincpu", 0 ) + ROM_LOAD( "bbaladar.3", 0x00000, 0x8000, CRC(31bfc6fb) SHA1(6a72086d415a69b9e5c003ec6cf7858e8c4b346f) ) + /* ROMs banked at 8000-bfff */ + ROM_LOAD( "bbaladar.5", 0x10000, 0x8000, CRC(16386e9a) SHA1(77fa3f5ecce5c79ba52098c0870482459926b415) ) + ROM_LOAD( "bbaladar.4", 0x18000, 0x8000, CRC(0c4bcb07) SHA1(3e3f7fa098d6be61d265cab5258dbd0e279bd8ed) ) + + ROM_REGION( 0x10000, "slave", 0 ) /* 64k for the second CPU */ + ROM_LOAD( "a78-08.37", 0x0000, 0x08000, CRC(ae11a07b) SHA1(af7a335c8da637103103cc274e077f123908ebb7) ) + + ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for the third CPU */ + ROM_LOAD( "a78-07.46", 0x0000, 0x08000, CRC(4f9a26e8) SHA1(3105b34b88a7134493c2b3f584729f8b0407a011) ) + + ROM_REGION( 0x80000, "gfx1", ROMREGION_INVERT ) + ROM_LOAD( "a78-09.12", 0x00000, 0x8000, CRC(20358c22) SHA1(2297af6c53d5807bf90a8e081075b8c72a994fc5) ) /* 1st plane */ + ROM_LOAD( "a78-10.13", 0x08000, 0x8000, CRC(930168a9) SHA1(fd358c3c3b424bca285f67a1589eb98a345ff670) ) + ROM_LOAD( "a78-11.14", 0x10000, 0x8000, CRC(9773e512) SHA1(33c1687ee575d66bf0e98add45d06da827813765) ) + ROM_LOAD( "a78-12.15", 0x18000, 0x8000, CRC(d045549b) SHA1(0c12077d3ddc2ce6aa45a0224ad5540f3f218446) ) + ROM_LOAD( "a78-13.16", 0x20000, 0x8000, CRC(d0af35c5) SHA1(c5a89f4d73acc0db86654540b3abfd77b3757db5) ) + ROM_LOAD( "a78-14.17", 0x28000, 0x8000, CRC(7b5369a8) SHA1(1307b26d80e6f36ebe6c442bebec41d20066eaf9) ) + /* 0x30000-0x3ffff empty */ + ROM_LOAD( "a78-15.30", 0x40000, 0x8000, CRC(6b61a413) SHA1(44eddf12fb46fceca2addbe6da929aaea7636b13) ) /* 2nd plane */ + ROM_LOAD( "a78-16.31", 0x48000, 0x8000, CRC(b5492d97) SHA1(d5b045e3ebaa44809757a4220cefb3c6815470da) ) + ROM_LOAD( "a78-17.32", 0x50000, 0x8000, CRC(d69762d5) SHA1(3326fef4e0bd86681a3047dc11886bb171ecb609) ) + ROM_LOAD( "a78-18.33", 0x58000, 0x8000, CRC(9f243b68) SHA1(32dce8d311a4be003693182a999e4053baa6bb0a) ) + ROM_LOAD( "a78-19.34", 0x60000, 0x8000, CRC(66e9438c) SHA1(b94e62b6fbe7f4e08086d0365afc5cff6e0ccafd) ) + ROM_LOAD( "a78-20.35", 0x68000, 0x8000, CRC(9ef863ad) SHA1(29f91b5a3765e4d6e6c3382db1d8d8297b6e56c8) ) + /* 0x70000-0x7ffff empty */ + + ROM_REGION( 0x0100, "proms", 0 ) + ROM_LOAD( "a71-25.41", 0x0000, 0x0100, CRC(2d0f8545) SHA1(089c31e2f614145ef2743164f7b52ae35bc06808) ) /* video timing */ + + ROM_REGION( 0x0600, "plds", 0 ) + ROM_LOAD( "pal16r4.u36", 0x0000, 0x0104, CRC(22fe26ac) SHA1(bbbfcbe6faded4af7ceec57b800297c054a997da) ) + ROM_LOAD( "pal16l8.u38", 0x0200, 0x0104, CRC(c02d9663) SHA1(5d23cfd96f072981fd5fcf0dd7e98459da58b662) ) + ROM_LOAD( "pal16l8.u4", 0x0400, 0x0104, CRC(077d20a8) SHA1(8e568ffd6f66c3dd61708dd0f3be9c2ed488ae4b) ) +ROM_END /************************************* * @@ -1598,6 +1861,16 @@ GAME( 1986, boblbobl, bublbobl, boblbobl, boblbobl, bublbobl_state, bublbobl GAME( 1986, sboblbobl, bublbobl, boblbobl, sboblbobl, bublbobl_state, bublbobl, ROT0, "bootleg (Datsu)", "Super Bobble Bobble (bootleg, set 1)", MACHINE_SUPPORTS_SAVE ) GAME( 1986, sboblbobla, bublbobl, boblbobl, boblbobl, bublbobl_state, bublbobl, ROT0, "bootleg", "Super Bobble Bobble (bootleg, set 2)", MACHINE_SUPPORTS_SAVE ) GAME( 1986, sboblboblb, bublbobl, boblbobl, sboblboblb, bublbobl_state, bublbobl, ROT0, "bootleg", "Super Bobble Bobble (bootleg, set 3)", MACHINE_SUPPORTS_SAVE ) +GAME( 1986, sboblboblc, bublbobl, boblbobl, sboblboblb, bublbobl_state, bublbobl, ROT0, "bootleg", "Super Bubble Bobble (bootleg)", MACHINE_SUPPORTS_SAVE ) // the title screen on this one isn't hacked GAME( 1986, bub68705, bublbobl, bub68705, bublbobl, bublbobl_state, bublbobl, ROT0, "bootleg", "Bubble Bobble (bootleg with 68705)", MACHINE_SUPPORTS_SAVE ) GAME( 1987, dland, bublbobl, boblbobl, dland, bublbobl_state, dland, ROT0, "bootleg", "Dream Land / Super Dream Land (bootleg of Bubble Bobble)", MACHINE_SUPPORTS_SAVE ) + +GAME( 2013, bbredux, bublbobl, boblbobl, boblbobl, bublbobl_state, bublbobl, ROT0, "bootleg (Punji)", "Bubble Bobble ('bootleg redux' hack for Bobble Bobble PCB)", MACHINE_SUPPORTS_SAVE ) // for use on non-MCU bootleg boards (Bobble Bobble etc.) has more faithful simulation of the protection device (JAN-04-2015 release) +GAME( 2013, bublboblb, bublbobl, boblbobl, boblcave, bublbobl_state, bublbobl, ROT0, "bootleg (Aladar)", "Bubble Bobble (for Bobble Bobble PCB)", MACHINE_SUPPORTS_SAVE ) // alt bootleg/hack to restore proper MCU behavior to bootleg boards + +GAME( 2013, bublcave, bublbobl, bublbobl, bublbobl, bublbobl_state, bublbobl, ROT0, "hack (Bisboch and Aladar)", "Bubble Bobble: Lost Cave V1.2", MACHINE_SUPPORTS_SAVE ) +GAME( 2013, boblcave, bublbobl, boblbobl, boblcave, bublbobl_state, bublbobl, ROT0, "hack (Bisboch and Aladar)", "Bubble Bobble: Lost Cave V1.2 (for Bobble Bobble PCB)", MACHINE_SUPPORTS_SAVE ) + +GAME( 2012, bublcave11, bublbobl, bublbobl, bublbobl, bublbobl_state, bublbobl, ROT0, "hack (Bisboch and Aladar)", "Bubble Bobble: Lost Cave V1.1", MACHINE_SUPPORTS_SAVE ) +GAME( 2012, bublcave10, bublbobl, bublbobl, bublbobl, bublbobl_state, bublbobl, ROT0, "hack (Bisboch and Aladar)", "Bubble Bobble: Lost Cave V1.0", MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/bwidow.c b/src/mame/drivers/bwidow.c index ae1b2056abe..afe5c9654d7 100644 --- a/src/mame/drivers/bwidow.c +++ b/src/mame/drivers/bwidow.c @@ -265,7 +265,7 @@ READ8_MEMBER(bwidow_state::spacduel_IN3_r) res1 = ioport("IN3")->read(); res2 = ioport("IN4")->read(); - res3 = ioport("DSW2")->read_safe(0); + res3 = read_safe(ioport("DSW2"), 0); res = 0x00; switch (offset & 0x07) diff --git a/src/mame/drivers/by17.c b/src/mame/drivers/by17.c index 3a837969bf4..02afc2174ca 100644 --- a/src/mame/drivers/by17.c +++ b/src/mame/drivers/by17.c @@ -1,13 +1,13 @@ // license:BSD-3-Clause -// copyright-holders:Robbbert +// copyright-holders:Robbbert, Quench /******************************************************************************************** PINBALL Bally MPU AS-2518-17 - These are some very early and well known SS machines, such as 'Eight Ball'. + These are some very early and well known Solid State machines, such as 'Eight Ball'. - They have an orange digital display, and a chime unit. + They have orange digital 6 digit displays, and a mechanical chime unit for sounds. ToDo: @@ -22,6 +22,8 @@ ToDo: #include "cpu/m6800/m6800.h" #include "machine/6821pia.h" #include "by17.lh" +#include "by17_pwerplay.lh" +#include "by17_matahari.lh" class by17_state : public genpin_class @@ -30,6 +32,7 @@ public: by17_state(const machine_config &mconfig, device_type type, const char *tag) : genpin_class(mconfig, type, tag) , m_maincpu(*this, "maincpu") + , m_nvram(*this, "nvram") , m_pia_u10(*this, "pia_u10") , m_pia_u11(*this, "pia_u11") , m_io_test(*this, "TEST") @@ -44,6 +47,9 @@ public: , m_io_x4(*this, "X4") { } + DECLARE_DRIVER_INIT(by17); + DECLARE_DRIVER_INIT(matahari); + DECLARE_DRIVER_INIT(pwerplay); DECLARE_READ8_MEMBER(u10_a_r); DECLARE_WRITE8_MEMBER(u10_a_w); DECLARE_READ8_MEMBER(u10_b_r); @@ -51,29 +57,43 @@ public: DECLARE_READ8_MEMBER(u11_a_r); DECLARE_WRITE8_MEMBER(u11_a_w); DECLARE_WRITE8_MEMBER(u11_b_w); + DECLARE_READ8_MEMBER(nibble_nvram_r); + DECLARE_WRITE8_MEMBER(nibble_nvram_w); + DECLARE_READ_LINE_MEMBER(u10_ca1_r); + DECLARE_READ_LINE_MEMBER(u10_cb1_r); DECLARE_WRITE_LINE_MEMBER(u10_ca2_w); DECLARE_WRITE_LINE_MEMBER(u10_cb2_w); + DECLARE_READ_LINE_MEMBER(u11_ca1_r); + DECLARE_READ_LINE_MEMBER(u11_cb1_r); DECLARE_WRITE_LINE_MEMBER(u11_ca2_w); DECLARE_WRITE_LINE_MEMBER(u11_cb2_w); - DECLARE_INPUT_CHANGED_MEMBER(activity_test); + DECLARE_INPUT_CHANGED_MEMBER(activity_button); DECLARE_INPUT_CHANGED_MEMBER(self_test); - TIMER_DEVICE_CALLBACK_MEMBER(timer_x); + DECLARE_CUSTOM_INPUT_MEMBER(outhole_x0); + DECLARE_CUSTOM_INPUT_MEMBER(saucer_x3); + DECLARE_CUSTOM_INPUT_MEMBER(drop_target_x2); + DECLARE_MACHINE_RESET(by17); + TIMER_DEVICE_CALLBACK_MEMBER(timer_z_freq); + TIMER_DEVICE_CALLBACK_MEMBER(timer_z_pulse); TIMER_DEVICE_CALLBACK_MEMBER(u11_timer); + TIMER_DEVICE_CALLBACK_MEMBER(timer_d_pulse); private: UINT8 m_u10a; UINT8 m_u10b; UINT8 m_u11a; UINT8 m_u11b; bool m_u10_ca2; + bool m_u10_cb1; bool m_u10_cb2; + bool m_u11_ca1; bool m_u11_cb2; - bool m_timer_x; - bool m_u11_timer; UINT8 m_digit; - UINT8 m_counter; - UINT8 m_segment[5]; - virtual void machine_reset(); + UINT8 m_segment[6]; + UINT8 m_lamp_decode; + UINT8 m_solenoid_features[20][4]; + UINT8 m_io_hold_x[5]; // Used to hold switches closed (drop targets, balls in outholes/saucers etc). Solenoid activity release them. required_device<m6800_cpu_device> m_maincpu; + required_shared_ptr<UINT8> m_nvram; required_device<pia6821_device> m_pia_u10; required_device<pia6821_device> m_pia_u11; required_ioport m_io_test; @@ -91,21 +111,22 @@ private: static ADDRESS_MAP_START( by17_map, AS_PROGRAM, 8, by17_state ) ADDRESS_MAP_GLOBAL_MASK(0x1fff) - AM_RANGE(0x0000, 0x007f) AM_RAM // internal to the cpu + AM_RANGE(0x0000, 0x007f) AM_RAM AM_RANGE(0x0088, 0x008b) AM_DEVREADWRITE("pia_u10", pia6821_device, read, write) AM_RANGE(0x0090, 0x0093) AM_DEVREADWRITE("pia_u11", pia6821_device, read, write) - AM_RANGE(0x0200, 0x02ff) AM_RAM AM_SHARE("nvram") + AM_RANGE(0x0200, 0x02ff) AM_RAM AM_READWRITE(nibble_nvram_r, nibble_nvram_w) AM_SHARE("nvram") AM_RANGE(0x1000, 0x1fff) AM_ROM AM_REGION("roms", 0 ) ADDRESS_MAP_END + static INPUT_PORTS_START( by17 ) PORT_START("TEST") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Self Test") PORT_IMPULSE(1) PORT_CHANGED_MEMBER(DEVICE_SELF, by17_state, self_test, 0) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_NAME("Activity") PORT_IMPULSE(1) PORT_CHANGED_MEMBER(DEVICE_SELF, by17_state, activity_test, 0) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Self Test") PORT_CHANGED_MEMBER(DEVICE_SELF, by17_state, self_test, NULL) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_NAME("Activity") PORT_CHANGED_MEMBER(DEVICE_SELF, by17_state, activity_button, NULL) PORT_START("DSW0") - PORT_DIPNAME( 0x1f, 0x02, "Coin Slot 1") - PORT_DIPSETTING( 0x00, DEF_STR( 2C_3C )) // same as 01 + PORT_DIPNAME( 0x1f, 0x02, "Coin Slot 1") PORT_DIPLOCATION("SW0:!1,!2,!3,!4,!5") // same as 03 + PORT_DIPSETTING( 0x00, DEF_STR( 2C_3C )) PORT_DIPSETTING( 0x02, DEF_STR( 1C_1C )) PORT_DIPSETTING( 0x03, DEF_STR( 2C_1C )) PORT_DIPSETTING( 0x04, DEF_STR( 1C_2C )) @@ -123,32 +144,32 @@ static INPUT_PORTS_START( by17 ) PORT_DIPSETTING( 0x10, DEF_STR( 1C_8C )) PORT_DIPSETTING( 0x11, DEF_STR( 2C_8C )) PORT_DIPSETTING( 0x12, DEF_STR( 1C_9C )) - PORT_DIPSETTING( 0x13, "2 coins 9 credits") - PORT_DIPSETTING( 0x14, "1 coin 10 credits") - PORT_DIPSETTING( 0x15, "2 coins 10 credits") - PORT_DIPSETTING( 0x16, "1 coin 11 credits") - PORT_DIPSETTING( 0x17, "2 coins 11 credits") - PORT_DIPSETTING( 0x18, "1 coin 12 credits") - PORT_DIPSETTING( 0x19, "2 coins 12 credits") - PORT_DIPSETTING( 0x1a, "1 coin 13 credits") - PORT_DIPSETTING( 0x1b, "2 coins 13 credits") - PORT_DIPSETTING( 0x1c, "1 coin 14 credits") - PORT_DIPSETTING( 0x1d, "2 coins 14 credits") - PORT_DIPSETTING( 0x1e, "1 coin 15 credits") - PORT_DIPSETTING( 0x1f, "2 coins 15 credits") - PORT_DIPNAME( 0x20, 0x20, "Award") + PORT_DIPSETTING( 0x13, "2 Coins/9 Credits") + PORT_DIPSETTING( 0x14, "1 Coin/10 Credits") + PORT_DIPSETTING( 0x15, "2 Coins/10 Credits") + PORT_DIPSETTING( 0x16, "1 Coin/11 Credits") + PORT_DIPSETTING( 0x17, "2 Coins/11 Credits") + PORT_DIPSETTING( 0x18, "1 Coin/12 Credits") + PORT_DIPSETTING( 0x19, "2 Coins/12 Credits") + PORT_DIPSETTING( 0x1a, "1 Coin/13 Credits") + PORT_DIPSETTING( 0x1b, "2 Coins/13 Credits") + PORT_DIPSETTING( 0x1c, "1 Coin/14 Credits") + PORT_DIPSETTING( 0x1d, "2 Coins/14 Credits") + PORT_DIPSETTING( 0x1e, "1 Coin/15 Credits") + PORT_DIPSETTING( 0x1f, "2 Coins/15 Credits") + PORT_DIPNAME( 0x20, 0x20, "Score Level Award") PORT_DIPLOCATION("SW0:!6") PORT_DIPSETTING( 0x00, "Extra Ball") - PORT_DIPSETTING( 0x20, "Free Game") - PORT_DIPNAME( 0x40, 0x00, "S07") + PORT_DIPSETTING( 0x20, "Replay") + PORT_DIPNAME( 0x40, 0x00, "S07") PORT_DIPLOCATION("SW0:!7") PORT_DIPSETTING( 0x00, DEF_STR( Off )) PORT_DIPSETTING( 0x40, DEF_STR( On )) - PORT_DIPNAME( 0x80, 0x00, "Play melody always") + PORT_DIPNAME( 0x80, 0x80, "Play Melodies") PORT_DIPLOCATION("SW0:!8") PORT_DIPSETTING( 0x00, DEF_STR( Off )) PORT_DIPSETTING( 0x80, DEF_STR( On )) PORT_START("DSW1") - PORT_DIPNAME( 0x1f, 0x02, "Coin Slot 3") - PORT_DIPSETTING( 0x00, DEF_STR( 2C_3C )) // same as 01 + PORT_DIPNAME( 0x1f, 0x02, "Coin Slot 3") PORT_DIPLOCATION("SW1:!1,!2,!3,!4,!5") // same as 01 + PORT_DIPSETTING( 0x00, DEF_STR( 2C_3C )) PORT_DIPSETTING( 0x02, DEF_STR( 1C_1C )) PORT_DIPSETTING( 0x03, DEF_STR( 2C_1C )) PORT_DIPSETTING( 0x04, DEF_STR( 1C_2C )) @@ -166,140 +187,327 @@ static INPUT_PORTS_START( by17 ) PORT_DIPSETTING( 0x10, DEF_STR( 1C_8C )) PORT_DIPSETTING( 0x11, DEF_STR( 2C_8C )) PORT_DIPSETTING( 0x12, DEF_STR( 1C_9C )) - PORT_DIPSETTING( 0x13, "2 coins 9 credits") - PORT_DIPSETTING( 0x14, "1 coin 10 credits") - PORT_DIPSETTING( 0x15, "2 coins 10 credits") - PORT_DIPSETTING( 0x16, "1 coin 11 credits") - PORT_DIPSETTING( 0x17, "2 coins 11 credits") - PORT_DIPSETTING( 0x18, "1 coin 12 credits") - PORT_DIPSETTING( 0x19, "2 coins 12 credits") - PORT_DIPSETTING( 0x1a, "1 coin 13 credits") - PORT_DIPSETTING( 0x1b, "2 coins 13 credits") - PORT_DIPSETTING( 0x1c, "1 coin 14 credits") - PORT_DIPSETTING( 0x1d, "2 coins 14 credits") - PORT_DIPSETTING( 0x1e, "1 coin 15 credits") - PORT_DIPSETTING( 0x1f, "2 coins 15 credits") - PORT_DIPNAME( 0x20, 0x00, "S14") + PORT_DIPSETTING( 0x13, "2 Coins/9 Credits") + PORT_DIPSETTING( 0x14, "1 Coin/10 Credits") + PORT_DIPSETTING( 0x15, "2 Coins/10 Credits") + PORT_DIPSETTING( 0x16, "1 Coin/11 Credits") + PORT_DIPSETTING( 0x17, "2 Coins/11 Credits") + PORT_DIPSETTING( 0x18, "1 Coin/12 Credits") + PORT_DIPSETTING( 0x19, "2 Coins/12 Credits") + PORT_DIPSETTING( 0x1a, "1 Coin/13 Credits") + PORT_DIPSETTING( 0x1b, "2 Coins/13 Credits") + PORT_DIPSETTING( 0x1c, "1 Coin/14 Credits") + PORT_DIPSETTING( 0x1d, "2 Coins/14 Credits") + PORT_DIPSETTING( 0x1e, "1 Coin/15 Credits") + PORT_DIPSETTING( 0x1f, "2 Coins/15 Credits") + PORT_DIPNAME( 0x20, 0x00, "S14") PORT_DIPLOCATION("SW1:!6") PORT_DIPSETTING( 0x00, DEF_STR( Off )) PORT_DIPSETTING( 0x20, DEF_STR( On )) - PORT_DIPNAME( 0x40, 0x00, "Award for beating high score") + PORT_DIPNAME( 0x40, 0x40, "Award for Beating Highest Score") PORT_DIPLOCATION("SW1:!7") PORT_DIPSETTING( 0x00, "Novelty") - PORT_DIPSETTING( 0x40, "3 Free Games") - PORT_DIPNAME( 0x80, 0x00, "Balls") + PORT_DIPSETTING( 0x40, "3 Credits") + PORT_DIPNAME( 0x80, 0x80, "Balls per Game") PORT_DIPLOCATION("SW1:!8") PORT_DIPSETTING( 0x00, "3") PORT_DIPSETTING( 0x80, "5") PORT_START("DSW2") - PORT_DIPNAME( 0x07, 0x02, "Maximum Credits") + PORT_DIPNAME( 0x07, 0x01, "Maximum Credits") PORT_DIPLOCATION("SW2:!1,!2,!3") PORT_DIPSETTING( 0x00, "5") PORT_DIPSETTING( 0x01, "10") PORT_DIPSETTING( 0x02, "15") - PORT_DIPSETTING( 0x00, "20") - PORT_DIPSETTING( 0x00, "25") - PORT_DIPSETTING( 0x00, "30") - PORT_DIPSETTING( 0x00, "35") - PORT_DIPSETTING( 0x00, "40") - PORT_DIPNAME( 0x08, 0x08, "Credits displayed") + PORT_DIPSETTING( 0x03, "20") + PORT_DIPSETTING( 0x04, "25") + PORT_DIPSETTING( 0x05, "30") + PORT_DIPSETTING( 0x06, "35") + PORT_DIPSETTING( 0x07, "40") + PORT_DIPNAME( 0x08, 0x08, "Credits Displayed") PORT_DIPLOCATION("SW2:!4") PORT_DIPSETTING( 0x00, DEF_STR( Off )) PORT_DIPSETTING( 0x08, DEF_STR( On )) PORT_DIPNAME( 0x10, 0x10, "Match") - PORT_DIPSETTING( 0x00, DEF_STR( Off )) + PORT_DIPSETTING( 0x00, DEF_STR( Off )) PORT_DIPLOCATION("SW2:!5") PORT_DIPSETTING( 0x10, DEF_STR( On )) // from here, game-specific options - PORT_DIPNAME( 0x20, 0x00, "S22") + PORT_DIPNAME( 0x20, 0x00, "S22 (game specific)") PORT_DIPLOCATION("SW2:!6") PORT_DIPSETTING( 0x00, DEF_STR( Off )) PORT_DIPSETTING( 0x20, DEF_STR( On )) - PORT_DIPNAME( 0x40, 0x00, "S23") + PORT_DIPNAME( 0x40, 0x00, "S23 (game specific)") PORT_DIPLOCATION("SW2:!7") PORT_DIPSETTING( 0x00, DEF_STR( Off )) PORT_DIPSETTING( 0x40, DEF_STR( On )) - PORT_DIPNAME( 0x80, 0x00, "No free balls or games") // night rider + PORT_DIPNAME( 0x80, 0x00, "No Free Balls or Games") PORT_DIPLOCATION("SW2:!8") // night rider PORT_DIPSETTING( 0x00, DEF_STR( Off )) PORT_DIPSETTING( 0x80, DEF_STR( On )) PORT_START("DSW3") - PORT_DIPNAME( 0x01, 0x00, "S25") - PORT_DIPSETTING( 0x00, DEF_STR( Off )) - PORT_DIPSETTING( 0x01, DEF_STR( On )) - PORT_DIPNAME( 0x02, 0x00, "S26") - PORT_DIPSETTING( 0x00, DEF_STR( Off )) - PORT_DIPSETTING( 0x02, DEF_STR( On )) - PORT_DIPNAME( 0x04, 0x00, "S27") - PORT_DIPSETTING( 0x00, DEF_STR( Off )) - PORT_DIPSETTING( 0x04, DEF_STR( On )) - PORT_DIPNAME( 0x08, 0x00, "S28") - PORT_DIPSETTING( 0x00, DEF_STR( Off )) - PORT_DIPSETTING( 0x08, DEF_STR( On )) - PORT_DIPNAME( 0x10, 0x00, "S29") + PORT_DIPNAME( 0x0f, 0x00, "Coin Slot 2") PORT_DIPLOCATION("SW3:!1,!2,!3,!4") + PORT_DIPSETTING( 0x00, "Same as Slot 1") + PORT_DIPSETTING( 0x01, DEF_STR( 1C_1C )) + PORT_DIPSETTING( 0x02, DEF_STR( 1C_2C )) + PORT_DIPSETTING( 0x03, DEF_STR( 1C_3C )) + PORT_DIPSETTING( 0x04, DEF_STR( 1C_4C )) + PORT_DIPSETTING( 0x05, DEF_STR( 1C_5C )) + PORT_DIPSETTING( 0x06, DEF_STR( 1C_6C )) + PORT_DIPSETTING( 0x07, DEF_STR( 1C_7C )) + PORT_DIPSETTING( 0x08, DEF_STR( 1C_8C )) + PORT_DIPSETTING( 0x09, DEF_STR( 1C_9C )) + PORT_DIPSETTING( 0x0a, "1 Coin/10 Credits") + PORT_DIPSETTING( 0x0b, "1 Coin/11 Credits") + PORT_DIPSETTING( 0x0c, "1 Coin/12 Credits") + PORT_DIPSETTING( 0x0d, "1 Coin/13 Credits") + PORT_DIPSETTING( 0x0e, "1 Coin/14 Credits") + PORT_DIPSETTING( 0x0f, "1 Coin/15 Credits") + PORT_DIPNAME( 0x10, 0x00, "S29 (game specific)") PORT_DIPLOCATION("SW3:!5") PORT_DIPSETTING( 0x00, DEF_STR( Off )) PORT_DIPSETTING( 0x10, DEF_STR( On )) - PORT_DIPNAME( 0x20, 0x00, "S30") + PORT_DIPNAME( 0x20, 0x00, "S30 (game specific)") PORT_DIPLOCATION("SW3:!6") PORT_DIPSETTING( 0x00, DEF_STR( Off )) PORT_DIPSETTING( 0x20, DEF_STR( On )) - PORT_DIPNAME( 0x40, 0x00, "Awards") // night rider + PORT_DIPNAME( 0x40, 0x00, "Awards") PORT_DIPLOCATION("SW3:!7") // night rider PORT_DIPSETTING( 0x00, "Conservative") PORT_DIPSETTING( 0x40, "Liberal") - PORT_DIPNAME( 0x80, 0x00, "Lane Adjustment") // night rider + PORT_DIPNAME( 0x80, 0x00, "Lane Adjustment") PORT_DIPLOCATION("SW3:!8") // night rider PORT_DIPSETTING( 0x00, "Conservative") PORT_DIPSETTING( 0x80, "Liberal") PORT_START("X0") // custom - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_SLASH) - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_COLON) - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_QUOTE) - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_BACKSLASH) - PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_BACKSPACE) + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_STOP) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_SLASH) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_OPENBRACE) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_CLOSEBRACE) + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_BACKSLASH) // standard PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_START1 ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_TILT ) - PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Outhole") PORT_CODE(KEYCODE_X) +// PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Outhole") PORT_CODE(KEYCODE_BACKSPACE) + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by17_state, outhole_x0, (void *)0x07) // PORT_CODE(KEYCODE_BACKSPACE) PORT_START("X1") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN3 ) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN2 ) - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_L) - PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_OPENBRACE) - PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_CLOSEBRACE) - PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_ENTER) - PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_TILT1 ) PORT_NAME("Slam Tilt") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_ENTER) + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_QUOTE) + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_COLON) + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_L) + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_TILT2 ) PORT_NAME("Slam Tilt") PORT_CODE(KEYCODE_EQUALS) // custom PORT_START("X2") - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_A) - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_S) - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_D) - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_F) - PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_G) - PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_H) - PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_J) - PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_K) + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_K) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_J) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_H) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_G) + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_F) + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_D) + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_S) + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_A) PORT_START("X3") - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_Q) - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_W) - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_E) - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_R) - PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_Y) - PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_U) - PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_I) - PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_O) + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_O) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_I) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_U) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_Y) + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_R) + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_E) + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_W) + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_Q) PORT_START("X4") - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_Z) - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_C) - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_V) + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_COMMA) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_M) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_N) PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_B) - PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_N) - PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_M) - PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_COMMA) - PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_STOP) + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_V) + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_C) + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_X) + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_Z) INPUT_PORTS_END -INPUT_CHANGED_MEMBER( by17_state::activity_test ) +static INPUT_PORTS_START( matahari ) + PORT_INCLUDE( by17 ) + + PORT_MODIFY("DSW0") + PORT_DIPNAME( 0x60, 0x60, "Award for Beating Highest Score") PORT_DIPLOCATION("SW0:!6,!7") + PORT_DIPSETTING( 0x00, "Nothing") + PORT_DIPSETTING( 0x20, "1 Credit") + PORT_DIPSETTING( 0x40, "2 Credits") + PORT_DIPSETTING( 0x60, "3 Credits") + + PORT_MODIFY("DSW1") + PORT_DIPNAME( 0x40, 0x00, "S15") PORT_DIPLOCATION("SW1:!7") + PORT_DIPSETTING( 0x00, DEF_STR( Off )) + PORT_DIPSETTING( 0x40, DEF_STR( On )) + + PORT_MODIFY("DSW2") + PORT_DIPNAME( 0x20, 0x00, "S22") PORT_DIPLOCATION("SW2:!6") + PORT_DIPSETTING( 0x00, DEF_STR( Off )) + PORT_DIPSETTING( 0x20, DEF_STR( On )) + PORT_DIPNAME( 0x40, 0x00, "Saucer Award Feature") PORT_DIPLOCATION("SW2:!7") + PORT_DIPSETTING( 0x00, "Start at 3000 Points") + PORT_DIPSETTING( 0x40, "Start at 2X Bonus") + PORT_DIPNAME( 0x80, 0x00, "A & B Special Award Feature Per Ball") PORT_DIPLOCATION("SW2:!8") + PORT_DIPSETTING( 0x00, "Award Special Once") + PORT_DIPSETTING( 0x80, "Award Special Alternates") + + PORT_MODIFY("DSW3") + PORT_DIPNAME( 0x10, 0x00, "S29") PORT_DIPLOCATION("SW3:!5") + PORT_DIPSETTING( 0x00, DEF_STR( Off )) + PORT_DIPSETTING( 0x10, DEF_STR( On )) + PORT_DIPNAME( 0x60, 0x60, "Extra Ball / Specials Award Mode") PORT_DIPLOCATION("SW3:!6,!7") + PORT_DIPSETTING( 0x00, "Novelty / 50,000") +// PORT_DIPSETTING( 0x20, "") + PORT_DIPSETTING( 0x40, "Extra Ball / 50,000") + PORT_DIPSETTING( 0x60, "Extra Ball / Replay") + PORT_DIPNAME( 0x80, 0x80, "Score Level Award") PORT_DIPLOCATION("SW3:!8") + PORT_DIPSETTING( 0x00, "Extra Ball") + PORT_DIPSETTING( 0x80, "Replay") + + PORT_MODIFY("X2") /* Drop Target switches */ + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by17_state, drop_target_x2, (void *)0x20) // PORT_CODE(KEYCODE_K) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by17_state, drop_target_x2, (void *)0x21) // PORT_CODE(KEYCODE_J) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by17_state, drop_target_x2, (void *)0x22) // PORT_CODE(KEYCODE_H) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by17_state, drop_target_x2, (void *)0x23) // PORT_CODE(KEYCODE_G) + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by17_state, drop_target_x2, (void *)0x24) // PORT_CODE(KEYCODE_F) + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by17_state, drop_target_x2, (void *)0x25) // PORT_CODE(KEYCODE_D) + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by17_state, drop_target_x2, (void *)0x26) // PORT_CODE(KEYCODE_S) + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by17_state, drop_target_x2, (void *)0x27) // PORT_CODE(KEYCODE_A) + + PORT_MODIFY("X3") + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by17_state, saucer_x3, (void *)0x37) // PORT_CODE(KEYCODE_Q) +INPUT_PORTS_END + +static INPUT_PORTS_START( pwerplay ) + PORT_INCLUDE( by17 ) + + PORT_MODIFY("DSW0") + PORT_DIPNAME( 0x60, 0x60, "Award for Beating Highest Score") PORT_DIPLOCATION("SW0:!6,!7") + PORT_DIPSETTING( 0x00, "Nothing") + PORT_DIPSETTING( 0x20, "1 Credit") + PORT_DIPSETTING( 0x40, "2 Credits") + PORT_DIPSETTING( 0x60, "3 Credits") + + PORT_MODIFY("DSW1") + PORT_DIPNAME( 0x20, 0x00, "Drop Target Award Sequence") PORT_DIPLOCATION("SW1:!6") + PORT_DIPSETTING( 0x00, "5X then Extra Ball") + PORT_DIPSETTING( 0x20, "5X and Extra Ball") + PORT_DIPNAME( 0x40, 0x00, "Rollover Button Score") PORT_DIPLOCATION("SW1:!7") + PORT_DIPSETTING( 0x00, "Conservative - 100 Points") + PORT_DIPSETTING( 0x40, "Liberal - 1,000 Points") + + PORT_MODIFY("DSW2") + PORT_DIPNAME( 0x20, 0x00, "Drop Target Bank Reset") PORT_DIPLOCATION("SW2:!6") + PORT_DIPSETTING( 0x00, "Reset Both Banks") + PORT_DIPSETTING( 0x20, "Reset Completed Bank Only") + PORT_DIPNAME( 0x40, 0x00, "Pop Bumper Scores") PORT_DIPLOCATION("SW2:!7") + PORT_DIPSETTING( 0x00, "Alternate 1,000 Points Top and Bottom") + PORT_DIPSETTING( 0x40, "All score 1,000 Points When Lit") + + PORT_MODIFY("DSW3") + PORT_DIPNAME( 0x30, 0x20, "Top Saucer Specials Feature") PORT_DIPLOCATION("SW3:!5,!6") + PORT_DIPSETTING( 0x00, "Outlane Specials do Not Light") +// PORT_DIPSETTING( 0x10, "") + PORT_DIPSETTING( 0x20, "Outlane Specials Alternate") + PORT_DIPSETTING( 0x30, "Outlane Specials Both Light") + PORT_DIPNAME( 0xc0, 0xc0, "Award Mode") PORT_DIPLOCATION("SW3:!7,!8") + PORT_DIPSETTING( 0x00, "Novelty / 50,000") +// PORT_DIPSETTING( 0x40, "") + PORT_DIPSETTING( 0x80, "Extra Ball / 50,000") + PORT_DIPSETTING( 0xc0, "Extra Ball / Replay") + + PORT_MODIFY("X2") /* Drop Target switches */ + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by17_state, drop_target_x2, (void *)0x20) // PORT_CODE(KEYCODE_K) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by17_state, drop_target_x2, (void *)0x21) // PORT_CODE(KEYCODE_J) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by17_state, drop_target_x2, (void *)0x22) // PORT_CODE(KEYCODE_H) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by17_state, drop_target_x2, (void *)0x23) // PORT_CODE(KEYCODE_G) + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by17_state, drop_target_x2, (void *)0x24) // PORT_CODE(KEYCODE_F) + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by17_state, drop_target_x2, (void *)0x25) // PORT_CODE(KEYCODE_D) + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by17_state, drop_target_x2, (void *)0x26) // PORT_CODE(KEYCODE_S) + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by17_state, drop_target_x2, (void *)0x27) // PORT_CODE(KEYCODE_A) + + PORT_MODIFY("X3") + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by17_state, saucer_x3, (void *)0x37) // PORT_CODE(KEYCODE_Q) +INPUT_PORTS_END + + +CUSTOM_INPUT_MEMBER( by17_state::outhole_x0 ) +{ + int bit_shift = ((FPTR)param & 0x07); + int port = (((FPTR)param >> 4) & 0x07); + + /* Here we simulate the ball sitting in the Outhole so the Outhole Solenoid can release it */ + + if (machine().input().code_pressed_once(KEYCODE_BACKSPACE)) + m_io_hold_x[port] |= (1 << bit_shift); + + return ((m_io_hold_x[port] >> bit_shift) & 1); +} + +CUSTOM_INPUT_MEMBER( by17_state::saucer_x3 ) +{ + int bit_shift = ((FPTR)param & 0x07); + int port = (((FPTR)param >> 4) & 0x07); + + /* Here we simulate the ball sitting in a Saucer so the Saucer Solenoid can release it */ + + if (machine().input().code_pressed_once(KEYCODE_Q)) + m_io_hold_x[port] |= (1 << bit_shift); + + return ((m_io_hold_x[port] >> bit_shift) & 1); +} + + +CUSTOM_INPUT_MEMBER( by17_state::drop_target_x2 ) +{ + /* Here we simulate fallen Drop Targets so the Drop Target Reset Solenoids can release the switches */ + + int bit_shift = ((FPTR)param & 0x07); + int port = (((FPTR)param >> 4) & 0x07); + + switch (bit_shift) + { + case 0: if (machine().input().code_pressed_once(KEYCODE_K)) + m_io_hold_x[port] |= (1 << bit_shift); + break; + case 1: if (machine().input().code_pressed_once(KEYCODE_J)) + m_io_hold_x[port] |= (1 << bit_shift); + break; + case 2: if (machine().input().code_pressed_once(KEYCODE_H)) + m_io_hold_x[port] |= (1 << bit_shift); + break; + case 3: if (machine().input().code_pressed_once(KEYCODE_G)) + m_io_hold_x[port] |= (1 << bit_shift); + break; + case 4: if (machine().input().code_pressed_once(KEYCODE_F)) + m_io_hold_x[port] |= (1 << bit_shift); + break; + case 5: if (machine().input().code_pressed_once(KEYCODE_D)) + m_io_hold_x[port] |= (1 << bit_shift); + break; + case 6: if (machine().input().code_pressed_once(KEYCODE_S)) + m_io_hold_x[port] |= (1 << bit_shift); + break; + case 7: if (machine().input().code_pressed_once(KEYCODE_A)) + m_io_hold_x[port] |= (1 << bit_shift); + break; + } + return ((m_io_hold_x[port] >> bit_shift) & 1); +} + + +READ8_MEMBER(by17_state::nibble_nvram_r) +{ + return (m_nvram[offset] | 0x0f); +} + +WRITE8_MEMBER(by17_state::nibble_nvram_w) { - if(newval) - m_maincpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE); + m_nvram[offset] = (data | 0x0f); +} + +INPUT_CHANGED_MEMBER( by17_state::activity_button ) +{ + if (newval != oldval) + m_maincpu->set_input_line(INPUT_LINE_NMI, (newval ? ASSERT_LINE : CLEAR_LINE)); } INPUT_CHANGED_MEMBER( by17_state::self_test ) @@ -307,20 +515,60 @@ INPUT_CHANGED_MEMBER( by17_state::self_test ) m_pia_u10->ca1_w(newval); } +READ_LINE_MEMBER( by17_state::u10_ca1_r ) +{ + return m_io_test->read() & 0x01; +} +READ_LINE_MEMBER( by17_state::u10_cb1_r ) +{ + return m_u10_cb1; +} + WRITE_LINE_MEMBER( by17_state::u10_ca2_w ) { +#if 0 // Display Blanking - Out of sync with video redraw rate and causes flicker so it's disabled + if (state == 0) + { + int digit; + + for (digit=1; digit<=8; digit++) + { + output_set_digit_value(10+digit, 0); + output_set_digit_value(20+digit, 0); + output_set_digit_value(30+digit, 0); + output_set_digit_value(40+digit, 0); + output_set_digit_value(50+digit, 0); + } + } +#endif + m_u10_ca2 = state; - if (!state) - m_counter = 0; } WRITE_LINE_MEMBER( by17_state::u10_cb2_w ) { +// logerror("New U10 CB2 state %01x, was %01x. PIA=%02x\n", state, m_u10_cb2, m_u10a); + + if (state == TRUE) + m_lamp_decode = m_u10a & 0x0f; + + m_u10_cb2 = state; } WRITE_LINE_MEMBER( by17_state::u11_ca2_w ) { - output_set_value("led0", !state); + output_set_value("led0", state); +} + +READ_LINE_MEMBER( by17_state::u11_ca1_r ) +{ + return m_u11_ca1; +} + +READ_LINE_MEMBER( by17_state::u11_cb1_r ) +{ + /* Pin 32 on MPU J5 AID connector tied low */ + return 0; } WRITE_LINE_MEMBER( by17_state::u11_cb2_w ) @@ -335,27 +583,40 @@ READ8_MEMBER( by17_state::u10_a_r ) WRITE8_MEMBER( by17_state::u10_a_w ) { - m_u10a = data; +// logerror("Writing %02x to U10 PIA, CB2 state is %01x, CA2 state is %01x, Lamp_Dec is %02x\n",data, m_u10_cb2, m_u10_ca2, (m_lamp_decode & 0x0f)); if (!m_u10_ca2) { - m_counter++; - - if (m_counter==1) - m_segment[0] = data>>4; - else - if (m_counter==3) + if (BIT(data, 0)==0) // Display 1 m_segment[1] = data>>4; else - if (m_counter==5) + if (BIT(data, 1)==0) // Display 2 m_segment[2] = data>>4; else - if (m_counter==7) + if (BIT(data, 2)==0) // Display 3 m_segment[3] = data>>4; else - if (m_counter==9) + if (BIT(data, 3)==0) // Display 4 m_segment[4] = data>>4; } + + /*** Update the Lamp latched outputs ***/ + if ((data & 0x0f) == 0x0f) + { + if ((m_lamp_decode & 0x0f) < 0x0f) + { + if (output_get_indexed_value("lamp", ((m_lamp_decode & 0x0f)+00) ) ==0 ) output_set_indexed_value("lamp", ((m_lamp_decode & 0x0f)+00), ((data & 0x10) ? FALSE : TRUE)); + if (output_get_indexed_value("lamp", ((m_lamp_decode & 0x0f)+15) ) ==0 ) output_set_indexed_value("lamp", ((m_lamp_decode & 0x0f)+15), ((data & 0x20) ? FALSE : TRUE)); + if (output_get_indexed_value("lamp", ((m_lamp_decode & 0x0f)+30) ) ==0 ) output_set_indexed_value("lamp", ((m_lamp_decode & 0x0f)+30), ((data & 0x40) ? FALSE : TRUE)); + if (output_get_indexed_value("lamp", ((m_lamp_decode & 0x0f)+45) ) ==0 ) output_set_indexed_value("lamp", ((m_lamp_decode & 0x0f)+45), ((data & 0x80) ? FALSE : TRUE)); + } + else + { + // Rest output - all lamps are off + } + } + + m_u10a = data; } READ8_MEMBER( by17_state::u10_b_r ) @@ -404,116 +665,327 @@ READ8_MEMBER( by17_state::u11_a_r ) WRITE8_MEMBER( by17_state::u11_a_w ) { - m_u11a = data; + if (BIT(data, 0)==0) // Display Credit/Ball + { + m_segment[5] = m_u10a>>4; + } - if (!m_u10_ca2) + + m_digit = 0; + + if BIT(data, 7) + m_digit = 1; + else + if BIT(data, 6) + m_digit = 2; + else + if BIT(data, 5) + m_digit = 3; + else + if BIT(data, 4) + m_digit = 4; + else + if BIT(data, 3) + m_digit = 5; + else + if BIT(data, 2) + m_digit = 6; + else + if (BIT(data, 2) && BIT(data, 3)) // Aftermarket 7th digit strobe for 6 digit games + m_digit = 7; + + if ((m_u10_ca2==0) && m_digit) { - if BIT(data, 2) - m_digit = 5; - else - if BIT(data, 3) - m_digit = 4; - else - if BIT(data, 4) - m_digit = 3; - else - if BIT(data, 5) - m_digit = 2; - else - if BIT(data, 6) - m_digit = 1; - else - if BIT(data, 7) - m_digit = 0; + static const UINT8 patterns[16] = { 0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f,0,0,0,0,0,0 }; // MC14543 - BCD to 7 Segment Display Decoder + + output_set_digit_value(10+m_digit, patterns[m_segment[1]]); + output_set_digit_value(20+m_digit, patterns[m_segment[2]]); + output_set_digit_value(30+m_digit, patterns[m_segment[3]]); + output_set_digit_value(40+m_digit, patterns[m_segment[4]]); + output_set_digit_value(50+m_digit, patterns[m_segment[5]]); - if (BIT(data, 0) && (m_counter > 8)) - { - static const UINT8 patterns[16] = { 0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f,0,0,0,0,0,0 }; // MC14543 - output_set_digit_value(m_digit, patterns[m_segment[0]]); - output_set_digit_value(10+m_digit, patterns[m_segment[1]]); - output_set_digit_value(20+m_digit, patterns[m_segment[2]]); - output_set_digit_value(30+m_digit, patterns[m_segment[3]]); - output_set_digit_value(40+m_digit, patterns[m_segment[4]]); - } } + + m_u11a = data; } WRITE8_MEMBER( by17_state::u11_b_w ) { - m_u11b = data; if (!m_u11_cb2) { - switch (data & 15) + if ((data & 0x0f) < 0x0f) // Momentary Solenoids + { + output_set_indexed_value( "solenoid", (data & 0x0f), TRUE); + + if (m_solenoid_features[(data & 0x0f)][3]) // Reset/release relevant switch after firing Solenoid + m_io_hold_x[(m_solenoid_features[(data & 0x0f)][2])] &= (m_solenoid_features[(data & 0x0f)][3]); + + if (m_solenoid_features[(data & 0x0f)][0] != 0xff) // Play solenoid audio sample + m_samples->start(m_solenoid_features[(data & 0x0f)][0], m_solenoid_features[(data & 0x0f)][1]); + } + else // Rest output - all momentary solenoids are off { - case 0x0: // chime 10 - m_samples->start(1, 1); - break; - case 0x1: // chime 100 - m_samples->start(2, 2); - break; - case 0x2: // chime 1000 - m_samples->start(3, 3); - break; - case 0x3: // chime 10000 - m_samples->start(0, 4); - break; - case 0x4: - break; - case 0x5: // knocker - m_samples->start(0, 6); - break; - case 0x6: // outhole - m_samples->start(0, 5); - break; - // from here, vary per game - case 0x7: - case 0x8: - case 0x9: - break; - case 0xa: - case 0xb: - case 0xc: // bumpers - m_samples->start(0, 0); - break; - case 0xd: - case 0xe: - case 0xf: - break; + for (int i=0; i<15; i++) + { + output_set_indexed_value( "solenoid", i, FALSE); + } } } -} -void by17_state::machine_reset() -{ - m_u10a = 0; - m_u10b = 0; - m_u10_cb2 = 0; - m_u11a = 0; - m_u11b = 0; - m_timer_x = 0; - m_u11_timer = 0; + + if ((m_u11b & 0x10) && ((data & 0x10)==0)) + { + output_set_value("solenoid16", TRUE); + if (m_solenoid_features[16][0] != 0xff) + m_samples->start(m_solenoid_features[16][0], m_solenoid_features[16][1]); + } + else if ((data & 0x10) && ((m_u11b & 0x10)==0)) + { + output_set_value("solenoid16", FALSE); + if (m_solenoid_features[16][0] != 0xff) + m_samples->start(m_solenoid_features[16][0], m_solenoid_features[16][2]); + } + if ((m_u11b & 0x20) && ((data & 0x20)==0)) + { + output_set_value("solenoid17", TRUE); // Coin Lockout Coil engage + if (m_solenoid_features[17][0] != 0xff) + m_samples->start(m_solenoid_features[17][0], m_solenoid_features[17][1]); + } + else if ((data & 0x20) && ((m_u11b & 0x20)==0)) + { + output_set_value("solenoid17", FALSE); // Coin Lockout Coil release + if (m_solenoid_features[17][0] != 0xff) + m_samples->start(m_solenoid_features[17][0], m_solenoid_features[17][2]); + } + if ((m_u11b & 0x40) && ((data & 0x40)==0)) + { + output_set_value("solenoid18", TRUE); // Flipper Enable Relay engage + if (m_solenoid_features[18][0] != 0xff) + m_samples->start(m_solenoid_features[18][0], m_solenoid_features[18][1]); + } + else if ((data & 0x40) && ((m_u11b & 0x40)==0)) + { + output_set_value("solenoid18", FALSE); // Flipper Enable Relay release + if (m_solenoid_features[18][0] != 0xff) + m_samples->start(m_solenoid_features[18][0], m_solenoid_features[18][2]); + } + if ((m_u11b & 0x80) && ((data & 0x80)==0)) + { + output_set_value("solenoid19", TRUE); + if (m_solenoid_features[19][0] != 0xff) + m_samples->start(m_solenoid_features[19][0], m_solenoid_features[19][1]); + } + else if ((data & 0x80) && ((m_u11b & 0x80)==0)) + { + output_set_value("solenoid19", FALSE); + if (m_solenoid_features[19][0] != 0xff) + m_samples->start(m_solenoid_features[19][0], m_solenoid_features[19][2]); + } + + m_u11b = data; } + // zero-cross detection -TIMER_DEVICE_CALLBACK_MEMBER( by17_state::timer_x ) +TIMER_DEVICE_CALLBACK_MEMBER( by17_state::timer_z_freq ) +{ +/* Zero Crossing Detector - this timing is based on 50Hz AC line power input converted to unregulated DC + + -+ +---+ + | | | + |<-------- 9.30ms -------->|<->|700us + | | | + +--------------------------+ +----- +*/ + + timer_device *zero_crossing_active_timer = machine().device<timer_device>("timer_z_pulse"); + + zero_crossing_active_timer->adjust(attotime::from_usec(700)); + + m_u10_cb1 = true; + m_pia_u10->cb1_w(m_u10_cb1); + + /*** Zero Crossing - power to all Lamp SCRs is cut off and reset ***/ + + for (int i=0; i<60; i++) + { + output_set_indexed_value( "lamp", i, 0 ); + } + +} +TIMER_DEVICE_CALLBACK_MEMBER( by17_state::timer_z_pulse ) { - m_timer_x ^= 1; - m_pia_u10->cb1_w(m_timer_x); + /*** Line Power to DC Zero Crossing has ended ***/ + + m_u10_cb1 = false; + m_pia_u10->cb1_w(m_u10_cb1); } // 555 timer for display refresh TIMER_DEVICE_CALLBACK_MEMBER( by17_state::u11_timer ) { - m_u11_timer ^= 1; - m_pia_u11->ca1_w(m_u11_timer); +/* +--------------------------+ +----- + | | | + |<-------- 2.85ms -------->|<->|300us + | | | + -+ +---+ +*/ + + timer_device *display_refresh_timer = machine().device<timer_device>("timer_d_pulse"); + + display_refresh_timer->adjust(attotime::from_msec(2.85)); + + m_u11_ca1 = true; + m_pia_u11->ca1_w(m_u11_ca1); +} + +TIMER_DEVICE_CALLBACK_MEMBER( by17_state::timer_d_pulse ) +{ + m_u11_ca1 = false; + m_pia_u11->ca1_w(m_u11_ca1); +} + + + +DRIVER_INIT_MEMBER( by17_state, by17 ) +{ + static const UINT8 solenoid_features_default[20][4] = + { + // This table serves two functions and is configured on a per game basis: + // Assign a particular sound sample corresponding to a solenoid function, and + // release any switches being held closed eg. drop targets, ball in saucer/outhole, etc + + // { Sound Channel, Sound Sample, Switch Strobe, Switch Return Mask } + /*00*/ { 0x00, 0x00, 0x00, 0x00 }, + /*01*/ { 0x05, 0x01, 0x00, 0x00 }, // Chime 10 + /*02*/ { 0x05, 0x02, 0x00, 0x00 }, // Chime 100 + /*03*/ { 0x05, 0x03, 0x00, 0x00 }, // Chime 1000 + /*04*/ { 0x05, 0x04, 0x00, 0x00 }, // Chime 10000 + /*05*/ { 0x04, 0x00, 0x00, 0x00 }, // Knocker + /*06*/ { 0x01, 0x09, 0x00, 0x7f }, // Outhole + /*07*/ { 0x00, 0x00, 0x00, 0x00 }, + /*08*/ { 0x02, 0x00, 0x00, 0x00 }, + /*09*/ { 0x02, 0x00, 0x00, 0x00 }, + /*10*/ { 0x02, 0x00, 0x00, 0x00 }, + /*11*/ { 0x02, 0x00, 0x00, 0x00 }, + /*12*/ { 0x00, 0x00, 0x00, 0x00 }, + /*13*/ { 0x02, 0x00, 0x00, 0x00 }, + /*14*/ { 0x00, 0x00, 0x00, 0x00 }, + /*15*/ { 0xff, 0xff, 0x00, 0x00 }, // None - all momentary solenoids off + // { Sound Channel, Sound engage, Sound release, Not Used } + /*16*/ { 0xff, 0xff, 0xff, 0x00 }, + /*17*/ { 0x00, 0x0c, 0x0d, 0x00 }, // Coin Lockout coil + /*18*/ { 0x00, 0x0e, 0x0f, 0x00 }, // Flipper Enable relay + /*19*/ { 0xff, 0xff, 0xff, 0x00 } + }; + + for (int i=0; i<20; i++) + { + for (int j=0; j<4; j++) + m_solenoid_features[i][j] = solenoid_features_default[i][j]; + } +} + + +DRIVER_INIT_MEMBER( by17_state, matahari ) +{ + static const UINT8 solenoid_features_matahari[20][4] = + { + // { Sound Channel, Sound Sample, Switch Strobe, Switch Return Mask } + /*00*/ { 0x02, 0x05, 0x03, 0x7f }, // Saucer + /*01*/ { 0x05, 0x01, 0x00, 0x00 }, // Chime 10 + /*02*/ { 0x05, 0x02, 0x00, 0x00 }, // Chime 100 + /*03*/ { 0x05, 0x03, 0x00, 0x00 }, // Chime 1000 + /*04*/ { 0x05, 0x04, 0x00, 0x00 }, // Chime 10000 + /*05*/ { 0x04, 0x06, 0x00, 0x00 }, // Knocker + /*06*/ { 0x01, 0x09, 0x00, 0x7f }, // Outhole + /*07*/ { 0x02, 0x00, 0x00, 0x00 }, // Pop Bumper Left Bottom + /*08*/ { 0x02, 0x00, 0x00, 0x00 }, // Pop Bumper Left Top + /*09*/ { 0x02, 0x00, 0x00, 0x00 }, // Pop Bumper Right Top + /*10*/ { 0x02, 0x00, 0x00, 0x00 }, // Pop Bumper Right Bottom + /*11*/ { 0x02, 0x07, 0x00, 0x00 }, // Slingshot Left + /*12*/ { 0x00, 0x0b, 0x02, 0x0f }, // Drop Target Reset Left + /*13*/ { 0x02, 0x07, 0x00, 0x00 }, // Slingshot Right + /*14*/ { 0x03, 0x0b, 0x02, 0xf0 }, // Drop Target Reset Right + /*15*/ { 0xff, 0xff, 0x00, 0x00 }, // None - all momentary solenoids off + // { Sound Channel, Sound engage, Sound release, Not Used } + /*16*/ { 0xff, 0xff, 0xff, 0x00 }, + /*17*/ { 0x00, 0x0c, 0x0d, 0x00 }, // Coin Lockout coil + /*18*/ { 0x00, 0x0e, 0x0f, 0x00 }, // Flipper Enable relay + /*19*/ { 0xff, 0xff, 0xff, 0x00 } + }; + + for (int i=0; i<20; i++) + { + for (int j=0; j<4; j++) + m_solenoid_features[i][j] = solenoid_features_matahari[i][j]; + } +} + + +DRIVER_INIT_MEMBER( by17_state, pwerplay ) +{ + static const UINT8 solenoid_features_pwerplay[20][4] = + { + // { Sound Channel, Sound Sample, Switch Strobe, Switch Return Mask } + /*00*/ { 0x00, 0x10, 0x00, 0x00 }, // Post Down + /*01*/ { 0x05, 0x01, 0x00, 0x00 }, // Chime 10 + /*02*/ { 0x05, 0x02, 0x00, 0x00 }, // Chime 100 + /*03*/ { 0x05, 0x03, 0x00, 0x00 }, // Chime 1000 + /*04*/ { 0x05, 0x04, 0x00, 0x00 }, // Chime 10000 + /*05*/ { 0x04, 0x06, 0x00, 0x00 }, // Knocker + /*06*/ { 0x01, 0x09, 0x00, 0x7f }, // Outhole + /*07*/ { 0x02, 0x05, 0x03, 0x7f }, // Saucer + /*08*/ { 0x02, 0x00, 0x00, 0x00 }, // Pop Bumper Left + /*09*/ { 0x02, 0x00, 0x00, 0x00 }, // Pop Bumper Right + /*10*/ { 0x02, 0x00, 0x00, 0x00 }, // Pop Bumper Bottom + /*11*/ { 0x02, 0x07, 0x00, 0x00 }, // Slingshot Left + /*12*/ { 0x00, 0x0b, 0x02, 0x0f }, // Drop Target Reset Left + /*13*/ { 0x02, 0x07, 0x00, 0x00 }, // Slingshot Right + /*14*/ { 0x03, 0x0b, 0x02, 0xf0 }, // Drop Target Reset Right + /*15*/ { 0xff, 0xff, 0x00, 0x00 }, // None - all momentary solenoids off + // { Sound Channel, Sound engage, Sound release, Not Used } + /*16*/ { 0x00, 0x11, 0x0f, 0x00 }, // Post Up + /*17*/ { 0x00, 0x0c, 0x0d, 0x00 }, // Coin Lockout coil + /*18*/ { 0x00, 0x0e, 0x0f, 0x00 }, // Flipper Enable relay + /*19*/ { 0xff, 0xff, 0xff, 0x00 } + }; + + + for (int i=0; i<20; i++) + { + for (int j=0; j<4; j++) + m_solenoid_features[i][j] = solenoid_features_pwerplay[i][j]; + } } + + +MACHINE_RESET_MEMBER( by17_state, by17 ) +{ + render_target *target = machine().render().first_target(); + + target->set_view(0); + + m_u10a = 0; + m_u10b = 0; + m_u11a = 0; + m_u11b = 0; + m_lamp_decode = 0x0f; + m_io_hold_x[0] = 0x80; // Put ball in Outhole on startup + m_io_hold_x[1] = m_io_hold_x[2] = m_io_hold_x[3] = m_io_hold_x[4] = 0; +} + + + static MACHINE_CONFIG_START( by17, by17_state ) /* basic machine hardware */ - MCFG_CPU_ADD("maincpu", M6800, 1000000) // no xtal, just 2 chips forming a random oscillator + MCFG_CPU_ADD("maincpu", M6800, 530000) // No xtal, just 2 chips forming a multivibrator oscillator around 530KHz MCFG_CPU_PROGRAM_MAP(by17_map) - MCFG_NVRAM_ADD_0FILL("nvram") + MCFG_MACHINE_RESET_OVERRIDE( by17_state, by17 ) + + MCFG_NVRAM_ADD_0FILL("nvram") // 'F' filled causes Credit Display to be blank on first startup /* Video */ MCFG_DEFAULT_LAYOUT(layout_by17) @@ -527,23 +999,32 @@ static MACHINE_CONFIG_START( by17, by17_state ) MCFG_PIA_WRITEPA_HANDLER(WRITE8(by17_state, u10_a_w)) MCFG_PIA_READPB_HANDLER(READ8(by17_state, u10_b_r)) MCFG_PIA_WRITEPB_HANDLER(WRITE8(by17_state, u10_b_w)) + MCFG_PIA_READCA1_HANDLER(READLINE(by17_state, u10_ca1_r)) + MCFG_PIA_READCB1_HANDLER(READLINE(by17_state, u10_cb1_r)) MCFG_PIA_CA2_HANDLER(WRITELINE(by17_state, u10_ca2_w)) MCFG_PIA_CB2_HANDLER(WRITELINE(by17_state, u10_cb2_w)) MCFG_PIA_IRQA_HANDLER(DEVWRITELINE("maincpu", m6800_cpu_device, irq_line)) MCFG_PIA_IRQB_HANDLER(DEVWRITELINE("maincpu", m6800_cpu_device, irq_line)) - MCFG_TIMER_DRIVER_ADD_PERIODIC("timer_x", by17_state, timer_x, attotime::from_hz(120)) // mains freq*2 + MCFG_TIMER_DRIVER_ADD_PERIODIC("timer_z_freq", by17_state, timer_z_freq, attotime::from_hz(100)) // Mains Line Frequency * 2 + MCFG_TIMER_DRIVER_ADD("timer_z_pulse", by17_state, timer_z_pulse) // Active pulse length from Zero Crossing detector MCFG_DEVICE_ADD("pia_u11", PIA6821, 0) MCFG_PIA_READPA_HANDLER(READ8(by17_state, u11_a_r)) MCFG_PIA_WRITEPA_HANDLER(WRITE8(by17_state, u11_a_w)) MCFG_PIA_WRITEPB_HANDLER(WRITE8(by17_state, u11_b_w)) + MCFG_PIA_READCA1_HANDLER(READLINE(by17_state, u11_ca1_r)) + MCFG_PIA_READCB1_HANDLER(READLINE(by17_state, u11_cb1_r)) MCFG_PIA_CA2_HANDLER(WRITELINE(by17_state, u11_ca2_w)) MCFG_PIA_CB2_HANDLER(WRITELINE(by17_state, u11_cb2_w)) MCFG_PIA_IRQA_HANDLER(DEVWRITELINE("maincpu", m6800_cpu_device, irq_line)) MCFG_PIA_IRQB_HANDLER(DEVWRITELINE("maincpu", m6800_cpu_device, irq_line)) - MCFG_TIMER_DRIVER_ADD_PERIODIC("timer_d", by17_state, u11_timer, attotime::from_hz(634)) // 555 timer*2 + MCFG_TIMER_DRIVER_ADD_PERIODIC("timer_d_freq", by17_state, u11_timer, attotime::from_hz(317)) // 555 timer + MCFG_TIMER_DRIVER_ADD("timer_d_pulse", by17_state, timer_d_pulse) // 555 Active pulse length MACHINE_CONFIG_END + + + /*------------------------------------------------------------------ / Bow and Arrow #1033 (prototype only, slightly different hardware) / not sure yet if it belongs in this driver @@ -642,13 +1123,13 @@ ROM_END /---------------------------------------------------------------*/ -GAME( 1976, bowarrow, 0, by17, by17, driver_device, 0, ROT0, "Bally", "Bow & Arrow (Prototype)", MACHINE_IS_SKELETON_MECHANICAL) -GAME( 1977, freedom, 0, by17, by17, driver_device, 0, ROT0, "Bally", "Freedom", MACHINE_MECHANICAL) -GAME( 1977, nightrdr, 0, by17, by17, driver_device, 0, ROT0, "Bally", "Night Rider (rev. 21)", MACHINE_MECHANICAL) -GAME( 1977, nightr20, nightrdr, by17, by17, driver_device, 0, ROT0, "Bally", "Night Rider (rev. 20)", MACHINE_MECHANICAL) -GAME( 1978, blackjck, 0, by17, by17, driver_device, 0, ROT0, "Bally", "Black Jack (Pinball)", MACHINE_MECHANICAL) -GAME( 1977, evelknie, 0, by17, by17, driver_device, 0, ROT0, "Bally", "Evel Knievel", MACHINE_MECHANICAL) -GAME( 1978, matahari, 0, by17, by17, driver_device, 0, ROT0, "Bally", "Mata Hari", MACHINE_MECHANICAL) -GAME( 1977, eightbll, 0, by17, by17, driver_device, 0, ROT0, "Bally", "Eight Ball", MACHINE_MECHANICAL) -GAME( 1978, pwerplay, 0, by17, by17, driver_device, 0, ROT0, "Bally", "Power Play (Pinball)", MACHINE_MECHANICAL) -GAME( 1978, stk_sprs, 0, by17, by17, driver_device, 0, ROT0, "Bally", "Strikes and Spares", MACHINE_MECHANICAL) +GAME( 1976, bowarrow, 0, by17, by17, by17_state, by17, ROT0, "Bally", "Bow & Arrow (Prototype)", MACHINE_IS_SKELETON_MECHANICAL) +GAME( 1977, freedom, 0, by17, by17, by17_state, by17, ROT0, "Bally", "Freedom", MACHINE_IS_SKELETON_MECHANICAL) +GAME( 1977, nightrdr, 0, by17, by17, by17_state, by17, ROT0, "Bally", "Night Rider (rev. 21)", MACHINE_IS_SKELETON_MECHANICAL) +GAME( 1977, nightr20, nightrdr, by17, by17, by17_state, by17, ROT0, "Bally", "Night Rider (rev. 20)", MACHINE_IS_SKELETON_MECHANICAL) +GAME( 1978, blackjck, 0, by17, by17, by17_state, by17, ROT0, "Bally", "Black Jack (Pinball)", MACHINE_IS_SKELETON_MECHANICAL) +GAME( 1977, evelknie, 0, by17, by17, by17_state, by17, ROT0, "Bally", "Evel Knievel", MACHINE_IS_SKELETON_MECHANICAL) +GAMEL( 1978, matahari, 0, by17, matahari, by17_state, matahari, ROT0, "Bally", "Mata Hari", MACHINE_MECHANICAL, layout_by17_matahari) +GAME( 1977, eightbll, 0, by17, by17, by17_state, by17, ROT0, "Bally", "Eight Ball", MACHINE_IS_SKELETON_MECHANICAL) +GAMEL( 1978, pwerplay, 0, by17, pwerplay, by17_state, pwerplay, ROT0, "Bally", "Power Play (Pinball)", MACHINE_MECHANICAL, layout_by17_pwerplay) +GAME( 1978, stk_sprs, 0, by17, by17, by17_state, by17, ROT0, "Bally", "Strikes and Spares", MACHINE_IS_SKELETON_MECHANICAL) diff --git a/src/mame/drivers/by35.c b/src/mame/drivers/by35.c index 5d46049225b..60a2a3c640f 100644 --- a/src/mame/drivers/by35.c +++ b/src/mame/drivers/by35.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Robbbert +// copyright-holders:Robbbert, Quench /******************************************************************************************** PINBALL @@ -50,11 +50,17 @@ Cheap Squeak 1390,1391,0A17,0A40,0A44,0B42 (unknown) 1370 (Centaur II - Manual has the correct cover but insides are for Centaur #1239) +- The Nuova Bell Games from Dark Shadow onwards use inhouse designed circuit boards. The MPU board contains enhancements for full + CPU address space, larger ROMs, 6802 CPU, Toshiba TC5517 CMOS RAM (2kb) for battery backup that can be jumpered in nibble or byte mode, etc. + ToDo: -- The Nuova Bell games don't boot +- The Nuova Bell games don't boot. - The Bell games have major problems - Sound - Dips, Inputs, Solenoids vary per game +- Bally: Add Strobe 5 (ST5) for extra inputs on later games +- Bally: Add support for Solenoid Expanders on later games +- Bally: Add support for Aux Lamp Expander on later games - Mechanical *********************************************************************************************/ @@ -64,6 +70,8 @@ ToDo: #include "cpu/m6800/m6800.h" #include "machine/6821pia.h" #include "by35.lh" +#include "by35_playboy.lh" +#include "sound/discrete.h" class by35_state : public genpin_class @@ -72,6 +80,7 @@ public: by35_state(const machine_config &mconfig, device_type type, const char *tag) : genpin_class(mconfig, type, tag) , m_maincpu(*this, "maincpu") + , m_nvram(*this, "nvram") , m_pia_u10(*this, "pia_u10") , m_pia_u11(*this, "pia_u11") , m_io_test(*this, "TEST") @@ -84,10 +93,13 @@ public: , m_io_x2(*this, "X2") , m_io_x3(*this, "X3") , m_io_x4(*this, "X4") + , m_discrete(*this, "discrete") + , m_timer_s_freq(*this, "timer_s_freq") { } DECLARE_DRIVER_INIT(by35_6); DECLARE_DRIVER_INIT(by35_7); + DECLARE_DRIVER_INIT(playboy); DECLARE_READ8_MEMBER(u10_a_r); DECLARE_WRITE8_MEMBER(u10_a_w); DECLARE_READ8_MEMBER(u10_b_r); @@ -95,30 +107,54 @@ public: DECLARE_READ8_MEMBER(u11_a_r); DECLARE_WRITE8_MEMBER(u11_a_w); DECLARE_WRITE8_MEMBER(u11_b_w); + DECLARE_WRITE8_MEMBER(u11_b_as2888_w); + DECLARE_READ8_MEMBER(nibble_nvram_r); + DECLARE_WRITE8_MEMBER(nibble_nvram_w); + DECLARE_READ_LINE_MEMBER(u10_ca1_r); + DECLARE_READ_LINE_MEMBER(u10_cb1_r); DECLARE_WRITE_LINE_MEMBER(u10_ca2_w); DECLARE_WRITE_LINE_MEMBER(u10_cb2_w); + DECLARE_READ_LINE_MEMBER(u11_ca1_r); + DECLARE_READ_LINE_MEMBER(u11_cb1_r); DECLARE_WRITE_LINE_MEMBER(u11_ca2_w); DECLARE_WRITE_LINE_MEMBER(u11_cb2_w); - DECLARE_INPUT_CHANGED_MEMBER(activity_test); + DECLARE_WRITE_LINE_MEMBER(u11_cb2_as2888_w); + DECLARE_INPUT_CHANGED_MEMBER(activity_button); DECLARE_INPUT_CHANGED_MEMBER(self_test); - TIMER_DEVICE_CALLBACK_MEMBER(timer_x); + DECLARE_CUSTOM_INPUT_MEMBER(outhole_x0); + DECLARE_CUSTOM_INPUT_MEMBER(drop_target_x0); + DECLARE_CUSTOM_INPUT_MEMBER(kickback_x3); + DECLARE_MACHINE_START(as2888); + DECLARE_MACHINE_RESET(by35); + TIMER_DEVICE_CALLBACK_MEMBER(timer_z_freq); + TIMER_DEVICE_CALLBACK_MEMBER(timer_z_pulse); TIMER_DEVICE_CALLBACK_MEMBER(u11_timer); + TIMER_DEVICE_CALLBACK_MEMBER(timer_d_pulse); + TIMER_DEVICE_CALLBACK_MEMBER(timer_s); + TIMER_DEVICE_CALLBACK_MEMBER(timer_as2888); private: UINT8 m_u10a; UINT8 m_u10b; UINT8 m_u11a; UINT8 m_u11b; bool m_u10_ca2; + bool m_u10_cb1; bool m_u10_cb2; + bool m_u11_ca1; bool m_u11_cb2; - bool m_timer_x; - bool m_u11_timer; + bool m_timer_as2888; bool m_7d; UINT8 m_digit; - UINT8 m_counter; - UINT8 m_segment[5]; - virtual void machine_reset(); + UINT8 m_segment[6]; + UINT8 m_lamp_decode; + UINT8 m_solenoid_features[20][4]; + UINT8 m_io_hold_x[6]; + UINT8 m_snd_sel; + UINT8 m_snd_tone_gen; + UINT8 m_snd_div; + UINT8 *m_snd_prom; required_device<m6800_cpu_device> m_maincpu; + required_shared_ptr<UINT8> m_nvram; required_device<pia6821_device> m_pia_u10; required_device<pia6821_device> m_pia_u11; required_ioport m_io_test; @@ -131,26 +167,38 @@ private: required_ioport m_io_x2; required_ioport m_io_x3; required_ioport m_io_x4; + optional_device<discrete_device> m_discrete; + optional_device<timer_device> m_timer_s_freq; }; static ADDRESS_MAP_START( by35_map, AS_PROGRAM, 8, by35_state ) - //ADDRESS_MAP_GLOBAL_MASK(0x7fff) - AM_RANGE(0x0000, 0x007f) AM_RAM // internal to the cpu + ADDRESS_MAP_GLOBAL_MASK(0x7fff) // A15 is not connected + AM_RANGE(0x0000, 0x007f) AM_RAM + AM_RANGE(0x0088, 0x008b) AM_DEVREADWRITE("pia_u10", pia6821_device, read, write) + AM_RANGE(0x0090, 0x0093) AM_DEVREADWRITE("pia_u11", pia6821_device, read, write) + AM_RANGE(0x0200, 0x02ff) AM_RAM AM_READWRITE(nibble_nvram_r, nibble_nvram_w) AM_SHARE("nvram") + AM_RANGE(0x1000, 0x7fff) AM_ROM // AM_REGION("roms", 0 ) +ADDRESS_MAP_END + +static ADDRESS_MAP_START( nuovo_map, AS_PROGRAM, 8, by35_state ) +// AM_RANGE(0x0000, 0x007f) AM_RAM // Schematics infer that the M6802 internal RAM is disabled. AM_RANGE(0x0088, 0x008b) AM_DEVREADWRITE("pia_u10", pia6821_device, read, write) AM_RANGE(0x0090, 0x0093) AM_DEVREADWRITE("pia_u11", pia6821_device, read, write) - AM_RANGE(0x0200, 0x02ff) AM_RAM AM_SHARE("nvram") - AM_RANGE(0x1000, 0xffff) AM_ROM //AM_REGION("roms", 0 ) + AM_RANGE(0x0000, 0x07ff) AM_RAM AM_SHARE("nvram") + AM_RANGE(0x1000, 0xffff) AM_ROM ADDRESS_MAP_END + + static INPUT_PORTS_START( by35 ) PORT_START("TEST") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Self Test") PORT_IMPULSE(1) PORT_CHANGED_MEMBER(DEVICE_SELF, by35_state, self_test, 0) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_NAME("Activity") PORT_IMPULSE(1) PORT_CHANGED_MEMBER(DEVICE_SELF, by35_state, activity_test, 0) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Self Test") PORT_CHANGED_MEMBER(DEVICE_SELF, by35_state, self_test, 0) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_NAME("Activity") PORT_CHANGED_MEMBER(DEVICE_SELF, by35_state, activity_button, 0) PORT_START("DSW0") - PORT_DIPNAME( 0x1f, 0x02, "Coin Slot 1") - PORT_DIPSETTING( 0x00, DEF_STR( 2C_3C )) // same as 01 + PORT_DIPNAME( 0x1f, 0x02, "Coin Slot 1") PORT_DIPLOCATION("SW0:!1,!2,!3,!4,!5") // same as 03 + PORT_DIPSETTING( 0x00, DEF_STR( 2C_3C )) PORT_DIPSETTING( 0x02, DEF_STR( 1C_1C )) PORT_DIPSETTING( 0x03, DEF_STR( 2C_1C )) PORT_DIPSETTING( 0x04, DEF_STR( 1C_2C )) @@ -168,31 +216,31 @@ static INPUT_PORTS_START( by35 ) PORT_DIPSETTING( 0x10, DEF_STR( 1C_8C )) PORT_DIPSETTING( 0x11, DEF_STR( 2C_8C )) PORT_DIPSETTING( 0x12, DEF_STR( 1C_9C )) - PORT_DIPSETTING( 0x13, "2 coins 9 credits") - PORT_DIPSETTING( 0x14, "1 coin 10 credits") - PORT_DIPSETTING( 0x15, "2 coins 10 credits") - PORT_DIPSETTING( 0x16, "1 coin 11 credits") - PORT_DIPSETTING( 0x17, "2 coins 11 credits") - PORT_DIPSETTING( 0x18, "1 coin 12 credits") - PORT_DIPSETTING( 0x19, "2 coins 12 credits") - PORT_DIPSETTING( 0x1a, "1 coin 13 credits") - PORT_DIPSETTING( 0x1b, "2 coins 13 credits") - PORT_DIPSETTING( 0x1c, "1 coin 14 credits") - PORT_DIPSETTING( 0x1d, "2 coins 14 credits") - PORT_DIPSETTING( 0x1e, "1 coin 15 credits") - PORT_DIPSETTING( 0x1f, "2 coins 15 credits") - PORT_DIPNAME( 0x60, 0x40, "Award for beating high score") + PORT_DIPSETTING( 0x13, "2 Coins/9 Credits") + PORT_DIPSETTING( 0x14, "1 Coin/10 Credits") + PORT_DIPSETTING( 0x15, "2 Coins/10 Credits") + PORT_DIPSETTING( 0x16, "1 Coin/11 Credits") + PORT_DIPSETTING( 0x17, "2 Coins/11 Credits") + PORT_DIPSETTING( 0x18, "1 Coin/12 Credits") + PORT_DIPSETTING( 0x19, "2 Coins/12 Credits") + PORT_DIPSETTING( 0x1a, "1 Coin/13 Credits") + PORT_DIPSETTING( 0x1b, "2 Coins/13 Credits") + PORT_DIPSETTING( 0x1c, "1 Coin/14 Credits") + PORT_DIPSETTING( 0x1d, "2 Coins/14 Credits") + PORT_DIPSETTING( 0x1e, "1 Coin/15 Credits") + PORT_DIPSETTING( 0x1f, "2 Coins/15 Credits") + PORT_DIPNAME( 0x60, 0x40, "Award for Beating Highest Score") PORT_DIPLOCATION("SW0:!6,!7") PORT_DIPSETTING( 0x00, "Nothing") - PORT_DIPSETTING( 0x20, "1 free game") - PORT_DIPSETTING( 0x40, "2 free games") - PORT_DIPSETTING( 0x60, "3 free games") - PORT_DIPNAME( 0x80, 0x00, "Melody option 1") + PORT_DIPSETTING( 0x20, "1 Credit") + PORT_DIPSETTING( 0x40, "2 Credits") + PORT_DIPSETTING( 0x60, "3 Credits") + PORT_DIPNAME( 0x80, 0x80, "Melody Option 1") PORT_DIPLOCATION("SW0:!8") PORT_DIPSETTING( 0x00, DEF_STR( Off )) PORT_DIPSETTING( 0x80, DEF_STR( On )) PORT_START("DSW1") - PORT_DIPNAME( 0x1f, 0x02, "Coin Slot 3") - PORT_DIPSETTING( 0x00, DEF_STR( 2C_3C )) // same as 01 + PORT_DIPNAME( 0x1f, 0x02, "Coin Slot 3") PORT_DIPLOCATION("SW1:!1,!2,!3,!4,!5") // same as 01 + PORT_DIPSETTING( 0x00, DEF_STR( 2C_3C )) PORT_DIPSETTING( 0x02, DEF_STR( 1C_1C )) PORT_DIPSETTING( 0x03, DEF_STR( 2C_1C )) PORT_DIPSETTING( 0x04, DEF_STR( 1C_2C )) @@ -210,29 +258,29 @@ static INPUT_PORTS_START( by35 ) PORT_DIPSETTING( 0x10, DEF_STR( 1C_8C )) PORT_DIPSETTING( 0x11, DEF_STR( 2C_8C )) PORT_DIPSETTING( 0x12, DEF_STR( 1C_9C )) - PORT_DIPSETTING( 0x13, "2 coins 9 credits") - PORT_DIPSETTING( 0x14, "1 coin 10 credits") - PORT_DIPSETTING( 0x15, "2 coins 10 credits") - PORT_DIPSETTING( 0x16, "1 coin 11 credits") - PORT_DIPSETTING( 0x17, "2 coins 11 credits") - PORT_DIPSETTING( 0x18, "1 coin 12 credits") - PORT_DIPSETTING( 0x19, "2 coins 12 credits") - PORT_DIPSETTING( 0x1a, "1 coin 13 credits") - PORT_DIPSETTING( 0x1b, "2 coins 13 credits") - PORT_DIPSETTING( 0x1c, "1 coin 14 credits") - PORT_DIPSETTING( 0x1d, "2 coins 14 credits") - PORT_DIPSETTING( 0x1e, "1 coin 15 credits") - PORT_DIPSETTING( 0x1f, "2 coins 15 credits") - PORT_DIPNAME( 0x60, 0x60, "Award") + PORT_DIPSETTING( 0x13, "2 Coins/9 Credits") + PORT_DIPSETTING( 0x14, "1 Coin/10 Credits") + PORT_DIPSETTING( 0x15, "2 Coins/10 Credits") + PORT_DIPSETTING( 0x16, "1 Coin/11 Credits") + PORT_DIPSETTING( 0x17, "2 Coins/11 Credits") + PORT_DIPSETTING( 0x18, "1 Coin/12 Credits") + PORT_DIPSETTING( 0x19, "2 Coins/12 Credits") + PORT_DIPSETTING( 0x1a, "1 Coin/13 Credits") + PORT_DIPSETTING( 0x1b, "2 Coins/13 Credits") + PORT_DIPSETTING( 0x1c, "1 Coin/14 Credits") + PORT_DIPSETTING( 0x1d, "2 Coins/14 Credits") + PORT_DIPSETTING( 0x1e, "1 Coin/15 Credits") + PORT_DIPSETTING( 0x1f, "2 Coins/15 Credits") + PORT_DIPNAME( 0x60, 0x60, "Score Level Award") PORT_DIPLOCATION("SW1:!6,!7") PORT_DIPSETTING( 0x00, "Nothing") PORT_DIPSETTING( 0x40, "Extra Ball") - PORT_DIPSETTING( 0x60, "Free Game") - PORT_DIPNAME( 0x80, 0x00, "Balls") + PORT_DIPSETTING( 0x60, "Replay") + PORT_DIPNAME( 0x80, 0x80, "Balls Per Game") PORT_DIPLOCATION("SW1:!8") PORT_DIPSETTING( 0x00, "3") PORT_DIPSETTING( 0x80, "5") PORT_START("DSW2") - PORT_DIPNAME( 0x07, 0x02, "Maximum Credits") + PORT_DIPNAME( 0x07, 0x01, "Maximum Credits") PORT_DIPLOCATION("SW2:!1,!2,!3") PORT_DIPSETTING( 0x00, "5") PORT_DIPSETTING( 0x01, "10") PORT_DIPSETTING( 0x02, "15") @@ -241,25 +289,25 @@ static INPUT_PORTS_START( by35 ) PORT_DIPSETTING( 0x05, "30") PORT_DIPSETTING( 0x06, "35") PORT_DIPSETTING( 0x07, "40") - PORT_DIPNAME( 0x08, 0x08, "Credits displayed") + PORT_DIPNAME( 0x08, 0x08, "Credits Displayed") PORT_DIPLOCATION("SW2:!4") PORT_DIPSETTING( 0x00, DEF_STR( Off )) PORT_DIPSETTING( 0x08, DEF_STR( On )) - PORT_DIPNAME( 0x10, 0x10, "Match") + PORT_DIPNAME( 0x10, 0x10, "Match Feature") PORT_DIPLOCATION("SW2:!5") PORT_DIPSETTING( 0x00, DEF_STR( Off )) PORT_DIPSETTING( 0x10, DEF_STR( On )) - PORT_DIPNAME( 0x20, 0x00, "S22 (game specific)") + PORT_DIPNAME( 0x20, 0x00, "S22 (game specific)") PORT_DIPLOCATION("SW2:!6") PORT_DIPSETTING( 0x00, DEF_STR( Off )) PORT_DIPSETTING( 0x20, DEF_STR( On )) - PORT_DIPNAME( 0x40, 0x00, "S23 (game specific)") + PORT_DIPNAME( 0x40, 0x00, "S23 (game specific)") PORT_DIPLOCATION("SW2:!7") PORT_DIPSETTING( 0x00, DEF_STR( Off )) PORT_DIPSETTING( 0x40, DEF_STR( On )) - PORT_DIPNAME( 0x80, 0x00, "S24 (game specific)") + PORT_DIPNAME( 0x80, 0x00, "S24 (game specific)") PORT_DIPLOCATION("SW2:!8") PORT_DIPSETTING( 0x00, DEF_STR( Off )) PORT_DIPSETTING( 0x80, DEF_STR( On )) PORT_START("DSW3") - PORT_DIPNAME( 0x0f, 0x00, "Coin Slot 2") - PORT_DIPSETTING( 0x00, "Same as slot 1") + PORT_DIPNAME( 0x0f, 0x00, "Coin Slot 2") PORT_DIPLOCATION("SW3:!1,!2,!3,!4") + PORT_DIPSETTING( 0x00, "Same as Slot 1") PORT_DIPSETTING( 0x01, DEF_STR( 1C_1C )) PORT_DIPSETTING( 0x02, DEF_STR( 1C_2C )) PORT_DIPSETTING( 0x03, DEF_STR( 1C_3C )) @@ -269,80 +317,185 @@ static INPUT_PORTS_START( by35 ) PORT_DIPSETTING( 0x07, DEF_STR( 1C_7C )) PORT_DIPSETTING( 0x08, DEF_STR( 1C_8C )) PORT_DIPSETTING( 0x09, DEF_STR( 1C_9C )) - PORT_DIPSETTING( 0x0a, "1 coin 10 credits") - PORT_DIPSETTING( 0x0b, "1 coin 11 credits") - PORT_DIPSETTING( 0x0c, "1 coin 12 credits") - PORT_DIPSETTING( 0x0d, "1 coin 13 credits") - PORT_DIPSETTING( 0x0e, "1 coin 14 credits") - PORT_DIPSETTING( 0x0f, "1 coin 15 credits") - PORT_DIPNAME( 0x10, 0x00, "S29") + PORT_DIPSETTING( 0x0a, "1 Coin/10 Credits") + PORT_DIPSETTING( 0x0b, "1 Coin/11 Credits") + PORT_DIPSETTING( 0x0c, "1 Coin/12 Credits") + PORT_DIPSETTING( 0x0d, "1 Coin/13 Credits") + PORT_DIPSETTING( 0x0e, "1 Coin/14 Credits") + PORT_DIPSETTING( 0x0f, "1 Coin/15 Credits") + PORT_DIPNAME( 0x10, 0x00, "S29 (game specific)") PORT_DIPLOCATION("SW3:!5") PORT_DIPSETTING( 0x00, DEF_STR( Off )) PORT_DIPSETTING( 0x10, DEF_STR( On )) - PORT_DIPNAME( 0x20, 0x00, "S30") + PORT_DIPNAME( 0x20, 0x00, "S30 (game specific)") PORT_DIPLOCATION("SW3:!6") PORT_DIPSETTING( 0x00, DEF_STR( Off )) PORT_DIPSETTING( 0x20, DEF_STR( On )) - PORT_DIPNAME( 0x40, 0x00, "S31 (game specific)") + PORT_DIPNAME( 0x40, 0x00, "S31 (game specific)") PORT_DIPLOCATION("SW3:!7") PORT_DIPSETTING( 0x00, DEF_STR( Off )) PORT_DIPSETTING( 0x40, DEF_STR( On )) - PORT_DIPNAME( 0x80, 0x00, "Melody option 2") + PORT_DIPNAME( 0x80, 0x80, "Melody Option 2") PORT_DIPLOCATION("SW3:!8") PORT_DIPSETTING( 0x00, DEF_STR( Off )) PORT_DIPSETTING( 0x80, DEF_STR( On )) PORT_START("X0") - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_SLASH) - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_COLON) - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_QUOTE) - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_BACKSLASH) - PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_BACKSPACE) + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_STOP) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_SLASH) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_OPENBRACE) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_CLOSEBRACE) + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_BACKSLASH) PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_START1 ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_TILT ) - PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Outhole") PORT_CODE(KEYCODE_X) +// PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Outhole") PORT_CODE(KEYCODE_BACKSPACE) + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by35_state, outhole_x0, (void *)0x07) // PORT_CODE(KEYCODE_BACKSPACE) PORT_START("X1") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN3 ) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN2 ) - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_L) - PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_OPENBRACE) - PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_CLOSEBRACE) - PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_ENTER) - PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_TILT1 ) PORT_NAME("Slam Tilt") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_ENTER) + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_QUOTE) + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_COLON) + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_L) + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_TILT2 ) PORT_NAME("Slam Tilt") PORT_CODE(KEYCODE_EQUALS) PORT_START("X2") - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_A) - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_S) - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_D) - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_F) - PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_G) - PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_H) - PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_J) - PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_K) + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_K) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_J) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_H) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_G) + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_F) + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_D) + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_S) + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_A) PORT_START("X3") - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_Q) - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_W) - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_E) - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_R) - PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_Y) - PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_U) - PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_I) - PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_O) + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_O) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_I) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_U) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_Y) + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_R) + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_E) + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_W) + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_Q) PORT_START("X4") - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_Z) - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_C) - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_V) + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_COMMA) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_M) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_N) PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_B) - PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_N) - PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_M) - PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_COMMA) - PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_STOP) + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_V) + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_C) + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_X) + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_Z) INPUT_PORTS_END -INPUT_CHANGED_MEMBER( by35_state::activity_test ) +static INPUT_PORTS_START( playboy ) + PORT_INCLUDE( by35 ) + + PORT_MODIFY("DSW2") + PORT_DIPNAME( 0x20, 0x00, "Drop Target Special") PORT_DIPLOCATION("SW2:!6") + PORT_DIPSETTING( 0x00, "Lit Until Next Ball") + PORT_DIPSETTING( 0x20, "Lit Until Collected") + PORT_DIPNAME( 0x40, 0x00, "Playmate Keys") PORT_DIPLOCATION("SW2:!7") + PORT_DIPSETTING( 0x00, "Reset At Next Ball") + PORT_DIPSETTING( 0x40, "Remembered Next Ball") + PORT_DIPNAME( 0x80, 0x00, "25000 Outlanes") PORT_DIPLOCATION("SW2:!8") + PORT_DIPSETTING( 0x00, "Alternate") + PORT_DIPSETTING( 0x80, "Both") + + PORT_MODIFY("DSW3") + PORT_DIPNAME( 0x10, 0x00, "2 and 3 Key Lanes") PORT_DIPLOCATION("SW3:!5") + PORT_DIPSETTING( 0x00, "Separate") + PORT_DIPSETTING( 0x10, "Tied Together") + PORT_DIPNAME( 0x20, 0x00, "1 and 4 Key Lanes") PORT_DIPLOCATION("SW3:!6") + PORT_DIPSETTING( 0x00, "Separate") + PORT_DIPSETTING( 0x20, "Tied Together") + PORT_DIPNAME( 0x40, 0x00, "Rollover Button Award") PORT_DIPLOCATION("SW3:!7") + PORT_DIPSETTING( 0x00, "Extra Ball or Special Reset At Next Ball") + PORT_DIPSETTING( 0x40, "Extra Ball or Special Held Until Collected") + + PORT_MODIFY("X0") /* Drop Target switches */ + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by35_state, drop_target_x0, (void *)0x00) // PORT_CODE(KEYCODE_STOP) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by35_state, drop_target_x0, (void *)0x01) // PORT_CODE(KEYCODE_SLASH) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by35_state, drop_target_x0, (void *)0x02) // PORT_CODE(KEYCODE_OPENBRACE) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by35_state, drop_target_x0, (void *)0x03) // PORT_CODE(KEYCODE_CLOSEBRACE) + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by35_state, drop_target_x0, (void *)0x04) // PORT_CODE(KEYCODE_BACKSLASH) + + PORT_MODIFY("X3") + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by35_state, kickback_x3, (void *)0x37) // PORT_CODE(KEYCODE_Q) + + PORT_START("RT2") + PORT_ADJUSTER( 50, "RT2 - Tone Sustain" ) +INPUT_PORTS_END + + +CUSTOM_INPUT_MEMBER( by35_state::outhole_x0 ) +{ + int bit_shift = ((FPTR)param & 0x07); + int port = (((FPTR)param >> 4) & 0x07); + + /* Here we simulate the ball sitting in the Outhole so the Outhole Solenoid can release it */ + + if (machine().input().code_pressed_once(KEYCODE_BACKSPACE)) + m_io_hold_x[port] |= (1 << bit_shift); + + return ((m_io_hold_x[port] >> bit_shift) & 1); +} + +CUSTOM_INPUT_MEMBER( by35_state::kickback_x3 ) +{ + int bit_shift = ((FPTR)param & 0x07); + int port = (((FPTR)param >> 4) & 0x07); + + /* Here we simulate the ball sitting in a Saucer so the Saucer Solenoid can release it */ + + if (machine().input().code_pressed_once(KEYCODE_Q)) + m_io_hold_x[port] |= (1 << bit_shift); + + return ((m_io_hold_x[port] >> bit_shift) & 1); +} + +CUSTOM_INPUT_MEMBER( by35_state::drop_target_x0 ) +{ + /* Here we simulate the Drop Target switch states so the Drop Target Reset Solenoid can also release the switches */ + + int bit_shift = ((FPTR)param & 0x07); + int port = (((FPTR)param >> 4) & 0x07); + + switch (bit_shift) + { + case 0: if (machine().input().code_pressed_once(KEYCODE_STOP)) + m_io_hold_x[port] |= (1 << bit_shift); + break; + case 1: if (machine().input().code_pressed_once(KEYCODE_SLASH)) + m_io_hold_x[port] |= (1 << bit_shift); + break; + case 2: if (machine().input().code_pressed_once(KEYCODE_OPENBRACE)) + m_io_hold_x[port] |= (1 << bit_shift); + break; + case 3: if (machine().input().code_pressed_once(KEYCODE_CLOSEBRACE)) + m_io_hold_x[port] |= (1 << bit_shift); + break; + case 4: if (machine().input().code_pressed_once(KEYCODE_BACKSLASH)) + m_io_hold_x[port] |= (1 << bit_shift); + break; + } + return ((m_io_hold_x[port] >> bit_shift) & 1); +} + +READ8_MEMBER(by35_state::nibble_nvram_r) { - if(newval) - m_maincpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE); + return (m_nvram[offset] | 0x0f); +} + +WRITE8_MEMBER(by35_state::nibble_nvram_w) +{ + m_nvram[offset] = (data | 0x0f); +} + +INPUT_CHANGED_MEMBER( by35_state::activity_button ) +{ + if (newval != oldval) + m_maincpu->set_input_line(INPUT_LINE_NMI, (newval ? ASSERT_LINE : CLEAR_LINE)); } INPUT_CHANGED_MEMBER( by35_state::self_test ) @@ -350,20 +503,60 @@ INPUT_CHANGED_MEMBER( by35_state::self_test ) m_pia_u10->ca1_w(newval); } +READ_LINE_MEMBER( by35_state::u10_ca1_r ) +{ + return m_io_test->read() & 0x01; +} +READ_LINE_MEMBER( by35_state::u10_cb1_r ) +{ + return m_u10_cb1; +} + WRITE_LINE_MEMBER( by35_state::u10_ca2_w ) { +#if 0 // Display Blanking - Out of sync with video redraw rate and causes flicker so it's disabled + if (state == 0) + { + int digit; + + for (digit=1; digit<=8; digit++) + { + output_set_digit_value(10+digit, 0); + output_set_digit_value(20+digit, 0); + output_set_digit_value(30+digit, 0); + output_set_digit_value(40+digit, 0); + output_set_digit_value(50+digit, 0); + } + } +#endif + m_u10_ca2 = state; - if (!state) - m_counter = 0; } WRITE_LINE_MEMBER( by35_state::u10_cb2_w ) { +// logerror("New U10 CB2 state %01x, was %01x. PIA=%02x\n", state, m_u10_cb2, m_u10a); + + if (state == TRUE) + m_lamp_decode = m_u10a & 0x0f; + + m_u10_cb2 = state; } WRITE_LINE_MEMBER( by35_state::u11_ca2_w ) { - output_set_value("led0", !state); + output_set_value("led0", state); +} + +READ_LINE_MEMBER( by35_state::u11_ca1_r ) +{ + return m_u11_ca1; +} + +READ_LINE_MEMBER( by35_state::u11_cb1_r ) +{ + /* Pin 32 on MPU J5 AID connector tied low */ + return 0; } WRITE_LINE_MEMBER( by35_state::u11_cb2_w ) @@ -371,6 +564,22 @@ WRITE_LINE_MEMBER( by35_state::u11_cb2_w ) m_u11_cb2 = state; } +WRITE_LINE_MEMBER( by35_state::u11_cb2_as2888_w ) +{ + if (state) + { + address_space &space = m_maincpu->space(AS_PROGRAM); + + timer_device *snd_sustain_timer = machine().device<timer_device>("timer_as2888"); + snd_sustain_timer->adjust(attotime::from_msec(5)); + m_timer_as2888 = true; + + m_discrete->write(space, NODE_08, 11); // 11 volt pulse + } + + m_u11_cb2 = state; +} + READ8_MEMBER( by35_state::u10_a_r ) { return m_u10a; @@ -378,27 +587,40 @@ READ8_MEMBER( by35_state::u10_a_r ) WRITE8_MEMBER( by35_state::u10_a_w ) { - m_u10a = data; +// logerror("Writing %02x to U10 PIA, CB2 state is %01x, CA2 state is %01x, Lamp_Dec is %02x\n",data, m_u10_cb2, m_u10_ca2, (m_lamp_decode & 0x0f)); if (!m_u10_ca2) { - m_counter++; - - if (m_counter==1) - m_segment[0] = data>>4; - else - if (m_counter==3) + if (BIT(data, 0)==0) // Display 1 m_segment[1] = data>>4; else - if (m_counter==5) + if (BIT(data, 1)==0) // Display 2 m_segment[2] = data>>4; else - if (m_counter==7) + if (BIT(data, 2)==0) // Display 3 m_segment[3] = data>>4; else - if (m_counter==9) + if (BIT(data, 3)==0) // Display 4 m_segment[4] = data>>4; } + + /*** Update the Lamp latched outputs ***/ + if ((data & 0x0f) == 0x0f) + { + if ((m_lamp_decode & 0x0f) < 0x0f) + { + if (output_get_indexed_value("lamp", ((m_lamp_decode & 0x0f)+00) ) ==0 ) output_set_indexed_value("lamp", ((m_lamp_decode & 0x0f)+00), ((data & 0x10) ? FALSE : TRUE)); + if (output_get_indexed_value("lamp", ((m_lamp_decode & 0x0f)+15) ) ==0 ) output_set_indexed_value("lamp", ((m_lamp_decode & 0x0f)+15), ((data & 0x20) ? FALSE : TRUE)); + if (output_get_indexed_value("lamp", ((m_lamp_decode & 0x0f)+30) ) ==0 ) output_set_indexed_value("lamp", ((m_lamp_decode & 0x0f)+30), ((data & 0x40) ? FALSE : TRUE)); + if (output_get_indexed_value("lamp", ((m_lamp_decode & 0x0f)+45) ) ==0 ) output_set_indexed_value("lamp", ((m_lamp_decode & 0x0f)+45), ((data & 0x80) ? FALSE : TRUE)); + } + else + { + // Rest output - all lamps are off + } + } + + m_u10a = data; } READ8_MEMBER( by35_state::u10_b_r ) @@ -447,139 +669,421 @@ READ8_MEMBER( by35_state::u11_a_r ) WRITE8_MEMBER( by35_state::u11_a_w ) { - m_u11a = data; + if (BIT(data, 0)==0) // Display Credit/Ball + { + m_segment[5] = m_u10a>>4; + } - if (!m_u10_ca2) + + m_digit = 0; + + if BIT(data, 7) + m_digit = 1; + else + if BIT(data, 6) + m_digit = 2; + else + if BIT(data, 5) + m_digit = 3; + else + if BIT(data, 4) + m_digit = 4; + else + if BIT(data, 3) + m_digit = 5; + else + if BIT(data, 2) + m_digit = 6; + else + if (BIT(data, 2) && BIT(data, 3)) // Aftermarket 7th digit strobe for 6 digit games + m_digit = 7; + else + if (BIT(data, 1) && m_7d) + m_digit = 7; + + if ((m_u10_ca2==0) && m_digit) { - if (m_7d & BIT(data, 1)) - m_digit = 6; - else - if BIT(data, 2) - m_digit = 5; - else - if BIT(data, 3) - m_digit = 4; - else - if BIT(data, 4) - m_digit = 3; - else - if BIT(data, 5) - m_digit = 2; - else - if BIT(data, 6) - m_digit = 1; - else - if BIT(data, 7) - m_digit = 0; + static const UINT8 patterns[16] = { 0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f,0,0,0,0,0,0 }; // MC14543 - BCD to 7 Segment Display Decoder + + output_set_digit_value(10+m_digit, patterns[m_segment[1]]); + output_set_digit_value(20+m_digit, patterns[m_segment[2]]); + output_set_digit_value(30+m_digit, patterns[m_segment[3]]); + output_set_digit_value(40+m_digit, patterns[m_segment[4]]); + output_set_digit_value(50+m_digit, patterns[m_segment[5]]); - if (BIT(data, 0) && (m_counter > 8)) - { - static const UINT8 patterns[16] = { 0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f,0,0,0,0,0,0 }; // MC14543 - output_set_digit_value(m_digit, patterns[m_segment[0]]); - output_set_digit_value(10+m_digit, patterns[m_segment[1]]); - output_set_digit_value(20+m_digit, patterns[m_segment[2]]); - output_set_digit_value(30+m_digit, patterns[m_segment[3]]); - output_set_digit_value(40+m_digit, patterns[m_segment[4]]); - } } + + m_u11a = data; } WRITE8_MEMBER( by35_state::u11_b_w ) { - m_u11b = data; if (!m_u11_cb2) { - switch (data & 15) + if ((data & 0x0f) < 0x0f) // Momentary Solenoids + { + if (m_solenoid_features[(data & 0x0f)][0] != 0xff) { // Play solenoid audio sample + if (output_get_indexed_value("solenoid", (data & 0x0f)) == FALSE) + m_samples->start(m_solenoid_features[(data & 0x0f)][0], m_solenoid_features[(data & 0x0f)][1]); + } + + output_set_indexed_value( "solenoid", (data & 0x0f), TRUE); + + if (m_solenoid_features[(data & 0x0f)][3]) // Reset/release relevant switch after firing Solenoid + m_io_hold_x[(m_solenoid_features[(data & 0x0f)][2])] &= (m_solenoid_features[(data & 0x0f)][3]); + } + else // Rest output - all momentary solenoids are off { - // these vary per game - case 0x0: // - //m_samples->start(0, 3); - break; - case 0x1: // chime 10 - //m_samples->start(1, 1); - break; - case 0x2: // chime 100 - //m_samples->start(2, 2); - break; - case 0x3: // chime 1000 - //m_samples->start(3, 3); - break; - case 0x4: // chime 10000 - //m_samples->start(0, 4); - break; - // these 2 are standard - case 0x5: // knocker - m_samples->start(0, 6); - break; - case 0x6: // outhole - m_samples->start(0, 5); - break; - // these vary per game - case 0x7: - case 0x8: - case 0x9: - //m_samples->start(0, 5); - break; - case 0xa: - //m_samples->start(0, 5); - break; - case 0xb: - //m_samples->start(0, 0); - break; - case 0xc: - //m_samples->start(0, 5); - break; - case 0xd: - //m_samples->start(0, 0); - break; - case 0xe: - //m_samples->start(0, 5); - break; - case 0xf: // not used - break; + for (int i=0; i<15; i++) + { + output_set_indexed_value( "solenoid", i, FALSE); + } } } + + + if ((m_u11b & 0x10) && ((data & 0x10)==0)) + { + output_set_value("solenoid16", TRUE); + if (m_solenoid_features[16][0] != 0xff) + m_samples->start(m_solenoid_features[16][0], m_solenoid_features[16][1]); + } + else if ((data & 0x10) && ((m_u11b & 0x10)==0)) + { + output_set_value("solenoid16", FALSE); + if (m_solenoid_features[16][0] != 0xff) + m_samples->start(m_solenoid_features[16][0], m_solenoid_features[16][2]); + } + if ((m_u11b & 0x20) && ((data & 0x20)==0)) + { + output_set_value("solenoid17", TRUE); // Coin Lockout Coil engage + if (m_solenoid_features[17][0] != 0xff) + m_samples->start(m_solenoid_features[17][0], m_solenoid_features[17][1]); + } + else if ((data & 0x20) && ((m_u11b & 0x20)==0)) + { + output_set_value("solenoid17", FALSE); // Coin Lockout Coil release + if (m_solenoid_features[17][0] != 0xff) + m_samples->start(m_solenoid_features[17][0], m_solenoid_features[17][2]); + } + if ((m_u11b & 0x40) && ((data & 0x40)==0)) + { + output_set_value("solenoid18", TRUE); // Flipper Enable Relay engage + if (m_solenoid_features[18][0] != 0xff) + m_samples->start(m_solenoid_features[18][0], m_solenoid_features[18][1]); + } + else if ((data & 0x40) && ((m_u11b & 0x40)==0)) + { + output_set_value("solenoid18", FALSE); // Flipper Enable Relay release + if (m_solenoid_features[18][0] != 0xff) + m_samples->start(m_solenoid_features[18][0], m_solenoid_features[18][2]); + } + if ((m_u11b & 0x80) && ((data & 0x80)==0)) + { + output_set_value("solenoid19", TRUE); + if (m_solenoid_features[19][0] != 0xff) + m_samples->start(m_solenoid_features[19][0], m_solenoid_features[19][1]); + } + else if ((data & 0x80) && ((m_u11b & 0x80)==0)) + { + output_set_value("solenoid19", FALSE); + if (m_solenoid_features[19][0] != 0xff) + m_samples->start(m_solenoid_features[19][0], m_solenoid_features[19][2]); + } + + m_u11b = data; } -void by35_state::machine_reset() +WRITE8_MEMBER( by35_state::u11_b_as2888_w ) { - m_u10a = 0; - m_u10b = 0; - m_u10_cb2 = 0; - m_u11a = 0; - m_u11b = 0; + u11_b_w( space, offset, data ); +} + + +// zero-cross detection +TIMER_DEVICE_CALLBACK_MEMBER( by35_state::timer_z_freq ) +{ +/* Zero Crossing Detector - this timing is based on 50Hz AC line power input converted to unregulated DC + + -+ +---+ + | | | + |<-------- 9.30ms -------->|<->|700us + | | | + +--------------------------+ +----- +*/ + + timer_device *zero_crossing_active_timer = machine().device<timer_device>("timer_z_pulse"); + + zero_crossing_active_timer->adjust(attotime::from_usec(700)); + + m_u10_cb1 = true; + m_pia_u10->cb1_w(m_u10_cb1); + + /*** Zero Crossing - power to all Lamp SCRs is cut off and reset ***/ + + for (int i=0; i<60; i++) + { + output_set_indexed_value( "lamp", i, 0 ); + } + +} +TIMER_DEVICE_CALLBACK_MEMBER( by35_state::timer_z_pulse ) +{ + /*** Line Power to DC Zero Crossing has ended ***/ + + m_u10_cb1 = false; + m_pia_u10->cb1_w(m_u10_cb1); } +// 555 timer for display refresh +TIMER_DEVICE_CALLBACK_MEMBER( by35_state::u11_timer ) +{ +/* +--------------------------+ +----- + | | | + |<-------- 2.85ms -------->|<->|300us + | | | + -+ +---+ +*/ + + timer_device *display_refresh_timer = machine().device<timer_device>("timer_d_pulse"); + + display_refresh_timer->adjust(attotime::from_msec(2.85)); + + m_u11_ca1 = true; + m_pia_u11->ca1_w(m_u11_ca1); +} + +TIMER_DEVICE_CALLBACK_MEMBER( by35_state::timer_d_pulse ) +{ + m_u11_ca1 = false; + m_pia_u11->ca1_w(m_u11_ca1); +} + +TIMER_DEVICE_CALLBACK_MEMBER( by35_state::timer_s ) +{ + m_snd_tone_gen--; + + if ((m_snd_tone_gen == 0) && (m_snd_sel != 0x01)) + { + address_space &space = m_maincpu->space(AS_PROGRAM); + + m_snd_tone_gen = m_snd_sel; + m_snd_div++; + + m_discrete->write(space, NODE_04, ((m_snd_div & 0x04)>>2) * 1); + m_discrete->write(space, NODE_01, ((m_snd_div & 0x01)>>0) * 1); + +// if (m_snd_sel == 0x01) logerror("SndSel=%02x, Tone=%02x, Div=%02x\n",m_snd_sel, m_snd_tone_gen, m_snd_div); + } +} + +TIMER_DEVICE_CALLBACK_MEMBER( by35_state::timer_as2888 ) +{ + address_space &space = m_maincpu->space(AS_PROGRAM); + + offs_t offs = (m_u11b & 0x0f); + if ((m_u11a & 0x02) == 0) offs |= 0x10; + { + m_snd_sel = m_snd_prom[offs]; +// logerror("SndSel read %02x from PROM addr %02x\n",m_snd_sel, offs ); + m_snd_sel = BITSWAP8(m_snd_sel,0,1,2,3,4,5,6,7); + + m_snd_tone_gen = m_snd_sel; +// logerror("SndSel=%02x, Tone=%02x, Div=%02x\n",m_snd_sel, m_snd_tone_gen, m_snd_div); + } + + m_discrete->write(space, NODE_08, 0); + timer.adjust(attotime::never); + m_timer_as2888 = false; + +// logerror("Sustain off\n"); +} + + + DRIVER_INIT_MEMBER( by35_state, by35_6 ) { + static const UINT8 solenoid_features_default[20][4] = + { + // This table serves two functions and is configured on a per game basis: + // Assign a particular sound sample corresponding to a solenoid function, and + // release any switches being held closed eg. drop targets, ball in saucer/outhole, etc + + // { Sound Channel, Sound Sample, Switch Strobe, Switch Return Mask } + /*00*/ { 0x00, 0x00, 0x00, 0x00 }, + /*01*/ { 0x00, 0x00, 0x00, 0x00 }, + /*02*/ { 0x00, 0x00, 0x00, 0x00 }, + /*03*/ { 0x00, 0x00, 0x00, 0x00 }, + /*04*/ { 0x00, 0x00, 0x00, 0x00 }, + /*05*/ { 0x04, 0x06, 0x00, 0x00 }, // Knocker + /*06*/ { 0x01, 0x09, 0x00, 0x7f }, // Outhole + /*07*/ { 0x00, 0x0a, 0x00, 0x00 }, + /*08*/ { 0x02, 0x00, 0x00, 0x00 }, + /*09*/ { 0x02, 0x00, 0x00, 0x00 }, + /*10*/ { 0x02, 0x00, 0x00, 0x00 }, + /*11*/ { 0x02, 0x07, 0x00, 0x00 }, + /*12*/ { 0x00, 0x0b, 0x00, 0x00 }, + /*13*/ { 0x02, 0x07, 0x00, 0x00 }, + /*14*/ { 0x00, 0x00, 0x00, 0x00 }, + /*15*/ { 0xff, 0xff, 0x00, 0x00 }, // None - all momentary solenoids off + // { Sound Channel, Sound engage, Sound release, Not Used } + /*16*/ { 0xff, 0xff, 0xff, 0x00 }, + /*17*/ { 0x00, 0x0c, 0x0d, 0x00 }, // Coin Lockout coil + /*18*/ { 0x00, 0x0e, 0x0f, 0x00 }, // Flipper enable relay + /*19*/ { 0xff, 0xff, 0xff, 0x00 } + }; + + + for (int i=0; i<20; i++) + { + for (int j=0; j<4; j++) + m_solenoid_features[i][j] = solenoid_features_default[i][j]; + } + + + m_7d = 0; +} + +DRIVER_INIT_MEMBER( by35_state, playboy ) +{ + static const UINT8 solenoid_features_playboy[20][4] = + { + // { Sound Channel, Sound Sample, Switch Strobe, Switch Return Mask } + /*00*/ { 0xff, 0xff, 0x00, 0x00 }, + /*01*/ { 0xff, 0xff, 0x00, 0x00 }, + /*02*/ { 0xff, 0xff, 0x00, 0x00 }, + /*03*/ { 0xff, 0xff, 0x00, 0x00 }, + /*04*/ { 0xff, 0xff, 0x00, 0x00 }, + /*05*/ { 0x04, 0x06, 0x00, 0x00 }, // Knocker + /*06*/ { 0x01, 0x09, 0x00, 0x7f }, // Outhole + /*07*/ { 0x02, 0x0a, 0x03, 0x7f }, // Kickback Grotto + /*08*/ { 0x02, 0x00, 0x00, 0x00 }, // Pop Bumper Left + /*09*/ { 0x02, 0x00, 0x00, 0x00 }, // Pop Bumper Right + /*10*/ { 0x02, 0x00, 0x00, 0x00 }, // Pop Bumper Bottom + /*11*/ { 0x02, 0x07, 0x00, 0x00 }, // Slingshot Left + /*12*/ { 0x03, 0x0b, 0x00, 0xe0 }, // Drop Target Reset + /*13*/ { 0x02, 0x07, 0x00, 0x00 }, // Slingshot Right + /*14*/ { 0xff, 0xff, 0x00, 0x00 }, + /*15*/ { 0xff, 0xff, 0x00, 0x00 }, // None - all momentary solenoids off + // { Sound Channel, Sound engage, Sound release, Not Used } + /*16*/ { 0xff, 0xff, 0xff, 0x00 }, + /*17*/ { 0x00, 0x0c, 0x0d, 0x00 }, // Coin Lockout coil + /*18*/ { 0x00, 0x0e, 0x0f, 0x00 }, // Flipper enable relay + /*19*/ { 0xff, 0xff, 0xff, 0x00 } + }; + + + DRIVER_INIT_CALL( by35_6 ); + + for (int i=0; i<20; i++) + { + for (int j=0; j<4; j++) + m_solenoid_features[i][j] = solenoid_features_playboy[i][j]; + } + + m_7d = 0; } + DRIVER_INIT_MEMBER( by35_state, by35_7 ) { + DRIVER_INIT_CALL(by35_6); + m_7d = 1; } -// zero-cross detection -TIMER_DEVICE_CALLBACK_MEMBER( by35_state::timer_x ) + +MACHINE_RESET_MEMBER( by35_state, by35 ) { - m_timer_x ^= 1; - m_pia_u10->cb1_w(m_timer_x); + render_target *target = machine().render().first_target(); + + target->set_view(0); + + m_u10a = 0; + m_u10b = 0; + m_u11a = 0; + m_u11b = 0; + m_lamp_decode = 0x0f; + m_io_hold_x[0] = 0x80; // Put ball in Outhole on startup + m_io_hold_x[1] = m_io_hold_x[2] = m_io_hold_x[3] = m_io_hold_x[4] = m_io_hold_x[5] = 0; } -// 555 timer for display refresh -TIMER_DEVICE_CALLBACK_MEMBER( by35_state::u11_timer ) +MACHINE_START_MEMBER( by35_state, as2888 ) { - m_u11_timer ^= 1; - m_pia_u11->ca1_w(m_u11_timer); + MACHINE_RESET_CALL_MEMBER( by35 ); + m_snd_prom = memregion("sound1")->base(); } +static const discrete_mixer_desc as2888_digital_mixer_info = +{ + DISC_MIXER_IS_RESISTOR, /* type */ + {RES_K(33), RES_K(3.9)}, /* r{} */ + {0, 0, 0, 0}, /* r_node */ + {0, 0}, /* c{} */ + 0, /* rI */ +// RES_VOLTAGE_DIVIDER(RES_K(10), RES_R(360)), /* rF */ + RES_K(10), /* rF */ // not really + CAP_U(0.01), /* cF */ + 0, /* cAmp */ + 0, /* vRef */ + 0.00002 /* gain */ +}; + +static const discrete_op_amp_filt_info as2888_preamp_info = { + RES_K(10), 0, RES_R(470), 0, /* r1 .. r4 */ + RES_K(10), /* rF */ + CAP_U(1), /* C1 */ + 0, /* C2 */ + 0, /* C3 */ + 0.0, /* vRef */ + 12.0, /* vP */ + -12.0, /* vN */ +}; + + +static DISCRETE_SOUND_START(as2888) + + DISCRETE_INPUT_DATA(NODE_08) // Start Sustain Attenuation from 555 circuit + DISCRETE_INPUT_LOGIC(NODE_01) // Binary Counter B output (divide by 1) T2 + DISCRETE_INPUT_LOGIC(NODE_04) // Binary Counter D output (divide by 4) T3 + + DISCRETE_DIVIDE(NODE_11, 1, NODE_01, 1) // 2 + DISCRETE_DIVIDE(NODE_14, 1, NODE_04, 1) + + + DISCRETE_RCFILTER(NODE_06, NODE_14, RES_K(15), CAP_U(0.1)) // T4 filter +#if 0 + DISCRETE_RCFILTER(NODE_05, NODE_11, RES_K(33), CAP_U(0.01)) // T1 filter + DISCRETE_ADDER2(NODE_07, 1, NODE_05, NODE_06) +#else + + DISCRETE_MIXER2(NODE_07, 1, NODE_11, NODE_06, &as2888_digital_mixer_info) // Mix and filter T1 and T4 together +#endif + DISCRETE_RCDISC5(NODE_87, 1, NODE_08, RES_K(150), CAP_U(1.0)) + + DISCRETE_RCFILTER_VREF(NODE_88,NODE_87,RES_M(1),CAP_U(0.01),2) + DISCRETE_MULTIPLY(NODE_09, NODE_07, NODE_88) // Apply sustain + + DISCRETE_OP_AMP_FILTER(NODE_20, 1, NODE_09, 0, DISC_OP_AMP_FILTER_IS_HIGH_PASS_1, &as2888_preamp_info) + + DISCRETE_CRFILTER(NODE_25, NODE_20, RES_M(100), CAP_U(0.05)) // Resistor is fake. Capacitor in series between pre-amp and output amp. + + DISCRETE_GAIN(NODE_30, NODE_25, 50) // Output amplifier LM380 fixed inbuilt gain of 50 + + DISCRETE_OUTPUT(NODE_30, 10000000) // 17000000 +DISCRETE_SOUND_END + + + static MACHINE_CONFIG_START( by35, by35_state ) /* basic machine hardware */ - MCFG_CPU_ADD("maincpu", M6800, 1000000) // no xtal, just 2 chips forming a random oscillator + MCFG_CPU_ADD("maincpu", M6800, 530000) // No xtal, just 2 chips forming a multivibrator oscillator around 530KHz MCFG_CPU_PROGRAM_MAP(by35_map) - MCFG_NVRAM_ADD_0FILL("nvram") + MCFG_MACHINE_RESET_OVERRIDE( by35_state, by35 ) + + MCFG_NVRAM_ADD_0FILL("nvram") // 'F' filled causes Credit Display to be blank on first startup /* Video */ MCFG_DEFAULT_LAYOUT(layout_by35) @@ -593,33 +1097,72 @@ static MACHINE_CONFIG_START( by35, by35_state ) MCFG_PIA_WRITEPA_HANDLER(WRITE8(by35_state, u10_a_w)) MCFG_PIA_READPB_HANDLER(READ8(by35_state, u10_b_r)) MCFG_PIA_WRITEPB_HANDLER(WRITE8(by35_state, u10_b_w)) + MCFG_PIA_READCA1_HANDLER(READLINE(by35_state, u10_ca1_r)) + MCFG_PIA_READCB1_HANDLER(READLINE(by35_state, u10_cb1_r)) MCFG_PIA_CA2_HANDLER(WRITELINE(by35_state, u10_ca2_w)) MCFG_PIA_CB2_HANDLER(WRITELINE(by35_state, u10_cb2_w)) MCFG_PIA_IRQA_HANDLER(DEVWRITELINE("maincpu", m6800_cpu_device, irq_line)) MCFG_PIA_IRQB_HANDLER(DEVWRITELINE("maincpu", m6800_cpu_device, irq_line)) - MCFG_TIMER_DRIVER_ADD_PERIODIC("timer_x", by35_state, timer_x, attotime::from_hz(120)) // mains freq*2 + MCFG_TIMER_DRIVER_ADD_PERIODIC("timer_z_freq", by35_state, timer_z_freq, attotime::from_hz(100)) // Mains Line Frequency * 2 + MCFG_TIMER_DRIVER_ADD("timer_z_pulse", by35_state, timer_z_pulse) // Active pulse length from Zero Crossing detector MCFG_DEVICE_ADD("pia_u11", PIA6821, 0) MCFG_PIA_READPA_HANDLER(READ8(by35_state, u11_a_r)) MCFG_PIA_WRITEPA_HANDLER(WRITE8(by35_state, u11_a_w)) MCFG_PIA_WRITEPB_HANDLER(WRITE8(by35_state, u11_b_w)) + MCFG_PIA_READCA1_HANDLER(READLINE(by35_state, u11_ca1_r)) + MCFG_PIA_READCB1_HANDLER(READLINE(by35_state, u11_cb1_r)) MCFG_PIA_CA2_HANDLER(WRITELINE(by35_state, u11_ca2_w)) MCFG_PIA_CB2_HANDLER(WRITELINE(by35_state, u11_cb2_w)) MCFG_PIA_IRQA_HANDLER(DEVWRITELINE("maincpu", m6800_cpu_device, irq_line)) MCFG_PIA_IRQB_HANDLER(DEVWRITELINE("maincpu", m6800_cpu_device, irq_line)) - MCFG_TIMER_DRIVER_ADD_PERIODIC("timer_d", by35_state, u11_timer, attotime::from_hz(634)) // 555 timer*2 + MCFG_TIMER_DRIVER_ADD_PERIODIC("timer_d_freq", by35_state, u11_timer, attotime::from_hz(317)) // 555 timer + MCFG_TIMER_DRIVER_ADD("timer_d_pulse", by35_state, timer_d_pulse) // 555 Active pulse length MACHINE_CONFIG_END +MACHINE_CONFIG_FRAGMENT( as2888_audio ) + + MCFG_MACHINE_START_OVERRIDE( by35_state, as2888 ) + + MCFG_SPEAKER_STANDARD_MONO("mono") + MCFG_SOUND_ADD("discrete", DISCRETE, 0) + MCFG_DISCRETE_INTF(as2888) + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) + + MCFG_DEVICE_MODIFY("pia_u11") + MCFG_PIA_WRITEPB_HANDLER(WRITE8(by35_state, u11_b_as2888_w)) + MCFG_PIA_CB2_HANDLER(WRITELINE(by35_state, u11_cb2_as2888_w)) + + MCFG_TIMER_DRIVER_ADD_PERIODIC("timer_s_freq", by35_state, timer_s, attotime::from_hz(353000)) // Inverter clock on AS-2888 sound board + MCFG_TIMER_DRIVER_ADD("timer_as2888", by35_state, timer_as2888) +MACHINE_CONFIG_END + + +static MACHINE_CONFIG_DERIVED( as2888, by35 ) + + MCFG_FRAGMENT_ADD( as2888_audio ) +MACHINE_CONFIG_END + + +static MACHINE_CONFIG_DERIVED( nuovo, by35 ) + + MCFG_CPU_REPLACE("maincpu", M6802, 2000000) // ? MHz ? Large crystal next to CPU, schematics don't indicate speed. + MCFG_CPU_PROGRAM_MAP(nuovo_map) + +MACHINE_CONFIG_END + + + /*-------------------------------- / Supersonic #1106 /-------------------------------*/ ROM_START(sst) - ROM_REGION(0x10000, "maincpu", 0) + ROM_REGION(0x8000, "maincpu", 0) ROM_LOAD( "741-10_1.716", 0x1000, 0x0800, CRC(5e4cd81a) SHA1(d2a4a3599ad7271cd0ddc376c31c9b2e8defa379)) ROM_LOAD( "741-08_2.716", 0x5000, 0x0800, CRC(2789cbe6) SHA1(8230657cb5ee793354a5d4a80a9348639ec9af8f)) ROM_LOAD( "720-30_6.716", 0x5800, 0x0800, CRC(4be8aab0) SHA1(b6ae0c4f27b7dd7fb13c0632617a2559f86f29ae)) - ROM_RELOAD( 0xf800, 0x0800) + ROM_RELOAD( 0x7800, 0x0800) ROM_REGION(0x0020, "sound1", 0) ROM_LOAD( "729-18_3.123", 0x0000, 0x0020, CRC(7b6b7d45) SHA1(22f791bac0baab71754b2f6c00c217a342c92df5)) ROM_END @@ -628,11 +1171,11 @@ ROM_END / Playboy #1116 /-------------------------------*/ ROM_START(playboy) - ROM_REGION(0x10000, "maincpu", 0) + ROM_REGION(0x8000, "maincpu", 0) ROM_LOAD( "743-14_1.716", 0x1000, 0x0800, CRC(5c40984a) SHA1(dea104242fcb6d604faa0f01f087bc58bd43cd9d)) ROM_LOAD( "743-12_2.716", 0x5000, 0x0800, CRC(6fa66664) SHA1(4943220942ce74d4620eb5fbbab8f8a763f65a2e)) ROM_LOAD( "720-30_6.716", 0x5800, 0x0800, CRC(4be8aab0) SHA1(b6ae0c4f27b7dd7fb13c0632617a2559f86f29ae)) - ROM_RELOAD( 0xf800, 0x0800) + ROM_RELOAD( 0x7800, 0x0800) ROM_REGION(0x0020, "sound1", 0) ROM_LOAD( "729-18_3.123", 0x0000, 0x0020, CRC(7b6b7d45) SHA1(22f791bac0baab71754b2f6c00c217a342c92df5)) ROM_END @@ -641,11 +1184,11 @@ ROM_END / Lost World #1119 /-------------------------------*/ ROM_START(lostwrlp) - ROM_REGION(0x10000, "maincpu", 0) + ROM_REGION(0x8000, "maincpu", 0) ROM_LOAD( "729-33_1.716", 0x1000, 0x0800, CRC(4ca40b95) SHA1(4b4a3fbffb0aa99dab6330e24f93605eee35ac54)) ROM_LOAD( "729-48_2.716", 0x5000, 0x0800, CRC(963bffd8) SHA1(5144092d019132946b396fd7134866a878b3ca62)) ROM_LOAD( "720-28_6.716", 0x5800, 0x0800, CRC(f24cce3e) SHA1(0dfeaeb5b1cf4c950ff530ee56966ac0f2257111)) - ROM_RELOAD( 0xf800, 0x0800) + ROM_RELOAD( 0x7800, 0x0800) ROM_REGION(0x0020, "sound1", 0) ROM_LOAD( "729-18_3.123", 0x0000, 0x0020, CRC(7b6b7d45) SHA1(22f791bac0baab71754b2f6c00c217a342c92df5)) ROM_END @@ -654,11 +1197,11 @@ ROM_END / Six Million Dollar Man #1138 /-------------------------------*/ ROM_START(smman) - ROM_REGION(0x10000, "maincpu", 0) + ROM_REGION(0x8000, "maincpu", 0) ROM_LOAD( "742-20_1.716", 0x1000, 0x0800, CRC(33e55a75) SHA1(98fbec07c9d03557654e5b67e29738c66156ec62)) ROM_LOAD( "742-18_2.716", 0x5000, 0x0800, CRC(5365d36c) SHA1(1db651d31e28cf3fda00bef5289bb14d3b37b3c1)) ROM_LOAD( "720-30_6.716", 0x5800, 0x0800, CRC(4be8aab0) SHA1(b6ae0c4f27b7dd7fb13c0632617a2559f86f29ae)) - ROM_RELOAD( 0xf800, 0x0800) + ROM_RELOAD( 0x7800, 0x0800) ROM_REGION(0x0020, "sound1", 0) ROM_LOAD( "729-18_3.123", 0x0000, 0x0020, CRC(7b6b7d45) SHA1(22f791bac0baab71754b2f6c00c217a342c92df5)) ROM_END @@ -667,11 +1210,11 @@ ROM_END / Voltan Escapes Cosmic Doom #1147 /-----------------------------------*/ ROM_START(voltan) - ROM_REGION(0x10000, "maincpu", 0) + ROM_REGION(0x8000, "maincpu", 0) ROM_LOAD( "744-03_1.716", 0x1000, 0x0800, CRC(ad2467ae) SHA1(58c4de1ea696372bce9146a4c48a296ebcb2c431)) ROM_LOAD( "744-04_2.716", 0x5000, 0x0800, CRC(dbf58b83) SHA1(2d5e1c42fb8987eec81d89a4fe758ff0b88a1889)) ROM_LOAD( "720-30_6.716", 0x5800, 0x0800, CRC(4be8aab0) SHA1(b6ae0c4f27b7dd7fb13c0632617a2559f86f29ae)) - ROM_RELOAD( 0xf800, 0x0800) + ROM_RELOAD( 0x7800, 0x0800) ROM_REGION(0x0020, "sound1", 0) ROM_LOAD( "729-18_3.123", 0x0000, 0x0020, CRC(7b6b7d45) SHA1(22f791bac0baab71754b2f6c00c217a342c92df5)) ROM_END @@ -680,11 +1223,11 @@ ROM_END / Star Trek #1148 /-------------------------------*/ ROM_START(startrep) - ROM_REGION(0x10000, "maincpu", 0) + ROM_REGION(0x8000, "maincpu", 0) ROM_LOAD( "745-11_1.716", 0x1000, 0x0800, CRC(a077efca) SHA1(6f78d9a43db0b99c3818a73a04d15aa300194a6d)) ROM_LOAD( "745-12_2.716", 0x5000, 0x0800, CRC(f683210a) SHA1(6120909d97269d9abfcc34eef2c79b56a9cf53bc)) ROM_LOAD( "720-30_6.716", 0x5800, 0x0800, CRC(4be8aab0) SHA1(b6ae0c4f27b7dd7fb13c0632617a2559f86f29ae)) - ROM_RELOAD( 0xf800, 0x0800) + ROM_RELOAD( 0x7800, 0x0800) ROM_REGION(0x0020, "sound1", 0) ROM_LOAD( "729-18_3.123", 0x0000, 0x0020, CRC(7b6b7d45) SHA1(22f791bac0baab71754b2f6c00c217a342c92df5)) ROM_END @@ -693,11 +1236,11 @@ ROM_END / Kiss #1152 /-------------------------------*/ ROM_START(kiss) - ROM_REGION(0x10000, "maincpu", 0) + ROM_REGION(0x8000, "maincpu", 0) ROM_LOAD( "746-11_1.716", 0x1000, 0x0800, CRC(78ec7fad) SHA1(b7e47ed14be08571b620de71cd5006faaddc88d5)) ROM_LOAD( "746-14_2.716", 0x5000, 0x0800, CRC(0fc8922d) SHA1(dc6bd4d2d744df69b33ec69896cf71ac10c14a35)) ROM_LOAD( "720-30_6.716", 0x5800, 0x0800, CRC(4be8aab0) SHA1(b6ae0c4f27b7dd7fb13c0632617a2559f86f29ae)) - ROM_RELOAD( 0xf800, 0x0800) + ROM_RELOAD( 0x7800, 0x0800) ROM_REGION(0x0020, "sound1", 0) ROM_LOAD( "729-18_3.123", 0x0000, 0x0020, CRC(7b6b7d45) SHA1(22f791bac0baab71754b2f6c00c217a342c92df5)) ROM_END @@ -706,11 +1249,11 @@ ROM_END / Nitro Ground Shaker #1154 /-------------------------------*/ ROM_START(ngndshkr) - ROM_REGION(0x10000, "maincpu", 0) + ROM_REGION(0x8000, "maincpu", 0) ROM_LOAD( "776-17_1.716", 0x1000, 0x0800, CRC(f2d44235) SHA1(282106767b5ec5180fa8e7eb2eb5b4766849c920)) ROM_LOAD( "776-11_2.716", 0x5000, 0x0800, CRC(b0396b55) SHA1(2d10c4af7ecfa23b64ffb640111b582f44256fd5)) ROM_LOAD( "720-35_6.716", 0x5800, 0x0800, CRC(78d6d289) SHA1(47c3005790119294309f12ea68b7e573f360b9ef)) - ROM_RELOAD( 0xf800, 0x0800) + ROM_RELOAD( 0x7800, 0x0800) ROM_REGION(0x10000, "cpu2", 0) ROM_LOAD("776-15_4.716", 0xf000, 0x0800, CRC(63c80c52) SHA1(3350919fce237b308b8f960948f70d01d312e9c0)) ROM_RELOAD(0xf800, 0x0800) @@ -722,11 +1265,11 @@ ROM_END / Silverball Mania #1157 /-------------------------------*/ ROM_START(slbmania) - ROM_REGION(0x10000, "maincpu", 0) + ROM_REGION(0x8000, "maincpu", 0) ROM_LOAD( "786-16_1.716", 0x1000, 0x0800, CRC(c054733f) SHA1(2699cf940ce40012e2d7554b0b130adcb2bec6d1)) ROM_LOAD( "786-17_2.716", 0x5000, 0x0800, CRC(94af0298) SHA1(579eb0290283194d92b172f787d8a9ff54f16a07)) ROM_LOAD( "720-35_6.716", 0x5800, 0x0800, CRC(78d6d289) SHA1(47c3005790119294309f12ea68b7e573f360b9ef)) - ROM_RELOAD( 0xf800, 0x0800) + ROM_RELOAD( 0x7800, 0x0800) ROM_REGION(0x10000, "cpu2", 0) ROM_LOAD("786-11_4.716", 0xf000, 0x0800, CRC(2a3641e6) SHA1(64693d424277e2aaf5fd4af33b2d348a8a455448)) ROM_RELOAD(0xf800, 0x0800) @@ -738,11 +1281,11 @@ ROM_END / Harlem Globetrotters On Tour #1161 /------------------------------------*/ ROM_START(hglbtrtr) - ROM_REGION(0x10000, "maincpu", 0) + ROM_REGION(0x8000, "maincpu", 0) ROM_LOAD( "750-07_1.716", 0x1000, 0x0800, CRC(da594719) SHA1(0aaa50e7d62da64f88d82b00cf0747945be88818)) ROM_LOAD( "750-08_2.716", 0x5000, 0x0800, CRC(3c783931) SHA1(ee260511063aff1b72e18b3bc5a5be81aecf10c9)) ROM_LOAD( "720-35_6.716", 0x5800, 0x0800, CRC(78d6d289) SHA1(47c3005790119294309f12ea68b7e573f360b9ef)) - ROM_RELOAD( 0xf800, 0x0800) + ROM_RELOAD( 0x7800, 0x0800) ROM_REGION(0x0020, "sound1", 0) ROM_LOAD( "729-51_3.123", 0x0000, 0x0020, CRC(6e7d3e8b) SHA1(7a93d82a05213ffa6eacfa318051414f872a701d)) ROM_END @@ -751,11 +1294,11 @@ ROM_END / Dolly Parton #1162 /-------------------------------*/ ROM_START(dollyptn) - ROM_REGION(0x10000, "maincpu", 0) + ROM_REGION(0x8000, "maincpu", 0) ROM_LOAD( "777-10_1.716", 0x1000, 0x0800, CRC(ca88cb9a) SHA1(0deac1c02b2121635af4bd76a6695d8abc09d694)) ROM_LOAD( "777-13_2.716", 0x5000, 0x0800, CRC(7fc93ea3) SHA1(534ac5ed34397fe622dcf7cc90eaf38a311fa871)) ROM_LOAD( "720-35_6.716", 0x5800, 0x0800, CRC(78d6d289) SHA1(47c3005790119294309f12ea68b7e573f360b9ef)) - ROM_RELOAD( 0xf800, 0x0800) + ROM_RELOAD( 0x7800, 0x0800) ROM_REGION(0x0020, "sound1", 0) ROM_LOAD( "729-51_3.123", 0x0000, 0x0020, CRC(6e7d3e8b) SHA1(7a93d82a05213ffa6eacfa318051414f872a701d)) ROM_END @@ -764,11 +1307,11 @@ ROM_END / Paragon #1167 /-------------------------------*/ ROM_START(paragon) - ROM_REGION(0x10000, "maincpu", 0) + ROM_REGION(0x8000, "maincpu", 0) ROM_LOAD( "748-17_1.716", 0x1000, 0x0800, CRC(08dbdf32) SHA1(43d1380d809683e74d67b6cf57c6eb0ad248a813)) ROM_LOAD( "748-15_2.716", 0x5000, 0x0800, CRC(26cc05c1) SHA1(6e11a0f2327dbf15f6c149ddd873d9af96597d9d)) ROM_LOAD( "720-30_6.716", 0x5800, 0x0800, CRC(4be8aab0) SHA1(b6ae0c4f27b7dd7fb13c0632617a2559f86f29ae)) - ROM_RELOAD( 0xf800, 0x0800) + ROM_RELOAD( 0x7800, 0x0800) ROM_REGION(0x0020, "sound1", 0) ROM_LOAD( "729-51_3.123", 0x0000, 0x0020, CRC(6e7d3e8b) SHA1(7a93d82a05213ffa6eacfa318051414f872a701d)) ROM_END @@ -777,11 +1320,11 @@ ROM_END / Future Spa #1173 /-------------------------------*/ ROM_START(futurspa) - ROM_REGION(0x10000, "maincpu", 0) + ROM_REGION(0x8000, "maincpu", 0) ROM_LOAD( "781-07_1.716", 0x1000, 0x0800, CRC(4c716a6a) SHA1(a19ff17079b7ef0b9e6933ffc718dee0236bae10)) ROM_LOAD( "781-09_2.716", 0x5000, 0x0800, CRC(316617ed) SHA1(749d63cefe9541885b51db89302ad8a23e8f5b0a)) ROM_LOAD( "720-35_6.716", 0x5800, 0x0800, CRC(78d6d289) SHA1(47c3005790119294309f12ea68b7e573f360b9ef)) - ROM_RELOAD( 0xf800, 0x0800) + ROM_RELOAD( 0x7800, 0x0800) ROM_REGION(0x10000, "cpu2", 0) ROM_LOAD("781-02_4.716", 0xf000, 0x0800, CRC(364f7c9a) SHA1(e6a3d425317eaeba4109712c6949f11c50b82892)) ROM_RELOAD(0xf800, 0x0800) @@ -793,11 +1336,11 @@ ROM_END / Space Invaders #1178 /-------------------------------*/ ROM_START(spaceinv) - ROM_REGION(0x10000, "maincpu", 0) + ROM_REGION(0x8000, "maincpu", 0) ROM_LOAD( "792-10_1.716", 0x1000, 0x0800, CRC(075eba5a) SHA1(7147c2dfb6af1c39bbfb9e98f409baae10d09628)) ROM_LOAD( "792-13_2.716", 0x5000, 0x0800, CRC(b87b9e6b) SHA1(eab787ea81409ba88e30a342564944e1fade8124)) ROM_LOAD( "720-37_6.716", 0x5800, 0x0800, CRC(ceff6993) SHA1(bc91e7afdfc441ff47a37031f2d6caeb9ab64143)) - ROM_RELOAD( 0xf800, 0x0800) + ROM_RELOAD( 0x7800, 0x0800) ROM_REGION(0x10000, "cpu2", 0) ROM_LOAD("792-07_4.716", 0xf000, 0x0800, CRC(787ffd5e) SHA1(4dadad7095de27622c2120311a84555dacdc3364)) ROM_RELOAD(0xf800, 0x0800) @@ -809,11 +1352,11 @@ ROM_END / Rolling Stones #1187 /-------------------------------*/ ROM_START(rollston) - ROM_REGION(0x10000, "maincpu", 0) + ROM_REGION(0x8000, "maincpu", 0) ROM_LOAD( "796-17_1.716", 0x1000, 0x0800, CRC(51a826d7) SHA1(6811149c8948066b85b4018802afd409dbe8c2e1)) ROM_LOAD( "796-18_2.716", 0x5000, 0x0800, CRC(08c75b1a) SHA1(792a535514fe4d9476914f7f61c696a7a1bdb549)) ROM_LOAD( "720-35_6.716", 0x5800, 0x0800, CRC(78d6d289) SHA1(47c3005790119294309f12ea68b7e573f360b9ef)) - ROM_RELOAD( 0xf800, 0x0800) + ROM_RELOAD( 0x7800, 0x0800) ROM_REGION(0x10000, "cpu2", 0) ROM_LOAD("796-19_4.716", 0xf000, 0x0800, CRC(b740d047) SHA1(710edb6bbba0a03e4f516b501f019493a3a4033e)) ROM_RELOAD(0xf800, 0x0800) @@ -825,11 +1368,11 @@ ROM_END / Mystic #1192 /-------------------------------*/ ROM_START(mystic) - ROM_REGION(0x10000, "maincpu", 0) + ROM_REGION(0x8000, "maincpu", 0) ROM_LOAD( "798-03_1.716", 0x1000, 0x0800, CRC(f9c91e3b) SHA1(a3e6600b7b809cdd51a2d61b679f4f45ecf16e99)) ROM_LOAD( "798-04_2.716", 0x5000, 0x0800, CRC(f54e5785) SHA1(425304512b70ef0f17ca9854af96cbb63c5ee33e)) ROM_LOAD( "720-35_6.716", 0x5800, 0x0800, CRC(78d6d289) SHA1(47c3005790119294309f12ea68b7e573f360b9ef)) - ROM_RELOAD( 0xf800, 0x0800) + ROM_RELOAD( 0x7800, 0x0800) ROM_REGION(0x10000, "cpu2", 0) ROM_LOAD("798-05_4.716", 0xf000, 0x0800, CRC(e759e093) SHA1(e635dac4aa925804ec658e856f7830290bfbc7b8)) ROM_RELOAD(0xf800, 0x0800) @@ -841,12 +1384,12 @@ ROM_END / Xenon #1196 /-------------------------------*/ ROM_START(xenon) - ROM_REGION(0x10000, "maincpu", 0) + ROM_REGION(0x8000, "maincpu", 0) ROM_LOAD( "811-40_1.716", 0x1000, 0x0800, CRC(0fba871b) SHA1(52bc0ef65507f0f7422c319d0dc2059e12deab6d)) ROM_LOAD( "811-41_2.716", 0x5000, 0x0800, CRC(1ea0d891) SHA1(98cd8cfed5c0f437d2b9423b31205f1e8b7436f9)) ROM_LOAD( "720-40_6.732", 0x1800, 0x0800, CRC(d7aaaa03) SHA1(4e0b901645e509bcb59bf81a6ffc1612b4fb16ee)) ROM_CONTINUE( 0x5800, 0x0800 ) - ROM_RELOAD( 0xf000, 0x1000 ) + ROM_RELOAD( 0x7000, 0x1000 ) ROM_REGION(0x10000, "cpu2", 0) ROM_LOAD("811-35_4.532", 0xf000, 0x1000, CRC(e9caccbb) SHA1(e2e09ac738c48342212bf38687299876b40cecbb)) ROM_LOAD("811-22_1.532", 0x8000, 0x1000, CRC(c49a968e) SHA1(86680e8cbb82e69c232313e5fdd7a0058b7eef13)) @@ -859,12 +1402,12 @@ ROM_START(xenon) ROM_END ROM_START(xenonf) - ROM_REGION(0x10000, "maincpu", 0) + ROM_REGION(0x8000, "maincpu", 0) ROM_LOAD( "811-40_1.716", 0x1000, 0x0800, CRC(0fba871b) SHA1(52bc0ef65507f0f7422c319d0dc2059e12deab6d)) ROM_LOAD( "811-41_2.716", 0x5000, 0x0800, CRC(1ea0d891) SHA1(98cd8cfed5c0f437d2b9423b31205f1e8b7436f9)) ROM_LOAD( "720-40_6.732", 0x1800, 0x0800, CRC(d7aaaa03) SHA1(4e0b901645e509bcb59bf81a6ffc1612b4fb16ee)) ROM_CONTINUE( 0x5800, 0x0800 ) - ROM_RELOAD( 0xf000, 0x1000 ) + ROM_RELOAD( 0x7000, 0x1000 ) ROM_REGION(0x10000, "cpu2", 0) ROM_LOAD("811-36_4.532", 0xf000, 0x1000, CRC(73156c6e) SHA1(b0b3ecb44428c01849189adf6c86be3e95a99012)) ROM_LOAD("811-22_1.532", 0x8000, 0x1000, CRC(c49a968e) SHA1(86680e8cbb82e69c232313e5fdd7a0058b7eef13)) @@ -880,11 +1423,11 @@ ROM_END / Viking #1198 /-------------------------------*/ ROM_START(viking) - ROM_REGION(0x10000, "maincpu", 0) + ROM_REGION(0x8000, "maincpu", 0) ROM_LOAD( "802-05_1.716", 0x1000, 0x0800, CRC(a5db0574) SHA1(d9836679ed797b649f2c1e22bc24e8a9fe1c3000)) ROM_LOAD( "802-06_2.716", 0x5000, 0x0800, CRC(40410760) SHA1(b0b87d8600a03de7090e42f6ebdeeb5feccf87f6)) ROM_LOAD( "720-35_6.716", 0x5800, 0x0800, CRC(78d6d289) SHA1(47c3005790119294309f12ea68b7e573f360b9ef)) - ROM_RELOAD( 0xf800, 0x0800) + ROM_RELOAD( 0x7800, 0x0800) ROM_REGION(0x10000, "cpu2", 0) ROM_LOAD("802-07-4.716", 0xf000, 0x0800, CRC(62bc5030) SHA1(5a696f784a415d5b16ee23cd72a905264a2bbeac)) ROM_RELOAD(0xf800, 0x0800) @@ -896,11 +1439,11 @@ ROM_END / Hot Doggin' #1199 /-------------------------------*/ ROM_START(hotdoggn) - ROM_REGION(0x10000, "maincpu", 0) + ROM_REGION(0x8000, "maincpu", 0) ROM_LOAD( "809-05_1.716", 0x1000, 0x0800, CRC(2744abcb) SHA1(b45bd58c365785d12f9bec381574058e29f33fd2)) ROM_LOAD( "809-06_2.716", 0x5000, 0x0800, CRC(03db3d4d) SHA1(b8eed2d22474d2b0a1667eef2fdd4ecfa5fd35f3)) ROM_LOAD( "720-35_6.716", 0x5800, 0x0800, CRC(78d6d289) SHA1(47c3005790119294309f12ea68b7e573f360b9ef)) - ROM_RELOAD( 0xf800, 0x0800) + ROM_RELOAD( 0x7800, 0x0800) ROM_REGION(0x10000, "cpu2", 0) ROM_LOAD("809-07_4.716", 0xf000, 0x0800, CRC(43f28d7f) SHA1(01fca0ee0137a0715421eaa3582ff8d324340ecf)) ROM_RELOAD(0xf800, 0x0800) @@ -910,12 +1453,12 @@ ROM_END #ifdef MISSING_GAME ROM_START(hotdoggb) // check to see if this is the same as above but with a different split - ROM_REGION(0x10000, "maincpu", 0) + ROM_REGION(0x8000, "maincpu", 0) ROM_LOAD( "hotd2732.u2", 0x1000, 0x0800, CRC(709305ee) SHA1(37d5e681a1a2b8b2782dae3007db3e5036003e00)) ROM_CONTINUE( 0x5000, 0x0800) ROM_LOAD( "720-3532.u6b", 0x1800, 0x0800, CRC(b5e6a3d5) SHA1(fa1593eeed449dbac87965e613b501108a015eb2) ) ROM_CONTINUE( 0x5800, 0x0800) - ROM_RELOAD( 0xf000, 0x1000) + ROM_RELOAD( 0x7000, 0x1000) ROM_REGION(0x10000, "cpu2", 0) ROM_LOAD("809-07_4.716", 0xf000, 0x0800, CRC(43f28d7f) SHA1(01fca0ee0137a0715421eaa3582ff8d324340ecf)) ROM_RELOAD(0xf800, 0x0800) @@ -928,12 +1471,12 @@ ROM_END / Skateball #1210 /-------------------------------*/ ROM_START(skatebll) - ROM_REGION(0x10000, "maincpu", 0) + ROM_REGION(0x8000, "maincpu", 0) ROM_LOAD( "823-24_1.716", 0x1000, 0x0800, CRC(46e797d1) SHA1(7ddbf6047b8d95af8727c32b056bee1c4aa228e4)) ROM_LOAD( "823-25_2.716", 0x5000, 0x0800, CRC(960cb8c3) SHA1(3a4499cab85d3563961b0a01c78fa1f3ba2188fe)) ROM_LOAD( "720-40_6.732", 0x1800, 0x0800, CRC(d7aaaa03) SHA1(4e0b901645e509bcb59bf81a6ffc1612b4fb16ee)) ROM_CONTINUE( 0x5800, 0x0800 ) - ROM_RELOAD( 0xf000, 0x1000 ) + ROM_RELOAD( 0x7000, 0x1000 ) ROM_REGION(0x10000, "cpu2", 0) ROM_LOAD("823-02_4.716", 0xf000, 0x0800, CRC(d1037b20) SHA1(8784728540573be5e8ebb940ec0046b778f9413b)) ROM_RELOAD(0xf800, 0x0800) @@ -945,36 +1488,36 @@ ROM_END / Flash Gordon #1215 /-------------------------------*/ ROM_START(flashgdn) - ROM_REGION(0x10000, "maincpu", 0) + ROM_REGION(0x8000, "maincpu", 0) ROM_LOAD( "834-23_2.732", 0x1000, 0x0800, CRC(0c7a0d91) SHA1(1f79be15817975acbc35cb08591e2289e2eca938)) ROM_CONTINUE( 0x5000, 0x0800) ROM_LOAD( "720-52_6.732", 0x1800, 0x0800, CRC(2a43d9fb) SHA1(9ff903c32b80780383578a9abaa3ef9d3bcecbc7)) ROM_CONTINUE( 0x5800, 0x0800) - ROM_RELOAD( 0xf000, 0x1000) + ROM_RELOAD( 0x7000, 0x1000) ROM_REGION(0x10000, "cpu2", 0) ROM_LOAD("834-20_2.532", 0xc000, 0x1000, CRC(2f8ced3e) SHA1(ecdeb07c31c22ec313b55774f4358a9923c5e9e7)) ROM_LOAD("834-18_5.532", 0xf000, 0x1000, CRC(8799e80e) SHA1(f255b4e7964967c82cfc2de20ebe4b8d501e3cb0)) ROM_END ROM_START(flashgdnf) - ROM_REGION(0x10000, "maincpu", 0) + ROM_REGION(0x8000, "maincpu", 0) ROM_LOAD( "834-23_2.732", 0x1000, 0x0800, CRC(0c7a0d91) SHA1(1f79be15817975acbc35cb08591e2289e2eca938)) ROM_CONTINUE( 0x5000, 0x0800) ROM_LOAD( "720-52_6.732", 0x1800, 0x0800, CRC(2a43d9fb) SHA1(9ff903c32b80780383578a9abaa3ef9d3bcecbc7)) ROM_CONTINUE( 0x5800, 0x0800) - ROM_RELOAD( 0xf000, 0x1000) + ROM_RELOAD( 0x7000, 0x1000) ROM_REGION(0x10000, "cpu2", 0) ROM_LOAD("834-35_2.532", 0xc000, 0x1000, CRC(dff3f711) SHA1(254a5670775ecb6c347f33af8ba7c350e4cfa550)) ROM_LOAD("834-36_5.532", 0xf000, 0x1000, CRC(18691897) SHA1(3b445e0756c07d80f14c01af5a7f87744474ae15)) ROM_END ROM_START(flashgdnv) - ROM_REGION(0x10000, "maincpu", 0) + ROM_REGION(0x8000, "maincpu", 0) ROM_LOAD( "834-23_2.732", 0x1000, 0x0800, CRC(0c7a0d91) SHA1(1f79be15817975acbc35cb08591e2289e2eca938)) ROM_CONTINUE( 0x5000, 0x0800) ROM_LOAD( "720-52_6.732", 0x1800, 0x0800, CRC(2a43d9fb) SHA1(9ff903c32b80780383578a9abaa3ef9d3bcecbc7) ) ROM_CONTINUE( 0x5800, 0x0800) - ROM_RELOAD( 0xf000, 0x1000) + ROM_RELOAD( 0x7000, 0x1000) ROM_REGION(0x10000, "cpu2", 0) ROM_LOAD("834-02_4.532", 0xf000, 0x1000, CRC(f1eb0a12) SHA1(a58567665547aacf9a1b2c39295d963527ef8696)) ROM_LOAD("834-03_1.532", 0x8000, 0x1000, CRC(88bef6f4) SHA1(561e0bde04661b700552e4fbb6141c39f2789c99)) @@ -990,12 +1533,12 @@ ROM_END / Frontier #1217 /-------------------------------*/ ROM_START(frontier) - ROM_REGION(0x10000, "maincpu", 0) + ROM_REGION(0x8000, "maincpu", 0) ROM_LOAD( "819-08_1.716", 0x1000, 0x0800, CRC(e2f8ce9d) SHA1(03b38486e12f1677dcabcd0f14d194c59b3bd214)) ROM_LOAD( "819-07_2.716", 0x5000, 0x0800, CRC(af023a85) SHA1(95df232ba654293066beccbad158146259a764b7)) ROM_LOAD( "720-40_6.732", 0x1800, 0x0800, CRC(d7aaaa03) SHA1(4e0b901645e509bcb59bf81a6ffc1612b4fb16ee)) ROM_CONTINUE( 0x5800, 0x0800 ) - ROM_RELOAD( 0xf000, 0x1000 ) + ROM_RELOAD( 0x7000, 0x1000 ) ROM_REGION(0x10000, "cpu2", 0) ROM_LOAD("819-09_4.716", 0xf000, 0x0800, CRC(a62059ca) SHA1(75e139ea2573a8c3b666c9a1024d9308da9875c7)) ROM_RELOAD(0xf800, 0x0800) @@ -1007,12 +1550,12 @@ ROM_END / Fireball II #1219 /-------------------------------*/ ROM_START(fball_ii) - ROM_REGION(0x10000, "maincpu", 0) + ROM_REGION(0x8000, "maincpu", 0) ROM_LOAD( "839-12_2.732", 0x1000, 0x0800, CRC(45e768ad) SHA1(b706cb5f3dcfa2db54d8d15de180fcbf36b3768f)) ROM_CONTINUE( 0x5000, 0x0800) ROM_LOAD( "720-52_6.732", 0x1800, 0x0800, CRC(2a43d9fb) SHA1(9ff903c32b80780383578a9abaa3ef9d3bcecbc7) ) ROM_CONTINUE( 0x5800, 0x0800) - ROM_RELOAD( 0xf000, 0x1000) + ROM_RELOAD( 0x7000, 0x1000) ROM_REGION(0x10000, "cpu2", 0) ROM_LOAD("839-01_2.532", 0xc000, 0x1000, CRC(4aa473bd) SHA1(eaa12ded76f9999d33ce0fe6198df1708e007e12)) ROM_LOAD("839-02_5.532", 0xf000, 0x1000, CRC(8bf904ff) SHA1(de78d08bddd546abac65c2f95f1d52797e716362)) @@ -1022,12 +1565,12 @@ ROM_END / Eight Ball Deluxe #1220 /-------------------------------*/ ROM_START(eballdlx) - ROM_REGION(0x10000, "maincpu", 0) + ROM_REGION(0x8000, "maincpu", 0) ROM_LOAD( "838-15_2.732", 0x1000, 0x0800, CRC(68d92acc) SHA1(f37b16d2953677cd779073bc3eac4b586d62fad8)) ROM_CONTINUE( 0x5000, 0x0800) ROM_LOAD( "720-52_6.732", 0x1800, 0x0800, CRC(2a43d9fb) SHA1(9ff903c32b80780383578a9abaa3ef9d3bcecbc7) ) ROM_CONTINUE( 0x5800, 0x0800) - ROM_RELOAD( 0xf000, 0x1000) + ROM_RELOAD( 0x7000, 0x1000) ROM_REGION(0x10000, "cpu2", 0) ROM_LOAD("838-08_3.532", 0xd000, 0x1000, CRC(c39478d7) SHA1(8148aca7c4113921ab882da32d6d88e66abb22cc)) ROM_LOAD("838-09_4.716", 0xe000, 0x0800, CRC(518ea89e) SHA1(a387274ef530bb57f31819733b35615a39260126)) @@ -1036,12 +1579,12 @@ ROM_START(eballdlx) ROM_END ROM_START(eballd14) - ROM_REGION(0x10000, "maincpu", 0) + ROM_REGION(0x8000, "maincpu", 0) ROM_LOAD( "838-14_2.732", 0x1000, 0x0800, CRC(27eeabde) SHA1(a8f81dbb70202bdad1c9734d629e8a5c27f2a835)) ROM_CONTINUE( 0x5000, 0x0800) ROM_LOAD( "720-52_6.732", 0x1800, 0x0800, CRC(2a43d9fb) SHA1(9ff903c32b80780383578a9abaa3ef9d3bcecbc7) ) ROM_CONTINUE( 0x5800, 0x0800) - ROM_RELOAD( 0xf000, 0x1000) + ROM_RELOAD( 0x7000, 0x1000) ROM_REGION(0x10000, "cpu2", 0) ROM_LOAD("838-08_3.532", 0xd000, 0x1000, CRC(c39478d7) SHA1(8148aca7c4113921ab882da32d6d88e66abb22cc)) ROM_LOAD("838-09_4.716", 0xe000, 0x0800, CRC(518ea89e) SHA1(a387274ef530bb57f31819733b35615a39260126)) @@ -1053,12 +1596,12 @@ ROM_END / Embryon #1222 /-------------------------------*/ ROM_START(embryon) - ROM_REGION(0x10000, "maincpu", 0) + ROM_REGION(0x8000, "maincpu", 0) ROM_LOAD( "841-06_2.732", 0x1000, 0x0800, CRC(80ab18e7) SHA1(52e5b1709e6f21919fc9efed67f51934d883dbb7)) ROM_CONTINUE( 0x5000, 0x0800) ROM_LOAD( "720-52_6.732", 0x1800, 0x0800, CRC(2a43d9fb) SHA1(9ff903c32b80780383578a9abaa3ef9d3bcecbc7) ) ROM_CONTINUE( 0x5800, 0x0800) - ROM_RELOAD( 0xf000, 0x1000) + ROM_RELOAD( 0x7000, 0x1000) ROM_REGION(0x10000, "cpu2", 0) ROM_LOAD("841-01_4.716", 0xe000, 0x0800, CRC(e8b234e3) SHA1(584e553748b1c6571491150e346d815005948b68)) ROM_RELOAD(0xe800, 0x0800) @@ -1069,12 +1612,12 @@ ROM_END / Fathom #1233 /-------------------------------*/ ROM_START(fathom) - ROM_REGION(0x10000, "maincpu", 0) + ROM_REGION(0x8000, "maincpu", 0) ROM_LOAD( "842-08_2.732", 0x1000, 0x0800, CRC(1180f284) SHA1(78be1fa54faba5c5b14f580e41546be685846391)) ROM_CONTINUE( 0x5000, 0x0800) ROM_LOAD( "720-53_6.732", 0x1800, 0x0800, CRC(c2e92f80) SHA1(61de956a4b6e9fb9ef2b25c01bff1fb5972284ad) ) ROM_CONTINUE( 0x5800, 0x0800) - ROM_RELOAD( 0xf000, 0x1000) + ROM_RELOAD( 0x7000, 0x1000) ROM_REGION(0x10000, "cpu2", 0) ROM_LOAD("842-01_4.532", 0xe000, 0x1000, CRC(2ac02093) SHA1(a89c1d24f4f3e1f58ca4e476f408835efb368a90)) ROM_LOAD("842-02_5.532", 0xf000, 0x1000, CRC(736800bc) SHA1(2679d4d76e7258ad18ffe05cf333f21c35adfe0e)) @@ -1084,12 +1627,12 @@ ROM_END / Centaur #1239 /-------------------------------*/ ROM_START(centaur) - ROM_REGION(0x10000, "maincpu", 0) + ROM_REGION(0x8000, "maincpu", 0) ROM_LOAD( "848-08_2.732", 0x1000, 0x0800, CRC(8bdcd32b) SHA1(39f64393d3a39a8172b3d80d196253aac1342f40)) ROM_CONTINUE( 0x5000, 0x0800) ROM_LOAD( "720-53_6.732", 0x1800, 0x0800, CRC(c2e92f80) SHA1(61de956a4b6e9fb9ef2b25c01bff1fb5972284ad) ) ROM_CONTINUE( 0x5800, 0x0800) - ROM_RELOAD( 0xf000, 0x1000) + ROM_RELOAD( 0x7000, 0x1000) ROM_REGION(0x10000, "cpu2", 0) ROM_LOAD("848-01_3.532", 0xd000, 0x1000, CRC(88322c8a) SHA1(424fd2b107f5fbc3ab8b58e3fa8c285170b1f09a)) ROM_LOAD("848-02_4.532", 0xe000, 0x1000, CRC(d6dbd0e4) SHA1(62e4c8c1a747c5f6a3a4bf4d0bc80b06a1f70d13)) @@ -1101,12 +1644,12 @@ ROM_END / Medusa #1245 /-------------------------------*/ ROM_START(medusa) - ROM_REGION(0x10000, "maincpu", 0) + ROM_REGION(0x8000, "maincpu", 0) ROM_LOAD( "845-16_2.732", 0x1000, 0x0800, CRC(b0fbd1ac) SHA1(e876eced0c02a2b4b3c308494e8c453074d0e561)) ROM_CONTINUE( 0x5000, 0x0800) ROM_LOAD( "720-53_6.732", 0x1800, 0x0800, CRC(c2e92f80) SHA1(61de956a4b6e9fb9ef2b25c01bff1fb5972284ad) ) ROM_CONTINUE( 0x5800, 0x0800) - ROM_RELOAD( 0xf000, 0x1000) + ROM_RELOAD( 0x7000, 0x1000) ROM_REGION(0x10000, "cpu2", 0) ROM_LOAD("845-01_3.532", 0xd000, 0x1000, CRC(32200e02) SHA1(e75356a20f81a68e6b27d2fa04b8cc9b17f3976a)) ROM_LOAD("845-02_4.532", 0xe000, 0x1000, CRC(ab95885a) SHA1(fa91cef2a244d25d408585d1e14e1ed8fdc8c845)) @@ -1118,12 +1661,12 @@ ROM_END / Vector #1247 /-------------------------------*/ ROM_START(vector) - ROM_REGION(0x10000, "maincpu", 0) + ROM_REGION(0x8000, "maincpu", 0) ROM_LOAD( "858-11_2.732", 0x1000, 0x0800, CRC(323e286b) SHA1(998387900363fd46d392a931c1f092c886a23c69)) ROM_CONTINUE( 0x5000, 0x0800) ROM_LOAD( "720-53_6.732", 0x1800, 0x0800, CRC(c2e92f80) SHA1(61de956a4b6e9fb9ef2b25c01bff1fb5972284ad) ) ROM_CONTINUE( 0x5800, 0x0800) - ROM_RELOAD( 0xf000, 0x1000) + ROM_RELOAD( 0x7000, 0x1000) ROM_REGION(0x10000, "cpu2", 0) ROM_LOAD("858-01_2.532", 0xc000, 0x1000, CRC(bd2edef9) SHA1(8f129016440bad5e78d4b073268e76e542b61684)) ROM_LOAD("858-02_3.532", 0xd000, 0x1000, CRC(c592fb35) SHA1(5201824f129812c907e7d8a4600de23d95fd1eb0)) @@ -1135,12 +1678,12 @@ ROM_END / Elektra #1248 /-------------------------------*/ ROM_START(elektra) - ROM_REGION(0x10000, "maincpu", 0) + ROM_REGION(0x8000, "maincpu", 0) ROM_LOAD( "857-04_2.732", 0x1000, 0x0800, CRC(d2476720) SHA1(372c210c4f19302ffe25722bba6bcaaa85c4b90d)) ROM_CONTINUE( 0x5000, 0x0800) ROM_LOAD( "720-53_6.732", 0x1800, 0x0800, CRC(c2e92f80) SHA1(61de956a4b6e9fb9ef2b25c01bff1fb5972284ad) ) ROM_CONTINUE( 0x5800, 0x0800) - ROM_RELOAD( 0xf000, 0x1000) + ROM_RELOAD( 0x7000, 0x1000) ROM_REGION(0x10000, "cpu2", 0) ROM_LOAD("857-01_3.532", 0xd000, 0x1000, CRC(031548cc) SHA1(1f0204afd32dc07a301f404b4b064e34a83bd783)) ROM_LOAD("857-02_4.532", 0xe000, 0x1000, CRC(efc870d9) SHA1(45132c123b3191d616e2e9372948ab66ff221228)) @@ -1152,12 +1695,12 @@ ROM_END / Spectrum #1262 /-------------------------------*/ ROM_START(spectrm) - ROM_REGION(0x10000, "maincpu", 0) + ROM_REGION(0x8000, "maincpu", 0) ROM_LOAD( "868-00_2.732", 0x1000, 0x0800, NO_DUMP) ROM_CONTINUE( 0x5000, 0x0800) ROM_LOAD( "720-53_6.732", 0x1800, 0x0800, CRC(c2e92f80) SHA1(61de956a4b6e9fb9ef2b25c01bff1fb5972284ad) ) ROM_CONTINUE( 0x5800, 0x0800) - ROM_RELOAD( 0xf000, 0x1000) + ROM_RELOAD( 0x7000, 0x1000) ROM_REGION(0x10000, "cpu2", 0) ROM_LOAD("868-01_3.532", 0xd000, 0x1000, CRC(c3a16c66) SHA1(8c0a8b50fac0e218515b471621e80000ae475296)) ROM_LOAD("868-02_4.532", 0xe000, 0x1000, CRC(6b441399) SHA1(aae9e805f76cd6bc264bf69dd2d57629ee58bfc2)) @@ -1166,12 +1709,12 @@ ROM_START(spectrm) ROM_END ROM_START(spectrm4) - ROM_REGION(0x10000, "maincpu", 0) + ROM_REGION(0x8000, "maincpu", 0) ROM_LOAD( "868-04_2.732", 0x1000, 0x0800, CRC(b377f5f1) SHA1(adc40204da90ef1a4470a478520b949c6ded07b5)) ROM_CONTINUE( 0x5000, 0x0800) ROM_LOAD( "720-53_6.732", 0x1800, 0x0800, CRC(c2e92f80) SHA1(61de956a4b6e9fb9ef2b25c01bff1fb5972284ad) ) ROM_CONTINUE( 0x5800, 0x0800) - ROM_RELOAD( 0xf000, 0x1000) + ROM_RELOAD( 0x7000, 0x1000) ROM_REGION(0x10000, "cpu2", 0) ROM_LOAD("868-01_3.532", 0xd000, 0x1000, CRC(c3a16c66) SHA1(8c0a8b50fac0e218515b471621e80000ae475296)) ROM_LOAD("868-02_4.532", 0xe000, 0x1000, CRC(6b441399) SHA1(aae9e805f76cd6bc264bf69dd2d57629ee58bfc2)) @@ -1183,12 +1726,12 @@ ROM_END / Speakeasy #1273 /--------------------------------------------------*/ ROM_START(speakesy) - ROM_REGION(0x10000, "maincpu", 0) + ROM_REGION(0x8000, "maincpu", 0) ROM_LOAD( "877-03_2.732", 0x1000, 0x0800, CRC(34b28bbc) SHA1(c649a04664e694cfbd6b4d496bf76f5e802d492a)) ROM_CONTINUE( 0x5000, 0x0800) ROM_LOAD( "720-53_6.732", 0x1800, 0x0800, CRC(c2e92f80) SHA1(61de956a4b6e9fb9ef2b25c01bff1fb5972284ad) ) ROM_CONTINUE( 0x5800, 0x0800) - ROM_RELOAD( 0xf000, 0x1000) + ROM_RELOAD( 0x7000, 0x1000) ROM_REGION(0x10000, "cpu2", 0) ROM_LOAD("877-01_4.716", 0xf000, 0x0800, CRC(6534e826) SHA1(580653636f8d33e758e6631c9ce495f42fe3747a)) ROM_RELOAD(0xf800, 0x0800) @@ -1197,12 +1740,12 @@ ROM_START(speakesy) ROM_END ROM_START(speakesy4p) - ROM_REGION(0x10000, "maincpu", 0) + ROM_REGION(0x8000, "maincpu", 0) ROM_LOAD( "877-04_2.732", 0x1000, 0x0800, CRC(8926f2bb) SHA1(617c032ce949007d6bcb52268f17bec5a02f8651)) ROM_CONTINUE( 0x5000, 0x0800) ROM_LOAD( "720-53_6.732", 0x1800, 0x0800, CRC(c2e92f80) SHA1(61de956a4b6e9fb9ef2b25c01bff1fb5972284ad) ) ROM_CONTINUE( 0x5800, 0x0800) - ROM_RELOAD( 0xf000, 0x1000) + ROM_RELOAD( 0x7000, 0x1000) ROM_REGION(0x10000, "cpu2", 0) ROM_LOAD("877-01_4.716", 0xf000, 0x0800, CRC(6534e826) SHA1(580653636f8d33e758e6631c9ce495f42fe3747a)) ROM_RELOAD(0xf800, 0x0800) @@ -1214,12 +1757,12 @@ ROM_END / BMX #1276 /----------------------------------------------------*/ ROM_START(bmx) - ROM_REGION(0x10000, "maincpu", 0) + ROM_REGION(0x8000, "maincpu", 0) ROM_LOAD( "888-03_2.732", 0x1000, 0x0800, CRC(038cf1be) SHA1(b000a3d84623db6a7644551e5e2f0d7b533acb13)) ROM_CONTINUE( 0x5000, 0x0800) ROM_LOAD( "720-53_6.732", 0x1800, 0x0800, CRC(c2e92f80) SHA1(61de956a4b6e9fb9ef2b25c01bff1fb5972284ad) ) ROM_CONTINUE( 0x5800, 0x0800) - ROM_RELOAD( 0xf000, 0x1000) + ROM_RELOAD( 0x7000, 0x1000) ROM_REGION(0x10000, "cpu2", 0) ROM_LOAD("888-02_4.532", 0xf000, 0x1000, CRC(5692c679) SHA1(7eef074d16cde589cde7500c4dc76c9a902c7fe3)) ROM_RELOAD(0x1000, 0x1000) @@ -1229,12 +1772,12 @@ ROM_END / Rapid Fire #1282 /-------------------------------*/ ROM_START(rapidfip) - ROM_REGION(0x10000, "maincpu", 0) + ROM_REGION(0x8000, "maincpu", 0) ROM_LOAD( "869-04_2.732", 0x1000, 0x0800, CRC(26fdf048) SHA1(15787345e7162a530334bff98d877e525d4a1295)) ROM_CONTINUE( 0x5000, 0x0800) ROM_LOAD( "869-03_6.732", 0x1800, 0x0800, CRC(f6af5e8d) SHA1(3cf782d4a0ca38e3953a20d23d0eb01af87ba445) ) ROM_CONTINUE( 0x5800, 0x0800) - ROM_RELOAD( 0xf000, 0x1000) + ROM_RELOAD( 0x7000, 0x1000) ROM_REGION(0x10000, "cpu2", 0) ROM_LOAD("869-02_5.532", 0xf000, 0x1000, CRC(5a74cb86) SHA1(4fd09b0bc4257cb7b48cd8087b8b15fe768f7ddf)) ROM_END @@ -1243,12 +1786,12 @@ ROM_END / Mr. and Mrs. Pacman #1283 /--------------------------------------*/ ROM_START(m_mpac) - ROM_REGION(0x10000, "maincpu", 0) + ROM_REGION(0x8000, "maincpu", 0) ROM_LOAD( "872-04_2.732", 0x1000, 0x0800, CRC(5e542882) SHA1(bec5f56cd5192e0a12ea1226a49a2b7d8eaaa5cf)) ROM_CONTINUE( 0x5000, 0x0800) ROM_LOAD( "720-53_6.732", 0x1800, 0x0800, CRC(c2e92f80) SHA1(61de956a4b6e9fb9ef2b25c01bff1fb5972284ad) ) ROM_CONTINUE( 0x5800, 0x0800) - ROM_RELOAD( 0xf000, 0x1000) + ROM_RELOAD( 0x7000, 0x1000) ROM_REGION(0x10000, "cpu2", 0) ROM_LOAD("872-01_4.532", 0xe000, 0x1000, CRC(d21ce16d) SHA1(3ee6e2629530e7e6e4d7eac713d34c48297a1047)) ROM_LOAD("872-03_5.532", 0xf000, 0x1000, CRC(8fcdf853) SHA1(7c6bffcd974d2684e7f2c69d926f6cabb53e2f90)) @@ -1258,24 +1801,24 @@ ROM_END / Grand Slam #1311 /-----------------------------------------------------------*/ ROM_START(granslam) - ROM_REGION(0x10000, "maincpu", 0) + ROM_REGION(0x8000, "maincpu", 0) ROM_LOAD( "grndslam.u2", 0x1000, 0x0800, CRC(66aea9dc) SHA1(76c017dc83a63b7f1e6035e228370219eb9c0678)) ROM_CONTINUE( 0x5000, 0x0800) ROM_LOAD( "grndslam.u6", 0x1800, 0x0800, CRC(9e6ccea1) SHA1(5e158e021e0f3eed063577ae22cf5f1bc9655065) ) ROM_CONTINUE( 0x5800, 0x0800) - ROM_RELOAD( 0xf000, 0x1000) + ROM_RELOAD( 0x7000, 0x1000) ROM_REGION(0x10000, "cpu2", 0) ROM_LOAD("grndslam.u4", 0xf000, 0x1000, CRC(ac34bc38) SHA1(376ceb53cb51d250b5bc222001291b0c85e42e8a)) ROM_RELOAD(0x1000, 0x1000) ROM_END ROM_START(granslam4) - ROM_REGION(0x10000, "maincpu", 0) + ROM_REGION(0x8000, "maincpu", 0) ROM_LOAD( "gr_slam.u2b", 0x1000, 0x0800, CRC(552d9423) SHA1(16b86d5b7539fd803f458f1633ecc249ef15243d)) ROM_CONTINUE( 0x5000, 0x0800) ROM_LOAD( "grndslam.u6", 0x1800, 0x0800, CRC(9e6ccea1) SHA1(5e158e021e0f3eed063577ae22cf5f1bc9655065) ) ROM_CONTINUE( 0x5800, 0x0800) - ROM_RELOAD( 0xf000, 0x1000) + ROM_RELOAD( 0x7000, 0x1000) ROM_REGION(0x10000, "cpu2", 0) ROM_LOAD("grndslam.u4", 0xf000, 0x1000, CRC(ac34bc38) SHA1(376ceb53cb51d250b5bc222001291b0c85e42e8a)) ROM_RELOAD(0x1000, 0x1000) @@ -1290,24 +1833,24 @@ ROM_END / Gold Ball #1371 /----------------------------------------------------------*/ ROM_START(goldball) - ROM_REGION(0x10000, "maincpu", 0) + ROM_REGION(0x8000, "maincpu", 0) ROM_LOAD( "gold2732.u2", 0x1000, 0x0800, CRC(3169493c) SHA1(1335fcdfb2d6970d78c636748ff419baf85ef78b)) ROM_CONTINUE( 0x5000, 0x0800) ROM_LOAD( "goldball.u6", 0x1800, 0x0800, CRC(9b6e79d0) SHA1(4fcda91bbe930e6131d94964a08459e395f841af)) ROM_CONTINUE( 0x5800, 0x0800) - ROM_RELOAD( 0xf000, 0x1000) + ROM_RELOAD( 0x7000, 0x1000) ROM_REGION(0x10000, "cpu2", 0) ROM_LOAD("gb_u4.532", 0xf000, 0x1000, CRC(2dcb0315) SHA1(8cb9c9f627f0c8420d3b3d9f0d10d77a82c8be56)) ROM_RELOAD(0x1000, 0x1000) ROM_END ROM_START(goldballn) - ROM_REGION(0x10000, "maincpu", 0) + ROM_REGION(0x8000, "maincpu", 0) ROM_LOAD( "u2.532", 0x1000, 0x0800, CRC(aa6eb9d6) SHA1(a73cc832450e718d9b8484e409a1f8093d91d786)) ROM_CONTINUE( 0x5000, 0x0800) ROM_LOAD( "goldball.u6", 0x1800, 0x0800, CRC(9b6e79d0) SHA1(4fcda91bbe930e6131d94964a08459e395f841af) ) ROM_CONTINUE( 0x5800, 0x0800) - ROM_RELOAD( 0xf000, 0x1000) + ROM_RELOAD( 0x7000, 0x1000) ROM_REGION(0x10000, "cpu2", 0) ROM_LOAD("gb_u4.532", 0xf000, 0x1000, CRC(2dcb0315) SHA1(8cb9c9f627f0c8420d3b3d9f0d10d77a82c8be56)) ROM_RELOAD(0x1000, 0x1000) @@ -1317,12 +1860,12 @@ ROM_END / Kings of Steel #1390 /-------------------------------*/ ROM_START(kosteel) - ROM_REGION(0x10000, "maincpu", 0) + ROM_REGION(0x8000, "maincpu", 0) ROM_LOAD( "kngs2732.u2", 0x1000, 0x0800, CRC(f876d8f2) SHA1(581f4b98e0a69f4ae879caeafdbf2eb979514ad1)) ROM_CONTINUE( 0x5000, 0x0800) ROM_LOAD( "720-5332.u6", 0x1800, 0x0800, CRC(c2e92f80) SHA1(61de956a4b6e9fb9ef2b25c01bff1fb5972284ad) ) ROM_CONTINUE( 0x5800, 0x0800) - ROM_RELOAD( 0xf000, 0x1000) + ROM_RELOAD( 0x7000, 0x1000) ROM_REGION(0x10000, "cpu2", 0) ROM_LOAD("kngsu4.snd", 0x8000, 0x1000, CRC(f3e4d2f6) SHA1(93f4e9e1348b1225bc02db38c994e3338afb175c)) ROM_RELOAD(0x9000, 0x1000) @@ -1338,12 +1881,12 @@ ROM_END / X's & O's #1391 /-------------------------------*/ ROM_START(xsandos) - ROM_REGION(0x10000, "maincpu", 0) + ROM_REGION(0x8000, "maincpu", 0) ROM_LOAD( "x&os2732.u2", 0x1000, 0x0800, CRC(068dfe5a) SHA1(028baf79852b14cac51a7cdc8e751a8173beeccb)) ROM_CONTINUE( 0x5000, 0x0800) ROM_LOAD( "720-5332.u6", 0x1800, 0x0800, CRC(c2e92f80) SHA1(61de956a4b6e9fb9ef2b25c01bff1fb5972284ad) ) ROM_CONTINUE( 0x5800, 0x0800) - ROM_RELOAD( 0xf000, 0x1000) + ROM_RELOAD( 0x7000, 0x1000) ROM_REGION(0x10000, "cpu2", 0) ROM_LOAD("720_u3.snd", 0xc000, 0x2000, CRC(5d8e2adb) SHA1(901a26f5e598386295a1298ee3a634941bd58b3e)) ROM_RELOAD(0xe000, 0x2000) @@ -1353,12 +1896,12 @@ ROM_END / Spy Hunter #0A17 /-------------------------------*/ ROM_START(spyhuntr) - ROM_REGION(0x10000, "maincpu", 0) + ROM_REGION(0x8000, "maincpu", 0) ROM_LOAD( "spy-2732.u2", 0x1000, 0x0800, CRC(9e930f2d) SHA1(fb48ce0d8d8f8a695827c0eea57510b53daa7c39)) ROM_CONTINUE( 0x5000, 0x0800) ROM_LOAD( "720-5332.u6", 0x1800, 0x0800, CRC(c2e92f80) SHA1(61de956a4b6e9fb9ef2b25c01bff1fb5972284ad) ) ROM_CONTINUE( 0x5800, 0x0800) - ROM_RELOAD( 0xf000, 0x1000) + ROM_RELOAD( 0x7000, 0x1000) ROM_REGION(0x10000, "cpu2", 0) ROM_LOAD("spy_u4.532", 0x8000, 0x1000, CRC(a43887d0) SHA1(6bbc55943fa9f0cd97f946767f21652e19d85265)) ROM_RELOAD(0x9000, 0x1000) @@ -1374,12 +1917,12 @@ ROM_END / Fireball Classic #0A40 /------------------------------------*/ ROM_START(fbclass) - ROM_REGION(0x10000, "maincpu", 0) + ROM_REGION(0x8000, "maincpu", 0) ROM_LOAD( "fb-class.u2", 0x1000, 0x0800, CRC(32faac6c) SHA1(589020d09f26326dab266bc7c74ca0e10de565e6)) ROM_CONTINUE( 0x5000, 0x0800) ROM_LOAD( "720-5332.u6", 0x1800, 0x0800, CRC(c2e92f80) SHA1(61de956a4b6e9fb9ef2b25c01bff1fb5972284ad) ) ROM_CONTINUE( 0x5800, 0x0800) - ROM_RELOAD( 0xf000, 0x1000) + ROM_RELOAD( 0x7000, 0x1000) ROM_REGION(0x10000, "cpu2", 0) ROM_LOAD("fbcu4.snd", 0x8000, 0x1000, CRC(697ab16f) SHA1(7beed02e6cb042f90d2048778408b1f744ffe242)) ROM_RELOAD(0x9000, 0x1000) @@ -1395,12 +1938,12 @@ ROM_END / Black Pyramid #0A44 /-------------------------------*/ ROM_START(blakpyra) - ROM_REGION(0x10000, "maincpu", 0) + ROM_REGION(0x8000, "maincpu", 0) ROM_LOAD( "blkp2732.u2", 0x1000, 0x0800, CRC(600535b0) SHA1(33d080f4430ad9c33ee9de1bfbb5cfde50f0776e)) ROM_CONTINUE( 0x5000, 0x0800) ROM_LOAD( "720-5332.u6", 0x1800, 0x0800, CRC(c2e92f80) SHA1(61de956a4b6e9fb9ef2b25c01bff1fb5972284ad) ) ROM_CONTINUE( 0x5800, 0x0800) - ROM_RELOAD( 0xf000, 0x1000) + ROM_RELOAD( 0x7000, 0x1000) ROM_REGION(0x10000, "cpu2", 0) ROM_LOAD("bp_u4.532", 0x8000, 0x1000, CRC(57978b4a) SHA1(4995837790d81b02325d39b548fb882a591769c5)) ROM_RELOAD(0x9000, 0x1000) @@ -1416,12 +1959,12 @@ ROM_END / Cybernaut #0B42 /-------------------------------*/ ROM_START(cybrnaut) - ROM_REGION(0x10000, "maincpu", 0) + ROM_REGION(0x8000, "maincpu", 0) ROM_LOAD( "cybe2732.u2", 0x1000, 0x0800, CRC(0610b0e0) SHA1(92f5e8a83240ad03ecc16ece4824b047b77816f7)) ROM_CONTINUE( 0x5000, 0x0800) ROM_LOAD( "720-5332.u6", 0x1800, 0x0800, CRC(c2e92f80) SHA1(61de956a4b6e9fb9ef2b25c01bff1fb5972284ad) ) ROM_CONTINUE( 0x5800, 0x0800) - ROM_RELOAD( 0xf000, 0x1000) + ROM_RELOAD( 0x7000, 0x1000) ROM_REGION(0x10000, "cpu2", 0) ROM_LOAD("cybu3.snd", 0xc000, 0x2000, CRC(a3c1f6e7) SHA1(35a5e828a6f2dd9009e165328a005fa079bad6cb)) ROM_RELOAD(0xe000, 0x2000) @@ -1431,12 +1974,12 @@ ROM_END / Cosmic Flash (Flash Gordon Clone) /-------------------------------*/ ROM_START(cosflash) - ROM_REGION(0x10000, "maincpu", 0) + ROM_REGION(0x8000, "maincpu", 0) ROM_LOAD( "cf2d.532", 0x1000, 0x0800, CRC(939e941d) SHA1(889862043f351762e8c866aefb36a9ea75cbf828)) ROM_CONTINUE( 0x5000, 0x0800) ROM_LOAD( "cf6d.532", 0x1800, 0x0800, CRC(7af93d2f) SHA1(2d939b14f7fe79f836e12926f44b70037630cd3f) ) ROM_CONTINUE( 0x5800, 0x0800) - ROM_RELOAD( 0xf000, 0x1000) + ROM_RELOAD( 0x7000, 0x1000) ROM_REGION(0x10000, "cpu2", 0) ROM_LOAD("834-20_2.532", 0xc000, 0x1000, CRC(2f8ced3e) SHA1(ecdeb07c31c22ec313b55774f4358a9923c5e9e7)) ROM_LOAD("834-18_5.532", 0xf000, 0x1000, CRC(8799e80e) SHA1(f255b4e7964967c82cfc2de20ebe4b8d501e3cb0)) @@ -1466,11 +2009,11 @@ ROM_END / Mystic Star /-------------------------------*/ ROM_START(myststar) - ROM_REGION(0x10000, "maincpu", 0) + ROM_REGION(0x8000, "maincpu", 0) ROM_LOAD( "rom1.bin", 0x1000, 0x0800, CRC(9a12dc91) SHA1(8961c22b2aeabac04d36d124f283409e11faee8a)) ROM_LOAD( "rom2.bin", 0x5000, 0x0800, CRC(888ee5ae) SHA1(d99746c7c9a9a0a83b4bc15473fe9ebd3b02ffe4)) ROM_LOAD( "rom3.bin", 0x5800, 0x0800, CRC(9e0a4619) SHA1(82065b74d39ba932704514e83d432262d360f1e1)) - ROM_RELOAD( 0xf800, 0x0800) + ROM_RELOAD( 0x7800, 0x0800) ROM_REGION(0x0020, "sound1", 0) ROM_LOAD( "snd.123", 0x0000, 0x0020, NO_DUMP) ROM_END @@ -1479,12 +2022,12 @@ ROM_END / New Wave (Black Pyramid Clone) /-------------------------------*/ ROM_START(newwave) - ROM_REGION(0x10000, "maincpu", 0) + ROM_REGION(0x8000, "maincpu", 0) ROM_LOAD( "blkp2732.u2", 0x1000, 0x0800, CRC(600535b0) SHA1(33d080f4430ad9c33ee9de1bfbb5cfde50f0776e)) ROM_CONTINUE( 0x5000, 0x0800) ROM_LOAD( "newwu6.532", 0x1800, 0x0800, CRC(ca72a96b) SHA1(efcd8b41bf0c19ebd7db492632e046b348619460) ) ROM_CONTINUE( 0x5800, 0x0800) - ROM_RELOAD( 0xf000, 0x1000) + ROM_RELOAD( 0x7000, 0x1000) ROM_REGION(0x10000, "cpu2", 0) ROM_LOAD("newwu4.532", 0x8000, 0x1000, CRC(6f4f2a95) SHA1(a7a375827c0429b8b3d2ee9e471f557152492993)) ROM_RELOAD(0x9000, 0x1000) @@ -1508,12 +2051,12 @@ ROM_END / Saturn 2 (Spy Hunter Clone) /-------------------------------*/ ROM_START(saturn2) - ROM_REGION(0x10000, "maincpu", 0) + ROM_REGION(0x8000, "maincpu", 0) ROM_LOAD( "spy-2732.u2", 0x1000, 0x0800, CRC(9e930f2d) SHA1(fb48ce0d8d8f8a695827c0eea57510b53daa7c39)) ROM_CONTINUE( 0x5000, 0x0800) ROM_LOAD( "saturn2.u6", 0x1800, 0x0800, CRC(ca72a96b) SHA1(efcd8b41bf0c19ebd7db492632e046b348619460) ) ROM_CONTINUE( 0x5800, 0x0800) - ROM_RELOAD( 0xf000, 0x1000) + ROM_RELOAD( 0x7000, 0x1000) ROM_REGION(0x10000, "cpu2", 0) ROM_LOAD("spy_u4.532", 0x8000, 0x1000, CRC(a43887d0) SHA1(6bbc55943fa9f0cd97f946767f21652e19d85265)) ROM_RELOAD(0x9000, 0x1000) @@ -1533,12 +2076,12 @@ ROM_END / Space Hawks (Cybernaut Clone) /-------------------------------*/ ROM_START(spacehaw) - ROM_REGION(0x10000, "maincpu", 0) + ROM_REGION(0x8000, "maincpu", 0) ROM_LOAD( "cybe2732.u2g", 0x1000, 0x0800, CRC(d4a5e2f6) SHA1(841e940632993919a68c905546f533ff38a0ce31)) ROM_CONTINUE( 0x5000, 0x0800) ROM_LOAD( "spacehaw.u6", 0x1800, 0x0800, CRC(b154a3a3) SHA1(d632c5eddd0582ba2ca778ab03e11ca3f6f4e1ed) ) ROM_CONTINUE( 0x5800, 0x0800) - ROM_RELOAD( 0xf000, 0x1000) + ROM_RELOAD( 0x7000, 0x1000) ROM_REGION(0x10000, "cpu2", 0) ROM_LOAD("cybu3.snd", 0xc000, 0x2000, CRC(a3c1f6e7) SHA1(35a5e828a6f2dd9009e165328a005fa079bad6cb)) ROM_RELOAD(0xe000, 0x2000) @@ -1556,12 +2099,12 @@ ROM_END / Tiger Rag (Kings Of Steel Clone) /-------------------------------*/ ROM_START(tigerrag) - ROM_REGION(0x10000, "maincpu", 0) - ROM_LOAD("tigerrag.mpu", 0xe000, 0x2000, CRC(3eb389ba) SHA1(bdfdcf00f4a2200d39d7e469fe633e0b7b8f1676)) - ROM_COPY("maincpu", 0xe000, 0x1000,0x0800) - ROM_COPY("maincpu", 0xe800, 0x5000,0x0800) - ROM_COPY("maincpu", 0xf000, 0x1800,0x0800) - ROM_COPY("maincpu", 0xf800, 0x5800,0x0800) + ROM_REGION(0x8000, "maincpu", 0) + ROM_LOAD("tigerrag.mpu", 0x6000, 0x2000, CRC(3eb389ba) SHA1(bdfdcf00f4a2200d39d7e469fe633e0b7b8f1676)) + ROM_COPY("maincpu", 0x6000, 0x1000,0x0800) + ROM_COPY("maincpu", 0x6800, 0x5000,0x0800) + ROM_COPY("maincpu", 0x7000, 0x1800,0x0800) + ROM_COPY("maincpu", 0x7800, 0x5800,0x0800) ROM_REGION(0x10000, "cpu2", 0) ROM_LOAD("kngsu4.snd", 0x8000, 0x1000, CRC(f3e4d2f6) SHA1(93f4e9e1348b1225bc02db38c994e3338afb175c)) ROM_RELOAD(0x9000, 0x1000) @@ -1580,12 +2123,10 @@ ROM_END / 301/Bulls Eye /-------------------------------*/ ROM_START(bullseye) - ROM_REGION(0x10000, "maincpu", 0) - ROM_LOAD("bull.u2", 0x2000, 0x0800, CRC(a2951aa2) SHA1(f9c0826c5d1d6d904286678ed90de3850a13b5f4)) - ROM_CONTINUE( 0x2800, 0x0800) - ROM_LOAD("bull.u6", 0x3000, 0x0800, CRC(64d4b9c4) SHA1(bf4d0671372fd3a445c4c7330b9849171ca8048c)) - ROM_CONTINUE( 0x3800, 0x0800) - ROM_RELOAD( 0xf000, 0x1000) + ROM_REGION(0x8000, "maincpu", 0) // Actually seems to have an address mask of 0x3fff + ROM_LOAD("bull.u2", 0x2000, 0x1000, CRC(a2951aa2) SHA1(f9c0826c5d1d6d904286678ed90de3850a13b5f4)) + ROM_LOAD("bull.u6", 0x3000, 0x1000, CRC(64d4b9c4) SHA1(bf4d0671372fd3a445c4c7330b9849171ca8048c)) + ROM_RELOAD( 0x7000, 0x1000) ROM_REGION(0x10000, "cpu2", 0) ROM_LOAD("bull.snd", 0x8000, 0x0800, CRC(c0482a2f) SHA1(a6aa698ad517cdc078129d702ee936af576260ed)) ROM_RELOAD(0x8800, 0x0800) @@ -1596,12 +2137,12 @@ ROM_END / World Defender /-------------------------------*/ ROM_START(worlddef) - ROM_REGION(0x10000, "maincpu", 0) - ROM_LOAD("worlddef.764", 0xe000, 0x2000, CRC(ad1a7ba3) SHA1(d799b6d1cd252cd6d9fb72586099c43de7c22a00)) - ROM_COPY("maincpu", 0xe000, 0x1000,0x0800) - ROM_COPY("maincpu", 0xe800, 0x5000,0x0800) - ROM_COPY("maincpu", 0xf000, 0x1800,0x0800) - ROM_COPY("maincpu", 0xf800, 0x5800,0x0800) + ROM_REGION(0x8000, "maincpu", 0) + ROM_LOAD("worlddef.764", 0x1000, 0x0800, CRC(ad1a7ba3) SHA1(d799b6d1cd252cd6d9fb72586099c43de7c22a00)) + ROM_CONTINUE( 0x5000, 0x0800) + ROM_CONTINUE( 0x1800, 0x0800) + ROM_CONTINUE( 0x5800, 0x0800) + ROM_COPY("maincpu", 0x5800, 0x7800,0x0800) ROM_REGION(0x10000, "cpu2", 0) ROM_LOAD("wodefsnd.764", 0xc000, 0x2000, CRC(b8d4dc20) SHA1(5aecac4a2deb7ea8e0ff0600ea459ef272dcd5f0)) ROM_RELOAD(0xe000, 0x2000) @@ -1612,11 +2153,11 @@ ROM_END /-------------------------------*/ ROM_START(darkshad) ROM_REGION(0x10000, "maincpu", 0) - ROM_LOAD("cpu_u7.bin", 0xe000, 0x2000, CRC(8d04c546) SHA1(951e75d9867b85a0bf9f04fe9aa647a53b6830bc)) - ROM_COPY("maincpu", 0xe000, 0x1000,0x0800) - ROM_COPY("maincpu", 0xe800, 0x1800,0x0800) - ROM_COPY("maincpu", 0xf000, 0x5000,0x0800) - ROM_COPY("maincpu", 0xf800, 0x5800,0x0800) + ROM_LOAD("cpu_u7.bin", 0x1000, 0x0800, CRC(8d04c546) SHA1(951e75d9867b85a0bf9f04fe9aa647a53b6830bc)) + ROM_CONTINUE( 0x1800, 0x0800) + ROM_CONTINUE( 0x5000, 0x0800) + ROM_CONTINUE( 0x5800, 0x0800) + ROM_COPY("maincpu", 0x5800, 0xf800,0x0800) ROM_REGION(0x10000, "cpu2", 0) ROM_LOAD("bp_u4.532", 0x8000, 0x1000, CRC(57978b4a) SHA1(4995837790d81b02325d39b548fb882a591769c5)) ROM_RELOAD(0x9000, 0x1000) @@ -1784,34 +2325,34 @@ ROM_END / Big Ball Bowling (Bowler) /-------------------------------*/ ROM_START(bbbowlin) - ROM_REGION(0x10000, "maincpu", 0) + ROM_REGION(0x8000, "maincpu", 0) ROM_LOAD( "cpu_u2.716", 0x1000, 0x0800, CRC(179e0c69) SHA1(7921839d2014a00b99ce7c44b325ea4403df9eea)) ROM_LOAD( "cpu_u6.716", 0x1800, 0x0800, CRC(7b48e45b) SHA1(ac32292ef593bf8350e8bbc41113b6c1cb78a79e)) - ROM_RELOAD( 0xf800, 0x0800) + ROM_RELOAD( 0x7800, 0x0800) ROM_END /*---------------------------- / Stars & Strikes (Bowler) /----------------------------*/ ROM_START(monrobwl) - ROM_REGION(0x10000, "maincpu", 0) + ROM_REGION(0x8000, "maincpu", 0) ROM_LOAD( "cpu_u1.716", 0x1000, 0x0800, CRC(42592cc9) SHA1(22452072199c4b82a413065f8dfe235a39fe3825)) ROM_LOAD( "cpu_u5.716", 0x1800, 0x0800, CRC(78e2dcd2) SHA1(7fbe9f7adc69af5afa489d9fd953640f3466de3f)) ROM_LOAD( "cpu_u2.716", 0x5000, 0x0800, CRC(73534680) SHA1(d5233a9d4600fa28b767ee1a251ed1a1ffbaf9c4)) ROM_LOAD( "cpu_u6.716", 0x5800, 0x0800, CRC(ad77d719) SHA1(f8f8d0d183d639d19fea552d35a7be3aa7f07c17)) - ROM_RELOAD( 0xf800, 0x0800) + ROM_RELOAD( 0x7800, 0x0800) ROM_END /*----------------------------------------------------------------------------------------------- / Midnight Marauders (Gun game) different hardware, not a pinball, to be moved to its own driver /------------------------------------------------------------------------------------------------*/ ROM_START(mdntmrdr) - ROM_REGION(0x10000, "maincpu", 0) + ROM_REGION(0x8000, "maincpu", 0) ROM_LOAD( "mdru2.532", 0x1000, 0x0800, CRC(f72668bc) SHA1(25b984e1828905190c73c359ee6c9858ed1b2224)) ROM_CONTINUE( 0x5000, 0x0800) ROM_LOAD( "mdru6.732", 0x1800, 0x0800, CRC(ff55fb57) SHA1(4a44fc8732c8cbce38c9605c7958b02a6bc95da1)) ROM_CONTINUE( 0x5800, 0x0800) - ROM_RELOAD( 0xf000, 0x1000) + ROM_RELOAD( 0x7000, 0x1000) ROM_REGION(0x10000, "cpu2", 0) ROM_LOAD("u3.bin", 0xd000, 0x1000, CRC(3ba474e4) SHA1(4ee5c3ad2c9dca49e9394521506e97a95e3d9a17)) ROM_LOAD("u5.bin", 0xf000, 0x1000, CRC(3ab40e35) SHA1(63b2ee074e5993a2616e67d3383bc3d3ac51b400)) @@ -1821,40 +2362,40 @@ ROM_END / Black Beauty (Shuffle) /----------------------------*/ ROM_START(blbeauty) - ROM_REGION(0x10000, "maincpu", 0) + ROM_REGION(0x8000, "maincpu", 0) ROM_LOAD( "cpu_u1.716", 0x1000, 0x0800, CRC(e2550957) SHA1(e445548b650fec5d593ca7da587300799ef94991)) ROM_LOAD( "cpu_u5.716", 0x1800, 0x0800, CRC(70fcd9f7) SHA1(ca5c2ea09f45f5ba50526880c158aaac61f007d5)) ROM_LOAD( "cpu_u2.716", 0x5000, 0x0800, CRC(3f55d17f) SHA1(e6333e53570fb05a841a7f141872c8bd14143f9c)) ROM_LOAD( "cpu_u6.716", 0x5800, 0x0800, CRC(842cd307) SHA1(8429d84e8bc4343b437801d0236150e04de79b75)) - ROM_RELOAD( 0xf800, 0x0800) + ROM_RELOAD( 0x7800, 0x0800) ROM_END /*-------------------------------- / Super Bowl (X's & O's Clone) /-------------------------------*/ ROM_START(suprbowl) - ROM_REGION(0x10000, "maincpu", 0) + ROM_REGION(0x8000, "maincpu", 0) ROM_LOAD( "sbowlu2.732", 0x1000, 0x0800, CRC(bc497a13) SHA1(f428373bde72f0302c45c326aebbe56e8b09c2d6)) ROM_CONTINUE( 0x5000, 0x0800) ROM_LOAD( "sbowlu6.732", 0x1800, 0x0800, CRC(a9c92719) SHA1(972da0cf87863b637b88575c329f1d8162098d6f)) ROM_CONTINUE( 0x5800, 0x0800) - ROM_RELOAD( 0xf000, 0x1000) + ROM_RELOAD( 0x7000, 0x1000) ROM_REGION(0x10000, "cpu2", 0) ROM_LOAD("720_u3.snd", 0xc000, 0x2000, CRC(5d8e2adb) SHA1(901a26f5e598386295a1298ee3a634941bd58b3e)) ROM_RELOAD(0xe000, 0x2000) ROM_END // AS-2888 sound -GAME( 1979, sst, 0, by35, by35, by35_state, by35_6, ROT0, "Bally", "Supersonic", MACHINE_IS_SKELETON_MECHANICAL) -GAME( 1978, playboy, 0, by35, by35, by35_state, by35_6, ROT0, "Bally", "Playboy", MACHINE_IS_SKELETON_MECHANICAL) -GAME( 1978, lostwrlp, 0, by35, by35, by35_state, by35_6, ROT0, "Bally", "Lost World", MACHINE_IS_SKELETON_MECHANICAL) -GAME( 1978, smman, 0, by35, by35, by35_state, by35_6, ROT0, "Bally", "Six Million Dollar Man", MACHINE_IS_SKELETON_MECHANICAL) -GAME( 1978, voltan, 0, by35, by35, by35_state, by35_6, ROT0, "Bally", "Voltan Escapes Cosmic Doom", MACHINE_IS_SKELETON_MECHANICAL) -GAME( 1979, startrep, 0, by35, by35, by35_state, by35_6, ROT0, "Bally", "Star Trek (Pinball)", MACHINE_IS_SKELETON_MECHANICAL) -GAME( 1979, kiss, 0, by35, by35, by35_state, by35_6, ROT0, "Bally", "Kiss", MACHINE_IS_SKELETON_MECHANICAL) -GAME( 1979, hglbtrtr, 0, by35, by35, by35_state, by35_6, ROT0, "Bally", "Harlem Globetrotters On Tour", MACHINE_IS_SKELETON_MECHANICAL) -GAME( 1979, dollyptn, 0, by35, by35, by35_state, by35_6, ROT0, "Bally", "Dolly Parton", MACHINE_IS_SKELETON_MECHANICAL) -GAME( 1979, paragon, 0, by35, by35, by35_state, by35_6, ROT0, "Bally", "Paragon", MACHINE_IS_SKELETON_MECHANICAL) +GAME( 1979, sst, 0, as2888, by35, by35_state, by35_6, ROT0, "Bally", "Supersonic", MACHINE_IS_SKELETON_MECHANICAL) +GAMEL(1978, playboy, 0, as2888, playboy, by35_state, playboy, ROT0, "Bally", "Playboy", MACHINE_MECHANICAL, layout_by35_playboy) +GAME( 1978, lostwrlp, 0, as2888, by35, by35_state, by35_6, ROT0, "Bally", "Lost World", MACHINE_IS_SKELETON_MECHANICAL) +GAME( 1978, smman, 0, as2888, by35, by35_state, by35_6, ROT0, "Bally", "Six Million Dollar Man", MACHINE_IS_SKELETON_MECHANICAL) +GAME( 1978, voltan, 0, as2888, by35, by35_state, by35_6, ROT0, "Bally", "Voltan Escapes Cosmic Doom", MACHINE_IS_SKELETON_MECHANICAL) +GAME( 1979, startrep, 0, as2888, by35, by35_state, by35_6, ROT0, "Bally", "Star Trek (Pinball)", MACHINE_IS_SKELETON_MECHANICAL) +GAME( 1979, kiss, 0, as2888, by35, by35_state, by35_6, ROT0, "Bally", "Kiss", MACHINE_IS_SKELETON_MECHANICAL) +GAME( 1979, hglbtrtr, 0, as2888, by35, by35_state, by35_6, ROT0, "Bally", "Harlem Globetrotters On Tour", MACHINE_IS_SKELETON_MECHANICAL) +GAME( 1979, dollyptn, 0, as2888, by35, by35_state, by35_6, ROT0, "Bally", "Dolly Parton", MACHINE_IS_SKELETON_MECHANICAL) +GAME( 1979, paragon, 0, as2888, by35, by35_state, by35_6, ROT0, "Bally", "Paragon", MACHINE_IS_SKELETON_MECHANICAL) // AS-3022 sound GAME( 1980, ngndshkr, 0, by35, by35, by35_state, by35_6, ROT0, "Bally", "Nitro Ground Shaker", MACHINE_IS_SKELETON_MECHANICAL) @@ -1875,7 +2416,7 @@ GAME( 1983, bmx, 0, by35, by35, by35_state, by35_7, ROT0, "Bally", GAME( 1983, granslam, 0, by35, by35, by35_state, by35_7, ROT0, "Bally", "Grand Slam", MACHINE_IS_SKELETON_MECHANICAL) GAME( 1983, granslam4, granslam, by35, by35, by35_state, by35_7, ROT0, "Bally", "Grand Slam (4 Players)", MACHINE_IS_SKELETON_MECHANICAL) GAME( 1983, goldball, 0, by35, by35, by35_state, by35_7, ROT0, "Bally", "Gold Ball (set 1)", MACHINE_IS_SKELETON_MECHANICAL) -GAME( 1983, goldballn, goldball, by35, by35, by35_state, by35_7, ROT0, "Bally / Oliver", "Gold Ball (set 2)", MACHINE_IS_SKELETON_MECHANICAL) +GAME( 1983, goldballn, goldball, by35, by35, by35_state, by35_7, ROT0, "Bally", "Gold Ball (Field Service Upgrade)", MACHINE_IS_SKELETON_MECHANICAL) // Squawk & Talk sound GAME( 1981, flashgdn, 0, by35, by35, by35_state, by35_7, ROT0, "Bally", "Flash Gordon", MACHINE_IS_SKELETON_MECHANICAL) @@ -1904,23 +2445,23 @@ GAME( 1984, blakpyra, 0, by35, by35, by35_state, by35_7, ROT0, "Bally", GAME( 1985, cybrnaut, 0, by35, by35, by35_state, by35_7, ROT0, "Bally", "Cybernaut", MACHINE_IS_SKELETON_MECHANICAL) // Other manufacturers -GAME( 1984, suprbowl, xsandos, by35, by35, by35_state, by35_7, ROT0, "Bell Games", "Super Bowl", MACHINE_IS_SKELETON_MECHANICAL) -GAME( 1984, tigerrag, kosteel, by35, by35, by35_state, by35_7, ROT0, "Bell Games", "Tiger Rag", MACHINE_IS_SKELETON_MECHANICAL) -GAME( 1985, cosflash, flashgdn, by35, by35, by35_state, by35_7, ROT0, "Bell Games", "Cosmic Flash", MACHINE_IS_SKELETON_MECHANICAL) -GAME( 1985, newwave, blakpyra, by35, by35, by35_state, by35_7, ROT0, "Bell Games", "New Wave", MACHINE_IS_SKELETON_MECHANICAL) -GAME( 1985, saturn2, spyhuntr, by35, by35, by35_state, by35_7, ROT0, "Bell Games", "Saturn 2", MACHINE_IS_SKELETON_MECHANICAL) -GAME( 1985, worlddef, 0, by35, by35, by35_state, by35_7, ROT0, "Bell Games", "World Defender", MACHINE_IS_SKELETON_MECHANICAL) -GAME( 1986, spacehaw, cybrnaut, by35, by35, by35_state, by35_7, ROT0, "Nuova Bell Games", "Space Hawks", MACHINE_IS_SKELETON_MECHANICAL) -GAME( 1986, darkshad, 0, by35, by35, by35_state, by35_7, ROT0, "Nuova Bell Games", "Dark Shadow", MACHINE_IS_SKELETON_MECHANICAL) -GAME( 1986, skflight, 0, by35, by35, by35_state, by35_7, ROT0, "Nuova Bell Games", "Skill Flight", MACHINE_IS_SKELETON_MECHANICAL) -GAME( 1987, cobrap, 0, by35, by35, by35_state, by35_7, ROT0, "Nuova Bell Games", "Cobra", MACHINE_IS_SKELETON_MECHANICAL) -GAME( 1987, futrquen, 0, by35, by35, by35_state, by35_7, ROT0, "Nuova Bell Games", "Future Queen", MACHINE_IS_SKELETON_MECHANICAL) -GAME( 1987, f1gpp, 0, by35, by35, by35_state, by35_7, ROT0, "Nuova Bell Games", "F1 Grand Prix", MACHINE_IS_SKELETON_MECHANICAL) -GAME( 1988, toppin, 0, by35, by35, by35_state, by35_7, ROT0, "Nuova Bell Games", "Top Pin", MACHINE_IS_SKELETON_MECHANICAL) -GAME( 1988, uboat65, 0, by35, by35, by35_state, by35_7, ROT0, "Nuova Bell Games", "U-boat 65", MACHINE_IS_SKELETON_MECHANICAL) -GAME( 1986, bullseye, 0, by35, by35, by35_state, by35_7, ROT0, "Grand Products", "301/Bullseye", MACHINE_IS_SKELETON_MECHANICAL) -GAME( 1988, bbbowlin, 0, by35, by35, by35_state, by35_7, ROT0, "United", "Big Ball Bowling (Bowler)", MACHINE_IS_SKELETON_MECHANICAL) -GAME( 1988, monrobwl, 0, by35, by35, by35_state, by35_7, ROT0, "Monroe Bowling Co.", "Stars & Strikes (Bowler)", MACHINE_IS_SKELETON_MECHANICAL) -GAME( 1984, mdntmrdr, 0, by35, by35, by35_state, by35_6, ROT0, "Bally Midway", "Midnight Marauders (Gun game)", MACHINE_IS_SKELETON_MECHANICAL) -GAME( 1988, blbeauty, 0, by35, by35, by35_state, by35_7, ROT0, "Stern", "Black Beauty (Shuffle)", MACHINE_IS_SKELETON_MECHANICAL) -GAME( 1984, myststar, 0, by35, by35, by35_state, by35_6, ROT0, "Zaccaria", "Mystic Star", MACHINE_IS_SKELETON_MECHANICAL) +GAME( 1984, suprbowl, xsandos, by35, by35, by35_state, by35_7, ROT0, "Bell Games", "Super Bowl", MACHINE_IS_SKELETON_MECHANICAL) +GAME( 1984, tigerrag, kosteel, by35, by35, by35_state, by35_7, ROT0, "Bell Games", "Tiger Rag", MACHINE_IS_SKELETON_MECHANICAL) +GAME( 1985, cosflash, flashgdn, by35, by35, by35_state, by35_7, ROT0, "Bell Games", "Cosmic Flash", MACHINE_IS_SKELETON_MECHANICAL) +GAME( 1985, newwave, blakpyra, by35, by35, by35_state, by35_7, ROT0, "Bell Games", "New Wave", MACHINE_IS_SKELETON_MECHANICAL) +GAME( 1985, saturn2, spyhuntr, by35, by35, by35_state, by35_7, ROT0, "Bell Games", "Saturn 2", MACHINE_IS_SKELETON_MECHANICAL) +GAME( 1985, worlddef, 0, by35, by35, by35_state, by35_7, ROT0, "Bell Games", "World Defender", MACHINE_IS_SKELETON_MECHANICAL) +GAME( 1986, spacehaw, cybrnaut, by35, by35, by35_state, by35_7, ROT0, "Nuova Bell Games", "Space Hawks", MACHINE_IS_SKELETON_MECHANICAL) +GAME( 1986, darkshad, 0, nuovo, by35, by35_state, by35_7, ROT0, "Nuova Bell Games", "Dark Shadow", MACHINE_IS_SKELETON_MECHANICAL) +GAME( 1986, skflight, 0, nuovo, by35, by35_state, by35_7, ROT0, "Nuova Bell Games", "Skill Flight", MACHINE_IS_SKELETON_MECHANICAL) +GAME( 1987, cobrap, 0, nuovo, by35, by35_state, by35_7, ROT0, "Nuova Bell Games", "Cobra", MACHINE_IS_SKELETON_MECHANICAL) +GAME( 1987, futrquen, 0, nuovo, by35, by35_state, by35_7, ROT0, "Nuova Bell Games", "Future Queen", MACHINE_IS_SKELETON_MECHANICAL) +GAME( 1987, f1gpp, 0, nuovo, by35, by35_state, by35_7, ROT0, "Nuova Bell Games", "F1 Grand Prix", MACHINE_IS_SKELETON_MECHANICAL) +GAME( 1988, toppin, 0, nuovo, by35, by35_state, by35_7, ROT0, "Nuova Bell Games", "Top Pin", MACHINE_IS_SKELETON_MECHANICAL) +GAME( 1988, uboat65, 0, nuovo, by35, by35_state, by35_7, ROT0, "Nuova Bell Games", "U-boat 65", MACHINE_IS_SKELETON_MECHANICAL) +GAME( 1986, bullseye, 0, by35, by35, by35_state, by35_7, ROT0, "Grand Products", "301/Bullseye", MACHINE_IS_SKELETON_MECHANICAL) +GAME( 1988, bbbowlin, 0, by35, by35, by35_state, by35_7, ROT0, "United", "Big Ball Bowling (Bowler)", MACHINE_IS_SKELETON_MECHANICAL) +GAME( 1988, monrobwl, 0, by35, by35, by35_state, by35_7, ROT0, "Monroe Bowling Co.", "Stars & Strikes (Bowler)", MACHINE_IS_SKELETON_MECHANICAL) +GAME( 1984, mdntmrdr, 0, by35, by35, by35_state, by35_6, ROT0, "Bally Midway", "Midnight Marauders (Gun game)", MACHINE_IS_SKELETON_MECHANICAL) +GAME( 1988, blbeauty, 0, by35, by35, by35_state, by35_7, ROT0, "Stern", "Black Beauty (Shuffle)", MACHINE_IS_SKELETON_MECHANICAL) +GAME( 1984, myststar, 0, by35, by35, by35_state, by35_6, ROT0, "Zaccaria", "Mystic Star", MACHINE_IS_SKELETON_MECHANICAL) diff --git a/src/mame/drivers/camplynx.c b/src/mame/drivers/camplynx.c index 30101b2ab3c..aa8d605a2b2 100644 --- a/src/mame/drivers/camplynx.c +++ b/src/mame/drivers/camplynx.c @@ -4,7 +4,8 @@ Camputers Lynx - 05/2009 Skeleton driver. + 2009-05 Skeleton driver. + 2015-10-23 Working The Lynx was an 8-bit British home computer that was first released in early 1983 as a 48 kB model. @@ -62,7 +63,8 @@ - 48k and 96k are basically the same machine. 128k is different. + 48k and 96k are basically the same machine. 128k is different. Most software for + one won't work properly on the other, due to major hardware differences. This computer is weird, because it allows reads and writes from multiple banks at the same time. We can write to multiple banks, but we must limit ourselves @@ -81,24 +83,36 @@ - Cassette tapes made on 128k are a different speed to 48k tapes. To load a 128k tape on a 48k system, enter TAPE 3 before loading. (2,3,4,5 all seem to work). - When loading, there's no wildcard; you must specify the name. - - INT should be activated by the MC6845 CURS pin (inverted), or by holding down - the BREAK key. However, the rom leaves interrupts disabled, so none of this works. + - INT should be activated by the MC6845 CURS pin, but this doesn't happen. Using + VSYNC instead. Required for CP/M to boot. + - Info about disks: + - You must firstly do XROM to initialise the DOS ROM. + - Then do EXT DIR with a Lynx-formatted disk, or EXT BOOT with a CP/M disk. + - Then, on a Lynx-formatted disk, do EXT LOAD "name" or EXT MLOAD "name". To Do: - - Need disk-based software (only ones found are LDF format) - - finish memory banking - - disk (only partially done) - printer - joysticks - - UART type COM8017 - Bugs: - - YNXVADERS: Top row of invaders is missing and can't be killed, but they - continue to fire at you. This makes the game unwinnable. + - UART type COM8017 (48k,96k only) (not used by any programs) + - There's a few games that are not perfectly perfect, but it runs at least + as well as any other Lynx emulator. + Game bugs (reproducible in Jynx): - 3D Monster Craze: When attacked, garbage on screen - 3D Monster Craze: When you find the key, the game freezes - - LogiChess: unable to enter an acceptable move - - Power Blaster: Bad Tape + - YNXVADERS: Colours of top 2 rows of invaders should be white and yellow + but they show as magenta and red. After game ends, title screen has wrong + colours. + + Game Hints: + Most games have instructions or are quite obvious. + - Power Blaster. Using debug.exe, change byte 1965 from FE to F2 to fix + the loading. Then, arrows to turn, Shift to clean out a whole row of dots. + You can then move into the vacated areas. Even though it says you have + 3 lives, you actually only have 1. + - Backgammon. This is just the instructions. The game is missing. + - LogiChess. The page at http://www.nascomhomepage.com/games/logichess.html + should provide enough clues to enable you to work out how to play. ****************************************************************************/ @@ -110,6 +124,7 @@ #include "sound/wave.h" #include "formats/camplynx_cas.h" #include "machine/wd_fdc.h" +#include "formats/camplynx_dsk.h" class camplynx_state : public driver_device { @@ -127,12 +142,8 @@ public: , m_floppy1(*this, "fdc:1") { } - // 48k DECLARE_WRITE8_MEMBER(bank1_w); - DECLARE_WRITE8_MEMBER(bank5_w); DECLARE_WRITE8_MEMBER(bank6_w); - DECLARE_WRITE8_MEMBER(bank7_w); - DECLARE_WRITE8_MEMBER(bank8_w); DECLARE_WRITE8_MEMBER(port58_w); // drive select etc DECLARE_WRITE8_MEMBER(port7f_w); // banking 48k DECLARE_READ8_MEMBER(port80_r); // cassin for 48k @@ -140,10 +151,12 @@ public: DECLARE_READ8_MEMBER(port82_r); // cassin for 128k DECLARE_WRITE8_MEMBER(port82_w); // banking 128k DECLARE_WRITE8_MEMBER(port84_w); // dac port 48k + DECLARE_INPUT_CHANGED_MEMBER(brk_key); DECLARE_MACHINE_RESET(lynx48k); DECLARE_MACHINE_RESET(lynx128k); DECLARE_DRIVER_INIT(lynx48k); DECLARE_DRIVER_INIT(lynx128k); + DECLARE_FLOPPY_FORMATS(camplynx_floppy_formats); MC6845_UPDATE_ROW(lynx48k_update_row); MC6845_UPDATE_ROW(lynx128k_update_row); required_device<palette_device> m_palette; @@ -200,7 +213,7 @@ d7 = read from bank 4 */ membank("bankr5")->set_entry(0); membank("bankr6")->set_entry(1); membank("bankr7")->set_entry(2); - membank("bankr8")->set_entry(3); + membank("bankr8")->set_entry(7); break; case 0x20: case 0x24: @@ -213,7 +226,7 @@ d7 = read from bank 4 */ membank("bankr5")->set_entry(12); membank("bankr6")->set_entry(13); membank("bankr7")->set_entry(14); - membank("bankr8")->set_entry(15); + membank("bankr8")->set_entry(BIT(m_port58, 4) ? 15 : 7); break; case 0x30: case 0x34: @@ -235,9 +248,9 @@ d7 = read from bank 4 */ membank("bankr3")->set_entry(26); membank("bankr4")->set_entry(27); membank("bankr5")->set_entry(28); - membank("bankr6")->set_entry(28); + membank("bankr6")->set_entry(29); membank("bankr7")->set_entry(30); - membank("bankr8")->set_entry(30); + membank("bankr8")->set_entry(31); break; case 0x40: case 0x60: @@ -250,9 +263,9 @@ d7 = read from bank 4 */ membank("bankr3")->set_entry(18); membank("bankr4")->set_entry(19); membank("bankr5")->set_entry(20); - membank("bankr6")->set_entry(20); + membank("bankr6")->set_entry(21); membank("bankr7")->set_entry(22); - membank("bankr8")->set_entry(22); + membank("bankr8")->set_entry(23); break; case 0x54: case 0x74: @@ -261,9 +274,9 @@ d7 = read from bank 4 */ membank("bankr3")->set_entry(2); membank("bankr4")->set_entry(27); membank("bankr5")->set_entry(28); - membank("bankr6")->set_entry(28); + membank("bankr6")->set_entry(29); membank("bankr7")->set_entry(30); - membank("bankr8")->set_entry(30); + membank("bankr8")->set_entry(31); break; case 0x50: case 0x70: @@ -276,9 +289,9 @@ d7 = read from bank 4 */ membank("bankr3")->set_entry(2); membank("bankr4")->set_entry(19); membank("bankr5")->set_entry(20); - membank("bankr6")->set_entry(20); + membank("bankr6")->set_entry(21); membank("bankr7")->set_entry(22); - membank("bankr8")->set_entry(22); + membank("bankr8")->set_entry(23); break; default: printf("Banking code %X not handled\n", m_bankdata); @@ -319,9 +332,7 @@ d0 = read from bank 4 */ membank("bankr8")->set_entry(7); break; case 0x02: - case 0x06: case 0x0a: - case 0x0e: membank("bankr1")->set_entry(8); membank("bankr2")->set_entry(9); membank("bankr3")->set_entry(10); @@ -345,7 +356,9 @@ d0 = read from bank 4 */ membank("bankr8")->set_entry(BIT(m_port58, 4) ? 15 : 7); break; case 0x04: + case 0x06: case 0x0c: + case 0x0e: membank("bankr1")->set_entry(16); membank("bankr2")->set_entry(17); membank("bankr3")->set_entry(18); @@ -397,11 +410,11 @@ static ADDRESS_MAP_START( lynx48k_mem, AS_PROGRAM, 8, camplynx_state ) AM_RANGE(0x2000,0x3fff) AM_READ_BANK("bankr2") AM_RANGE(0x4000,0x5fff) AM_READ_BANK("bankr3") AM_RANGE(0x6000,0x7fff) AM_READ_BANK("bankr4") - AM_RANGE(0x8000,0x9fff) AM_READ_BANK("bankr5") AM_WRITE(bank5_w) - AM_RANGE(0xa000,0xbfff) AM_READ_BANK("bankr6") AM_WRITE(bank6_w) - AM_RANGE(0xc000,0xdfff) AM_READ_BANK("bankr7") AM_WRITE(bank7_w) - AM_RANGE(0xe000,0xffff) AM_READ_BANK("bankr8") AM_WRITE(bank8_w) - AM_RANGE(0x0000,0x7fff) AM_WRITE(bank1_w) + AM_RANGE(0x8000,0x9fff) AM_READ_BANK("bankr5") + AM_RANGE(0xa000,0xbfff) AM_READ_BANK("bankr6") + AM_RANGE(0xc000,0xdfff) AM_READ_BANK("bankr7") + AM_RANGE(0xe000,0xffff) AM_READ_BANK("bankr8") + AM_RANGE(0x0000,0xffff) AM_WRITE(bank6_w) ADDRESS_MAP_END static ADDRESS_MAP_START( lynx128k_mem, AS_PROGRAM, 8, camplynx_state ) @@ -473,7 +486,7 @@ ADDRESS_MAP_END static INPUT_PORTS_START( lynx48k ) PORT_START("LINE0") PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Shift") PORT_CODE(KEYCODE_LSHIFT) PORT_CODE(KEYCODE_RSHIFT) PORT_CHAR(UCHAR_SHIFT_1) - PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Esc") PORT_CODE(KEYCODE_ESC) PORT_CHAR(27) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Esc") PORT_CODE(KEYCODE_ESC) PORT_CHAR(27) PORT_CHANGED_MEMBER(DEVICE_SELF, camplynx_state, brk_key, 0) PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Down") PORT_CODE(KEYCODE_DOWN) PORT_CHAR(UCHAR_MAMEKEY(DOWN)) PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Up") PORT_CODE(KEYCODE_UP) PORT_CHAR(UCHAR_MAMEKEY(UP)) PORT_BIT(0x0e, IP_ACTIVE_LOW, IPT_UNUSED) @@ -549,6 +562,11 @@ static INPUT_PORTS_START( lynx48k ) PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Delete") PORT_CODE(KEYCODE_BACKSPACE) PORT_CHAR(8) INPUT_PORTS_END +INPUT_CHANGED_MEMBER( camplynx_state::brk_key ) +{ + m_maincpu->set_input_line(0, newval ? CLEAR_LINE : ASSERT_LINE); +} + WRITE8_MEMBER( camplynx_state::bank1_w ) { if BIT(m_wbyte, 0) @@ -561,44 +579,28 @@ WRITE8_MEMBER( camplynx_state::bank1_w ) m_p_ram[offset+0x40000] = data; } -WRITE8_MEMBER( camplynx_state::bank5_w ) -{ - if BIT(m_wbyte, 0) - m_p_ram[offset+0x18000] = data; - if ((m_wbyte & 0x22) == 0x02) - m_p_ram[offset+0x28000] = data; - if ((m_wbyte & 0x44) == 0x04) - m_p_ram[offset+0x38000] = data; -} - WRITE8_MEMBER( camplynx_state::bank6_w ) { if BIT(m_wbyte, 0) - m_p_ram[offset+0x1a000] = data; - if ((m_wbyte & 0x22) == 0x02) - m_p_ram[offset+0x28000] = data; - if ((m_wbyte & 0x44) == 0x04) - m_p_ram[offset+0x38000] = data; -} + m_p_ram[offset+0x10000] = data; -WRITE8_MEMBER( camplynx_state::bank7_w ) -{ - if BIT(m_wbyte, 0) - m_p_ram[offset+0x1c000] = data; - if ((m_wbyte & 0x22) == 0x02) - m_p_ram[offset+0x2c000] = data; - if ((m_wbyte & 0x44) == 0x04) - m_p_ram[offset+0x3c000] = data; -} + offset &= 0x5fff; -WRITE8_MEMBER( camplynx_state::bank8_w ) -{ - if BIT(m_wbyte, 0) - m_p_ram[offset+0x1e000] = data; if ((m_wbyte & 0x22) == 0x02) - m_p_ram[offset+0x2c000] = data; + { + m_p_ram[offset | 0x20000] = data; + m_p_ram[offset | 0x22000] = data; + m_p_ram[offset | 0x28000] = data; + m_p_ram[offset | 0x2a000] = data; + } + if ((m_wbyte & 0x44) == 0x04) - m_p_ram[offset+0x3c000] = data; + { + m_p_ram[offset | 0x30000] = data; + m_p_ram[offset | 0x32000] = data; + m_p_ram[offset | 0x38000] = data; + m_p_ram[offset | 0x3a000] = data; + } } READ8_MEMBER( camplynx_state::port80_r ) @@ -757,7 +759,6 @@ d7 = 125ns or 250ns */ else port7f_w(space, 0, m_bankdata); } - m_fdc->dden_w(BIT(data, 7)); floppy_image_device *floppy = NULL; if ((data & 3) == 0) floppy = m_floppy0->get_device(); @@ -773,6 +774,9 @@ d7 = 125ns or 250ns */ m_floppy1->get_device()->mon_w(BIT(data, 3)); } +FLOPPY_FORMATS_MEMBER( camplynx_state::camplynx_floppy_formats ) + FLOPPY_CAMPLYNX_FORMAT +FLOPPY_FORMATS_END static SLOT_INTERFACE_START( camplynx_floppies ) SLOT_INTERFACE( "drive0", FLOPPY_525_QD ) @@ -791,10 +795,10 @@ static MACHINE_CONFIG_FRAGMENT( lynx_common ) MACHINE_CONFIG_END static MACHINE_CONFIG_FRAGMENT( lynx_disk ) - MCFG_FD1793_ADD("fdc", XTAL_24MHz / 3) // no idea what crystal, no schematic of fdc found - MCFG_FLOPPY_DRIVE_ADD("fdc:0", camplynx_floppies, "drive0", floppy_image_device::default_floppy_formats) + MCFG_FD1793_ADD("fdc", XTAL_24MHz / 24) + MCFG_FLOPPY_DRIVE_ADD("fdc:0", camplynx_floppies, "drive0", camplynx_state::camplynx_floppy_formats) MCFG_FLOPPY_DRIVE_SOUND(true) - MCFG_FLOPPY_DRIVE_ADD("fdc:1", camplynx_floppies, "drive1", floppy_image_device::default_floppy_formats) + MCFG_FLOPPY_DRIVE_ADD("fdc:1", camplynx_floppies, "drive1", camplynx_state::camplynx_floppy_formats) MCFG_FLOPPY_DRIVE_SOUND(true) MACHINE_CONFIG_END @@ -827,7 +831,7 @@ static MACHINE_CONFIG_START( lynx48k, camplynx_state ) MCFG_MC6845_SHOW_BORDER_AREA(false) MCFG_MC6845_CHAR_WIDTH(8) MCFG_MC6845_UPDATE_ROW_CB(camplynx_state, lynx48k_update_row) - MCFG_MC6845_OUT_CUR_CB(DEVWRITELINE("maincpu", z80_device, irq_line)) + MCFG_MC6845_OUT_VSYNC_CB(DEVWRITELINE("maincpu", z80_device, irq_line)) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( lynx96k, lynx48k ) @@ -867,7 +871,7 @@ static MACHINE_CONFIG_START( lynx128k, camplynx_state ) MCFG_MC6845_SHOW_BORDER_AREA(false) MCFG_MC6845_CHAR_WIDTH(8) MCFG_MC6845_UPDATE_ROW_CB(camplynx_state, lynx128k_update_row) - MCFG_MC6845_OUT_CUR_CB(DEVWRITELINE("maincpu", z80_device, irq_line)) + MCFG_MC6845_OUT_VSYNC_CB(DEVWRITELINE("maincpu", z80_device, irq_line)) MCFG_FRAGMENT_ADD(lynx_disk) MACHINE_CONFIG_END @@ -932,5 +936,5 @@ ROM_END /* Driver */ /* YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS */ COMP( 1983, lynx48k, 0, 0, lynx48k, lynx48k, camplynx_state, lynx48k, "Camputers", "Lynx 48k", 0 ) -COMP( 1983, lynx96k, lynx48k, 0, lynx96k, lynx48k, camplynx_state, lynx48k, "Camputers", "Lynx 96k", MACHINE_NOT_WORKING) -COMP( 1983, lynx128k, lynx48k, 0, lynx128k, lynx48k, camplynx_state, lynx128k, "Camputers", "Lynx 128k", MACHINE_NOT_WORKING) +COMP( 1983, lynx96k, lynx48k, 0, lynx96k, lynx48k, camplynx_state, lynx48k, "Camputers", "Lynx 96k", 0 ) +COMP( 1983, lynx128k, lynx48k, 0, lynx128k, lynx48k, camplynx_state, lynx128k, "Camputers", "Lynx 128k", 0 ) diff --git a/src/mame/drivers/cardline.c b/src/mame/drivers/cardline.c index 8f2dd4c5bad..460b1e7dfa0 100644 --- a/src/mame/drivers/cardline.c +++ b/src/mame/drivers/cardline.c @@ -139,7 +139,8 @@ WRITE_LINE_MEMBER(cardline_state::hsync_changed) { /* update any video up to the current scanline */ m_hsync_q = (state ? 0x00 : 0x10); - m_screen->update_now(); +// m_screen->update_now(); + m_screen->update_partial(m_screen->vpos()); } WRITE_LINE_MEMBER(cardline_state::vsync_changed) diff --git a/src/mame/drivers/cat.c b/src/mame/drivers/cat.c index 161441bb667..39c31b740bf 100644 --- a/src/mame/drivers/cat.c +++ b/src/mame/drivers/cat.c @@ -3,7 +3,6 @@ /*************************************************************************** Canon Cat, Model V777 - IAI Swyft Model P0001 Copyright (C) 2009-2013 Miodrag Milanovic and Jonathan Gevaryahu AKA Lord Nightmare With information and help from John "Sandy" Bumgarner, Dwight Elvey, Charles Springer, Terry Holmes, Jonathan Sand, Aza Raskin and others. @@ -112,29 +111,6 @@ phosphor_life 0.93,0.95,0.87 which is fairly close but may actually be too SHORT compared to the real thing. -Swyft versions: -There are at least 4 variants of machines called 'swyft': -* The earliest desktop units which use plexi or rubber-tooled case and an - angled monitor; about a dozen were made and at least two of clear plexi. - These are sometimes called "wrinkled" swyfts. 5.25" drive, they may be able - to read Apple2 Swyftware/Swyftdisk and Swyftcard-created disks. - It is possible no prototypes of this type got beyond the 'runs forth console only' stage. - http://archive.computerhistory.org/resources/access/physical-object/2011/09/102746929.01.01.lg.JPG - http://www.digibarn.com/collections/systems/swyft/Swyft-No2-05-1271.jpg - http://www.digibarn.com/friends/jef-raskin/slides/iai/A%20-687%20SWYFTPRO.JPG -* The early "flat cat" or "roadkill" portable LCD screen units with a white - case and just a keyboard. Model SP0001 - http://www.digibarn.com/collections/systems/swyft/Image82.jpg -* The later "ur-cat" desktop units which use a machine tooled case and look - more or less like the canon cat. Around 100-200 were made. 3.5" drive. - These have a fully functional EDDE editor as the cat does, and can even compile - forth programs. - (the 'swyft' driver is based on one of these) -* The very late portable LCD units with a dark grey case and a row of hotkey - buttons below the screen. Not dumped yet. At least one functional prototype exists. - At least one plastic mockup exists with no innards. - http://www.digibarn.com/collections/systems/swyft/swyft.jpg - Canon Cat versions: There is really only one version of the cat which saw wide release, the US version. * It is possible a very small number of UK/European units were released as a test. @@ -161,93 +137,6 @@ X1: 19.968Mhz, used by GA2 (plus a PLL to multiply by 2?), and divide by 4 for X2: 3.579545Mhz, used by the DTMF generator chip AMI S2579 at IC40 X3: 2.4576Mhz, used by the modem chip AMI S35213 at IC37 -IAI Swyft: -Board name: 950-0001C -"INFORMATION APPLIANCE INC. COPYRIGHT 1985" - _________________|||||||||___________________________________________________________________________________ -| J8 [=======J3=======] ____ Trans- | -== / \ (E2) former | -==Jx 74LS107 J5 |PB1 | uA339 MC3403 -----| -| 7407 \____/ J7 = -| Y1 "TIMING B" 74LS132 74LS175 -----| -| ____________ 4N37 Relay -----| -| TMS4256 74LS161 "DECODE E" "DISK 3.5C" | | J6 = -| | MC6850P | -----| -| TMS4256 74LS166 74HCT259 74LS299 '------------' MC3403 MC3403 _____| -| ___________________ ___________________ || | = -| TMS4256 74LS373 | | | | J2 | J1 = -| | MC68008P8 | | R6522P | || I P R | = -| TMS4256 74F153 '-------------------' '-------------------' MN4053 || MN4053 N R E | B = -| (E1) D O S | R = -| TMS4256 74F153 74HCT08 __________ ___________________ MC14412 DS1489 U E T I | E = -| | | | | || C S E S | A = -| TMS4256 74F153 74HC4040E | AM27256 | | R6522P | || T D C T | K = -| '----------' '-------------------' || INFORMATION O T O | O = -| TMS4256 74F153 "VIDEO 2B" .----------. J4 APPLIANCE INC. R I R | U = -| | AM27256 | 74HC02 74HC374 || Copyright 1985 S O S | T = -| TMS4256 74F153 74LS393 B1|__________| || UM95089 Y2 N | = -|_____________________________[________J9___]__________________________________________________D13______|_____= - -*Devices of interest: -J1: breakout of joystick, serial/rs232, hex-keypad, parallel port, and forth switch (and maybe cassette?) pins - DIL 60 pin 2-row right-angle rectangular connector with metal shield contact; - not all 60 pins are populated in the connector, only pins 1-6, 8, 13-15, 17-18, 23-30, 35-60 are present - (traced partly by dwight) -J2: unpopulated 8-pin sip header, serial/rs232-related? - (vcc ? ? ? ? ? ? gnd) (random guess: txd, rxd, rts, cts, dsr, dtr, and one pin could be cd/ri though the modem circuit may do that separately?) -J3: Floppy Connector - (standard DIL 34 pin 2-row rectangular connector for mini-shugart/pc floppy cable; pin 2 IS connected somewhere and ?probably? is used for /DISKCHANGE like on an Amiga, with pin 34 being /TRUEREADY?) - (as opposed to normal ibm pc 3.5" drives where pin 2 is unconnected or is /DENSITY *input to drive*, and pin 34 is /DISKCHANGE) -J4: 18-pin sip header for keyboard ribbon cable; bottom edge of board is pin 1 - Pins: - 1: GND through 220k resistor r78 - 2: ? phone hook related? anode of diode d7; one of the pins of relay k2; topmost (boardwise) pin of transistor Q10 - 3: 74HCT34 pin - -J5: locking-tab-type "CONN HEADER VERT 4POS .100 TIN" connector for supplying power - through a small cable with a berg connector at the other end, to the floppy drive - (5v gnd gnd 12v) -J6: Phone connector, rj11 jack -J7: Line connector, rj11 jack -J8: 9-pin Video out/power in connector "CONN RECEPT 6POS .156 R/A PCB" plus "CONN RECEPT 3POS .156 R/A PCB" acting as one 9-pin connector - (NC ? ? ? NC NC ? 12v 5v) (video, vsync, hsync and case/video-gnd are likely here) - (the video pinout of the cat is: (Video Vsync Hsync SyncGnd PwrGnd PwrGnd +5v(VCC) +12v(VDD) -12v(VEE)) which is not the same as the swyft. -J9: unpopulated DIL 40-pin straight connector for a ROM debug/expansion/RAM-shadow daughterboard - the pins after pin 12 connect to that of the ROM-LO 27256 pinout counting pins 1,28,2,27,3,26,etc - the ROM-HI rom has a different /HICE pin which is not connected to this connector - /LOCE is a15 - /HICE is !a15 - /ROM_OE comes from pin 14 of DECODE_E pal, and is shorted to /ROM_OE' by the cuttable jumper B1 which is not cut - /ROM_OE' goes to the two EPROMS - DECODE_18 is DECODE_E pal pin 18 - pin 1 (GND) is in the lower left and the pins count low-high then to the right - (gnd N/C E_CLK R/W /ROM_OE a17 vcc a14 a13 a8 a9 a11 /ROM_OE' a10 a15 d7 d6 d5 d4 d3 ) - (GND /IPL1 DECODE_18 /RESET gnd a16 vcc a12 a7 a6 a5 a4 a3 a2 a1 a0 d0 d1 d2 gnd) -Jx: 4 pin on top side, 6 pin on bottom side edge ?debug? connector (doesn't have a Jx number) - (trace me!) -B1: a cuttable trace on the pcb. Not cut, affects one of the pins on the unpopulated J9 connector only. -E1: jumper, unknown purpose, not set -E2: jumper, unknown purpose, not set -D13: LED -R6522P (upper): parallel port via -R6522P (lower): keyboard via -UM95089: DTMF Tone generator chip (if you read the datasheet this is technically ROM based!) -Y1: 15.8976Mhz, main clock? -Y2: 3.579545Mhz, used by the DTMF generator chip UM95089 (connects to pins 7 and 8 of it) -TMS4256-15NL - 262144 x 1 DRAM -PB1 - piezo speaker - -*Pals: -"TIMING B" - AMPAL16R4APC (marked on silkscreen "TIMING PAL") -"DECODE E" - AMPAL16L8PC (marked on silkscreen "DECODE PAL") -"VIDEO 2B" - AMPAL16R4PC (marked on silkscreen "VIDEO PAL") -"DISK 3.5C" - AMPAL16R4PC (marked on silkscreen "DISK PAL") - -*Deviations from silkscreen: -4N37 (marked on silkscreen "4N35") -74F153 (marked on silkscreen "74ALS153") -74HCT259 is socketed, possibly intended that the rom expansion daughterboard will have a ribbon cable fit in its socket? - ToDo: * Canon Cat @@ -299,114 +188,6 @@ ToDo: - Hook the floppy control register readback up properly, things seem to get confused. - -* Swyft -- Figure out the keyboard (interrupts are involved? or maybe an NMI on a - timer/vblank? It is possible this uses a similar 'keyboard read int' - to what the cat does) -- get the keyboard scanning actually working; the VIAs are going nuts right now. -- Beeper (on one of the vias?) -- vblank/hblank stuff -- Get the 6850 ACIA working for communications -- Floppy (probably similar to the Cat) -- Centronics port (attached to one of the VIAs) -- Joystick port (also likely on a via) -- Keypad? (also likely on a via done as a grid scan?) -- Forth button (on the port on the back; keep in mind shift-usefront-space ALWAYS enables forth on a swyft) -- Multple undumped firmware revisions exist (330 and 331 are dumped) - -// 74ls107 @ u18 pin 1 is 68008 /BERR pin - -// mc6850 @ u33 pin 2 (RX_DATA) is -// mc6850 @ u33 pin 3 (RX_CLK) is 6522 @ u35 pin 17 (PB7) -// mc6850 @ u33 pin 4 (TX_CLK) is 6522 @ u35 pin 17 (PB7) -// mc6850 @ u33 pin 5 (/RTS) is -// mc6850 @ u33 pin 6 (TX_DATA) is -// mc6850 @ u33 pin 7 (/IRQ) is 68008 /IPL1 pin 41 -// mc6850 @ u33 pin 8 (CS0) is 68008 A12 pin 10 -// mc6850 @ u33 pin 9 (CS2) is DECODE E pin 18 -// mc6850 @ u33 pin 10 (CS1) is 68008 /BERR pin 40 -// mc6850 @ u33 pin 11 (RS) is 68008 A0 pin 46 -// mc6850 @ u33 pin 13 (R/W) is 68008 R/W pin 30 -// mc6850 @ u33 pin 14 (E) is 68008 E pin 38 -// mc6850 @ u33 pin 15-22 (D7-D0) are 68008 D7 to D0 pins 20-27 -// mc6850 @ u33 pin 23 (/DCD) is 74hc02 @ u35 pin 1 -// mc6850 @ u33 pin 24 (/CTS) is N/C? - -// 6522 @ u34: -// pin 2 (PA0) : -// pin 3 (PA1) : -// pin 4 (PA2) : -// pin 5 (PA3) : -// pin 6 (PA4) : -// pin 7 (PA5) : -// pin 8 (PA6) : -// pin 9 (PA7) : -// pin 10 (PB0) : -// pin 11 (PB1) : -// pin 12 (PB2) : -// pin 13 (PB3) : -// pin 14 (PB4) : -// pin 15 (PB5) : -// pin 16 (PB6) : -// pin 17 (PB7) : -// pin 18 (CB1) : ?from/to? Floppy connector j3 pin 8 -// pin 19 (CB2) : ?from/to? 6522 @ u35 pin 16 (PB6) -// pin 21 (/IRQ) : out to 68008 /IPL1 pin 41 -// pin 22 (R/W) : in from 68008 R/W pin 30 -// pin 23 (/CS2) : in from DECODE E pin 18 -// pin 24 (CS1) : in from 68008 A13 pin 11 -// pin 25 (Phi2) : in from 68008 E pin 38 -// pins 26-33 : in/out from/to 68008 D7 to D0 pins 20-27 -// pin 34 (/RES) : in from 68008 /RESET pin 37 AND 68008 /HALT pin 36 -// pins 35-38 (RS3-RS0) are 68008 A9-A6 pins 7-4 -// pin 39 (CA2) is through inductor L11 and resistor r128 to peripheral connector pin 35 <end minus 26> -// pin 40 (CA1) is through inductor L30 and resistor r138 to peripheral connector pin 53 <end minus 8> - -// 6522 @ u35 -// pin 2 (PA0) : -// pin 3 (PA1) : -// pin 4 (PA2) : -// pin 5 (PA3) : -// pin 6 (PA4) : -// pin 7 (PA5) : -// pin 8 (PA6) : -// pin 9 (PA7) : -// pin 10 (PB0) : -// pin 11 (PB1) : in from 74hc02 @ u36 pin 4 -// pin 12 (PB2) : -// pin 13 (PB3) : -// pin 14 (PB4) : -// pin 15 (PB5) : -// pin 16 (PB6) : 6522 @ u34 pin 19 (CB2) -// pin 17 (PB7) : mc6850 @ u33 pins 3 and 4 (RX_CLK, TX_CLK) -// pin 18 (CB1) : ds1489an @ u45 pin 11 -// pin 19 (CB2) : mn4053b @ u40 pin 11 and mc14412 @ u41 pin 10 -// pin 21 (/IRQ) : out to 68008 /IPL1 pin 41 -// pin 22 (R/W) : in from 68008 R/W pin 30 -// pin 23 (/CS2) : in from DECODE E pin 18 -// pin 24 (CS1) : in from 68008 A14 pin 12 -// pin 25 (Phi2) : in from 68008 E pin 38 -// pins 26-33 : in/out from/to 68008 D7 to D0 pins 20-27 -// pin 34 (/RES) : in from 68008 /RESET pin 37 AND 68008 /HALT pin 36 -// pins 35-38 (RS3-RS0) : in from 68008 A9-A6 pins 7-4 -// pin 39 (CA2) : out to 74HCT34 pin 11 (CLK) (keyboard column latch) -// pin 40 (CA1) : out? to? ds1489an @ u45 pin 8 - -// 74hc02 @ u36: -// pin 1 (Y1) : out to mc6850 @ u33 pin 23 /DCD -// pin 2 (A1) : in from (2 places: resistor R58 to ua339 @ u38 pin 4 (In1-)) <where does this actually come from? modem offhook?> -// pin 3 (B1) : in from mn4053b @ u40 pin 10 <probably from rs232> -// pin 4 (Y2) : out to 6522 @u35 pin 11 -// pin 5 (A2) : in from 4N37 @ u48 pin 5 (output side emitter pin) (tied via R189 to gnd) <ring indicator?> -// pin 6 (B2) : in from 4N37 @ u48 pin 5 (output side emitter pin) (tied via R189 to gnd) <ring indicator?> -// pin 8 (B3) : -// pin 9 (A3) : -// pin 10 (Y3) : -// pin 11 (B4) : in from 68008 A15 -// pin 12 (A4) : in from 68008 A15 -// pin 13 (Y4) : out to EPROM @ U31 /CE - ****************************************************************************/ // Defines @@ -445,8 +226,6 @@ ToDo: #include "cpu/m68000/m68000.h" #include "machine/clock.h" #include "machine/mc68681.h" -#include "machine/6850acia.h" -#include "machine/6522via.h" #include "machine/nvram.h" #include "sound/speaker.h" #include "bus/centronics/ctronics.h" @@ -467,13 +246,9 @@ public: m_duart(*this, "duartn68681"), m_ctx(*this, "ctx"), m_ctx_data_out(*this, "ctx_data_out"), - m_acia6850(*this, "acia6850"), - m_via0(*this, "via6522_0"), - m_via1(*this, "via6522_1"), m_speaker(*this, "speaker"), m_svram(*this, "svram"), // nvram m_p_cat_videoram(*this, "p_cat_vram"), - m_p_swyft_videoram(*this, "p_swyft_vram"), m_y0(*this, "Y0"), m_y1(*this, "Y1"), m_y2(*this, "Y2"), @@ -487,25 +262,21 @@ public: required_device<cpu_device> m_maincpu; //optional_device<nvram_device> m_nvram; - optional_device<mc68681_device> m_duart; // only cat uses this - optional_device<centronics_device> m_ctx; - optional_device<output_latch_device> m_ctx_data_out; - optional_device<acia6850_device> m_acia6850; // only swyft uses this - optional_device<via6522_device> m_via0; // only swyft uses this - optional_device<via6522_device> m_via1; // only swyft uses this - optional_device<speaker_sound_device> m_speaker; - optional_shared_ptr<UINT16> m_svram; - optional_shared_ptr<UINT16> m_p_cat_videoram; - optional_shared_ptr<UINT8> m_p_swyft_videoram; - optional_ioport m_y0; - optional_ioport m_y1; - optional_ioport m_y2; - optional_ioport m_y3; - optional_ioport m_y4; - optional_ioport m_y5; - optional_ioport m_y6; - optional_ioport m_y7; - optional_ioport m_dipsw; + required_device<mc68681_device> m_duart; + required_device<centronics_device> m_ctx; + required_device<output_latch_device> m_ctx_data_out; + required_device<speaker_sound_device> m_speaker; + required_shared_ptr<UINT16> m_svram; + required_shared_ptr<UINT16> m_p_cat_videoram; + required_ioport m_y0; + required_ioport m_y1; + required_ioport m_y2; + required_ioport m_y3; + required_ioport m_y4; + required_ioport m_y5; + required_ioport m_y6; + required_ioport m_y7; + required_ioport m_dipsw; emu_timer *m_keyboard_timer; emu_timer *m_6ms_timer; @@ -513,12 +284,8 @@ public: DECLARE_MACHINE_RESET(cat); DECLARE_VIDEO_START(cat); DECLARE_DRIVER_INIT(cat); - DECLARE_MACHINE_START(swyft); - DECLARE_MACHINE_RESET(swyft); - DECLARE_VIDEO_START(swyft); UINT32 screen_update_cat(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - UINT32 screen_update_swyft(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); DECLARE_WRITE_LINE_MEMBER(cat_duart_irq_handler); DECLARE_WRITE_LINE_MEMBER(cat_duart_txa); @@ -547,31 +314,6 @@ public: DECLARE_READ16_MEMBER(cat_0080_r); DECLARE_READ16_MEMBER(cat_0000_r); - DECLARE_READ8_MEMBER(swyft_d0000); - - DECLARE_READ8_MEMBER(swyft_via0_r); - DECLARE_WRITE8_MEMBER(swyft_via0_w); - DECLARE_READ8_MEMBER(via0_pa_r); - DECLARE_WRITE8_MEMBER(via0_pa_w); - DECLARE_WRITE_LINE_MEMBER(via0_ca2_w); - DECLARE_READ8_MEMBER(via0_pb_r); - DECLARE_WRITE8_MEMBER(via0_pb_w); - DECLARE_WRITE_LINE_MEMBER(via0_cb1_w); - DECLARE_WRITE_LINE_MEMBER(via0_cb2_w); - DECLARE_WRITE_LINE_MEMBER(via0_int_w); - - DECLARE_READ8_MEMBER(swyft_via1_r); - DECLARE_WRITE8_MEMBER(swyft_via1_w); - DECLARE_READ8_MEMBER(via1_pa_r); - DECLARE_WRITE8_MEMBER(via1_pa_w); - DECLARE_WRITE_LINE_MEMBER(via1_ca2_w); - DECLARE_READ8_MEMBER(via1_pb_r); - DECLARE_WRITE8_MEMBER(via1_pb_w); - DECLARE_WRITE_LINE_MEMBER(via1_cb1_w); - DECLARE_WRITE_LINE_MEMBER(via1_cb2_w); - DECLARE_WRITE_LINE_MEMBER(via1_int_w); - - DECLARE_WRITE_LINE_MEMBER(write_acia_clock); /* gate array 2 has a 16-bit counter inside which counts at 10mhz and rolls over at FFFF->0000; on roll-over (or likely at FFFF terminal count) @@ -1136,10 +878,6 @@ static INPUT_PORTS_START( cat ) PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_TILDE) PORT_CHAR('\xb1') PORT_CHAR('\xb0') // PORT_CHAR('\\') PORT_CHAR('~') INPUT_PORTS_END -static INPUT_PORTS_START( swyft ) -// insert dwight and sandy's swyft keyboard map here once we figure out the byte line order -INPUT_PORTS_END - void cat_state::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) { @@ -1334,428 +1072,6 @@ static MACHINE_CONFIG_START( cat, cat_state ) MCFG_NVRAM_ADD_0FILL("nvram") MACHINE_CONFIG_END - -/* Swyft Memory map, based on watching the infoapp roms do their thing: -68k address map: -(a23,a22,a21,a20 lines don't exist on the 68008 so are considered unconnected) -a23 a22 a21 a20 a19 a18 a17 a16 a15 a14 a13 a12 a11 a10 a9 a8 a7 a6 a5 a4 a3 a2 a1 a0 -x x x x 0 0 ? ? 0 * * * * * * * * * * * * * * * R ROM-LO (/LOCE is 0, /HICE is 1) -x x x x 0 0 ? ? 1 * * * * * * * * * * * * * * * R ROM-HI (/LOCE is 1, /HICE is 0) -x x x x 0 1 * * * * * * * * * * * * * * * * * a RW RAM -x x x x 1 1 ?0? ?1? ? ? ? ? ? ? ? ? ? ? ? ? * * * * R ? status of something? floppy? -x x x x 1 1 ?1? ?0? ? 0 0 1 x x x x x x x x x x x * RW 6850 acia @U33, gets 0x55 steadystate and 0x57 written to it to reset it -x x x x 1 1 ?1? ?0? ? 0 1 0 x x * * * * x x x x x x RW Parallel VIA 0 @ U34 -x x x x 1 1 ?1? ?0? ? 1 0 0 x x * * * * x x x x x x RW Keyboard VIA 1 @ U35 - ^ ^ ^ ^ ^ - -*/ - -/* Swyft rom and ram notes: -rom: -**Vectors: -0x0000-0x0003: SP boot vector -0x0004-0x0007: PC boot vector -**unknown: -0x0009-0x00BF: ? table -0x00C0-0x01DF: ? table -0x01E0-0x02DF: ? table (may be part of next table) -0x02E0-0x03DF: ? table -0x03E0-0x0B3F: int16-packed jump table (expanded to int32s at ram at 0x46000-0x46EC0 on boot) -0x0B40-0x0E83: ? function index tables? -0x0E84-0x1544: binary code (purpose?) -0x1545-0x24CF: ? -**Fonts: -0x24D0-0x254F: ? (likely font 1 width lookup table) -0x2550-0x2BCF: Font 1 data -0x2BD0-0x2C4F: ? (likely font 2 width lookup table) -0x2C50-0x32CF: Font 2 data -**unknown?: -0x32D0-0x360F: String data (and control codes?) -0x3610-0x364F: ? fill (0x03 0xe8) -0x3650-0x369F: ? fill (0x03 0x20) -0x36A0-0x384d: ? forth code? -0x384e-0x385d: Lookup table for phone keypad -0x385e-...: ? -...-0xC951: ? -0xC952: boot vector -0xC952-0xCAAE: binary code (purpose?) - 0xCD26-0xCD3B: ?init forth bytecode? -0xCD3C-0xCEBA: 0xFF fill (unused?) -0xCEEB-0xFFFE: Forth dictionaries for compiling, with <word> then <3 bytes> afterward? (or before it? most likely afterward) - -ram: (system dram ranges from 0x40000-0x7FFFF) -0x40000-0x425CF - the screen display ram -(?0x425D0-0x44BA0 - ?unknown (maybe screen ram page 2?)) -0x44DC6 - SP vector -0x46000-0x46EC0 - jump tables to instructions for ? (each forth word?) - - -on boot: -copy/expand packed rom short words 0x3E0-0xB3F to long words at 0x46000-0x46EC0 -copy 0x24f longwords of zero beyond that up to 0x47800 -CD26->A5 <?pointer to init stream function?> -44DC6->A7 <reset SP... why it does this twice, once by the vector and once here, i'm gonna guess has to do with running the code in a debugger or on a development daughterboard like the cat had, where the 68008 wouldn't get explicitly reset> -44F2A->A6 <?pointer to work ram space?> -EA2->A4 <?function> -E94->A3 <?function> -EAE->A2 <?function> -41800->D7 <?forth? opcode index base; the '1800' portion gets the opcode type added to it then is multiplied by 4 to produce the jump table offset within the 0x46000-0x46EC0 range> -46e3c->D4 <?pointer to more work ram space?> -CD22->D5 <?pointer to another function?> -write 0xFFFF to d0004.l -jump to A4(EA2) - -read first stream byte (which is 0x03) from address pointed to by A5 (which is CD26), inc A5, OR the opcode (0x03) to D7 - (Note: if the forth opcodes are in order in the dictionary, then 0x03 is "!char" which is used to read a char from an arbitrary address) -copy D7 to A0 -Add A0 low word to itself -Add A0 low word to itself again -move the long word from address pointed to by A0 (i.e. the specific opcode's area at the 46xxx part of ram) to A1 -Jump to A1(11A4) - -11A4: move 41b00 to D0 (select an opcode "page" 1bxx) -jump to 118E - -118E: read next stream byte (in this case, 0x8E) from address pointed to by A5 (which is CD27), inc A5, OR the opcode (0x8e) to D7 -add to 41b00 in d0, for 41b8E -Add A0 low word to itself -Add A0 low word to itself again -move the long word from address pointed to by A0 (i.e. the specific opcode's area at the 46xxx part of ram) to A1 -Jump to A1(CD06) - -CD06: jump to A3 (E94) - -E94: subtract D5 from A5 (cd28 - cd22 = 0x0006) -write 6 to address @A5(44f28) and decrement A5 -write D4(46e3c) to address @a6(44f26) and decrement a5 -lea ($2, A1), A5 - i.e. increment A1 by 2, and write that to A5, so write CD06+2=CD08 to A5 -A1->D5 -A0->D4 -read next stream byte (in this case, 0x03) from address pointed to by A5 (which is CD08), inc A5, OR the opcode (0x03) to D7 - -*/ - -static ADDRESS_MAP_START(swyft_mem, AS_PROGRAM, 8, cat_state) - ADDRESS_MAP_UNMAP_HIGH - AM_RANGE(0x000000, 0x00ffff) AM_ROM AM_MIRROR(0xF00000) // 64 KB ROM - AM_RANGE(0x040000, 0x07ffff) AM_RAM AM_MIRROR(0xF00000) AM_SHARE("p_swyft_vram") // 256 KB RAM - AM_RANGE(0x0d0000, 0x0d000f) AM_READ(swyft_d0000) AM_MIRROR(0xF00000) // status of something? reads from d0000, d0004, d0008, d000a, d000e - AM_RANGE(0x0e1000, 0x0e1000) AM_DEVWRITE("acia6850", acia6850_device, control_w) AM_MIRROR(0xF00000) // 6850 ACIA lives here - AM_RANGE(0x0e2000, 0x0e2fff) AM_READWRITE(swyft_via0_r, swyft_via0_w) AM_MIRROR(0xF00000)// io area with selector on a9 a8 a7 a6? - AM_RANGE(0x0e4000, 0x0e4fff) AM_READWRITE(swyft_via1_r, swyft_via1_w) AM_MIRROR(0xF00000) -ADDRESS_MAP_END - -MACHINE_START_MEMBER(cat_state,swyft) -{ - m_via0->write_ca1(1); - m_via0->write_ca2(1); - m_via0->write_cb1(1); - m_via0->write_cb2(1); - - m_via1->write_ca1(1); - m_via1->write_ca2(1); - m_via1->write_cb1(1); - m_via1->write_cb2(1); -} - -MACHINE_RESET_MEMBER(cat_state,swyft) -{ -} - -VIDEO_START_MEMBER(cat_state,swyft) -{ -} - -UINT32 cat_state::screen_update_swyft(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) -{ - UINT16 code; - int y, x, b; - - int addr = 0; - for (y = 0; y < 242; y++) - { - int horpos = 0; - for (x = 0; x < 40; x++) - { - code = m_p_swyft_videoram[addr++]; - for (b = 7; b >= 0; b--) - { - bitmap.pix16(y, horpos++) = (code >> b) & 0x01; - } - } - } - return 0; -} - -READ8_MEMBER( cat_state::swyft_d0000 ) -{ - // wtf is this supposed to be? - UINT8 byte = 0xFF; // ? - logerror("mystery device: read from 0x%5X, returning %02X\n", offset+0xD0000, byte); - return byte; -} - - -// if bit is 1 enable: (obviously don't set more than one bit or you get bus contention!) -// acia -// via0 -// via1 -// x x x x 1 1 ?1? ?0? ? ^ ^ ^ ? ? * * * * ?*? ? ? ? ? ? -// ^ ^ ^ ^ <- these four bits address the VIA registers? is this correct? -static const char *const swyft_via_regnames[] = { "0: ORB/IRB", "1: ORA/IRA", "2: DDRB", "3: DDRA", "4: T1C-L", "5: T1C-H", "6: T1L-L", "7: T1L-H", "8: T2C-L" "9: T2C-H", "A: SR", "B: ACR", "C: PCR", "D: IFR", "E: IER", "F: ORA/IRA*" }; - -READ8_MEMBER( cat_state::swyft_via0_r ) -{ - if (offset&0x000C3F) fprintf(stderr,"VIA0: read from invalid offset in 68k space: %06X!\n", offset); - UINT8 data = m_via0->read(space, (offset>>6)&0xF); -#ifdef DEBUG_SWYFT_VIA0 - logerror("VIA0 register %s read by cpu: returning %02x\n", swyft_via_regnames[(offset>>5)&0xF], data); -#endif - return data; -} - -WRITE8_MEMBER( cat_state::swyft_via0_w ) -{ -#ifdef DEBUG_SWYFT_VIA0 - logerror("VIA0 register %s written by cpu with data %02x\n", swyft_via_regnames[(offset>>5)&0xF], data); -#endif - if (offset&0x000C3F) fprintf(stderr,"VIA0: write to invalid offset in 68k space: %06X, data: %02X!\n", offset, data); - m_via1->write(space, (offset>>6)&0xF, data); -} - -READ8_MEMBER( cat_state::swyft_via1_r ) -{ - if (offset&0x000C3F) fprintf(stderr," VIA1: read from invalid offset in 68k space: %06X!\n", offset); - UINT8 data = m_via1->read(space, (offset>>6)&0xF); -#ifdef DEBUG_SWYFT_VIA1 - logerror(" VIA1 register %s read by cpu: returning %02x\n", swyft_via_regnames[(offset>>5)&0xF], data); -#endif - return data; -} - -WRITE8_MEMBER( cat_state::swyft_via1_w ) -{ -#ifdef DEBUG_SWYFT_VIA1 - logerror(" VIA1 register %s written by cpu with data %02x\n", swyft_via_regnames[(offset>>5)&0xF], data); -#endif - if (offset&0x000C3F) fprintf(stderr," VIA1: write to invalid offset in 68k space: %06X, data: %02X!\n", offset, data); - m_via0->write(space, (offset>>6)&0xF, data); -} - -// first via -READ8_MEMBER( cat_state::via0_pa_r ) -{ - logerror("VIA0: Port A read!\n"); - return 0xFF; -} - -WRITE8_MEMBER( cat_state::via0_pa_w ) -{ - logerror("VIA0: Port A written with data of 0x%02x!\n", data); -} - -WRITE_LINE_MEMBER ( cat_state::via0_ca2_w ) -{ - logerror("VIA0: CA2 written with %d!\n", state); -} - -READ8_MEMBER( cat_state::via0_pb_r ) -{ - logerror("VIA0: Port B read!\n"); - return 0xFF; -} - -WRITE8_MEMBER( cat_state::via0_pb_w ) -{ - logerror("VIA0: Port B written with data of 0x%02x!\n", data); -} - -WRITE_LINE_MEMBER ( cat_state::via0_cb1_w ) -{ - logerror("VIA0: CB1 written with %d!\n", state); -} - -WRITE_LINE_MEMBER ( cat_state::via0_cb2_w ) -{ - logerror("VIA0: CB2 written with %d!\n", state); -} - -WRITE_LINE_MEMBER ( cat_state::via0_int_w ) -{ - logerror("VIA0: INT output set to %d!\n", state); -} - -// second via -READ8_MEMBER( cat_state::via1_pa_r ) -{ - logerror(" VIA1: Port A read!\n"); - return 0xFF; -} - -WRITE8_MEMBER( cat_state::via1_pa_w ) -{ - logerror(" VIA1: Port A written with data of 0x%02x!\n", data); -} - -WRITE_LINE_MEMBER ( cat_state::via1_ca2_w ) -{ - logerror(" VIA1: CA2 written with %d!\n", state); -} - -READ8_MEMBER( cat_state::via1_pb_r ) -{ - logerror(" VIA1: Port B read!\n"); - return 0xFF; -} - -WRITE8_MEMBER( cat_state::via1_pb_w ) -{ - logerror(" VIA1: Port B written with data of 0x%02x!\n", data); -} - -WRITE_LINE_MEMBER ( cat_state::via1_cb1_w ) -{ - logerror(" VIA1: CB1 written with %d!\n", state); -} - -WRITE_LINE_MEMBER ( cat_state::via1_cb2_w ) -{ - logerror(" VIA1: CB2 written with %d!\n", state); -} - -WRITE_LINE_MEMBER ( cat_state::via1_int_w ) -{ - logerror(" VIA1: INT output set to %d!\n", state); -} - -WRITE_LINE_MEMBER( cat_state::write_acia_clock ) -{ - m_acia6850->write_txc(state); - m_acia6850->write_rxc(state); -} - -static MACHINE_CONFIG_START( swyft, cat_state ) - - /* basic machine hardware */ - MCFG_CPU_ADD("maincpu",M68008, XTAL_15_8976MHz/2) //MC68008P8, Y1=15.8976Mhz, clock GUESSED at Y1 / 2 - MCFG_CPU_PROGRAM_MAP(swyft_mem) - - MCFG_MACHINE_START_OVERRIDE(cat_state,swyft) - MCFG_MACHINE_RESET_OVERRIDE(cat_state,swyft) - - /* video hardware */ - MCFG_SCREEN_ADD("screen", RASTER) - MCFG_SCREEN_REFRESH_RATE(50) - MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */ - MCFG_SCREEN_SIZE(320, 242) - MCFG_SCREEN_VISIBLE_AREA(0, 320-1, 0, 242-1) - MCFG_SCREEN_UPDATE_DRIVER(cat_state, screen_update_swyft) - MCFG_SCREEN_PALETTE("palette") - - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") - - MCFG_VIDEO_START_OVERRIDE(cat_state,swyft) - - MCFG_DEVICE_ADD("acia6850", ACIA6850, 0) - // acia rx and tx clocks come from one of the VIA pins and are tied together, fix this below? acia e clock comes from 68008 - MCFG_DEVICE_ADD("acia_clock", CLOCK, (XTAL_15_8976MHz/2)/5) // out e clock from 68008, ~ 10in clocks per out clock - MCFG_CLOCK_SIGNAL_HANDLER(WRITELINE(cat_state, write_acia_clock)) - - MCFG_DEVICE_ADD("via6522_0", VIA6522, (XTAL_15_8976MHz/2)/5) // out e clock from 68008 - MCFG_VIA6522_READPA_HANDLER(READ8(cat_state, via0_pa_r)) - MCFG_VIA6522_READPB_HANDLER(READ8(cat_state, via0_pb_r)) - MCFG_VIA6522_WRITEPA_HANDLER(WRITE8(cat_state, via0_pa_w)) - MCFG_VIA6522_WRITEPB_HANDLER(WRITE8(cat_state, via0_pb_w)) - MCFG_VIA6522_CB1_HANDLER(WRITELINE(cat_state, via0_cb1_w)) - MCFG_VIA6522_CA2_HANDLER(WRITELINE(cat_state, via0_ca2_w)) - MCFG_VIA6522_CB2_HANDLER(WRITELINE(cat_state, via0_cb2_w)) - MCFG_VIA6522_IRQ_HANDLER(WRITELINE(cat_state, via0_int_w)) - - MCFG_DEVICE_ADD("via6522_1", VIA6522, (XTAL_15_8976MHz/2)/5) // out e clock from 68008 - MCFG_VIA6522_READPA_HANDLER(READ8(cat_state, via1_pa_r)) - MCFG_VIA6522_READPB_HANDLER(READ8(cat_state, via1_pb_r)) - MCFG_VIA6522_WRITEPA_HANDLER(WRITE8(cat_state, via1_pa_w)) - MCFG_VIA6522_WRITEPB_HANDLER(WRITE8(cat_state, via1_pb_w)) - MCFG_VIA6522_CB1_HANDLER(WRITELINE(cat_state, via1_cb1_w)) - MCFG_VIA6522_CA2_HANDLER(WRITELINE(cat_state, via1_ca2_w)) - MCFG_VIA6522_CB2_HANDLER(WRITELINE(cat_state, via1_cb2_w)) - MCFG_VIA6522_IRQ_HANDLER(WRITELINE(cat_state, via1_int_w)) -MACHINE_CONFIG_END - -/* ROM definition */ -ROM_START( swyft ) - ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF ) - ROM_SYSTEM_BIOS( 0, "v331", "IAI Swyft Version 331 Firmware") - ROMX_LOAD( "331-lo.u30", 0x0000, 0x8000, CRC(d6cc2e2f) SHA1(39ff26c18b1cf589fc48793263f280ef3780cc61), ROM_BIOS(1)) - ROMX_LOAD( "331-hi.u31", 0x8000, 0x8000, CRC(4677630a) SHA1(8845d702fa8b8e1a08352f4c59d3076cc2e1307e), ROM_BIOS(1)) - /* this version of the swyft code identifies itself at 0x3FCB as version 330 */ - ROM_SYSTEM_BIOS( 1, "v330", "IAI Swyft Version 330 Firmware") - ROMX_LOAD( "infoapp.lo.u30", 0x0000, 0x8000, CRC(52c1bd66) SHA1(b3266d72970f9d64d94d405965b694f5dcb23bca), ROM_BIOS(2)) - ROMX_LOAD( "infoapp.hi.u31", 0x8000, 0x8000, CRC(83505015) SHA1(693c914819dd171114a8c408f399b56b470f6be0), ROM_BIOS(2)) - ROM_REGION( 0x4000, "pals", ROMREGION_ERASEFF ) - /* Swyft PALs: - * The Swyft has four PALs, whose rough function can be derived from their names: - * TIMING - state machine for DRAM refresh/access; handles ras/cas and choosing whether the video out shifter or the 68k is accessing ram. also divides clock - * DECODE - address decoder for the 68008 - * VIDEO - state machine for the video shifter (and vblank/hblank?) - * DISK 3.5 - state machine for the floppy drive interface - */ - /* U9: Timing AMPAL16R4 - * - * pins: - * 111111111000000000 - * 987654321987654321 - * ??QQQQ??EIIIIIIIIC - * |||||||||||||||||\-< /CK input - 15.8976mhz crystal and transistor oscillator - * ||||||||||||||||\--< ? - * |||||||||||||||\---< ? - * ||||||||||||||\----< ? - * |||||||||||||\-----< ?<also input to decode pal pin 1, video pal pin 1, source is ?> - * ||||||||||||\------< ? - * |||||||||||\-------< ? - * ||||||||||\--------< ? - * |||||||||\---------< ? - * ||||||||\----------< /OE input - shorted to GND - * |||||||\-----------? ? - * ||||||\------------? ? - * |||||\------------Q> /ROM_OE (to both eproms through jumper b1 and optionally j9 connector) - * ||||\-------------Q? ? - * |||\--------------Q? ? - * ||\---------------Q> output to decode pal pin 2 - * |\----------------->? output? to ram multiplexer 'A' pins - * \------------------< ? - */ - ROM_LOAD( "timing_b.ampal16r4a.u9.jed", 0x0000, 0xb08, CRC(643e6e83) SHA1(7db167883f9d6cf385ce496d08976dc16fc3e2c3)) - /* U20: Decode AMPAL16L8 - * - * pins: - * 111111111000000000 - * 987654321987654321 - * O??????OIIIIIIIIII - * |||||||||||||||||\-< TIMING PAL pin 5 - * ||||||||||||||||\--< TIMING PAL pin 17 - * |||||||||||||||\---< 68008 R/W (pin 30) - * ||||||||||||||\----< 68008 /DS (pin 29) - * |||||||||||||\-----< 68008 E (pin 38) - * ||||||||||||\------< 68008 A19 - * |||||||||||\-------< 68008 A18 - * ||||||||||\--------< 68008 A17 - * |||||||||\---------< 68008 A16 - * ||||||||\----------< ? - * |||||||\-----------> ? - * ||||||\------------? 68008 /VPA (pin 39) - * |||||\-------------> /ROM_OE (to both eproms through jumper b1 and optionally j9 connector) - * ||||\--------------? ? - * |||\---------------? ? - * ||\----------------? ? - * |\-----------------? goes to j9 connector pin 5 - * \------------------< ? - */ - ROM_LOAD( "decode_e.ampal16l8.u20.jed", 0x1000, 0xb08, CRC(0b1dbd76) SHA1(08c144ad7a7bbdd53eefd271b2f6813f8b3b1594)) - ROM_LOAD( "video_2b.ampal16r4.u25.jed", 0x2000, 0xb08, CRC(caf91148) SHA1(3f8ddcb512a1c05395c74ad9a6ba7b87027ce4ec)) - ROM_LOAD( "disk_3.5c.ampal16r4.u28.jed", 0x3000, 0xb08, CRC(fd994d02) SHA1(f910ab16587dd248d63017da1e5b37855e4c1a0c)) -ROM_END - ROM_START( cat ) ROM_REGION( 0x40000, "maincpu", ROMREGION_ERASEFF ) // SYS ROM @@ -1839,5 +1155,4 @@ ROM_END /* Driver */ /* YEAR NAME PARENT COMPAT MACHINE INPUT DEVICE INIT COMPANY FULLNAME FLAGS */ -COMP( 1985, swyft,0, 0, swyft, swyft, driver_device, 0, "Information Applicance Inc", "Swyft", MACHINE_NOT_WORKING | MACHINE_NO_SOUND) -COMP( 1987, cat, swyft, 0, cat, cat, driver_device, 0, "Canon", "Cat", MACHINE_NOT_WORKING) +COMP( 1987, cat, 0, 0, cat, cat, driver_device, 0, "Canon", "Cat", MACHINE_NOT_WORKING) diff --git a/src/mame/drivers/cave.c b/src/mame/drivers/cave.c index 00cacc0285c..5e333578c03 100644 --- a/src/mame/drivers/cave.c +++ b/src/mame/drivers/cave.c @@ -72,17 +72,6 @@ Versions known to exist but not dumped: PCBs were shown running (and could be played) at a Cave fan show known as Cave Festival 2006. There are videos of the game being played floating around the internet and on YouTube. AKA DDP-CV or DDP BLUE ROM - Dodonpachi Arrange: This version is a hack by trap15 and ment to be a tribute to the game. It is neither a - long lost version or official release from Cave and therefore not suitable for MAME. - - Known rom version 1.1: - File CRC32 SHA1 - --------------------------------------------------------- - u27.bin 44b899ae 798ec437d861b94fcd90c99a7015dd420887c788 - u26.bin 727a09a8 91876386855f19e8a3d8d1df71dfe9b3d98e9ea9 - u51.bin 0f3e5148 3016f4d075940feae691389606cd2aa7ac53849e - u62.bin 42e4c6c5 4d282f7592f5fc5e11839c57f39cae20b8422aa1 - ***************************************************************************/ #include "emu.h" @@ -3162,6 +3151,34 @@ ROM_START( ddonpachj ) ROM_END +ROM_START( ddonpacha ) + ROM_REGION( 0x100000, "maincpu", 0 ) /* 68000 Code */ + ROM_LOAD16_BYTE( "arrange_u27.bin", 0x000000, 0x080000, CRC(44b899ae) SHA1(798ec437d861b94fcd90c99a7015dd420887c788) ) + ROM_LOAD16_BYTE( "arrange_u26.bin", 0x000001, 0x080000, CRC(727a09a8) SHA1(91876386855f19e8a3d8d1df71dfe9b3d98e9ea9) ) + + ROM_REGION( 0x800000 * 2, "sprites0", 0 ) /* Sprites: * 2 */ + ROM_LOAD( "u50.bin", 0x000000, 0x200000, CRC(14b260ec) SHA1(33bda210302428d5500115d0c7a839cdfcb67d17) ) + ROM_LOAD( "arrange_u51.bin", 0x200000, 0x200000, CRC(0f3e5148) SHA1(3016f4d075940feae691389606cd2aa7ac53849e) ) + ROM_LOAD( "u52.bin", 0x400000, 0x200000, CRC(02492ee0) SHA1(64d9cc64a4ad189a8b03cf6a749ddb732b4a0014) ) + ROM_LOAD( "u53.bin", 0x600000, 0x200000, CRC(cb4c10f0) SHA1(a622e8bd0c938b5d38b392b247400b744d8be288) ) + + ROM_REGION( 0x200000, "layer0", 0 ) /* Layer 0 */ + ROM_LOAD( "u60.bin", 0x000000, 0x200000, CRC(903096a7) SHA1(a243e903fef7c4a7b71383263e82e42acd869261) ) + + ROM_REGION( 0x200000, "layer1", 0 ) /* Layer 1 */ + ROM_LOAD( "u61.bin", 0x000000, 0x200000, CRC(d89b7631) SHA1(a66bb4955ca58fab8973ca37a0f971e9a67ce017) ) + + ROM_REGION( 0x200000, "layer2", 0 ) /* Layer 2 */ + ROM_LOAD( "arrange_u62.bin", 0x000000, 0x200000, CRC(42e4c6c5) SHA1(4d282f7592f5fc5e11839c57f39cae20b8422aa1) ) + + ROM_REGION( 0x400000, "ymz", 0 ) /* Samples */ + ROM_LOAD( "u6.bin", 0x000000, 0x200000, CRC(9dfdafaf) SHA1(f5cb450cdc78a20c3a74c6dac05c9ac3cba08327) ) + ROM_LOAD( "u7.bin", 0x200000, 0x200000, CRC(795b17d5) SHA1(cbfc29f1df9600c82e0fdae00edd00da5b73e14c) ) + + ROM_REGION16_BE( 0x80, "eeprom", 0 ) + ROM_LOAD16_WORD( "eeprom-ddonpach.bin", 0x0000, 0x0080, CRC(2df16438) SHA1(4881b70589a97e2420feb6d6e6737273beeff303) ) +ROM_END + /*************************************************************************** Donpachi @@ -5043,6 +5060,9 @@ GAME( 1996, ppsatan, 0, ppsatan, ppsatan, cave_state, ppsatan, ROT0 GAME( 1997, ddonpach, 0, ddonpach, cave, cave_state, ddonpach, ROT270, "Cave (Atlus license)", "DoDonPachi (International, Master Ver. 97/02/05)", MACHINE_SUPPORTS_SAVE ) GAME( 1997, ddonpachj, ddonpach, ddonpach, cave, cave_state, ddonpach, ROT270, "Cave (Atlus license)", "DoDonPachi (Japan, Master Ver. 97/02/05)", MACHINE_SUPPORTS_SAVE ) +// NOT an official CAVE release, but several PCBs have been converted to it and used on location. +GAME( 2012, ddonpacha, ddonpach, ddonpach, cave, cave_state, ddonpach, ROT270, "hack (trap15)", "DoDonPachi (2012/02/12 Arrange Ver. 1.1) (hack)", MACHINE_SUPPORTS_SAVE ) + GAME( 1998, dfeveron, feversos, dfeveron, cave, cave_state, dfeveron, ROT270, "Cave (Nihon System license)", "Dangun Feveron (Japan, Ver. 98/09/17)", MACHINE_SUPPORTS_SAVE ) GAME( 1998, feversos, 0, dfeveron, cave, cave_state, feversos, ROT270, "Cave (Nihon System license)", "Fever SOS (International, Ver. 98/09/25)", MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/champbas.c b/src/mame/drivers/champbas.c index 8aaad810c17..082c599bd14 100644 --- a/src/mame/drivers/champbas.c +++ b/src/mame/drivers/champbas.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Ernesto Corvi, Jarek Parchanski, Nicola Salmoria +// copyright-holders:Ernesto Corvi, Jarek Parchanski, Nicola Salmoria, hap /*************************************************************************** Talbot - (c) 1982 Alpha Denshi Co. @@ -8,9 +8,6 @@ Champion Base Ball Part-2 - (c) 1983 Alpha Denshi Co. Exciting Soccer - (c) 1983 Alpha Denshi Co. Exciting Soccer II - (c) 1984 Alpha Denshi Co. -driver by Ernesto Corvi, Jarek Parchanski, Nicola Salmoria -ALPHA 8201 MCU handling by Tatsuyuki satoh - Note: the Champion Baseball II unofficial schematics show a 8302 instead of the 8201, however the MCU is used like a plain 8201, 830x extra instructions are not used. @@ -40,7 +37,7 @@ write: 7001 8910 control 8ff0-8fff sprites a000 ? -a006 MCU HALT controll +a006 MCU HALT control a007 NOP (MCU shared RAM switch) a060-a06f sprites a080 command for the sound CPU @@ -68,13 +65,11 @@ Notes: and crashes if the bit doesn't match bit 2 of RAM location 0x8c00. - The Exciting Soccer bootleg runs on a modified Champion Baseball board. The - original board has vastly improved sound hardware which is thereforew missing + original board has vastly improved sound hardware which is therefore missing from the bootleg. TODO: ----- -- champbb2, sometime mcu err and ACCESS VIOLATION trap. - - Exciting Soccer: interrupt source for sound CPU is unknown. - Exciting Soccer: sound CPU writes to unknown ports on startup. Timer configure? @@ -85,30 +80,10 @@ TODO: #include "emu.h" #include "cpu/z80/z80.h" -#include "cpu/alph8201/alph8201.h" #include "sound/ay8910.h" -#include "sound/dac.h" #include "includes/champbas.h" -/************************************* - * - * Watchdog - * - *************************************/ - -void champbas_state::screen_eof_champbas(screen_device &screen, bool state) -{ - // rising edge - if (state) - { - m_watchdog_count++; - - if (m_watchdog_count == 0x10) - machine().schedule_soft_reset(); - } -} - /************************************* * @@ -116,17 +91,11 @@ void champbas_state::screen_eof_champbas(screen_device &screen, bool state) * *************************************/ -WRITE8_MEMBER(champbas_state::champbas_watchdog_reset_w) +CUSTOM_INPUT_MEMBER(champbas_state::watchdog_bit2) { - m_watchdog_count = 0; + return (0x10 - machine().get_vblank_watchdog_counter()) >> 2 & 1; } -CUSTOM_INPUT_MEMBER(champbas_state::champbas_watchdog_bit2) -{ - return BIT(m_watchdog_count, 2); -} - - WRITE8_MEMBER(champbas_state::irq_enable_w) { m_irq_mask = data & 1; @@ -135,52 +104,42 @@ WRITE8_MEMBER(champbas_state::irq_enable_w) m_maincpu->set_input_line(0, CLEAR_LINE); } -TIMER_CALLBACK_MEMBER(champbas_state::exctsccr_fm_callback) +TIMER_DEVICE_CALLBACK_MEMBER(champbas_state::exctsccr_sound_irq) { m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff); } -// Champion Baseball has only one DAC -WRITE8_MEMBER(champbas_state::champbas_dac_w) -{ - m_dac->write_signed8(data << 2); -} - -WRITE8_MEMBER(champbas_state::champbas_dac1_w) +WRITE8_MEMBER(champbas_state::dac1_w) { m_dac1->write_signed8(data << 2); } -WRITE8_MEMBER(champbas_state::champbas_dac2_w) +WRITE8_MEMBER(champbas_state::dac2_w) { m_dac2->write_signed8(data << 2); } + + /************************************* * * Protection handling * *************************************/ -WRITE8_MEMBER(champbas_state::champbas_mcu_switch_w) +WRITE8_MEMBER(champbas_state::mcu_switch_w) { // switch shared RAM between CPU and MCU bus - // FIXME not implemented + m_alpha_8201->bus_dir_w(data & 1); } -WRITE8_MEMBER(champbas_state::champbas_mcu_halt_w) +WRITE8_MEMBER(champbas_state::mcu_start_w) { - // MCU not present/not used in champbas - if (m_mcu == NULL) - return; - - data &= 1; - m_mcu->set_input_line(INPUT_LINE_HALT, data ? ASSERT_LINE : CLEAR_LINE); + m_alpha_8201->mcu_start_w(data & 1); } - /* champbja another protection */ -READ8_MEMBER(champbas_state::champbja_alt_protection_r) +READ8_MEMBER(champbas_state::champbja_protection_r) { UINT8 data = 0; /* @@ -214,47 +173,21 @@ READ8_MEMBER(champbas_state::champbja_alt_protection_r) } + /************************************* * * Address maps * *************************************/ -static ADDRESS_MAP_START( talbot_map, AS_PROGRAM, 8, champbas_state ) - AM_RANGE(0x0000, 0x5fff) AM_ROM - AM_RANGE(0x6000, 0x63ff) AM_RAM AM_SHARE("share1") /* MCU shared RAM */ - AM_RANGE(0x7000, 0x7001) AM_DEVWRITE("aysnd", ay8910_device, data_address_w) - AM_RANGE(0x8000, 0x87ff) AM_RAM_WRITE(champbas_bg_videoram_w) AM_SHARE("bg_videoram") - AM_RANGE(0x8800, 0x8fef) AM_RAM - AM_RANGE(0x8ff0, 0x8fff) AM_RAM AM_SHARE("spriteram") - - AM_RANGE(0xa000, 0xa000) AM_READ_PORT("P1") - AM_RANGE(0xa040, 0xa040) AM_READ_PORT("P2") - AM_RANGE(0xa080, 0xa080) AM_READ_PORT("DSW") - AM_RANGE(0xa0c0, 0xa0c0) AM_READ_PORT("SYSTEM") +// maincpu - AM_RANGE(0xa000, 0xa000) AM_WRITE(irq_enable_w) - AM_RANGE(0xa001, 0xa001) AM_WRITENOP // !WORK board output (no use?) - AM_RANGE(0xa002, 0xa002) AM_WRITENOP - AM_RANGE(0xa003, 0xa003) AM_WRITE(champbas_flipscreen_w) - AM_RANGE(0xa004, 0xa004) AM_WRITENOP - AM_RANGE(0xa005, 0xa005) AM_WRITENOP - AM_RANGE(0xa006, 0xa006) AM_WRITE(champbas_mcu_halt_w) - AM_RANGE(0xa007, 0xa007) AM_WRITE(champbas_mcu_switch_w) - - AM_RANGE(0xa060, 0xa06f) AM_WRITEONLY AM_SHARE("spriteram_2") - AM_RANGE(0xa0c0, 0xa0c0) AM_WRITE(champbas_watchdog_reset_w) -ADDRESS_MAP_END - - -static ADDRESS_MAP_START( champbas_main_map, AS_PROGRAM, 8, champbas_state ) +// base map +static ADDRESS_MAP_START( champbas_map, AS_PROGRAM, 8, champbas_state ) AM_RANGE(0x0000, 0x5fff) AM_ROM - AM_RANGE(0x6000, 0x63ff) AM_RAM AM_SHARE("share1") - AM_RANGE(0x7000, 0x7001) AM_DEVWRITE("aysnd", ay8910_device, data_address_w) - AM_RANGE(0x7800, 0x7fff) AM_ROM // champbb2 only - AM_RANGE(0x8000, 0x87ff) AM_RAM_WRITE(champbas_bg_videoram_w) AM_SHARE("bg_videoram") - AM_RANGE(0x8800, 0x8fef) AM_RAM - AM_RANGE(0x8ff0, 0x8fff) AM_RAM AM_SHARE("spriteram") + AM_RANGE(0x7000, 0x7001) AM_DEVWRITE("ay1", ay8910_device, data_address_w) + AM_RANGE(0x8000, 0x87ff) AM_RAM_WRITE(tilemap_w) AM_SHARE("vram") + AM_RANGE(0x8800, 0x8fff) AM_RAM AM_SHARE("mainram") AM_RANGE(0xa000, 0xa000) AM_READ_PORT("P1") AM_RANGE(0xa040, 0xa040) AM_READ_PORT("P2") @@ -262,93 +195,84 @@ static ADDRESS_MAP_START( champbas_main_map, AS_PROGRAM, 8, champbas_state ) AM_RANGE(0xa0c0, 0xa0c0) AM_READ_PORT("SYSTEM") AM_RANGE(0xa000, 0xa000) AM_WRITE(irq_enable_w) - AM_RANGE(0xa001, 0xa001) AM_WRITENOP // !WORK board output (no use?) - AM_RANGE(0xa002, 0xa002) AM_WRITE(champbas_gfxbank_w) - AM_RANGE(0xa003, 0xa003) AM_WRITE(champbas_flipscreen_w) - AM_RANGE(0xa004, 0xa004) AM_WRITE(champbas_palette_bank_w) - AM_RANGE(0xa005, 0xa005) AM_WRITENOP // n.c. - AM_RANGE(0xa006, 0xa006) AM_WRITE(champbas_mcu_halt_w) // MCU not present/not used in champbas - AM_RANGE(0xa007, 0xa007) AM_WRITE(champbas_mcu_switch_w) // MCU not present/not used in champbas - - AM_RANGE(0xa060, 0xa06f) AM_RAM AM_SHARE("spriteram_2") + AM_RANGE(0xa001, 0xa001) AM_WRITENOP // !WORK board output (no use?) + AM_RANGE(0xa002, 0xa002) AM_WRITE(gfxbank_w) + AM_RANGE(0xa003, 0xa003) AM_WRITE(flipscreen_w) + AM_RANGE(0xa004, 0xa004) AM_WRITE(palette_bank_w) + AM_RANGE(0xa005, 0xa005) AM_WRITENOP // n.c. + AM_RANGE(0xa006, 0xa006) AM_WRITENOP // no MCU + AM_RANGE(0xa007, 0xa007) AM_WRITENOP // no MCU + + AM_RANGE(0xa060, 0xa06f) AM_WRITEONLY AM_SHARE("spriteram") AM_RANGE(0xa080, 0xa080) AM_WRITE(soundlatch_byte_w) -/* AM_RANGE(0xa0a0, 0xa0a0) ???? */ - AM_RANGE(0xa0c0, 0xa0c0) AM_WRITE(champbas_watchdog_reset_w) - - /* champbja only */ - AM_RANGE(0x6800, 0x68ff) AM_READ(champbja_alt_protection_r) + AM_RANGE(0xa0c0, 0xa0c0) AM_WRITE(watchdog_reset_w) ADDRESS_MAP_END -static ADDRESS_MAP_START( exctsccrb_main_map, AS_PROGRAM, 8, champbas_state ) - AM_RANGE(0x0000, 0x5fff) AM_ROM -// AM_RANGE(0x6000, 0x63ff) AM_RAM AM_SHARE("share1") // MCU not used (though it's present on the board) - AM_RANGE(0x7000, 0x7001) AM_DEVWRITE("aysnd", ay8910_device, data_address_w) -// AM_RANGE(0x7800, 0x7fff) AM_ROM // champbb2 only - AM_RANGE(0x8000, 0x87ff) AM_RAM_WRITE(champbas_bg_videoram_w) AM_SHARE("bg_videoram") - AM_RANGE(0x8800, 0x8fff) AM_RAM AM_SHARE("spriteram_2") /* ??? */ - - AM_RANGE(0xa000, 0xa000) AM_READ_PORT("P1") - AM_RANGE(0xa040, 0xa040) AM_READ_PORT("P2") - AM_RANGE(0xa080, 0xa080) AM_READ_PORT("DSW") - AM_RANGE(0xa0c0, 0xa0c0) AM_READ_PORT("SYSTEM") +// base map + ALPHA-8x0x protection +static ADDRESS_MAP_START( champbasj_map, AS_PROGRAM, 8, champbas_state ) + AM_RANGE(0x6000, 0x63ff) AM_DEVREADWRITE("alpha_8201", alpha_8201_device, ext_ram_r, ext_ram_w) + AM_RANGE(0xa006, 0xa006) AM_WRITE(mcu_start_w) + AM_RANGE(0xa007, 0xa007) AM_WRITE(mcu_switch_w) + AM_IMPORT_FROM( champbas_map ) +ADDRESS_MAP_END - AM_RANGE(0xa000, 0xa000) AM_WRITE(irq_enable_w) - AM_RANGE(0xa001, 0xa001) AM_WRITENOP /* ??? */ - AM_RANGE(0xa002, 0xa002) AM_WRITE(champbas_gfxbank_w) - AM_RANGE(0xa003, 0xa003) AM_WRITE(champbas_flipscreen_w) - AM_RANGE(0xa006, 0xa006) AM_WRITENOP /* MCU is not used, but some leftover code still writes here */ - AM_RANGE(0xa007, 0xa007) AM_WRITENOP /* MCU is not used, but some leftover code still writes here */ +// different protection for champbasja +static ADDRESS_MAP_START( champbasja_map, AS_PROGRAM, 8, champbas_state ) + AM_RANGE(0x6800, 0x68ff) AM_READ(champbja_protection_r) + AM_IMPORT_FROM( champbas_map ) +ADDRESS_MAP_END - AM_RANGE(0xa040, 0xa06f) AM_WRITEONLY AM_SHARE("spriteram") /* Sprite Pos */ - AM_RANGE(0xa080, 0xa080) AM_WRITE(soundlatch_byte_w) - AM_RANGE(0xa0c0, 0xa0c0) AM_WRITE(watchdog_reset_w) +// champbb2 +static ADDRESS_MAP_START( champbb2_map, AS_PROGRAM, 8, champbas_state ) + AM_RANGE(0x7800, 0x7fff) AM_ROM + AM_IMPORT_FROM( champbasj_map ) ADDRESS_MAP_END +// talbot +static ADDRESS_MAP_START( talbot_map, AS_PROGRAM, 8, champbas_state ) + AM_RANGE(0xa002, 0xa002) AM_WRITENOP // no gfxbank + AM_RANGE(0xa004, 0xa004) AM_WRITENOP // no palettebank + AM_IMPORT_FROM( champbasj_map ) +ADDRESS_MAP_END -static ADDRESS_MAP_START( exctsccr_main_map, AS_PROGRAM, 8, champbas_state ) - AM_RANGE(0x0000, 0x5fff) AM_ROM - AM_RANGE(0x6000, 0x63ff) AM_RAM AM_SHARE("share1") +// more sprites in exctsccr +static ADDRESS_MAP_START( exctsccr_map, AS_PROGRAM, 8, champbas_state ) + AM_RANGE(0x7000, 0x7001) AM_UNMAP // aysnd is controlled by audiocpu AM_RANGE(0x7c00, 0x7fff) AM_RAM - AM_RANGE(0x8000, 0x87ff) AM_RAM_WRITE(champbas_bg_videoram_w) AM_SHARE("bg_videoram") - AM_RANGE(0x8800, 0x8bff) AM_RAM AM_SHARE("spriteram_2") /* ??? */ - - AM_RANGE(0xa000, 0xa000) AM_READ_PORT("P1") - AM_RANGE(0xa040, 0xa040) AM_READ_PORT("P2") - AM_RANGE(0xa080, 0xa080) AM_READ_PORT("DSW") - AM_RANGE(0xa0c0, 0xa0c0) AM_READ_PORT("SYSTEM") - - AM_RANGE(0xa000, 0xa000) AM_WRITE(irq_enable_w) -// AM_RANGE(0xa001, 0xa001) AM_WRITENOP /* ??? */ - AM_RANGE(0xa002, 0xa002) AM_WRITE(champbas_gfxbank_w) - AM_RANGE(0xa003, 0xa003) AM_WRITE(champbas_flipscreen_w) - AM_RANGE(0xa006, 0xa006) AM_WRITE(champbas_mcu_halt_w) - AM_RANGE(0xa007, 0xa007) AM_WRITENOP /* This is also MCU control, but I don't need it */ + AM_RANGE(0xa004, 0xa004) AM_WRITENOP // no palettebank + AM_RANGE(0xa040, 0xa04f) AM_WRITEONLY AM_SHARE("spriteram2") + AM_IMPORT_FROM( champbasj_map ) +ADDRESS_MAP_END - AM_RANGE(0xa040, 0xa06f) AM_WRITEONLY AM_SHARE("spriteram") /* Sprite pos */ - AM_RANGE(0xa080, 0xa080) AM_WRITE(soundlatch_byte_w) - AM_RANGE(0xa0c0, 0xa0c0) AM_WRITE(watchdog_reset_w) +// exctsccrb +static ADDRESS_MAP_START( exctsccrb_map, AS_PROGRAM, 8, champbas_state ) + AM_RANGE(0xa004, 0xa004) AM_WRITENOP // no palettebank + AM_RANGE(0xa040, 0xa04f) AM_WRITEONLY AM_SHARE("spriteram2") + AM_IMPORT_FROM( champbasj_map ) ADDRESS_MAP_END +// audiocpu -static ADDRESS_MAP_START( champbas_sub_map, AS_PROGRAM, 8, champbas_state ) +// champbas/champbb2 (note: talbot doesn't have audiocpu) +static ADDRESS_MAP_START( champbas_sound_map, AS_PROGRAM, 8, champbas_state ) AM_RANGE(0x0000, 0x5fff) AM_ROM - AM_RANGE(0x6000, 0x7fff) AM_READ(soundlatch_byte_r) - AM_RANGE(0x8000, 0x9fff) AM_WRITENOP // 4-bit return code to main CPU (not used) - AM_RANGE(0xa000, 0xbfff) AM_WRITE(soundlatch_clear_byte_w) - AM_RANGE(0xc000, 0xdfff) AM_WRITE(champbas_dac_w) + AM_RANGE(0x6000, 0x6000) AM_MIRROR(0x1fff) AM_READ(soundlatch_byte_r) + AM_RANGE(0x8000, 0x8000) AM_MIRROR(0x1fff) AM_WRITENOP // 4-bit return code to main CPU (not used) + AM_RANGE(0xa000, 0xa000) AM_MIRROR(0x1fff) AM_WRITE(soundlatch_clear_byte_w) + AM_RANGE(0xc000, 0xc000) AM_MIRROR(0x1fff) AM_WRITE(dac1_w) AM_RANGE(0xe000, 0xe3ff) AM_MIRROR(0x1c00) AM_RAM ADDRESS_MAP_END - -static ADDRESS_MAP_START( exctsccr_sub_map, AS_PROGRAM, 8, champbas_state ) +// exctsccr +static ADDRESS_MAP_START( exctsccr_sound_map, AS_PROGRAM, 8, champbas_state ) AM_RANGE(0x0000, 0x8fff) AM_ROM AM_RANGE(0xa000, 0xa7ff) AM_RAM - AM_RANGE(0xc008, 0xc008) AM_WRITE(champbas_dac1_w) - AM_RANGE(0xc009, 0xc009) AM_WRITE(champbas_dac2_w) + AM_RANGE(0xc008, 0xc008) AM_WRITE(dac1_w) + AM_RANGE(0xc009, 0xc009) AM_WRITE(dac2_w) AM_RANGE(0xc00c, 0xc00c) AM_WRITE(soundlatch_clear_byte_w) AM_RANGE(0xc00d, 0xc00d) AM_READ(soundlatch_byte_r) -// AM_RANGE(0xc00f, 0xc00f) AM_WRITENOP /* ??? */ +// AM_RANGE(0xc00f, 0xc00f) AM_WRITENOP // ? ADDRESS_MAP_END static ADDRESS_MAP_START( exctsccr_sound_io_map, AS_IO, 8, champbas_state ) @@ -360,10 +284,6 @@ static ADDRESS_MAP_START( exctsccr_sound_io_map, AS_IO, 8, champbas_state ) ADDRESS_MAP_END -static ADDRESS_MAP_START( mcu_map, AS_PROGRAM, 8, champbas_state ) - AM_RANGE(0x0000, 0x03ff) AM_RAM AM_SHARE("share1") /* main CPU shared RAM */ -ADDRESS_MAP_END - /************************************* * @@ -377,20 +297,20 @@ static INPUT_PORTS_START( talbot ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON2 ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_START("P2") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_COCKTAIL + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_COCKTAIL + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_COCKTAIL + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_COCKTAIL PORT_START("DSW") PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coinage ) ) @@ -408,7 +328,7 @@ static INPUT_PORTS_START( talbot ) PORT_DIPNAME( 0x40, 0x00, DEF_STR( Cabinet ) ) PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) PORT_DIPSETTING( 0x40, DEF_STR( Cocktail ) ) - PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, champbas_state,champbas_watchdog_bit2, NULL) // bit 2 of the watchdog counter + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, champbas_state, watchdog_bit2, NULL) // bit 2 of the watchdog counter PORT_START("SYSTEM") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 ) @@ -425,16 +345,16 @@ static INPUT_PORTS_START( champbas ) PORT_INCLUDE( talbot ) PORT_MODIFY("P1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) // throw (red) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) // throw (red) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 ) // changes (blue) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON2 ) // steal (yellow) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 ) // changes (blue) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON2 ) // steal (yellow) PORT_MODIFY("P2") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL // steal (yellow) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_COCKTAIL // changes (blue) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL // steal (yellow) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_COCKTAIL // changes (blue) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_COCKTAIL - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL // throw (red) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL // throw (red) PORT_MODIFY("DSW") PORT_DIPNAME( 0x03, 0x02, DEF_STR( Coinage ) ) @@ -455,7 +375,6 @@ static INPUT_PORTS_START( champbas ) PORT_DIPSETTING( 0x20, DEF_STR( Easy ) ) PORT_DIPSETTING( 0x00, DEF_STR( Hard )) PORT_DIPUNKNOWN( 0x40, 0x00 ) - PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, champbas_state,champbas_watchdog_bit2, NULL) // bit 2 of the watchdog counter INPUT_PORTS_END static INPUT_PORTS_START( exctsccr ) @@ -481,10 +400,10 @@ static INPUT_PORTS_START( exctsccr ) PORT_DIPSETTING( 0x00, "2 Min." ) PORT_DIPSETTING( 0x60, "3 Min." ) PORT_DIPSETTING( 0x40, "4 Min." ) - PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, champbas_state,champbas_watchdog_bit2, NULL) // bit 2 of the watchdog counter INPUT_PORTS_END + /************************************* * * Graphics definitions @@ -524,7 +443,6 @@ static GFXDECODE_START( champbas ) GFXDECODE_END - static const gfx_layout charlayout_3bpp = { 8,8, @@ -565,37 +483,36 @@ static GFXDECODE_START( exctsccr ) GFXDECODE_END + /************************************* * - * Machine driver + * Machine drivers * *************************************/ -MACHINE_START_MEMBER(champbas_state,champbas) +void champbas_state::machine_start() { - save_item(NAME(m_watchdog_count)); + // zerofill + m_irq_mask = 0; + m_palette_bank = 0; + m_gfx_bank = 0; + + // register for savestates + save_item(NAME(m_irq_mask)); save_item(NAME(m_palette_bank)); save_item(NAME(m_gfx_bank)); } -MACHINE_START_MEMBER(champbas_state,exctsccr) -{ - // FIXME - machine().scheduler().timer_pulse(attotime::from_hz(75), timer_expired_delegate(FUNC(champbas_state::exctsccr_fm_callback),this)); /* updates fm */ - - MACHINE_START_CALL_MEMBER(champbas); -} - - -MACHINE_RESET_MEMBER(champbas_state,champbas) +void champbas_state::machine_reset() { - m_palette_bank = 0; - m_gfx_bank = 0; // talbot has only 1 bank + // 74LS259 is auto CLR on reset + for (int i = 0; i < 8; i++) + m_maincpu->space(AS_PROGRAM).write_byte(0xa000 + i, 0); } INTERRUPT_GEN_MEMBER(champbas_state::vblank_irq) { - if(m_irq_mask) + if (m_irq_mask) device.execute().set_input_line(0, ASSERT_LINE); } @@ -605,14 +522,12 @@ static MACHINE_CONFIG_START( talbot, champbas_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, XTAL_18_432MHz/6) MCFG_CPU_PROGRAM_MAP(talbot_map) - MCFG_CPU_VBLANK_INT_DRIVER("screen", champbas_state, vblank_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", champbas_state, vblank_irq) - /* MCU */ - MCFG_CPU_ADD(CPUTAG_MCU, ALPHA8201, XTAL_18_432MHz/6/8) - MCFG_CPU_PROGRAM_MAP(mcu_map) + MCFG_DEVICE_ADD("alpha_8201", ALPHA_8201, XTAL_18_432MHz/6/8) + MCFG_QUANTUM_PERFECT_CPU("alpha_8201:mcu") - MCFG_MACHINE_START_OVERRIDE(champbas_state,champbas) - MCFG_MACHINE_RESET_OVERRIDE(champbas_state,champbas) + MCFG_WATCHDOG_VBLANK_INIT(0x10) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -620,7 +535,6 @@ static MACHINE_CONFIG_START( talbot, champbas_state ) MCFG_SCREEN_SIZE(32*8, 32*8) MCFG_SCREEN_VISIBLE_AREA(0, 32*8-1, 2*8, 30*8-1) MCFG_SCREEN_UPDATE_DRIVER(champbas_state, screen_update_champbas) - MCFG_SCREEN_VBLANK_DRIVER(champbas_state, screen_eof_champbas) MCFG_SCREEN_PALETTE("palette") MCFG_GFXDECODE_ADD("gfxdecode", "palette", talbot) @@ -631,7 +545,7 @@ static MACHINE_CONFIG_START( talbot, champbas_state ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") - MCFG_SOUND_ADD("aysnd", AY8910, XTAL_18_432MHz/12) + MCFG_SOUND_ADD("ay1", AY8910, XTAL_18_432MHz/12) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.5) MACHINE_CONFIG_END @@ -639,16 +553,14 @@ MACHINE_CONFIG_END static MACHINE_CONFIG_START( champbas, champbas_state ) /* basic machine hardware */ - /* main cpu */ MCFG_CPU_ADD("maincpu", Z80, XTAL_18_432MHz/6) - MCFG_CPU_PROGRAM_MAP(champbas_main_map) - MCFG_CPU_VBLANK_INT_DRIVER("screen", champbas_state, vblank_irq) + MCFG_CPU_PROGRAM_MAP(champbas_map) + MCFG_CPU_VBLANK_INT_DRIVER("screen", champbas_state, vblank_irq) - MCFG_CPU_ADD("sub", Z80, XTAL_18_432MHz/6) - MCFG_CPU_PROGRAM_MAP(champbas_sub_map) + MCFG_CPU_ADD("audiocpu", Z80, XTAL_18_432MHz/6) + MCFG_CPU_PROGRAM_MAP(champbas_sound_map) - MCFG_MACHINE_START_OVERRIDE(champbas_state,champbas) - MCFG_MACHINE_RESET_OVERRIDE(champbas_state,champbas) + MCFG_WATCHDOG_VBLANK_INIT(0x10) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -656,7 +568,6 @@ static MACHINE_CONFIG_START( champbas, champbas_state ) MCFG_SCREEN_SIZE(32*8, 32*8) MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1) MCFG_SCREEN_UPDATE_DRIVER(champbas_state, screen_update_champbas) - MCFG_SCREEN_VBLANK_DRIVER(champbas_state, screen_eof_champbas) MCFG_SCREEN_PALETTE("palette") MCFG_GFXDECODE_ADD("gfxdecode", "palette", champbas) @@ -668,24 +579,35 @@ static MACHINE_CONFIG_START( champbas, champbas_state ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") - MCFG_SOUND_ADD("aysnd", AY8910, XTAL_18_432MHz/12) + MCFG_SOUND_ADD("ay1", AY8910, XTAL_18_432MHz/12) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30) - MCFG_DAC_ADD("dac") + MCFG_DAC_ADD("dac1") MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.70) MACHINE_CONFIG_END +static MACHINE_CONFIG_DERIVED( champbasj, champbas ) -static MACHINE_CONFIG_DERIVED( champmcu, champbas ) + /* basic machine hardware */ + MCFG_CPU_MODIFY("maincpu") + MCFG_CPU_PROGRAM_MAP(champbasj_map) + + MCFG_DEVICE_ADD("alpha_8201", ALPHA_8201, XTAL_18_432MHz/6/8) // note: 8302 rom on champbb2 (same device!) + MCFG_QUANTUM_PERFECT_CPU("alpha_8201:mcu") +MACHINE_CONFIG_END + +static MACHINE_CONFIG_DERIVED( champbasja, champbas ) /* basic machine hardware */ + MCFG_CPU_MODIFY("maincpu") + MCFG_CPU_PROGRAM_MAP(champbasja_map) +MACHINE_CONFIG_END - /* MCU */ - MCFG_CPU_ADD(CPUTAG_MCU, ALPHA8201, XTAL_18_432MHz/6/8) - MCFG_CPU_PROGRAM_MAP(mcu_map) +static MACHINE_CONFIG_DERIVED( champbb2, champbasj ) - /* to MCU timeout champbbj */ - MCFG_QUANTUM_TIME(attotime::from_hz(3000)) + /* basic machine hardware */ + MCFG_CPU_MODIFY("maincpu") + MCFG_CPU_PROGRAM_MAP(champbb2_map) MACHINE_CONFIG_END @@ -693,20 +615,21 @@ static MACHINE_CONFIG_START( exctsccr, champbas_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, XTAL_18_432MHz/6 ) - MCFG_CPU_PROGRAM_MAP(exctsccr_main_map) - MCFG_CPU_VBLANK_INT_DRIVER("screen", champbas_state, vblank_irq) + MCFG_CPU_PROGRAM_MAP(exctsccr_map) + MCFG_CPU_VBLANK_INT_DRIVER("screen", champbas_state, vblank_irq) MCFG_CPU_ADD("audiocpu", Z80, XTAL_14_31818MHz/4 ) - MCFG_CPU_PROGRAM_MAP(exctsccr_sub_map) + MCFG_CPU_PROGRAM_MAP(exctsccr_sound_map) MCFG_CPU_IO_MAP(exctsccr_sound_io_map) - MCFG_CPU_PERIODIC_INT_DRIVER(champbas_state, nmi_line_pulse, 4000) /* 4 kHz, updates the dac */ + MCFG_CPU_PERIODIC_INT_DRIVER(champbas_state, nmi_line_pulse, 4000) // 4 kHz, updates the dac + + MCFG_TIMER_DRIVER_ADD_PERIODIC("exc_snd_irq", champbas_state, exctsccr_sound_irq, attotime::from_hz(75)) // irq source unknown, determines music tempo + MCFG_TIMER_START_DELAY(attotime::from_hz(75)) - /* MCU */ - MCFG_CPU_ADD(CPUTAG_MCU, ALPHA8301, XTAL_18_432MHz/6/8) /* Actually 8302 */ - MCFG_CPU_PROGRAM_MAP(mcu_map) + MCFG_DEVICE_ADD("alpha_8201", ALPHA_8201, XTAL_18_432MHz/6/8) // note: 8302 rom, or 8303 on exctscc2 (same device!) + MCFG_QUANTUM_PERFECT_CPU("alpha_8201:mcu") - MCFG_MACHINE_START_OVERRIDE(champbas_state,exctsccr) - MCFG_MACHINE_RESET_OVERRIDE(champbas_state,champbas) + MCFG_WATCHDOG_VBLANK_INIT(0x10) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -714,7 +637,6 @@ static MACHINE_CONFIG_START( exctsccr, champbas_state ) MCFG_SCREEN_SIZE(32*8, 32*8) MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1) MCFG_SCREEN_UPDATE_DRIVER(champbas_state, screen_update_exctsccr) - MCFG_SCREEN_VBLANK_DRIVER(champbas_state, screen_eof_champbas) MCFG_SCREEN_PALETTE("palette") MCFG_GFXDECODE_ADD("gfxdecode", "palette", exctsccr) @@ -751,14 +673,16 @@ static MACHINE_CONFIG_START( exctsccrb, champbas_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, XTAL_18_432MHz/6) - MCFG_CPU_PROGRAM_MAP(exctsccrb_main_map) - MCFG_CPU_VBLANK_INT_DRIVER("screen", champbas_state, vblank_irq) + MCFG_CPU_PROGRAM_MAP(exctsccrb_map) + MCFG_CPU_VBLANK_INT_DRIVER("screen", champbas_state, vblank_irq) + + MCFG_CPU_ADD("audiocpu", Z80, XTAL_18_432MHz/6) + MCFG_CPU_PROGRAM_MAP(champbas_sound_map) - MCFG_CPU_ADD("sub", Z80, XTAL_18_432MHz/6) - MCFG_CPU_PROGRAM_MAP(champbas_sub_map) + MCFG_DEVICE_ADD("alpha_8201", ALPHA_8201, XTAL_18_432MHz/6/8) // champbasj 8201 on pcb, though unused + MCFG_QUANTUM_PERFECT_CPU("alpha_8201:mcu") - MCFG_MACHINE_START_OVERRIDE(champbas_state,champbas) - MCFG_MACHINE_RESET_OVERRIDE(champbas_state,champbas) + MCFG_WATCHDOG_VBLANK_INIT(0x10) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -766,7 +690,6 @@ static MACHINE_CONFIG_START( exctsccrb, champbas_state ) MCFG_SCREEN_SIZE(32*8, 32*8) MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1) MCFG_SCREEN_UPDATE_DRIVER(champbas_state, screen_update_exctsccr) - MCFG_SCREEN_VBLANK_DRIVER(champbas_state, screen_eof_champbas) MCFG_SCREEN_PALETTE("palette") MCFG_GFXDECODE_ADD("gfxdecode", "palette", exctsccr) @@ -778,10 +701,10 @@ static MACHINE_CONFIG_START( exctsccrb, champbas_state ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") - MCFG_SOUND_ADD("aysnd", AY8910, XTAL_18_432MHz/12) + MCFG_SOUND_ADD("ay1", AY8910, XTAL_18_432MHz/12) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30) - MCFG_DAC_ADD("dac") + MCFG_DAC_ADD("dac1") MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.70) MACHINE_CONFIG_END @@ -802,8 +725,8 @@ ROM_START( talbot ) ROM_LOAD( "15.10i", 0x4000, 0x1000, CRC(0225b7ef) SHA1(9adee4831eb633b0a31580596205a655df94c2b2) ) ROM_LOAD( "16.11i", 0x5000, 0x1000, CRC(1612adf5) SHA1(9adeb21d5d1692f6e31460062f03f2008076b307) ) - ROM_REGION( 0x2000, "mcu", 0 ) - ROM_LOAD( "alpha-8201__44801a75__2f25.bin", 0x0000, 0x2000, CRC(b77931ac) SHA1(405b02585e80d95a2821455538c5c2c31ce262d1) ) + ROM_REGION( 0x2000, "alpha_8201:mcu", 0 ) + ROM_LOAD( "alpha-8201_44801a75_2f25.bin", 0x0000, 0x2000, CRC(b77931ac) SHA1(405b02585e80d95a2821455538c5c2c31ce262d1) ) ROM_REGION( 0x1000, "gfx1", 0 ) // chars ROM_LOAD( "7.6a", 0x0000, 0x1000, CRC(bde14194) SHA1(f8f569342a3094eb5450a30b8ab87901b98e6061) ) @@ -822,7 +745,7 @@ ROM_START( champbas ) ROM_LOAD( "champbb.2", 0x2000, 0x2000, CRC(5ddd872e) SHA1(68e21572e27707c991180b1bd0a6b31f7b64abf6) ) ROM_LOAD( "champbb.3", 0x4000, 0x2000, CRC(f39a7046) SHA1(3097bffe84ac74ce9e6481028a0ebbe8b1d6eaf9) ) - ROM_REGION( 0x10000, "sub", 0 ) + ROM_REGION( 0x10000, "audiocpu", 0 ) ROM_LOAD( "champbb.6", 0x0000, 0x2000, CRC(26ab3e16) SHA1(019b9d34233a6b7a53e204154b782ceb42915d2b) ) ROM_LOAD( "champbb.7", 0x2000, 0x2000, CRC(7c01715f) SHA1(b15b2001b8c110f2599eee3aeed79f67686ebd7e) ) ROM_LOAD( "champbb.8", 0x4000, 0x2000, CRC(3c911786) SHA1(eea0c467e213d237b5bb9d04b19a418d6090c2dc) ) @@ -844,13 +767,13 @@ ROM_START( champbasj ) ROM_LOAD( "12.2g", 0x2000, 0x2000, CRC(7b4e5faa) SHA1(b7201816a819ef313ddc81f312d26982b83ef1c7) ) ROM_LOAD( "13.2h", 0x4000, 0x2000, CRC(b201e31f) SHA1(bba3b611ff60ad8d5dd8484df4cfc2026f4fd344) ) - ROM_REGION( 0x10000, "sub", 0 ) + ROM_REGION( 0x10000, "audiocpu", 0 ) ROM_LOAD( "16.2k", 0x0000, 0x2000, CRC(24c482ee) SHA1(c25bdf77014e095fc11a9a6b17f16858f19db451) ) ROM_LOAD( "17.2l", 0x2000, 0x2000, CRC(f10b148b) SHA1(d66516d509f6f16e51ee59d27c4867e276064c3f) ) ROM_LOAD( "18.2n", 0x4000, 0x2000, CRC(2dc484dd) SHA1(28bd68c787d7e6989849ca52009948dbd5cdcc79) ) - ROM_REGION( 0x2000, "mcu", 0 ) - ROM_LOAD( "alpha-8201__44801a75__2f25.bin", 0x0000, 0x2000, CRC(b77931ac) SHA1(405b02585e80d95a2821455538c5c2c31ce262d1) ) + ROM_REGION( 0x2000, "alpha_8201:mcu", 0 ) + ROM_LOAD( "alpha-8201_44801a75_2f25.bin", 0x0000, 0x2000, CRC(b77931ac) SHA1(405b02585e80d95a2821455538c5c2c31ce262d1) ) ROM_REGION( 0x2000, "gfx1", 0 ) // chars + sprites: rearranged by DRIVER_INIT to leave only chars ROM_LOAD( "14.5e", 0x0000, 0x2000, CRC(1b8202b3) SHA1(889b77fc3d0cb029baf8c47be260f513f3ed59bd) ) @@ -869,7 +792,7 @@ ROM_START( champbasja ) ROM_LOAD( "09", 0x2000, 0x2000, CRC(9d39e5b3) SHA1(11c1a1d2296c0bf16d7610eaa79b034bfd813740) ) ROM_LOAD( "08", 0x4000, 0x2000, CRC(53468a0f) SHA1(d4b5ea48b27754eebe593c8b4fcf5bf117f27ae4) ) - ROM_REGION( 0x10000, "sub", 0 ) + ROM_REGION( 0x10000, "audiocpu", 0 ) ROM_LOAD( "16.2k", 0x0000, 0x2000, CRC(24c482ee) SHA1(c25bdf77014e095fc11a9a6b17f16858f19db451) ) ROM_LOAD( "17.2l", 0x2000, 0x2000, CRC(f10b148b) SHA1(d66516d509f6f16e51ee59d27c4867e276064c3f) ) ROM_LOAD( "18.2n", 0x4000, 0x2000, CRC(2dc484dd) SHA1(28bd68c787d7e6989849ca52009948dbd5cdcc79) ) @@ -892,14 +815,14 @@ ROM_START( champbb2 ) ROM_LOAD( "epr5930", 0x4000, 0x2000, CRC(b6570a90) SHA1(5a2651aeac986000913b5854792b2d81df6b2fc6) ) ROM_LOAD( "epr5931", 0x7800, 0x0800, CRC(0592434d) SHA1(a7f61546c39ffdbff46c4db485c9b3f6eefcf1ac) ) - ROM_REGION( 0x10000, "sub", 0 ) + ROM_REGION( 0x10000, "audiocpu", 0 ) ROM_LOAD( "epr5933", 0x0000, 0x2000, CRC(26ab3e16) SHA1(019b9d34233a6b7a53e204154b782ceb42915d2b) ) ROM_LOAD( "epr5934", 0x2000, 0x2000, CRC(7c01715f) SHA1(b15b2001b8c110f2599eee3aeed79f67686ebd7e) ) ROM_LOAD( "epr5935", 0x4000, 0x2000, CRC(3c911786) SHA1(eea0c467e213d237b5bb9d04b19a418d6090c2dc) ) // the pcb has a 8302 on it, though only the 8201 instructions are used - ROM_REGION( 0x2000, "mcu", 0 ) - ROM_LOAD( "alpha-8302__44801b35.bin", 0x0000, 0x2000, CRC(edabac6c) SHA1(eaf1c51b63023256df526b0d3fd53cffc919c901) ) + ROM_REGION( 0x2000, "alpha_8201:mcu", 0 ) + ROM_LOAD( "alpha-8302_44801b35.bin", 0x0000, 0x2000, CRC(edabac6c) SHA1(eaf1c51b63023256df526b0d3fd53cffc919c901) ) ROM_REGION( 0x2000, "gfx1", 0 ) // chars + sprites: rearranged by DRIVER_INIT to leave only chars ROM_LOAD( "epr5936", 0x0000, 0x2000, CRC(c4a4df75) SHA1(7b85dbf405697b0b8881f910c08f6db6c828b19a) ) @@ -920,14 +843,14 @@ ROM_START( champbb2a ) ROM_LOAD( "4.bin", 0x7800, 0x0800, NO_DUMP ) /* not in this set, but probably the same */ - ROM_REGION( 0x10000, "sub", 0 ) + ROM_REGION( 0x10000, "audiocpu", 0 ) ROM_LOAD( "epr5933", 0x0000, 0x2000, CRC(26ab3e16) SHA1(019b9d34233a6b7a53e204154b782ceb42915d2b) ) ROM_LOAD( "epr5934", 0x2000, 0x2000, CRC(7c01715f) SHA1(b15b2001b8c110f2599eee3aeed79f67686ebd7e) ) ROM_LOAD( "epr5935", 0x4000, 0x2000, CRC(3c911786) SHA1(eea0c467e213d237b5bb9d04b19a418d6090c2dc) ) // the pcb has a 8302 on it, though only the 8201 instructions are used - ROM_REGION( 0x2000, "mcu", 0 ) - ROM_LOAD( "alpha-8302__44801b35.bin", 0x0000, 0x2000, CRC(edabac6c) SHA1(eaf1c51b63023256df526b0d3fd53cffc919c901) ) + ROM_REGION( 0x2000, "alpha_8201:mcu", 0 ) + ROM_LOAD( "alpha-8302_44801b35.bin", 0x0000, 0x2000, CRC(edabac6c) SHA1(eaf1c51b63023256df526b0d3fd53cffc919c901) ) ROM_REGION( 0x2000, "gfx1", 0 ) // chars + sprites: rearranged by DRIVER_INIT to leave only chars ROM_LOAD( "epr5936", 0x0000, 0x2000, CRC(c4a4df75) SHA1(7b85dbf405697b0b8881f910c08f6db6c828b19a) ) @@ -948,14 +871,14 @@ ROM_START( champbb2j ) ROM_LOAD( "0.11g", 0x7800, 0x0800, CRC(be0e180d) SHA1(7a8915e00920faa08344d752404a6f98d8fb303b) ) /* not in this set, but probably the same */ - ROM_REGION( 0x10000, "sub", 0 ) + ROM_REGION( 0x10000, "audiocpu", 0 ) ROM_LOAD( "6.15c", 0x0000, 0x2000, CRC(24c482ee) SHA1(c25bdf77014e095fc11a9a6b17f16858f19db451) ) ROM_LOAD( "7.15d", 0x2000, 0x2000, CRC(f10b148b) SHA1(d66516d509f6f16e51ee59d27c4867e276064c3f) ) ROM_LOAD( "8.15e", 0x4000, 0x2000, CRC(2dc484dd) SHA1(28bd68c787d7e6989849ca52009948dbd5cdcc79) ) // the pcb has a 8302 on it, though only the 8201 instructions are used - ROM_REGION( 0x2000, "mcu", 0 ) - ROM_LOAD( "alpha-8302__44801b35.bin", 0x0000, 0x2000, CRC(edabac6c) SHA1(eaf1c51b63023256df526b0d3fd53cffc919c901) ) + ROM_REGION( 0x2000, "alpha_8201:mcu", 0 ) + ROM_LOAD( "alpha-8302_44801b35.bin", 0x0000, 0x2000, CRC(edabac6c) SHA1(eaf1c51b63023256df526b0d3fd53cffc919c901) ) ROM_REGION( 0x2000, "gfx1", 0 ) // chars + sprites: rearranged by DRIVER_INIT to leave only chars ROM_LOAD( "4.6a", 0x0000, 0x2000, CRC(c4a4df75) SHA1(7b85dbf405697b0b8881f910c08f6db6c828b19a) ) @@ -981,6 +904,9 @@ ROM_START( exctsccr ) /* Teams: ITA AUS GBR FRA FRG BRA */ ROM_LOAD( "7_c6.bin", 0x6000, 0x2000, CRC(6d51521e) SHA1(2809bd2e61f40dcd31d43c62520982bdcfb0a865) ) ROM_LOAD( "1_a6.bin", 0x8000, 0x1000, CRC(20f2207e) SHA1(b1ed2237d0bd50ddbe593fd2fbff9f1d67c1eb11) ) + ROM_REGION( 0x2000, "alpha_8201:mcu", 0 ) + ROM_LOAD( "alpha-8302_44801b35.bin", 0x0000, 0x2000, CRC(edabac6c) SHA1(eaf1c51b63023256df526b0d3fd53cffc919c901) ) + ROM_REGION( 0x04000, "gfx1", 0 ) // 3bpp chars + sprites: rearranged by DRIVER_INIT to leave only chars ROM_LOAD( "4_a5.bin", 0x0000, 0x2000, CRC(c342229b) SHA1(a989d6c12521c77882a7e17d4d80afe7eae05906) ) /* planes 0,1 */ ROM_LOAD( "6_c5.bin", 0x2000, 0x2000, CRC(eda40e32) SHA1(6c08fd4f4fb35fd354d02e04548e960c545f6a88) ) /* plane 3 */ @@ -1011,6 +937,9 @@ ROM_START( exctsccra ) /* Teams: ITA AUS GBR FRA FRG BRA */ ROM_LOAD( "7_c6.bin", 0x6000, 0x2000, CRC(6d51521e) SHA1(2809bd2e61f40dcd31d43c62520982bdcfb0a865) ) ROM_LOAD( "1_a6.bin", 0x8000, 0x1000, CRC(20f2207e) SHA1(b1ed2237d0bd50ddbe593fd2fbff9f1d67c1eb11) ) + ROM_REGION( 0x2000, "alpha_8201:mcu", 0 ) + ROM_LOAD( "alpha-8302_44801b35.bin", 0x0000, 0x2000, CRC(edabac6c) SHA1(eaf1c51b63023256df526b0d3fd53cffc919c901) ) + ROM_REGION( 0x04000, "gfx1", 0 ) // 3bpp chars + sprites: rearranged by DRIVER_INIT to leave only chars ROM_LOAD( "4_a5.bin", 0x0000, 0x2000, CRC(c342229b) SHA1(a989d6c12521c77882a7e17d4d80afe7eae05906) ) /* planes 0,1 */ ROM_LOAD( "6_c5.bin", 0x2000, 0x2000, CRC(eda40e32) SHA1(6c08fd4f4fb35fd354d02e04548e960c545f6a88) ) /* plane 3 */ @@ -1041,6 +970,9 @@ ROM_START( exctsccru ) /* Teams: ITA USA GBR FRA FRG BRA */ ROM_LOAD( "7_c6.bin", 0x6000, 0x2000, CRC(6d51521e) SHA1(2809bd2e61f40dcd31d43c62520982bdcfb0a865) ) ROM_LOAD( "1_a6.bin", 0x8000, 0x1000, CRC(20f2207e) SHA1(b1ed2237d0bd50ddbe593fd2fbff9f1d67c1eb11) ) + ROM_REGION( 0x2000, "alpha_8201:mcu", 0 ) + ROM_LOAD( "alpha-8302_44801b35.bin", 0x0000, 0x2000, CRC(edabac6c) SHA1(eaf1c51b63023256df526b0d3fd53cffc919c901) ) + ROM_REGION( 0x04000, "gfx1", 0 ) // 3bpp chars + sprites: rearranged by DRIVER_INIT to leave only chars ROM_LOAD( "vr4u.a5", 0x0000, 0x2000, CRC(103bb739) SHA1(335d89b3a374daa3fd1bd3fd66a82e7310303051) ) /* planes 0,1 */ ROM_LOAD( "vr6u.c5", 0x2000, 0x2000, CRC(a5b2b303) SHA1(0dd1912baa8236cba2baa4bc3d2955fd19617be9) ) /* plane 3 */ @@ -1071,6 +1003,9 @@ ROM_START( exctsccrj ) /* Teams: JPN USA GBR FRA FRG BRA */ ROM_LOAD( "7_c6.bin", 0x6000, 0x2000, CRC(6d51521e) SHA1(2809bd2e61f40dcd31d43c62520982bdcfb0a865) ) ROM_LOAD( "1_a6.bin", 0x8000, 0x1000, CRC(20f2207e) SHA1(b1ed2237d0bd50ddbe593fd2fbff9f1d67c1eb11) ) + ROM_REGION( 0x2000, "alpha_8201:mcu", 0 ) + ROM_LOAD( "alpha-8302_44801b35.bin", 0x0000, 0x2000, CRC(edabac6c) SHA1(eaf1c51b63023256df526b0d3fd53cffc919c901) ) + ROM_REGION( 0x04000, "gfx1", 0 ) // 3bpp chars + sprites: rearranged by DRIVER_INIT to leave only chars ROM_LOAD( "4_5a.bin", 0x0000, 0x2000, CRC(74cc71d6) SHA1(ff3d59845bc66ec3335eadf81d799a684182c66f) ) /* planes 0,1 */ ROM_LOAD( "6_5c.bin", 0x2000, 0x2000, CRC(7c4cd1b6) SHA1(141e67fec9b6d6b4380cb941b4d79341787680e3) ) /* plane 3 */ @@ -1100,6 +1035,9 @@ ROM_START( exctsccrjo ) /* Teams: JPN USA ENG FRA GFR BRA */ ROM_LOAD( "8.6d", 0x4000, 0x2000, CRC(b6b209a5) SHA1(e49a0db65b29337ac6b919237067b1990f2233ab) ) ROM_LOAD( "7.6c", 0x6000, 0x2000, CRC(8856452a) SHA1(4494c225c9df97da09c180caadb4dda49d0d5392) ) + ROM_REGION( 0x2000, "alpha_8201:mcu", 0 ) + ROM_LOAD( "alpha-8302_44801b35.bin", 0x0000, 0x2000, CRC(edabac6c) SHA1(eaf1c51b63023256df526b0d3fd53cffc919c901) ) + ROM_REGION( 0x04000, "gfx1", 0 ) // 3bpp chars + sprites: rearranged by DRIVER_INIT to leave only chars ROM_LOAD( "4.5a", 0x0000, 0x2000, CRC(c4259307) SHA1(7bd4e229a5e1a5136826a57aa61810fcdf9c5027) ) /* planes 0,1 */ ROM_LOAD( "6.5c", 0x2000, 0x2000, CRC(cca53367) SHA1(f06ebf2ab8f8f10cfe118af490017972990e3073) ) /* plane 3 */ @@ -1140,11 +1078,14 @@ ROM_START( exctsccrb ) ROM_LOAD( "es-2.g2", 0x2000, 0x2000, CRC(5c66e792) SHA1(f7a7f32806965fa926261217cee3159ccd198d49) ) ROM_LOAD( "es-3.h2", 0x4000, 0x2000, CRC(e0d504c0) SHA1(d9a9f37b3a44a05a3f3389aa9617c419a2cee661) ) - ROM_REGION( 0x10000, "sub", 0 ) /* sound */ + ROM_REGION( 0x10000, "audiocpu", 0 ) /* sound */ ROM_LOAD( "es-a.k2", 0x0000, 0x2000, CRC(99e87b78) SHA1(f12006ff3f6f3c706e06288c97a1446141373432) ) ROM_LOAD( "es-b.l2", 0x2000, 0x2000, CRC(8b3db794) SHA1(dbfed2357c7631bfca6bbd63a23617bc3abf6ca3) ) ROM_LOAD( "es-c.m2", 0x4000, 0x2000, CRC(7bed2f81) SHA1(cbbb0480519cc04a99e8983228b18c9e49a9985d) ) + ROM_REGION( 0x2000, "alpha_8201:mcu", 0 ) + ROM_LOAD( "alpha-8201_44801a75_2f25.bin", 0x0000, 0x2000, CRC(b77931ac) SHA1(405b02585e80d95a2821455538c5c2c31ce262d1) ) + /* the national flags are wrong. This happens on the real board */ ROM_REGION( 0x04000, "gfx1", 0 ) // 3bpp chars + sprites: rearranged by DRIVER_INIT to leave only chars ROM_LOAD( "4_a5.bin", 0x0000, 0x2000, CRC(c342229b) SHA1(a989d6c12521c77882a7e17d4d80afe7eae05906) ) /* planes 0,1 */ @@ -1176,8 +1117,8 @@ ROM_START( exctscc2 ) ROM_LOAD( "7_c6.bin", 0x6000, 0x2000, CRC(6d51521e) SHA1(2809bd2e61f40dcd31d43c62520982bdcfb0a865) ) /* vr.7h */ ROM_LOAD( "1_a6.bin", 0x8000, 0x1000, CRC(20f2207e) SHA1(b1ed2237d0bd50ddbe593fd2fbff9f1d67c1eb11) ) /* vr.7k */ - ROM_REGION( 0x2000, "mcu", 0 ) - ROM_LOAD( "8303.bin", 0x0000, 0x2000, CRC(66adcb37) SHA1(e1c72ecb161129dcbddc0b16dd90e716d0c79311) ) + ROM_REGION( 0x2000, "alpha_8201:mcu", 0 ) + ROM_LOAD( "alpha-8303_44801b42.bin", 0x0000, 0x2000, CRC(66adcb37) SHA1(e1c72ecb161129dcbddc0b16dd90e716d0c79311) ) ROM_REGION( 0x04000, "gfx1", 0 ) // 3bpp chars + sprites: rearranged by DRIVER_INIT to leave only chars ROM_LOAD( "vr.5a", 0x0000, 0x2000, CRC(4ff1783d) SHA1(c45074864c3a4bcbf3a87d164027ae16dca53d9c) ) /* planes 0,1 */ @@ -1197,6 +1138,7 @@ ROM_START( exctscc2 ) ROM_END + /************************************* * * Driver initialization @@ -1209,9 +1151,8 @@ DRIVER_INIT_MEMBER(champbas_state,champbas) UINT8 *rom1 = memregion("gfx1")->base(); UINT8 *rom2 = memregion("gfx2")->base(); int len = memregion("gfx1")->bytes(); - int i; - for (i = 0; i < len/2; ++i) + for (int i = 0; i < len/2; i++) { UINT8 t = rom1[i + len/2]; rom1[i + len/2] = rom2[i]; @@ -1225,10 +1166,9 @@ DRIVER_INIT_MEMBER(champbas_state,exctsccr) // chars and sprites are mixed in the same ROMs, so rearrange them for easier decoding UINT8 *rom1 = memregion("gfx1")->base(); UINT8 *rom2 = memregion("gfx2")->base(); - int i; // planes 0,1 - for (i = 0; i < 0x1000; ++i) + for (int i = 0; i < 0x1000; i++) { UINT8 t = rom1[i + 0x1000]; rom1[i + 0x1000] = rom2[i]; @@ -1236,12 +1176,12 @@ DRIVER_INIT_MEMBER(champbas_state,exctsccr) } // plane 3 - for (i = 0; i < 0x1000; ++i) + for (int i = 0; i < 0x1000; i++) { rom2[i + 0x3000] = rom1[i + 0x3000] >> 4; rom2[i + 0x2000] = rom1[i + 0x3000] & 0x0f; } - for (i = 0; i < 0x1000; ++i) + for (int i = 0; i < 0x1000; i++) { rom1[i + 0x3000] = rom1[i + 0x2000] >> 4; rom1[i + 0x2000] &= 0x0f; @@ -1249,25 +1189,27 @@ DRIVER_INIT_MEMBER(champbas_state,exctsccr) } + /************************************* * * Game driver(s) * *************************************/ -GAME( 1982, talbot, 0, talbot, talbot, driver_device, 0, ROT270, "Alpha Denshi Co. (Volt Electronics license)", "Talbot", MACHINE_SUPPORTS_SAVE ) - -GAME( 1983, champbas, 0, champbas, champbas, champbas_state, champbas, ROT0, "Alpha Denshi Co. (Sega license)", "Champion Base Ball", MACHINE_SUPPORTS_SAVE ) -GAME( 1983, champbasj, champbas, champmcu, champbas, champbas_state, champbas, ROT0, "Alpha Denshi Co.", "Champion Base Ball (Japan set 1)", MACHINE_SUPPORTS_SAVE ) -GAME( 1983, champbasja, champbas, champbas, champbas, champbas_state, champbas, ROT0, "Alpha Denshi Co.", "Champion Base Ball (Japan set 2)", MACHINE_SUPPORTS_SAVE ) -GAME( 1983, champbb2, 0, champmcu, champbas, champbas_state, champbas, ROT0, "Alpha Denshi Co. (Sega license)", "Champion Base Ball Part-2: Pair Play (set 1)", MACHINE_SUPPORTS_SAVE ) -GAME( 1983, champbb2a, champbb2, champmcu, champbas, champbas_state, champbas, ROT0, "Alpha Denshi Co.", "Champion Baseball II (set 2)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) // no dump -GAME( 1983, champbb2j, champbb2, champmcu, champbas, champbas_state, champbas, ROT0, "Alpha Denshi Co.", "Champion Baseball II (Japan)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) - -GAME( 1983, exctsccr, 0, exctsccr, exctsccr, champbas_state, exctsccr, ROT270, "Alpha Denshi Co.", "Exciting Soccer", MACHINE_SUPPORTS_SAVE ) -GAME( 1983, exctsccru, exctsccr, exctsccr, exctsccr, champbas_state, exctsccr, ROT270, "Alpha Denshi Co.", "Exciting Soccer (US)", MACHINE_SUPPORTS_SAVE ) -GAME( 1983, exctsccra, exctsccr, exctsccr, exctsccr, champbas_state, exctsccr, ROT270, "Alpha Denshi Co.", "Exciting Soccer (alternate music)", MACHINE_SUPPORTS_SAVE ) -GAME( 1983, exctsccrj, exctsccr, exctsccr, exctsccr, champbas_state, exctsccr, ROT270, "Alpha Denshi Co.", "Exciting Soccer (Japan)", MACHINE_SUPPORTS_SAVE ) -GAME( 1983, exctsccrjo, exctsccr, exctsccr, exctsccr, champbas_state, exctsccr, ROT270, "Alpha Denshi Co.", "Exciting Soccer (Japan, older)", MACHINE_SUPPORTS_SAVE ) -GAME( 1983, exctsccrb, exctsccr, exctsccrb,exctsccr, champbas_state, exctsccr, ROT270, "bootleg", "Exciting Soccer (bootleg)", MACHINE_SUPPORTS_SAVE ) -GAME( 1984, exctscc2, 0, exctsccr, exctsccr, champbas_state, exctsccr, ROT270, "Alpha Denshi Co.", "Exciting Soccer II", MACHINE_SUPPORTS_SAVE ) +/* YEAR NAME PARENT MACHINE INPUT INIT MONITOR, COMPANY, FULLNAME, FLAGS */ +GAME( 1982, talbot, 0, talbot, talbot, driver_device, 0, ROT270, "Alpha Denshi Co. (Volt Electronics license)", "Talbot", MACHINE_SUPPORTS_SAVE ) + +GAME( 1983, champbas, 0, champbas, champbas, champbas_state, champbas, ROT0, "Alpha Denshi Co. (Sega license)", "Champion Base Ball", MACHINE_SUPPORTS_SAVE ) +GAME( 1983, champbasj, champbas, champbasj, champbas, champbas_state, champbas, ROT0, "Alpha Denshi Co.", "Champion Base Ball (Japan set 1)", MACHINE_SUPPORTS_SAVE ) +GAME( 1983, champbasja, champbas, champbasja, champbas, champbas_state, champbas, ROT0, "Alpha Denshi Co.", "Champion Base Ball (Japan set 2)", MACHINE_SUPPORTS_SAVE ) +GAME( 1983, champbb2, 0, champbb2, champbas, champbas_state, champbas, ROT0, "Alpha Denshi Co. (Sega license)", "Champion Base Ball Part-2 (set 1)", MACHINE_SUPPORTS_SAVE ) +GAME( 1983, champbb2a, champbb2, champbb2, champbas, champbas_state, champbas, ROT0, "Alpha Denshi Co.", "Champion Base Ball Part-2 (set 2)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) // incomplete dump +GAME( 1983, champbb2j, champbb2, champbb2, champbas, champbas_state, champbas, ROT0, "Alpha Denshi Co.", "Champion Base Ball Part-2 (Japan)", MACHINE_SUPPORTS_SAVE ) + +GAME( 1983, exctsccr, 0, exctsccr, exctsccr, champbas_state, exctsccr, ROT270, "Alpha Denshi Co.", "Exciting Soccer", MACHINE_SUPPORTS_SAVE ) +GAME( 1983, exctsccru, exctsccr, exctsccr, exctsccr, champbas_state, exctsccr, ROT270, "Alpha Denshi Co.", "Exciting Soccer (US)", MACHINE_SUPPORTS_SAVE ) +GAME( 1983, exctsccra, exctsccr, exctsccr, exctsccr, champbas_state, exctsccr, ROT270, "Alpha Denshi Co.", "Exciting Soccer (alternate music)", MACHINE_SUPPORTS_SAVE ) +GAME( 1983, exctsccrj, exctsccr, exctsccr, exctsccr, champbas_state, exctsccr, ROT270, "Alpha Denshi Co.", "Exciting Soccer (Japan)", MACHINE_SUPPORTS_SAVE ) +GAME( 1983, exctsccrjo, exctsccr, exctsccr, exctsccr, champbas_state, exctsccr, ROT270, "Alpha Denshi Co.", "Exciting Soccer (Japan, older)", MACHINE_SUPPORTS_SAVE ) +GAME( 1983, exctsccrb, exctsccr, exctsccrb, exctsccr, champbas_state, exctsccr, ROT270, "bootleg (Kazutomi)", "Exciting Soccer (bootleg)", MACHINE_SUPPORTS_SAVE ) +GAME( 1984, exctscc2, 0, exctsccr, exctsccr, champbas_state, exctsccr, ROT270, "Alpha Denshi Co.", "Exciting Soccer II", MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/chicago.c b/src/mame/drivers/chicago.c index a15b07fdb0c..762236efec0 100644 --- a/src/mame/drivers/chicago.c +++ b/src/mame/drivers/chicago.c @@ -14,7 +14,7 @@ TV Pingame (1975) #451 Super Flipper (1975) #458 Demolition Derby (1976) #466 - + ***************************************************************************/ diff --git a/src/mame/drivers/cinemat.c b/src/mame/drivers/cinemat.c index 5729cfefa4d..36bd8829843 100644 --- a/src/mame/drivers/cinemat.c +++ b/src/mame/drivers/cinemat.c @@ -150,8 +150,8 @@ READ8_MEMBER(cinemat_state::joystick_read) return 0; else { - int xval = (INT16)(m_maincpu->state_int(CCPU_X) << 4) >> 4; - return (ioport(m_mux_select ? "ANALOGX" : "ANALOGY")->read_safe(0) - xval) < 0x800; + int const xval = INT16(m_maincpu->state_int(CCPU_X) << 4) >> 4; + return (read_safe(ioport(m_mux_select ? "ANALOGX" : "ANALOGY"), 0) - xval) < 0x800; } } @@ -169,7 +169,7 @@ READ8_MEMBER(cinemat_state::speedfrk_wheel_r) int delta_wheel; /* the shift register is cleared once per 'frame' */ - delta_wheel = (INT8)ioport("WHEEL")->read() / 8; + delta_wheel = INT8(ioport("WHEEL")->read()) / 8; if (delta_wheel > 3) delta_wheel = 3; else if (delta_wheel < -3) diff --git a/src/mame/drivers/cntsteer.c b/src/mame/drivers/cntsteer.c index 3766eb129a2..99f7dd9a200 100644 --- a/src/mame/drivers/cntsteer.c +++ b/src/mame/drivers/cntsteer.c @@ -19,10 +19,10 @@ - In Back Rotate Test, rotation is tested with the following arrangement (upper bits of rotation parameter): 04 -> 05 -> 02 -> 03 -> 00 -> 01 -> 06 -> 07 -> 04 and backwards Anything with bit 0 set is tested from 0xff to 0, with bit 0 clear that's 0 -> 0xff, fun. - - Understand how irq communication works between CPUs. Buffer $415-6 seems involved in the protocol. - We currently have slave CPU irq hooked up to vblank, might or might not be correct. - - invert order between maincpu and subcpu, subcpu is clearly the master CPU here. - - understand why background mirroring causes wrong gfxs on title screen (wrong tilemap paging, missing video bit or it's actually a RMW thing); + - Understand how irq communication works between CPUs. Buffer $415-6 seems involved in the protocol. + We currently have slave CPU irq hooked up to vblank, might or might not be correct. + - invert order between maincpu and subcpu, subcpu is clearly the master CPU here. + - understand why background mirroring causes wrong gfxs on title screen (wrong tilemap paging, missing video bit or it's actually a RMW thing); cleanup - split into driver/video; @@ -633,8 +633,8 @@ INTERRUPT_GEN_MEMBER(cntsteer_state::subcpu_vblank_irq) // That's my best guess so far about how Slave is supposed to stop execution on Master CPU, the lack of any realistic write // between these operations brings us to this. // Game currently returns error on MIX CPU RAM because halt-ing BACK CPU doesn't happen when it should of course ... -// UINT8 dp_r = (UINT8)device.state().state_int(M6809_DP); -// m_maincpu->set_input_line(INPUT_LINE_HALT, dp_r ? ASSERT_LINE : CLEAR_LINE); +// UINT8 dp_r = (UINT8)device.state().state_int(M6809_DP); +// m_maincpu->set_input_line(INPUT_LINE_HALT, dp_r ? ASSERT_LINE : CLEAR_LINE); m_subcpu->set_input_line(M6809_IRQ_LINE, ASSERT_LINE); } diff --git a/src/mame/drivers/cobra.c b/src/mame/drivers/cobra.c index 047e8e7fb03..b53e655ec6c 100644 --- a/src/mame/drivers/cobra.c +++ b/src/mame/drivers/cobra.c @@ -516,11 +516,11 @@ bool cobra_jvs::switches(UINT8 *&buf, UINT8 count_players, UINT8 bytes_per_switc static const char* player_ports[2] = { ":P1", ":P2" }; - *buf++ = ioport(":TEST")->read_safe(0); + *buf++ = read_safe(ioport(":TEST"), 0); for (int i=0; i < count_players; i++) { - UINT32 pval = ioport(player_ports[i])->read_safe(0); + UINT32 pval = read_safe(ioport(player_ports[i]), 0); for (int j=0; j < bytes_per_switch; j++) { *buf++ = (UINT8)(pval >> ((1-j) * 8)); @@ -2268,7 +2268,7 @@ void cobra_renderer::gfx_fifo_exec() } else { - logerror("gfxfifo_exec: unknown %08X %08X\n", w1, w2); + cobra->logerror("gfxfifo_exec: unknown %08X %08X\n", w1, w2); } cobra->m_gfx_re_status = RE_STATUS_IDLE; @@ -2289,7 +2289,7 @@ void cobra_renderer::gfx_fifo_exec() if (w1 != 0x0f600000 && w1 != 0xf0600000) { - logerror("gfxfifo_exec: unknown %08X %08X\n", w1, w2); + cobra->logerror("gfxfifo_exec: unknown %08X %08X\n", w1, w2); } //printf("gfxfifo_exec: unhandled %08X %08X\n", w1, w2); @@ -2640,7 +2640,7 @@ void cobra_renderer::gfx_fifo_exec() if (w1 != 0x8fff0000 || w2 != 0x00000000) { - logerror("gfxfifo_exec: buf_flush: %08X %08X\n", w1, w2); + cobra->logerror("gfxfifo_exec: buf_flush: %08X %08X\n", w1, w2); } cobra->m_gfx_re_status = RE_STATUS_IDLE; @@ -2847,7 +2847,7 @@ void cobra_renderer::gfx_fifo_exec() } k++; }; - logerror("\n"); + cobra->logerror("\n"); } } diff --git a/src/mame/drivers/combatsc.c b/src/mame/drivers/combatsc.c index 75c753a685b..2d9323791ef 100644 --- a/src/mame/drivers/combatsc.c +++ b/src/mame/drivers/combatsc.c @@ -273,7 +273,7 @@ READ8_MEMBER(combatsc_state::trackball_r) { UINT8 curr; - curr = ioport(tracknames[i])->read_safe(0xff); + curr = read_safe(ioport(tracknames[i]), 0xff); dir[i] = curr - m_pos[i]; m_sign[i] = dir[i] & 0x80; diff --git a/src/mame/drivers/cosmic.c b/src/mame/drivers/cosmic.c index 5468258b1a6..1eae0404888 100644 --- a/src/mame/drivers/cosmic.c +++ b/src/mame/drivers/cosmic.c @@ -323,7 +323,7 @@ READ8_MEMBER(cosmic_state::cosmicg_port_0_r) READ8_MEMBER(cosmic_state::magspot_coinage_dip_r) { - return (ioport("DSW")->read_safe(0) & (1 << (7 - offset))) ? 0 : 1; + return (read_safe(ioport("DSW"), 0) & (1 << (7 - offset))) ? 0 : 1; } @@ -978,7 +978,7 @@ MACHINE_RESET_MEMBER(cosmic_state,cosmicg) static MACHINE_CONFIG_START( cosmic, cosmic_state ) /* basic machine hardware */ - MCFG_CPU_ADD("maincpu", Z80,Z80_MASTER_CLOCK/6) /* 1.8026 MHz*/ + MCFG_CPU_ADD("maincpu", Z80,Z80_MASTER_CLOCK/6) /* 1.8026 MHz */ MCFG_MACHINE_START_OVERRIDE(cosmic_state,cosmic) MCFG_MACHINE_RESET_OVERRIDE(cosmic_state,cosmic) @@ -1099,7 +1099,7 @@ MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( magspot, cosmic ) /* basic machine hardware */ - MCFG_CPU_MODIFY("maincpu") + MCFG_CPU_REPLACE("maincpu", Z80, Z80_MASTER_CLOCK/4) /* 2.704 MHz, verified via schematics */ MCFG_CPU_PROGRAM_MAP(magspot_map) /* video hardware */ diff --git a/src/mame/drivers/cps1.c b/src/mame/drivers/cps1.c index 999919c7bc0..20255620a2d 100644 --- a/src/mame/drivers/cps1.c +++ b/src/mame/drivers/cps1.c @@ -3284,23 +3284,97 @@ MACHINE_CONFIG_END /* B-Board 88621B-2 */ /* + There are 4 surface mounted ROMs each on it's own small 88621B-sub satellite board, type HN62404FP-18 package is QFP44. + The ROMs on the satellite boards are named and located as follows: + + LW-02 @ 6B + LW-08 @ 9B + LW-06 @ 9D + LW-07 @ 10G + + OTHER: + 2 PALs labeled LW621 (near LW_1.2A) and LWI0 (near LW_00.13C) + Custom chip - CAPCOM CPS-B-01 (QFP160) + NEC D4701AC +*/ +/* Note that ROMs are labeled left to right, top to bottom, instead of top to bottom, left to right as usual. */ +ROM_START( forgottn ) + ROM_REGION( CODE_SIZE, "maincpu", 0 ) + ROM_LOAD16_BYTE( "lw40.12f", 0x00000, 0x20000, CRC(73e920b7) SHA1(2df12fc1a66f488d06b0927db909da81466d7d07) ) /* Higher program numbers indicates a later revision */ + ROM_LOAD16_BYTE( "lw41.12h", 0x00001, 0x20000, CRC(58210b9e) SHA1(416cb56a81e74fce6f86c2b2519ba620457b785a) ) /* 1 byte difference: 0x66D4 == 0x0C versus 0x04 in lw15.12h below */ + ROM_LOAD16_BYTE( "lw42.13f", 0x40000, 0x20000, CRC(bea45994) SHA1(c419f65c5e0c11ae7508ec54412bf6b62fac4f72) ) + ROM_LOAD16_BYTE( "lw43.13h", 0x40001, 0x20000, CRC(539b2339) SHA1(8a9e452ef8ed05e0b956d36990266657d3077470) ) + ROM_LOAD16_WORD_SWAP( "lw-07.10g", 0x80000, 0x80000, CRC(fd252a26) SHA1(5cfb097984912a5167a8c7ec4c2e119b642f9970) ) // == lw-07.13e + + ROM_REGION( 0x400000, "gfx", 0 ) + ROMX_LOAD( "lw_2.2b", 0x000000, 0x20000, CRC(4bd75fee) SHA1(c27bfba951a0dc4f493937ceca335c50a1afeddf) , ROM_SKIP(7) ) // == lw-01.9d + ROMX_LOAD( "lw_1.2a", 0x000001, 0x20000, CRC(65f41485) SHA1(fb05dffc87ee2f2b1b6646d54b13671f8eee0429) , ROM_SKIP(7) ) // == lw-01.9d + ROMX_LOAD( "lw-08.9b", 0x000002, 0x80000, CRC(25a8e43c) SHA1(d57cee1fc508db2677e84882fb814e4d9ad20543) , ROM_GROUPWORD | ROM_SKIP(6) ) // == lw-08.9f + ROMX_LOAD( "lw_18.5e", 0x000004, 0x20000, CRC(b4b6241b) SHA1(92b6b530e18ce27ba8739ebba0d8096b1551026c) , ROM_SKIP(7) ) + ROMX_LOAD( "lw_17.5c", 0x000005, 0x20000, CRC(c5eea115) SHA1(22fe692eaf9dd00a56a76f46c19fb76bb5e5f0d6) , ROM_SKIP(7) ) + ROMX_LOAD( "lw_30.8h", 0x000006, 0x20000, CRC(b385954e) SHA1(d33adb5842e7b85d304836bd92a7a96be4ff3694) , ROM_SKIP(7) ) // == lw-12.9g + ROMX_LOAD( "lw_29.8f", 0x000007, 0x20000, CRC(7bda1ac6) SHA1(5b8bd05f52798f98ae16efa2ff61c06e28a4e3a0) , ROM_SKIP(7) ) // == lw-12.9g + ROMX_LOAD( "lw_4.3b", 0x100000, 0x20000, CRC(50cf757f) SHA1(c70d7d34ac2d6671d40dd372e241ccb60bf3bf2b) , ROM_SKIP(7) ) // == lw-01.9d + ROMX_LOAD( "lw_3.3a", 0x100001, 0x20000, CRC(c03ef278) SHA1(ad33b01bd8194025a2ecf7755894d6d638da457a) , ROM_SKIP(7) ) // == lw-01.9d + ROMX_LOAD( "lw_20.7e", 0x100004, 0x20000, CRC(df1a3665) SHA1(7ba9c0edc64d4f9a8563533ce723a0a748352a15) , ROM_SKIP(7) ) + ROMX_LOAD( "lw_19.7c", 0x100005, 0x20000, CRC(15af8440) SHA1(5afd0e833593f1a78487af489fe4384ab68f52b1) , ROM_SKIP(7) ) + ROMX_LOAD( "lw_32.9h", 0x100006, 0x20000, CRC(30967a15) SHA1(6f6c6ca2f40aa9beec63ed64f0571bebc7c1aa50) , ROM_SKIP(7) ) // == lw-12.9g + ROMX_LOAD( "lw_31.9f", 0x100007, 0x20000, CRC(c49d37fb) SHA1(ce400261a0f8d5a9b95d3823f8f52de87b8007f1) , ROM_SKIP(7) ) // == lw-12.9g + ROMX_LOAD( "lw-02.6b", 0x200000, 0x80000, CRC(43e6c5c8) SHA1(d3e6c971de0477ec4e178adc82508208dd8b397f) , ROM_GROUPWORD | ROM_SKIP(6) ) // == lw-02.12d + ROMX_LOAD( "lw_14.10b", 0x200002, 0x20000, CRC(82862cce) SHA1(727ca4ee55e076185b071a49afc87533fde9ec27) , ROM_SKIP(7) ) // == lw-09.12f + ROMX_LOAD( "lw_13.10a", 0x200003, 0x20000, CRC(b81c0e96) SHA1(09f4235786b8ff92a57112669c0385b64477eb01) , ROM_SKIP(7) ) // == lw-09.12f + ROMX_LOAD( "lw-06.9d", 0x200004, 0x80000, CRC(5b9edffc) SHA1(6fd8f4a3ab070733b52365ab1945bf86acb2bf62) , ROM_GROUPWORD | ROM_SKIP(6) ) // == lw-06.12e + ROMX_LOAD( "lw_26.10e", 0x200006, 0x20000, CRC(57bcd032) SHA1(6db0f96fb909ed02fe4b7ee25fe662ea23f884d2) , ROM_SKIP(7) ) // == lw-13.12g + ROMX_LOAD( "lw_25.10c", 0x200007, 0x20000, CRC(bac91554) SHA1(52f5de144193e0f78b9824cc8fd6f934dc19bab0) , ROM_SKIP(7) ) // == lw-13.12g + ROMX_LOAD( "lw_16.11b", 0x300002, 0x20000, CRC(40b26554) SHA1(b4b27573d6c329bc2bc4c64fd857475bf2a10877) , ROM_SKIP(7) ) // == lw-09.12f + ROMX_LOAD( "lw_15.11a", 0x300003, 0x20000, CRC(1b7d2e07) SHA1(0edf4d4b314fd9c29e7915d5d1adef6f9617f921) , ROM_SKIP(7) ) // == lw-09.12f + ROMX_LOAD( "lw_28.11e", 0x300006, 0x20000, CRC(a805ad30) SHA1(baded4ab5fe4e87d53233b5df88edc693c292fc4) , ROM_SKIP(7) ) // == lw-13.12g + ROMX_LOAD( "lw_27.11c", 0x300007, 0x20000, CRC(103c1bd2) SHA1(fc7ce74e108c30554139e55651c5348b11e9e3bd) , ROM_SKIP(7) ) // == lw-13.12g + + ROM_REGION( 0x8000, "stars", 0 ) + ROM_COPY( "gfx", 0x200000, 0x000000, 0x8000 ) + + ROM_REGION( 0x18000, "audiocpu", 0 ) + ROM_LOAD( "lw_37.13c", 0x00000, 0x08000, CRC(59df2a63) SHA1(dfe1fffc7a17179a80a2ae623e93b30a7d6df20d) ) // == lw_00b.13c + ROM_CONTINUE( 0x10000, 0x08000 ) + + ROM_REGION( 0x40000, "oki", 0 ) /* Samples */ + ROM_LOAD( "lw-03u.12e", 0x00000, 0x20000, CRC(807d051f) SHA1(720e4733787b9b11f4d1cdce0892b69475802844) ) // == lw-03u.14c + ROM_LOAD( "lw-04u.13e", 0x20000, 0x20000, CRC(e6cd098e) SHA1(667f6e5736f76a1c4c450c4e2035574ea89d7910) ) // == lw-04u.13c + + ROM_REGION( 0x0200, "aboardplds", 0 ) + ROM_LOAD( "buf1", 0x0000, 0x0117, CRC(eb122de7) SHA1(b26b5bfe258e3e184f069719f9fd008d6b8f6b9b) ) + ROM_LOAD( "ioa1", 0x0000, 0x0117, CRC(59c7ee3b) SHA1(fbb887c5b4f5cb8df77cec710eaac2985bc482a6) ) + ROM_LOAD( "prg1", 0x0000, 0x0117, CRC(f1129744) SHA1(a5300f301c1a08a7da768f0773fa0fe3f683b237) ) + ROM_LOAD( "rom1", 0x0000, 0x0117, CRC(41dc73b9) SHA1(7d4c9f1693c821fbf84e32dd6ef62ddf14967845) ) + ROM_LOAD( "sou1", 0x0000, 0x0117, CRC(84f4b2fe) SHA1(dcc9e86cc36316fe42eace02d6df75d08bc8bb6d) ) + + ROM_REGION( 0x0200, "bboardplds", 0 ) + ROM_LOAD( "lw621.1a", 0x0000, 0x0117, CRC(5eec6ce9) SHA1(5ec8b60f1f1bdba865b1fa2387987ce99ff4093a) ) + ROM_LOAD( "lwio.12b", 0x0000, 0x0117, CRC(ad52b90c) SHA1(f0fd6aeea515ee449320fe15684e6b3ab7f97bf4) ) +ROM_END + +/* B-Board 88621B-2 */ +/* These ROMs read from a dead and very unique top board. All EPROMs are type 27C1000, except LW_00.13C which is a 27C512. There are 5 surface mounted ROMs each on it's own small 88621B-sub satellite board, type HN62404FP-18 package is QFP44. The ROMs on the satellite boards are named and located as follows: LW-02 @ 6B - LW-05 @ 6D + LW-05 @ 6D (instead of LW_17.5C, LW_18.5E, LW_19.7C & LW_20.7E as above) LW-08 @ 9B LW-06 @ 9D LW-07 @ 10G + Also known to have LW-13 @ 10D instead of LW_25.10C, LW_26.10E, LW_27.11C & LW_28.11E + OTHER: 2 PALs labeled LW621 (near LW_1.2A) and LWI0 (near LW_00.13C) Custom chip - CAPCOM CPS-B-01 (QFP160) NEC D4701AC */ /* Note that ROMs are labeled left to right, top to bottom, instead of top to bottom, left to right as usual. */ -ROM_START( forgottn ) +ROM_START( forgottna ) ROM_REGION( CODE_SIZE, "maincpu", 0 ) ROM_LOAD16_BYTE( "lw11.12f", 0x00000, 0x20000, CRC(73e920b7) SHA1(2df12fc1a66f488d06b0927db909da81466d7d07) ) ROM_LOAD16_BYTE( "lw15.12h", 0x00001, 0x20000, CRC(50d7012d) SHA1(f82a28a835f0a83b26c2c8170b824447b1d7409f) ) @@ -11748,7 +11822,8 @@ WRITE16_MEMBER( cps_state::sf2m3_layer_w ) /*************************************************** Game Macros *****************************************************/ -GAME( 1988, forgottn, 0, cps1_10MHz, forgottn, cps_state, forgottn, ROT0, "Capcom", "Forgotten Worlds (World)", MACHINE_SUPPORTS_SAVE ) // (c) Capcom U.S.A. but World "warning" +GAME( 1988, forgottn, 0, cps1_10MHz, forgottn, cps_state, forgottn, ROT0, "Capcom", "Forgotten Worlds (World, newer)", MACHINE_SUPPORTS_SAVE ) // (c) Capcom U.S.A. but World "warning" +GAME( 1988, forgottna, forgottn, cps1_10MHz, forgottn, cps_state, forgottn, ROT0, "Capcom", "Forgotten Worlds (World)", MACHINE_SUPPORTS_SAVE ) // (c) Capcom U.S.A. but World "warning" GAME( 1988, forgottnu, forgottn, cps1_10MHz, forgottn, cps_state, forgottn, ROT0, "Capcom", "Forgotten Worlds (USA, B-Board 88621B-2, Rev. C)", MACHINE_SUPPORTS_SAVE ) GAME( 1988, forgottnu1, forgottn, cps1_10MHz, forgottn, cps_state, forgottn, ROT0, "Capcom", "Forgotten Worlds (USA, B-Board 88618B-2, Rev. C)", MACHINE_SUPPORTS_SAVE ) GAME( 1988, forgottnua, forgottn, cps1_10MHz, forgottn, cps_state, forgottn, ROT0, "Capcom", "Forgotten Worlds (USA, B-Board 88618B-2, Rev. A)", MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/cps2.c b/src/mame/drivers/cps2.c index 47999a2d659..eb2b4239cac 100644 --- a/src/mame/drivers/cps2.c +++ b/src/mame/drivers/cps2.c @@ -746,9 +746,9 @@ WRITE16_MEMBER( cps_state::cps2_eeprom_port_w ) m_audiocpu->set_input_line(INPUT_LINE_RESET, (data & 0x0008) ? CLEAR_LINE : ASSERT_LINE); coin_counter_w(machine(), 0, data & 0x0001); - if ((strncmp(machine().system().name, "pzloop2", 8) == 0) || + if ((strncmp(machine().system().name, "pzloop2", 7) == 0) || (strncmp(machine().system().name, "pzloop2j", 8) == 0) || - (strncmp(machine().system().name, "pzloop2jr1", 8) == 0)) + (strncmp(machine().system().name, "pzloop2jr1", 10) == 0)) { // Puzz Loop 2 uses coin counter 2 input to switch between stick and paddle controls m_readpaddle = data & 0x0002; diff --git a/src/mame/drivers/cubeqst.c b/src/mame/drivers/cubeqst.c index d11cf9ead2a..edf334cb961 100644 --- a/src/mame/drivers/cubeqst.c +++ b/src/mame/drivers/cubeqst.c @@ -101,7 +101,9 @@ void cubeqst_state::video_start() WRITE16_MEMBER(cubeqst_state::palette_w) { - m_screen->update_now(); +// m_screen->update_now(); + m_screen->update_partial(m_screen->vpos()); + COMBINE_DATA(&m_generic_paletteram_16[offset]); } diff --git a/src/mame/drivers/cxhumax.c b/src/mame/drivers/cxhumax.c index 4fc5ab65151..e7a2104d0fa 100644 --- a/src/mame/drivers/cxhumax.c +++ b/src/mame/drivers/cxhumax.c @@ -17,7 +17,7 @@ #define VERBOSE_LEVEL ( 0 ) -INLINE void ATTR_PRINTF(3,4) verboselog( running_machine &machine, int n_level, const char *s_fmt, ...) +INLINE void ATTR_PRINTF(3,4) verboselog( device_t &device, int n_level, const char *s_fmt, ...) { if (VERBOSE_LEVEL >= n_level) { @@ -26,29 +26,29 @@ INLINE void ATTR_PRINTF(3,4) verboselog( running_machine &machine, int n_level, va_start( v, s_fmt); vsprintf( buf, s_fmt, v); va_end( v); - logerror( "%s: %s", machine.describe_context( ), buf); + device.logerror( "%s: %s", device.machine().describe_context( ), buf); } } READ32_MEMBER ( cxhumax_state::cx_gxa_r ) { UINT32 res = m_gxa_cmd_regs[offset]; - verboselog( machine(), 9, "(GXA) %08X -> %08X\n", 0xE0600000 + (offset << 2), res); + verboselog(*this, 9, "(GXA) %08X -> %08X\n", 0xE0600000 + (offset << 2), res); /* UINT8 gxa_command_number = (offset >> 9) & 0x7F; - verboselog( machine(), 9, " Command: %08X\n", gxa_command_number); + verboselog(*this, 9, " Command: %08X\n", gxa_command_number); switch (gxa_command_number) { case GXA_CMD_RW_REGISTER: switch(offset) { case GXA_CFG2_REG: break; default: - verboselog( machine(), 9, " Unimplemented register - TODO?\n"); + verboselog(*this, 9, " Unimplemented register - TODO?\n"); break; } break; default: // do we need it? - verboselog( machine(), 9, " Unimplemented read command - TODO?\n"); + verboselog(*this, 9, " Unimplemented read command - TODO?\n"); break; }*/ return res; @@ -56,20 +56,20 @@ READ32_MEMBER ( cxhumax_state::cx_gxa_r ) WRITE32_MEMBER( cxhumax_state::cx_gxa_w ) { - verboselog( machine(), 9, "(GXA) %08X <- %08X\n", 0xE0600000 + (offset << 2), data); + verboselog(*this, 9, "(GXA) %08X <- %08X\n", 0xE0600000 + (offset << 2), data); UINT8 gxa_command_number = (offset >> 9) & 0x7F; - verboselog( machine(), 9, " Command: %08X\n", gxa_command_number); + verboselog(*this, 9, " Command: %08X\n", gxa_command_number); /* Clear non persistent data */ m_gxa_cmd_regs[GXA_CMD_REG] &= 0xfffc0000; if (gxa_command_number == GXA_CMD_RW_REGISTER) { - verboselog( machine(), 9, " Register Number: %08X\n", offset & 0xff); + verboselog(*this, 9, " Register Number: %08X\n", offset & 0xff); } else { m_gxa_cmd_regs[GXA_CMD_REG] |= (offset << 2) & 0x3ffff; - verboselog( machine(), 9, " Source Bitmap Selector: %08X\n", (offset >> 6) & 0x7); - verboselog( machine(), 9, " Destination Bitmap Selector: %08X\n", (offset >> 3) & 0x7); - verboselog( machine(), 9, " Parameter Count: %08X\n", offset & 0x7); + verboselog(*this, 9, " Source Bitmap Selector: %08X\n", (offset >> 6) & 0x7); + verboselog(*this, 9, " Destination Bitmap Selector: %08X\n", (offset >> 3) & 0x7); + verboselog(*this, 9, " Parameter Count: %08X\n", offset & 0x7); } switch (gxa_command_number) { case GXA_CMD_RW_REGISTER: @@ -79,13 +79,13 @@ WRITE32_MEMBER( cxhumax_state::cx_gxa_w ) m_gxa_cmd_regs[GXA_CFG2_REG] = (m_gxa_cmd_regs[GXA_CFG2_REG]&(0xfff00000 & ~(data&0x00300000))) | (data & 0x000fffff); break; default: - verboselog( machine(), 9, " Unimplemented register - TODO?\n"); + verboselog(*this, 9, " Unimplemented register - TODO?\n"); COMBINE_DATA(&m_gxa_cmd_regs[offset]); break; } break; case GXA_CMD_QMARK: - verboselog( machine(), 9, " QMARK - TODO?\n"); + verboselog(*this, 9, " QMARK - TODO?\n"); /* Set value and copy of WAIT4_VERTICAL bit written by QMARK */ m_gxa_cmd_regs[GXA_CMD_REG] = (m_gxa_cmd_regs[GXA_CMD_REG] & 0x3ffff) | (data<<24) | ((data&0x10)?1<<23:0); @@ -98,7 +98,7 @@ WRITE32_MEMBER( cxhumax_state::cx_gxa_w ) m_intctrl_regs[INTREG(INTGROUP2, INTIRQ)] |= 1<<18; m_intctrl_regs[INTREG(INTGROUP2, INTSTATCLR)] |= 1<<18; m_intctrl_regs[INTREG(INTGROUP2, INTSTATSET)] |= 1<<18; - verboselog( machine(), 9, " QMARK INT - TODO?\n"); + verboselog(*this, 9, " QMARK INT - TODO?\n"); } if((m_intctrl_regs[INTREG(INTGROUP2, INTIRQ)] & m_intctrl_regs[INTREG(INTGROUP2, INTENABLE)]) @@ -107,7 +107,7 @@ WRITE32_MEMBER( cxhumax_state::cx_gxa_w ) break; default: - verboselog( machine(), 9, " Unimplemented command - TODO?\n"); + verboselog(*this, 9, " Unimplemented command - TODO?\n"); break; } } @@ -119,7 +119,7 @@ WRITE32_MEMBER ( cxhumax_state::flash_w ) m_flash->write(offset, data); if(ACCESSING_BITS_16_31) m_flash->write(offset+1, data >> 16); - verboselog( machine(), 9, "(FLASH) %08X <- %08X\n", 0xF0000000 + (offset << 2), data); + verboselog(*this, 9, "(FLASH) %08X <- %08X\n", 0xF0000000 + (offset << 2), data); } READ32_MEMBER ( cxhumax_state::flash_r ) @@ -130,7 +130,7 @@ READ32_MEMBER ( cxhumax_state::flash_r ) res |= m_flash->read(offset); if(ACCESSING_BITS_16_31) res |= m_flash->read(offset+1) << 16; - //if(m_flash->m_flash_mode!=FM_NORMAL) verboselog( machine(), 9, "(FLASH) %08X -> %08X\n", 0xF0000000 + (offset << 2), res); + //if(m_flash->m_flash_mode!=FM_NORMAL) verboselog(*this, 9, "(FLASH) %08X -> %08X\n", 0xF0000000 + (offset << 2), res); return res; } @@ -142,7 +142,7 @@ READ32_MEMBER ( cxhumax_state::dummy_flash_r ) WRITE32_MEMBER ( cxhumax_state::cx_remap_w ) { if(!(data&1)) { - verboselog( machine(), 9, "(REMAP) %08X -> %08X\n", 0xE0400014 + (offset << 2), data); + verboselog(*this, 9, "(REMAP) %08X -> %08X\n", 0xE0400014 + (offset << 2), data); memset(m_ram, 0, 0x400000); // workaround :P } } @@ -150,7 +150,7 @@ WRITE32_MEMBER ( cxhumax_state::cx_remap_w ) READ32_MEMBER( cxhumax_state::cx_scratch_r ) { UINT32 data = m_scratch_reg; - verboselog( machine(), 9, "(SCRATCH) %08X -> %08X\n", 0xE0400024 + (offset << 2), data); + verboselog(*this, 9, "(SCRATCH) %08X -> %08X\n", 0xE0400024 + (offset << 2), data); if((m_maincpu->pc()==0xF0003BB8) || (m_maincpu->pc()==0x01003724) || (m_maincpu->pc()==0x00005d8c)) { // HDCI-2000 //we're in disabled debug_printf @@ -166,103 +166,103 @@ READ32_MEMBER( cxhumax_state::cx_scratch_r ) //m_terminal->write(space, 0, temp); } osd_printf_debug("%s", buf); - verboselog( machine(), 9, "(DEBUG) %s", buf); + verboselog(*this, 9, "(DEBUG) %s", buf); } return data; } WRITE32_MEMBER( cxhumax_state::cx_scratch_w ) { - verboselog( machine(), 9, "(SCRATCH) %08X <- %08X\n", 0xE0400024 + (offset << 2), data); + verboselog(*this, 9, "(SCRATCH) %08X <- %08X\n", 0xE0400024 + (offset << 2), data); COMBINE_DATA(&m_scratch_reg); } READ32_MEMBER( cxhumax_state::cx_hsx_r ) { UINT32 data = 0; // dummy - verboselog( machine(), 9, "(HSX) %08X -> %08X\n", 0xE0000000 + (offset << 2), data); + verboselog(*this, 9, "(HSX) %08X -> %08X\n", 0xE0000000 + (offset << 2), data); return data; } WRITE32_MEMBER( cxhumax_state::cx_hsx_w ) { - verboselog( machine(), 9, "(HSX) %08X <- %08X\n", 0xE0000000 + (offset << 2), data); + verboselog(*this, 9, "(HSX) %08X <- %08X\n", 0xE0000000 + (offset << 2), data); } READ32_MEMBER( cxhumax_state::cx_romdescr_r ) { UINT32 data = m_romdescr_reg; - verboselog( machine(), 9, "(ROMDESC0) %08X -> %08X\n", 0xE0010000 + (offset << 2), data); + verboselog(*this, 9, "(ROMDESC0) %08X -> %08X\n", 0xE0010000 + (offset << 2), data); return data; } WRITE32_MEMBER( cxhumax_state::cx_romdescr_w ) { - verboselog( machine(), 9, "(ROMDESC0) %08X <- %08X\n", 0xE0010000 + (offset << 2), data); + verboselog(*this, 9, "(ROMDESC0) %08X <- %08X\n", 0xE0010000 + (offset << 2), data); COMBINE_DATA(&m_romdescr_reg); } READ32_MEMBER( cxhumax_state::cx_isaromdescr_r ) { UINT32 data = m_isaromdescr_regs[offset]; - verboselog( machine(), 9, "(ISAROMDESC%d) %08X -> %08X\n", offset+1, 0xE0010004 + (offset << 2), data); + verboselog(*this, 9, "(ISAROMDESC%d) %08X -> %08X\n", offset+1, 0xE0010004 + (offset << 2), data); return data; } WRITE32_MEMBER( cxhumax_state::cx_isaromdescr_w ) { - verboselog( machine(), 9, "(ISAROMDESC%d) %08X <- %08X\n", offset+1, 0xE0010004 + (offset << 2), data); + verboselog(*this, 9, "(ISAROMDESC%d) %08X <- %08X\n", offset+1, 0xE0010004 + (offset << 2), data); COMBINE_DATA(&m_isaromdescr_regs[offset]); } READ32_MEMBER( cxhumax_state::cx_isadescr_r ) { UINT32 data = m_isaromdescr_regs[offset]; - verboselog( machine(), 9, "(ISA_DESC%d) %08X -> %08X\n", offset+4, 0xE0010010 + (offset << 2), data); + verboselog(*this, 9, "(ISA_DESC%d) %08X -> %08X\n", offset+4, 0xE0010010 + (offset << 2), data); return data; } WRITE32_MEMBER( cxhumax_state::cx_isadescr_w ) { - verboselog( machine(), 9, "(ISA_DESC%d) %08X <- %08X\n", offset+4, 0xE0010010 + (offset << 2), data); + verboselog(*this, 9, "(ISA_DESC%d) %08X <- %08X\n", offset+4, 0xE0010010 + (offset << 2), data); COMBINE_DATA(&m_isaromdescr_regs[offset]); } READ32_MEMBER( cxhumax_state::cx_rommap_r ) { UINT32 data = 0; - verboselog( machine(), 9, "(ROM%d_MAP) %08X -> %08X\n", offset, 0xE0010020 + (offset << 2), data); + verboselog(*this, 9, "(ROM%d_MAP) %08X -> %08X\n", offset, 0xE0010020 + (offset << 2), data); return data; } WRITE32_MEMBER( cxhumax_state::cx_rommap_w ) { - verboselog( machine(), 9, "(ROM%d_MAP) %08X <- %08X\n", offset, 0xE0010020 + (offset << 2), data); + verboselog(*this, 9, "(ROM%d_MAP) %08X <- %08X\n", offset, 0xE0010020 + (offset << 2), data); } READ32_MEMBER( cxhumax_state::cx_rommode_r ) { UINT32 data = m_rommode_reg; - verboselog( machine(), 9, "(ROMMODE) %08X -> %08X\n", 0xE0010034 + (offset << 2), data); + verboselog(*this, 9, "(ROMMODE) %08X -> %08X\n", 0xE0010034 + (offset << 2), data); return data; } WRITE32_MEMBER( cxhumax_state::cx_rommode_w ) { - verboselog( machine(), 9, "(ROMMODE) %08X <- %08X\n", 0xE0010034 + (offset << 2), data); + verboselog(*this, 9, "(ROMMODE) %08X <- %08X\n", 0xE0010034 + (offset << 2), data); COMBINE_DATA(&m_rommode_reg); } READ32_MEMBER( cxhumax_state::cx_xoemask_r ) { UINT32 data = m_xoemask_reg; - verboselog( machine(), 9, "(XOEMASK) %08X -> %08X\n", 0xE0010034 + (offset << 2), data); + verboselog(*this, 9, "(XOEMASK) %08X -> %08X\n", 0xE0010034 + (offset << 2), data); return data; } WRITE32_MEMBER( cxhumax_state::cx_xoemask_w ) { - verboselog( machine(), 9, "(XOEMASK) %08X <- %08X\n", 0xE0010034 + (offset << 2), data); + verboselog(*this, 9, "(XOEMASK) %08X <- %08X\n", 0xE0010034 + (offset << 2), data); COMBINE_DATA(&m_xoemask_reg); } @@ -280,26 +280,26 @@ READ32_MEMBER( cxhumax_state::cx_pci_r ) } } break; } - verboselog( machine(), 9, "(PCI) %08X -> %08X\n", 0xE0010040 + (offset << 2), data); + verboselog(*this, 9, "(PCI) %08X -> %08X\n", 0xE0010040 + (offset << 2), data); return data; } WRITE32_MEMBER( cxhumax_state::cx_pci_w ) { - verboselog( machine(), 9, "(PCI) %08X <- %08X\n", 0xE0010040 + (offset << 2), data); + verboselog(*this, 9, "(PCI) %08X <- %08X\n", 0xE0010040 + (offset << 2), data); COMBINE_DATA(&m_pci_regs[offset]); } READ32_MEMBER( cxhumax_state::cx_extdesc_r ) { UINT32 data = m_extdesc_regs[offset]; - verboselog( machine(), 9, "(EXTDESC) %08X -> %08X\n", 0xE0010080 + (offset << 2), data); + verboselog(*this, 9, "(EXTDESC) %08X -> %08X\n", 0xE0010080 + (offset << 2), data); return data; } WRITE32_MEMBER( cxhumax_state::cx_extdesc_w ) { - verboselog( machine(), 9, "(EXTDESC) %08X <- %08X\n", 0xE0010080 + (offset << 2), data); + verboselog(*this, 9, "(EXTDESC) %08X <- %08X\n", 0xE0010080 + (offset << 2), data); COMBINE_DATA(&m_extdesc_regs[offset]); } @@ -314,7 +314,7 @@ TIMER_CALLBACK_MEMBER(cxhumax_state::timer_tick) /* Indicate interrupt request if EN_INT bit is set */ if (m_timer_regs.timer[param].mode & 8) { //printf( "IRQ on Timer %d\n", param ); - verboselog( machine(), 9, "(TIMER%d) Interrupt\n", param); + verboselog(*this, 9, "(TIMER%d) Interrupt\n", param); m_intctrl_regs[INTREG(INTGROUP2, INTIRQ)] |= INT_TIMER_BIT; /* Timer interrupt */ m_intctrl_regs[INTREG(INTGROUP2, INTSTATCLR)] |= INT_TIMER_BIT; /* Timer interrupt */ m_intctrl_regs[INTREG(INTGROUP2, INTSTATSET)] |= INT_TIMER_BIT; /* Timer interrupt */ @@ -337,7 +337,7 @@ READ32_MEMBER( cxhumax_state::cx_timers_r ) if(index==16) { data = m_timer_regs.timer_irq; //m_timer_regs.timer_irq=0; - verboselog( machine(), 9, "(TIMERIRQ) %08X -> %08X\n", 0xE0430000 + (offset << 2), data); + verboselog(*this, 9, "(TIMERIRQ) %08X -> %08X\n", 0xE0430000 + (offset << 2), data); } else { switch (offset&3) { @@ -350,7 +350,7 @@ READ32_MEMBER( cxhumax_state::cx_timers_r ) case TIMER_TIMEBASE: data = m_timer_regs.timer[index].timebase; break; } - verboselog( machine(), 9, "(TIMER%d) %08X -> %08X\n", offset>>2, 0xE0430000 + (offset << 2), data); + verboselog(*this, 9, "(TIMER%d) %08X -> %08X\n", offset>>2, 0xE0430000 + (offset << 2), data); } return data; } @@ -359,11 +359,11 @@ WRITE32_MEMBER( cxhumax_state::cx_timers_w ) { UINT8 index = offset>>2; if(index==16) { - verboselog( machine(), 9, "(TIMERIRQ) %08X <- %08X\n", 0xE0430000 + (offset << 2), data); + verboselog(*this, 9, "(TIMERIRQ) %08X <- %08X\n", 0xE0430000 + (offset << 2), data); COMBINE_DATA(&m_timer_regs.timer_irq); } else { - verboselog( machine(), 9, "(TIMER%d) %08X <- %08X\n", index, 0xE0430000 + (offset << 2), data); + verboselog(*this, 9, "(TIMER%d) %08X <- %08X\n", index, 0xE0430000 + (offset << 2), data); switch(offset&3) { case TIMER_VALUE: COMBINE_DATA(&m_timer_regs.timer[index].value); break; @@ -397,13 +397,13 @@ READ32_MEMBER( cxhumax_state::cx_uart2_r ) default: data = m_uart2_regs[offset]; break; } - verboselog( machine(), 9, "(UART2) %08X -> %08X\n", 0xE0411000 + (offset << 2), data); + verboselog(*this, 9, "(UART2) %08X -> %08X\n", 0xE0411000 + (offset << 2), data); return data; } WRITE32_MEMBER( cxhumax_state::cx_uart2_w ) { - verboselog( machine(), 9, "(UART2) %08X <- %08X\n", 0xE0411000 + (offset << 2), data); + verboselog(*this, 9, "(UART2) %08X <- %08X\n", 0xE0411000 + (offset << 2), data); switch (offset) { case UART_FIFO_REG: if(!(m_uart2_regs[UART_FRMC_REG]&UART_FRMC_BDS_BIT)) { @@ -431,65 +431,65 @@ WRITE32_MEMBER( cxhumax_state::cx_uart2_w ) READ32_MEMBER( cxhumax_state::cx_pll_r ) { UINT32 data = m_pll_regs[offset]; - verboselog( machine(), 9, "(PLL) %08X -> %08X\n", 0xE0440000 + (offset << 2), data); + verboselog(*this, 9, "(PLL) %08X -> %08X\n", 0xE0440000 + (offset << 2), data); return data; } WRITE32_MEMBER( cxhumax_state::cx_pll_w ) { - verboselog( machine(), 9, "(PLL) %08X <- %08X\n", 0xE0440000 + (offset << 2), data); + verboselog(*this, 9, "(PLL) %08X <- %08X\n", 0xE0440000 + (offset << 2), data); COMBINE_DATA(&m_pll_regs[offset]); } READ32_MEMBER( cxhumax_state::cx_pllprescale_r ) { UINT32 data = m_pllprescale_reg; - verboselog( machine(), 9, "(PLLPRESCALE) %08X -> %08X\n", 0xE0440094 + (offset << 2), data); + verboselog(*this, 9, "(PLLPRESCALE) %08X -> %08X\n", 0xE0440094 + (offset << 2), data); return data; } WRITE32_MEMBER( cxhumax_state::cx_pllprescale_w ) { - verboselog( machine(), 9, "(PLLPRESCALE) %08X <- %08X\n", 0xE0440094 + (offset << 2), data); + verboselog(*this, 9, "(PLLPRESCALE) %08X <- %08X\n", 0xE0440094 + (offset << 2), data); COMBINE_DATA(&m_pllprescale_reg); } READ32_MEMBER( cxhumax_state::cx_clkdiv_r ) { UINT32 data = m_clkdiv_regs[offset]; - verboselog( machine(), 9, "(CLKDIV) %08X -> %08X\n", 0xE0440020 + (offset << 2), data); + verboselog(*this, 9, "(CLKDIV) %08X -> %08X\n", 0xE0440020 + (offset << 2), data); return data; } WRITE32_MEMBER( cxhumax_state::cx_clkdiv_w ) { - verboselog( machine(), 9, "(CLKDIV) %08X <- %08X\n", 0xE0440020 + (offset << 2), data); + verboselog(*this, 9, "(CLKDIV) %08X <- %08X\n", 0xE0440020 + (offset << 2), data); COMBINE_DATA(&m_clkdiv_regs[offset]); } READ32_MEMBER( cxhumax_state::cx_chipcontrol_r ) { UINT32 data = m_chipcontrol_regs[offset]; - verboselog( machine(), 9, "(CHIPCONTROL) %08X -> %08X\n", 0xE0440100 + (offset << 2), data); + verboselog(*this, 9, "(CHIPCONTROL) %08X -> %08X\n", 0xE0440100 + (offset << 2), data); return data; } WRITE32_MEMBER( cxhumax_state::cx_chipcontrol_w ) { - verboselog( machine(), 9, "(CHIPCONTROL) %08X <- %08X\n", 0xE0440100 + (offset << 2), data); + verboselog(*this, 9, "(CHIPCONTROL) %08X <- %08X\n", 0xE0440100 + (offset << 2), data); COMBINE_DATA(&m_chipcontrol_regs[offset]); } READ32_MEMBER( cxhumax_state::cx_intctrl_r ) { UINT32 data = m_intctrl_regs[offset]; - verboselog( machine(), 9, "(INTCTRL) %08X -> %08X\n", 0xE0450000 + (offset << 2), data); + verboselog(*this, 9, "(INTCTRL) %08X -> %08X\n", 0xE0450000 + (offset << 2), data); return data; } WRITE32_MEMBER( cxhumax_state::cx_intctrl_w ) { - verboselog( machine(), 9, "(INTCTRL) %08X <- %08X\n", 0xE0450000 + (offset << 2), data); + verboselog(*this, 9, "(INTCTRL) %08X <- %08X\n", 0xE0450000 + (offset << 2), data); switch (offset >> 3) { // Decode the group case 0: // Group 1 switch(offset & 7) { @@ -566,13 +566,13 @@ READ32_MEMBER( cxhumax_state::cx_ss_r ) data = m_ss_regs[offset]; break; } - verboselog( machine(), 9, "(SS) %08X -> %08X\n", 0xE0490000 + (offset << 2), data); + verboselog(*this, 9, "(SS) %08X -> %08X\n", 0xE0490000 + (offset << 2), data); return data; } WRITE32_MEMBER( cxhumax_state::cx_ss_w ) { - verboselog( machine(), 9, "(SS) %08X <- %08X\n", 0xE0490000 + (offset << 2), data); + verboselog(*this, 9, "(SS) %08X <- %08X\n", 0xE0490000 + (offset << 2), data); switch(offset) { case SS_CNTL_REG: if (data&1) { @@ -616,13 +616,13 @@ WRITE32_MEMBER( cxhumax_state::cx_ss_w ) READ32_MEMBER( cxhumax_state::cx_i2c0_r ) { UINT32 data = m_i2c0_regs[offset]; - verboselog( machine(), 9, "(I2C0) %08X -> %08X\n", 0xE04E0000 + (offset << 2), data); + verboselog(*this, 9, "(I2C0) %08X -> %08X\n", 0xE04E0000 + (offset << 2), data); return data; } WRITE32_MEMBER( cxhumax_state::cx_i2c0_w ) { - verboselog( machine(), 9, "(I2C0) %08X <- %08X\n", 0xE04E0000 + (offset << 2), data); + verboselog(*this, 9, "(I2C0) %08X <- %08X\n", 0xE04E0000 + (offset << 2), data); COMBINE_DATA(&m_i2c0_regs[offset]); } @@ -684,13 +684,13 @@ READ32_MEMBER( cxhumax_state::cx_i2c1_r ) default: data |= m_i2c1_regs[offset]; break; } - verboselog( machine(), 9, "(I2C1) %08X -> %08X\n", 0xE04E1000 + (offset << 2), data); + verboselog(*this, 9, "(I2C1) %08X -> %08X\n", 0xE04E1000 + (offset << 2), data); return data; } WRITE32_MEMBER( cxhumax_state::cx_i2c1_w ) { - verboselog( machine(), 9, "(I2C1) %08X <- %08X\n", 0xE04E1000 + (offset << 2), data); + verboselog(*this, 9, "(I2C1) %08X <- %08X\n", 0xE04E1000 + (offset << 2), data); switch(offset) { case I2C_CTRL_REG: if(data&0x10) {// START @@ -734,7 +734,7 @@ WRITE32_MEMBER( cxhumax_state::cx_i2c1_w ) m_intctrl_regs[INTREG(INTGROUP1, INTSTATCLR)] |= 1<<7; m_intctrl_regs[INTREG(INTGROUP1, INTSTATSET)] |= 1<<7; if (m_intctrl_regs[INTREG(INTGROUP1, INTENABLE)] & (1<<7)) { - verboselog( machine(), 9, "(I2C1) Int\n" ); + verboselog(*this, 9, "(I2C1) Int\n" ); m_maincpu->set_input_line(ARM7_IRQ_LINE, ASSERT_LINE); } break; @@ -750,33 +750,33 @@ WRITE32_MEMBER( cxhumax_state::cx_i2c1_w ) READ32_MEMBER( cxhumax_state::cx_i2c2_r ) { UINT32 data = m_i2c2_regs[offset]; - verboselog( machine(), 9, "(I2C2) %08X -> %08X\n", 0xE04E2000 + (offset << 2), data); + verboselog(*this, 9, "(I2C2) %08X -> %08X\n", 0xE04E2000 + (offset << 2), data); return data; } WRITE32_MEMBER( cxhumax_state::cx_i2c2_w ) { - verboselog( machine(), 9, "(I2C2) %08X <- %08X\n", 0xE04E2000 + (offset << 2), data); + verboselog(*this, 9, "(I2C2) %08X <- %08X\n", 0xE04E2000 + (offset << 2), data); COMBINE_DATA(&m_i2c2_regs[offset]); } READ32_MEMBER( cxhumax_state::cx_mc_cfg_r ) { UINT32 data = m_mccfg_regs[offset]; - verboselog( machine(), 9, "(MC_CFG) %08X -> %08X\n", 0xE0500300 + (offset << 2), data); + verboselog(*this, 9, "(MC_CFG) %08X -> %08X\n", 0xE0500300 + (offset << 2), data); return data; } WRITE32_MEMBER( cxhumax_state::cx_mc_cfg_w ) { - verboselog( machine(), 9, "(MC_CFG) %08X <- %08X\n", 0xE0500300 + (offset << 2), data); + verboselog(*this, 9, "(MC_CFG) %08X <- %08X\n", 0xE0500300 + (offset << 2), data); COMBINE_DATA(&m_mccfg_regs[offset]); } READ32_MEMBER( cxhumax_state::cx_drm0_r ) { UINT32 data = m_drm0_regs[offset]; - verboselog( machine(), 9, "(DRM0) %08X -> %08X\n", 0xE0560000 + (offset << 2), data); + verboselog(*this, 9, "(DRM0) %08X -> %08X\n", 0xE0560000 + (offset << 2), data); switch(offset) { case 0x14/4: // DRM_STATUS_REG data |= 1<<21; @@ -787,33 +787,33 @@ READ32_MEMBER( cxhumax_state::cx_drm0_r ) WRITE32_MEMBER( cxhumax_state::cx_drm0_w ) { - verboselog( machine(), 9, "(DRM0) %08X <- %08X\n", 0xE0560000 + (offset << 2), data); + verboselog(*this, 9, "(DRM0) %08X <- %08X\n", 0xE0560000 + (offset << 2), data); COMBINE_DATA(&m_drm0_regs[offset]); } READ32_MEMBER( cxhumax_state::cx_drm1_r ) { UINT32 data = m_drm1_regs[offset]; - verboselog( machine(), 9, "(DRM1) %08X -> %08X\n", 0xE0570000 + (offset << 2), data); + verboselog(*this, 9, "(DRM1) %08X -> %08X\n", 0xE0570000 + (offset << 2), data); return data; } WRITE32_MEMBER( cxhumax_state::cx_drm1_w ) { - verboselog( machine(), 9, "(DRM1) %08X <- %08X\n", 0xE0570000 + (offset << 2), data); + verboselog(*this, 9, "(DRM1) %08X <- %08X\n", 0xE0570000 + (offset << 2), data); COMBINE_DATA(&m_drm1_regs[offset]); } READ32_MEMBER( cxhumax_state::cx_hdmi_r ) { UINT32 data = m_hdmi_regs[offset]; - verboselog( machine(), 9, "(HDMI) %08X -> %08X\n", 0xE05D0800 + (offset << 2), data); + verboselog(*this, 9, "(HDMI) %08X -> %08X\n", 0xE05D0800 + (offset << 2), data); return data; } WRITE32_MEMBER( cxhumax_state::cx_hdmi_w ) { - verboselog( machine(), 9, "(HDMI) %08X <- %08X\n", 0xE05D0800 + (offset << 2), data); + verboselog(*this, 9, "(HDMI) %08X <- %08X\n", 0xE05D0800 + (offset << 2), data); switch(offset) { case 0x40/4: // HDMI_CONFIG_REG if(data&8) m_hdmi_regs[0xc0/4] |= 0x80; diff --git a/src/mame/drivers/dec0.c b/src/mame/drivers/dec0.c index 8a2dffc6b62..4bb0c6ad27d 100644 --- a/src/mame/drivers/dec0.c +++ b/src/mame/drivers/dec0.c @@ -1631,6 +1631,18 @@ static MACHINE_CONFIG_DERIVED( midresb, midres ) MCFG_SOUND_MODIFY("ym2") MCFG_YM3812_IRQ_HANDLER(WRITELINE(dec0_state, sound_irq)) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80) + + // bootleg doesn't seem to support row/col scroll (or enable is different) +// MCFG_DEVICE_MODIFY("tilegen1") +// MCFG_BAC06_BOOTLEG_DISABLE_16x16 +// MCFG_BAC06_BOOTLEG_DISABLE_RC_SCROLL + MCFG_DEVICE_MODIFY("tilegen2") +// MCFG_BAC06_BOOTLEG_DISABLE_8x8 + MCFG_BAC06_BOOTLEG_DISABLE_RC_SCROLL + MCFG_DEVICE_MODIFY("tilegen3") +// MCFG_BAC06_BOOTLEG_DISABLE_8x8 + MCFG_BAC06_BOOTLEG_DISABLE_RC_SCROLL + MACHINE_CONFIG_END /******************************************************************************/ diff --git a/src/mame/drivers/deco32.c b/src/mame/drivers/deco32.c index 26de6549454..93ce908916d 100644 --- a/src/mame/drivers/deco32.c +++ b/src/mame/drivers/deco32.c @@ -19,6 +19,12 @@ Captain America & Fighter's History - reset with both start buttons held down for test mode. Reset with player 1 start held in Fighter's History for 'Pattern Editor'. + + For version information: + Captain America - Reset with Player 1 start held + Fighter's History - Reset with Player 1 button 1 & 2 held + Night Slashers - Reset with Player 1 & 2 start held + Locked 'N Loaded - Reset with Player 1 & 2 start held Tattoo Assassins is a prototype, it is thought only 25 test units were manufactured and distributed to test arcades before the game @@ -3062,7 +3068,42 @@ ROM_START( dragngunj ) ROM_LOAD( "mar-07.n19", 0x000000, 0x80000, CRC(40287d62) SHA1(c00cb08bcdae55bcddc14c38e88b0484b1bc9e3e) ) ROM_END -ROM_START( fghthist ) /* DE-0380-2 PCB */ +ROM_START( fghthist ) /* DE-0395-1 PCB */ + ROM_REGION(0x100000, "maincpu", 0 ) /* ARM 32 bit code */ + ROM_LOAD32_WORD( "lc00-1.1f", 0x000000, 0x80000, CRC(61a76a16) SHA1(b69cd3e11cf133f1b14a017391035855a5038d46) ) /* Version 43-09, Overseas */ + ROM_LOAD32_WORD( "lc01-1.2f", 0x000002, 0x80000, CRC(6f2740d1) SHA1(4fa1fe4714236028ef70d42e15a58cfd25e45363) ) + + ROM_REGION(0x10000, "audiocpu", 0 ) /* Sound CPU */ + ROM_LOAD( "lc02-1.18k", 0x00000, 0x10000, CRC(5fd2309c) SHA1(2fb7af54d5cd9bf7dd6fb4f6b82aa52b03294f1f) ) + + ROM_REGION( 0x100000, "gfx1", 0 ) + ROM_LOAD( "mbf00-8.8a", 0x000000, 0x100000, CRC(d3e9b580) SHA1(fc4676e0ecc6c32441ff66fa1f990cc3158237db) ) /* Encrypted tiles */ + + ROM_REGION( 0x100000, "gfx2", 0 ) + ROM_LOAD( "mbf01-8.9a", 0x000000, 0x100000, CRC(0c6ed2eb) SHA1(8e37ef4b1f0b6d3370a08758bfd602cb5f221282) ) /* Encrypted tiles */ + + ROM_REGION( 0x800000, "gfx3", 0 ) /* Sprites */ + ROM_LOAD16_BYTE( "mbf02-16.16d", 0x000001, 0x200000, CRC(c19c5953) SHA1(e6ed26f932c6c86bbd1fc4c000aa2f510c268009) ) + ROM_LOAD16_BYTE( "mbf04-16.18d", 0x000000, 0x200000, CRC(f6a23fd7) SHA1(74e5559f17cd591aa25d2ed6c34ac9ed89e2e9ba) ) + ROM_LOAD16_BYTE( "mbf03-16.17d", 0x400001, 0x200000, CRC(37d25c75) SHA1(8219d31091b4317190618edd8acc49f97cba6a1e) ) + ROM_LOAD16_BYTE( "mbf05-16.19d", 0x400000, 0x200000, CRC(137be66d) SHA1(3fde345183ce04a7a65b4cedfd050d771df7d026) ) + + ROM_REGION(0x80000, "oki1", 0 ) + ROM_LOAD( "mbf06.15k", 0x000000, 0x80000, CRC(fb513903) SHA1(7727a49ff7977f159ed36d097020edef3b5b36ba) ) + + ROM_REGION(0x80000, "oki2", 0 ) + ROM_LOAD( "mbf07.16k", 0x000000, 0x80000, CRC(51d4adc7) SHA1(22106ed7a05db94adc5a783ce34529e29d24d41a) ) + + ROM_REGION(512, "proms", 0 ) + ROM_LOAD( "kt-00.8j", 0, 512, CRC(7294354b) SHA1(14fe42ad5d26d022c0fe9a46a4a9017af2296f40) ) /* MB7124H type prom */ + + ROM_REGION( 0x0400, "plds", 0 ) + ROM_LOAD( "ve-00.3d", 0x0000, 0x0117, CRC(384d316c) SHA1(61b50c695d4210c199cf6f7bbe50c8a5ecd1d21c) ) + ROM_LOAD( "ve-01a.4d", 0x0200, 0x0117, CRC(109613c8) SHA1(5991e010c1bc2a827c8ee2c85a9b40e00a3167b3) ) + /* PAL16L8BCN at 8J is unpopulated */ +ROM_END + +ROM_START( fghthista ) /* DE-0380-2 PCB */ ROM_REGION(0x100000, "maincpu", 0 ) /* ARM 32 bit code */ ROM_LOAD32_WORD( "kx00-3.1f", 0x000000, 0x80000, CRC(fe5eaba1) SHA1(c8a3784af487a1bbd2150abf4b1c8f3ad33da8a4) ) /* Version 43-07, Overseas */ ROM_LOAD32_WORD( "kx01-3.2f", 0x000002, 0x80000, CRC(3fb8d738) SHA1(2fca7a3ea483f01c97fb28a0adfa6d7980d8236c) ) @@ -3096,7 +3137,7 @@ ROM_START( fghthist ) /* DE-0380-2 PCB */ ROM_LOAD( "ve-01.4d", 0x0200, 0x0117, CRC(4ba7e6a9) SHA1(b65d696a3519e792df226f9f148c759cdb0e1e43) ) ROM_END -ROM_START( fghthista ) /* DE-0380-2 PCB */ +ROM_START( fghthistb ) /* DE-0380-2 PCB */ ROM_REGION(0x100000, "maincpu", 0 ) /* ARM 32 bit code */ ROM_LOAD32_WORD( "kx00-2.1f", 0x000000, 0x80000, CRC(a7c36bbd) SHA1(590937818343da53a6bccbd3ea1d7102abd4f27e) ) /* Version 43-05, Overseas */ ROM_LOAD32_WORD( "kx01-2.2f", 0x000002, 0x80000, CRC(bdc60bb1) SHA1(e621c5cf357f49aa62deef4da1e2227021f552ce) ) @@ -3925,7 +3966,7 @@ DRIVER_INIT_MEMBER(deco32_state,captaven) save_item(NAME(m_irq_source)); } -extern void process_dvi_data(UINT8* dvi_data, int offset, int regionsize); +extern void process_dvi_data(device_t *device,UINT8* dvi_data, int offset, int regionsize); void dragngun_state::dragngun_init_common() { @@ -3960,11 +4001,11 @@ void dragngun_state::dragngun_init_common() save_item(NAME(m_irq_source)); // there are DVI headers at 0x000000, 0x580000, 0x800000, 0xB10000, 0xB80000 -// process_dvi_data(memregion("dvi")->base(),0x000000, 0x1000000); -// process_dvi_data(memregion("dvi")->base(),0x580000, 0x1000000); -// process_dvi_data(memregion("dvi")->base(),0x800000, 0x1000000); -// process_dvi_data(memregion("dvi")->base(),0xB10000, 0x1000000); -// process_dvi_data(memregion("dvi")->base(),0xB80000, 0x1000000); +// process_dvi_data(this,memregion("dvi")->base(),0x000000, 0x1000000); +// process_dvi_data(this,memregion("dvi")->base(),0x580000, 0x1000000); +// process_dvi_data(this,memregion("dvi")->base(),0x800000, 0x1000000); +// process_dvi_data(this,memregion("dvi")->base(),0xB10000, 0x1000000); +// process_dvi_data(this,memregion("dvi")->base(),0xB80000, 0x1000000); } DRIVER_INIT_MEMBER(dragngun_state,dragngun) @@ -4078,12 +4119,13 @@ GAME( 1991, captavenj, captaven, captaven, captaven, deco32_state, captaven, // DE-0396-0 PCB sets (Z80 for sound) GAME( 1993, fghthistu, fghthist, fghthistz,fghthist, deco32_state, fghthist, ROT0, "Data East Corporation", "Fighter's History (US ver 42-09, DE-0396-0 PCB)", MACHINE_SUPPORTS_SAVE ) // DE-0395-1 PCB sets (HuC6280 for sound) +GAME( 1993, fghthist, 0 , fghthsta, fghthist, deco32_state, fghthist, ROT0, "Data East Corporation", "Fighter's History (World ver 43-09, DE-0395-1 PCB)", MACHINE_SUPPORTS_SAVE ) GAME( 1993, fghthistua, fghthist, fghthsta, fghthist, deco32_state, fghthist, ROT0, "Data East Corporation", "Fighter's History (US ver 42-06, DE-0395-1 PCB)", MACHINE_SUPPORTS_SAVE ) GAME( 1993, fghthistub, fghthist, fghthsta, fghthist, deco32_state, fghthist, ROT0, "Data East Corporation", "Fighter's History (US ver 42-05, DE-0395-1 PCB)", MACHINE_SUPPORTS_SAVE ) GAME( 1993, fghthistj, fghthist, fghthsta, fghthist, deco32_state, fghthist, ROT0, "Data East Corporation", "Fighter's History (Japan ver 41-07, DE-0395-1 PCB)", MACHINE_SUPPORTS_SAVE ) // DE-0380-2 PCB sets (HuC6280 for sound) -GAME( 1993, fghthist, 0, fghthist, fghthist, deco32_state, fghthist, ROT0, "Data East Corporation", "Fighter's History (World ver 43-07, DE-0380-2 PCB)", MACHINE_SUPPORTS_SAVE ) -GAME( 1993, fghthista, fghthist, fghthist, fghthist, deco32_state, fghthist, ROT0, "Data East Corporation", "Fighter's History (World ver 43-05, DE-0380-2 PCB)", MACHINE_SUPPORTS_SAVE ) +GAME( 1993, fghthista, fghthist, fghthist, fghthist, deco32_state, fghthist, ROT0, "Data East Corporation", "Fighter's History (World ver 43-07, DE-0380-2 PCB)", MACHINE_SUPPORTS_SAVE ) +GAME( 1993, fghthistb, fghthist, fghthist, fghthist, deco32_state, fghthist, ROT0, "Data East Corporation", "Fighter's History (World ver 43-05, DE-0380-2 PCB)", MACHINE_SUPPORTS_SAVE ) GAME( 1993, fghthistuc, fghthist, fghthist, fghthist, deco32_state, fghthist, ROT0, "Data East Corporation", "Fighter's History (US ver 42-03, DE-0380-2 PCB)", MACHINE_SUPPORTS_SAVE ) GAME( 1993, fghthistja, fghthist, fghthist, fghthist, deco32_state, fghthist, ROT0, "Data East Corporation", "Fighter's History (Japan ver 41-05, DE-0380-2 PCB)", MACHINE_SUPPORTS_SAVE ) // DE-0380-1 PCB sets (HuC6280 for sound) diff --git a/src/mame/drivers/djmain.c b/src/mame/drivers/djmain.c index 600fa4a4011..7a8c4dad84b 100644 --- a/src/mame/drivers/djmain.c +++ b/src/mame/drivers/djmain.c @@ -231,7 +231,7 @@ READ32_MEMBER(djmain_state::turntable_r) UINT8 pos; int delta; - pos = ioport(ttnames[m_turntable_select])->read_safe(0); + pos = read_safe(ioport(ttnames[m_turntable_select]), 0); delta = pos - m_turntable_last_pos[m_turntable_select]; if (delta < -128) delta += 256; diff --git a/src/mame/drivers/dkong.c b/src/mame/drivers/dkong.c index 655acbbc3c4..e6d81e7d2a6 100644 --- a/src/mame/drivers/dkong.c +++ b/src/mame/drivers/dkong.c @@ -2127,6 +2127,34 @@ ROM_START( dkongjo1 ) ROM_LOAD( "v-5e.bpr", 0x0200, 0x0100, CRC(b869b8f5) SHA1(c2bdccbf2654b64ea55cd589fd21323a9178a660) ) /* character color codes on a per-column basis */ ROM_END +ROM_START( dkongpe ) + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD( "c_5et_g.bin", 0x0000, 0x1000, CRC(ba70b88b) SHA1(d76ebecfea1af098d843ee7e578e480cd658ac1a) ) + ROM_LOAD( "c_5ct_gp.bin", 0x1000, 0x1000, CRC(45af403e) SHA1(6030a4af7df98bfdf5b35a9a42541566f7d12901) ) + ROM_LOAD( "c_5bt_gp.bin", 0x2000, 0x1000, CRC(3a9783b7) SHA1(e98d757c048f2180ba22c774e0e425ddc661ba8c) ) + ROM_LOAD( "c_5at_gp.bin", 0x3000, 0x1000, CRC(32bc20ff) SHA1(ef141f437912923625722b83a33ea182eaa31427) ) + + ROM_REGION( 0x1800, "soundcpu", 0 ) + ROM_LOAD( "s_3i_b.bin", 0x0000, 0x0800, CRC(45a4ed06) SHA1(144d24464c1f9f01894eb12f846952290e6e32ef) ) + ROM_RELOAD( 0x0800, 0x0800 ) + ROM_LOAD( "s_3j_b.bin", 0x1000, 0x0800, CRC(4743fe92) SHA1(6c82b57637c0212a580591397e6a5a1718f19fd2) ) + + ROM_REGION( 0x1000, "gfx1", 0 ) + ROM_LOAD( "v_5h_bp.bin", 0x0000, 0x0800, CRC(007aa348) SHA1(ff2ae583fef6da9d260fda8f4a896dd0414c3388) ) + ROM_LOAD( "v_3ptp.bin", 0x0800, 0x0800, CRC(a967aff0) SHA1(7bcfdbeb0a5cdfec604eb8450664bc4b789526be) ) + + ROM_REGION( 0x2000, "gfx2", 0 ) + ROM_LOAD( "l_4m_bp.bin", 0x0000, 0x0800, CRC(766ae006) SHA1(0ec53798aa2c30b2c5c8b2f99b811a187faa2549) ) + ROM_LOAD( "l_4n_bp.bin", 0x0800, 0x0800, CRC(39e7ca4b) SHA1(b77ddd39608d08013fa8bb764c8e5aa4e03181dc) ) + ROM_LOAD( "l_4r_bp.bin", 0x1000, 0x0800, CRC(012f2f25) SHA1(836709192a249b00ded783be542ee844eb930c7a) ) + ROM_LOAD( "l_4s_bp.bin", 0x1800, 0x0800, CRC(84eb5bfb) SHA1(c1f38efb8670f1a489275eb8ff576a95d140cfb9) ) + + ROM_REGION( 0x0300, "proms", 0 ) + ROM_LOAD( "c-2k.bpr", 0x0000, 0x0100, CRC(e273ede5) SHA1(b50ec9e1837c00c20fb2a4369ec7dd0358321127) ) + ROM_LOAD( "c-2j.bpr", 0x0100, 0x0100, CRC(d6412358) SHA1(f9c872da2fe8e800574ae3bf483fb3ccacc92eb3) ) + ROM_LOAD( "v-5e.bpr", 0x0200, 0x0100, CRC(b869b8f5) SHA1(c2bdccbf2654b64ea55cd589fd21323a9178a660) ) +ROM_END + ROM_START( dkongf ) /* Donkey Kong Foundry (hack) from Jeff's Romhack */ ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "dk_f.5et", 0x0000, 0x1000, CRC(00b7efaf) SHA1(97ed5930eb5d0cb98a9008b1d329ba7f3b8b8dbf) ) @@ -3295,6 +3323,7 @@ GAME( 1981, dkongjo1, dkong, dkong2b, dkong, driver_device, 0, R GAME( 2004, dkongf, dkong, dkong2b, dkongf, driver_device, 0, ROT90, "hack (Jeff Kulczycki)", "Donkey Kong Foundry (hack)", MACHINE_SUPPORTS_SAVE ) /* from Jeff's Romhack */ GAME( 2006, dkongx, dkong, braze, dkongx, dkong_state, dkongx, ROT90, "hack (Braze Technologies)", "Donkey Kong II: Jumpman Returns (hack, V1.2)", MACHINE_SUPPORTS_SAVE ) GAME( 2006, dkongx11, dkong, braze, dkongx, dkong_state, dkongx, ROT90, "hack (Braze Technologies)", "Donkey Kong II: Jumpman Returns (hack, V1.1)", MACHINE_SUPPORTS_SAVE ) +GAME( 2013, dkongpe, dkong, dkong2b, dkong, driver_device, 0, ROT90, "hack (Clay Cowgill and Mike Mika)", "Donkey Kong: Pauline Edition Rev 5 (2013-04-22)", MACHINE_SUPPORTS_SAVE ) GAME( 1982, dkongjr, 0, dkongjr, dkongjr, driver_device, 0, ROT90, "Nintendo of America", "Donkey Kong Junior (US set F-2)", MACHINE_SUPPORTS_SAVE ) GAME( 1982, dkongjrj, dkongjr, dkongjr, dkongjr, driver_device, 0, ROT90, "Nintendo", "Donkey Kong Jr. (Japan)", MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/dm7000.c b/src/mame/drivers/dm7000.c index cb808fb98fa..20c5e0bd787 100644 --- a/src/mame/drivers/dm7000.c +++ b/src/mame/drivers/dm7000.c @@ -43,7 +43,7 @@ #define VERBOSE_LEVEL ( 9 ) -INLINE void ATTR_PRINTF(3,4) verboselog( running_machine &machine, int n_level, const char *s_fmt, ...) +INLINE void ATTR_PRINTF(3,4) verboselog( device_t &device, int n_level, const char *s_fmt, ...) { if (VERBOSE_LEVEL >= n_level) { @@ -52,32 +52,32 @@ INLINE void ATTR_PRINTF(3,4) verboselog( running_machine &machine, int n_level, va_start( v, s_fmt); vsprintf( buf, s_fmt, v); va_end( v); - logerror( "%s: %s", machine.describe_context( ), buf); + device.logerror( "%s: %s", device.machine().describe_context( ), buf); } } READ8_MEMBER( dm7000_state::dm7000_iic0_r ) { UINT8 data = 0; // dummy - verboselog( machine(), 9, "(IIC0) %08X -> %08X\n", 0x40030000 + offset, data); + verboselog(*this, 9, "(IIC0) %08X -> %08X\n", 0x40030000 + offset, data); return data; } WRITE8_MEMBER( dm7000_state::dm7000_iic0_w ) { - verboselog( machine(), 9, "(IIC0) %08X <- %08X\n", 0x40030000 + offset, data); + verboselog(*this, 9, "(IIC0) %08X <- %08X\n", 0x40030000 + offset, data); } READ8_MEMBER( dm7000_state::dm7000_iic1_r ) { UINT8 data = 0; // dummy - verboselog( machine(), 9, "(IIC1) %08X -> %08X\n", 0x400b0000 + offset, data); + verboselog(*this, 9, "(IIC1) %08X -> %08X\n", 0x400b0000 + offset, data); return data; } WRITE8_MEMBER( dm7000_state::dm7000_iic1_w ) { - verboselog( machine(), 9, "(IIC1) %08X <- %08X\n", 0x400b0000 + offset, data); + verboselog(*this, 9, "(IIC1) %08X <- %08X\n", 0x400b0000 + offset, data); } READ8_MEMBER( dm7000_state::dm7000_scc0_r ) @@ -97,7 +97,7 @@ READ8_MEMBER( dm7000_state::dm7000_scc0_r ) data = UART_LSR_THRE | UART_LSR_TEMT | m_scc0_lsr; break; } - verboselog( machine(), 9, "(SCC0) %08X -> %08X\n", 0x40040000 + offset, data); + verboselog(*this, 9, "(SCC0) %08X -> %08X\n", 0x40040000 + offset, data); return data; } @@ -114,19 +114,19 @@ WRITE8_MEMBER( dm7000_state::dm7000_scc0_w ) m_scc0_lcr = data; break; } - verboselog( machine(), 9, "(SCC0) %08X <- %08X\n", 0x40040000 + offset, data); + verboselog(*this, 9, "(SCC0) %08X <- %08X\n", 0x40040000 + offset, data); } READ8_MEMBER( dm7000_state::dm7000_gpio0_r ) { UINT8 data = 0; // dummy - verboselog( machine(), 9, "(GPIO0) %08X -> %08X\n", 0x40060000 + offset, data); + verboselog(*this, 9, "(GPIO0) %08X -> %08X\n", 0x40060000 + offset, data); return data; } WRITE8_MEMBER( dm7000_state::dm7000_gpio0_w ) { - verboselog( machine(), 9, "(GPIO0) %08X <- %08X\n", 0x40060000 + offset, data); + verboselog(*this, 9, "(GPIO0) %08X <- %08X\n", 0x40060000 + offset, data); } READ8_MEMBER( dm7000_state::dm7000_scp0_r ) @@ -137,13 +137,13 @@ READ8_MEMBER( dm7000_state::dm7000_scp0_r ) data = SCP_STATUS_RXRDY; break; } - verboselog( machine(), 9, "(SCP0) %08X -> %08X\n", 0x400c0000 + offset, data); + verboselog(*this, 9, "(SCP0) %08X -> %08X\n", 0x400c0000 + offset, data); return data; } WRITE8_MEMBER( dm7000_state::dm7000_scp0_w ) { - verboselog( machine(), 9, "(SCP0) %08X <- %08X\n", 0x400c0000 + offset, data); + verboselog(*this, 9, "(SCP0) %08X <- %08X\n", 0x400c0000 + offset, data); switch(offset) { case SCP_TXDATA: //printf("%02X ", data); @@ -168,13 +168,13 @@ READ16_MEMBER( dm7000_state::dm7000_enet_r ) data = m_enet_regs[offset]; break; } - verboselog( machine(), 9, "(ENET) %08X -> %08X\n", 0x72000600 + (offset), data); + verboselog(*this, 9, "(ENET) %08X -> %08X\n", 0x72000600 + (offset), data); return data; } WRITE16_MEMBER( dm7000_state::dm7000_enet_w ) { - verboselog( machine(), 9, "(ENET) %08X <- %08X\n", 0x72000600 + (offset), data); + verboselog(*this, 9, "(ENET) %08X <- %08X\n", 0x72000600 + (offset), data); COMBINE_DATA(&m_enet_regs[offset]); } diff --git a/src/mame/drivers/ec184x.c b/src/mame/drivers/ec184x.c index 28a1eee5d0f..17a51aaf110 100644 --- a/src/mame/drivers/ec184x.c +++ b/src/mame/drivers/ec184x.c @@ -18,7 +18,7 @@ #include "cpu/i86/i86.h" #include "machine/ram.h" -#define EC1841_MEMBOARD_SIZE 512*1024 +#define EC1841_MEMBOARD_SIZE (512*1024) #define VERBOSE_DBG 1 /* general debug messages */ @@ -43,7 +43,7 @@ public: required_device<cpu_device> m_maincpu; - DECLARE_MACHINE_RESET(ec184x); + DECLARE_MACHINE_RESET(ec1841); DECLARE_DRIVER_INIT(ec1841); struct { @@ -79,11 +79,11 @@ READ8_MEMBER(ec184x_state::memboard_r) UINT8 data; data = offset % 4; - if (data > m_memory.boards) + if (data >= m_memory.boards) data = 0xff; else data = m_memory.enable[data]; - DBG_LOG(1,"ec1841_memboard",("R (%d of %d) == %02X\n", offset, m_memory.boards, data )); + DBG_LOG(1,"ec1841_memboard",("R (%d of %d) == %02X\n", offset+1, m_memory.boards, data )); return data; } @@ -96,9 +96,9 @@ WRITE8_MEMBER(ec184x_state::memboard_w) current = m_memory.enable[offset]; - DBG_LOG(1,"ec1841_memboard",("W (%d of %d) <- %02X (%02X)\n", offset, m_memory.boards, data, current)); + DBG_LOG(1,"ec1841_memboard",("W (%d of %d) <- %02X (%02X)\n", offset+1, m_memory.boards, data, current)); - if (offset > m_memory.boards) { + if (offset >= m_memory.boards) { return; } @@ -140,9 +140,9 @@ DRIVER_INIT_MEMBER( ec184x_state, ec1841 ) address_space &program = m_maincpu->space(AS_PROGRAM); ram_device *m_ram = machine().device<ram_device>(RAM_TAG); - m_memory.boards = m_ram->size()/EC1841_MEMBOARD_SIZE - 1; - if (m_memory.boards > 3) - m_memory.boards = 3; + m_memory.boards = m_ram->size()/EC1841_MEMBOARD_SIZE; + if (m_memory.boards > 4) + m_memory.boards = 4; // 640K configuration is special -- 512K board mapped at 0 + 128K board mapped at 512K // XXX verify this was actually the case @@ -157,7 +157,7 @@ DRIVER_INIT_MEMBER( ec184x_state, ec1841 ) membank( "bank20" )->set_base( m_ram->pointer() ); } -MACHINE_RESET_MEMBER( ec184x_state, ec184x ) +MACHINE_RESET_MEMBER( ec184x_state, ec1841 ) { memset(m_memory.enable, 0, sizeof(m_memory.enable)); // mark 1st board enabled @@ -255,7 +255,7 @@ static MACHINE_CONFIG_START( ec1841, ec184x_state ) MCFG_CPU_IO_MAP(ec1841_io) MCFG_CPU_IRQ_ACKNOWLEDGE_DEVICE("mb:pic8259", pic8259_device, inta_cb) - MCFG_MACHINE_RESET_OVERRIDE(ec184x_state, ec184x) + MCFG_MACHINE_RESET_OVERRIDE(ec184x_state, ec1841) MCFG_EC1841_MOTHERBOARD_ADD("mb", "maincpu") MCFG_DEVICE_INPUT_DEFAULTS(ec1841) diff --git a/src/mame/drivers/electron.c b/src/mame/drivers/electron.c index 9dbc5468a6f..1009dc504a3 100644 --- a/src/mame/drivers/electron.c +++ b/src/mame/drivers/electron.c @@ -1,9 +1,9 @@ // license:BSD-3-Clause // copyright-holders:Wilbert Pol /****************************************************************************** - Acorn Electron driver + Acorn Electron driver By Wilbert Pol - + Hardware Overview ----------------- The Acorn Electron is a budget version of the BBC Micro home computer @@ -18,7 +18,7 @@ Internal ports for cassette storage, RGB/CVBS monitors and TV output Various expansions can be added via the rear expansion port PCB Layout ----------- |-------------------| +---------- |-------------------| |--------| EXPANSION PORT | |-----|---------------------| |---||---------| |MOD | SPKR 16MHz LS169 18VAC|| []18VAC INPUT @@ -33,7 +33,7 @@ PCB Layout Notes: (all IC's shown. Only 16 ICs are used) 6502 - 6502 CPU, clock input 2.000MHz [16/8] ULA - Custom logic chip 12CO21, also containing most of the BBC Micro circuitry - Early PCB revisions used a PLCC68 chip in a socket. Later revisions used a + Early PCB revisions used a PLCC68 chip in a socket. Later revisions used a PGA68 chip soldered directly into the motherboard 4164 - 4164 64k x4-bit DRAM (4 chips for 32kbytes total) ROM - Hitachi HN613256 32k x8-bit MASK ROM containing OS & BASIC @@ -45,10 +45,10 @@ Notes: (all IC's shown. Only 16 ICs are used) PWR - 3-pin power input from internal power supply KBD_CONN - 22-pin keyboard connector SPKR - 2-pin internal speaker connector - + ****************************************************************************** Emulation notes: - + I don't have a real system to verify the behaviour of the emulation. The things that can be done through BASIC programs seem to behave properly (most of the time :). diff --git a/src/mame/drivers/equites.c b/src/mame/drivers/equites.c index bf5dcfc58d9..e8a6ef607ba 100644 --- a/src/mame/drivers/equites.c +++ b/src/mame/drivers/equites.c @@ -371,8 +371,6 @@ D #include "cpu/alph8201/alph8201.h" #include "cpu/i8085/i8085.h" #include "sound/ay8910.h" -#include "sound/dac.h" -#include "sound/samples.h" #include "machine/nvram.h" #include "includes/equites.h" @@ -652,7 +650,6 @@ WRITE16_MEMBER(equites_state::gekisou_unknown_1_w) /******************************************************************************/ // Main CPU Memory Map - READ16_MEMBER(equites_state::equites_spriteram_kludge_r) { if (m_spriteram[0] == 0x5555) @@ -661,30 +658,41 @@ READ16_MEMBER(equites_state::equites_spriteram_kludge_r) return m_spriteram[0]; } -READ16_MEMBER(equites_state::mcu_r) +READ8_MEMBER(equites_state::mcu_ram_r) { - return 0xff00 | m_mcu_ram[offset]; + if (m_fakemcu == NULL) + return m_alpha_8201->ext_ram_r(space, offset); + else + return m_mcuram[offset]; } -WRITE16_MEMBER(equites_state::mcu_w) +WRITE8_MEMBER(equites_state::mcu_ram_w) { - if (ACCESSING_BITS_0_7) - m_mcu_ram[offset] = data & 0xff; + if (m_fakemcu == NULL) + m_alpha_8201->ext_ram_w(space, offset, data); + else + m_mcuram[offset] = data; } -WRITE16_MEMBER(equites_state::mcu_halt_assert_w) +WRITE16_MEMBER(equites_state::mcu_start_w) { - m_mcu->set_input_line(INPUT_LINE_HALT, ASSERT_LINE); + // data bit is A16 (offset) + if (m_fakemcu == NULL) + m_alpha_8201->mcu_start_w(offset != 0); + else + m_fakemcu->set_input_line(INPUT_LINE_HALT, (offset != 0) ? ASSERT_LINE : CLEAR_LINE); } -WRITE16_MEMBER(equites_state::mcu_halt_clear_w) +WRITE16_MEMBER(equites_state::mcu_switch_w) { - m_mcu->set_input_line(INPUT_LINE_HALT, CLEAR_LINE); + // data bit is A16 (offset) + if (m_fakemcu == NULL) + m_alpha_8201->bus_dir_w(offset == 0); } - static ADDRESS_MAP_START( equites_map, AS_PROGRAM, 16, equites_state ) + ADDRESS_MAP_UNMAP_HIGH AM_RANGE(0x000000, 0x00ffff) AM_ROM // ROM area is written several times (dev system?) AM_RANGE(0x040000, 0x040fff) AM_RAM AM_SHARE("nvram") // nvram is for gekisou only AM_RANGE(0x080000, 0x080fff) AM_READWRITE(equites_fg_videoram_r, equites_fg_videoram_w) // 8-bit @@ -692,14 +700,12 @@ static ADDRESS_MAP_START( equites_map, AS_PROGRAM, 16, equites_state ) AM_RANGE(0x0c0200, 0x0c0fff) AM_RAM AM_RANGE(0x100000, 0x100001) AM_READ(equites_spriteram_kludge_r) AM_RANGE(0x100000, 0x1001ff) AM_RAM AM_SHARE("spriteram") - AM_RANGE(0x140000, 0x1407ff) AM_READWRITE(mcu_r, mcu_w) // 8-bit + AM_RANGE(0x140000, 0x1407ff) AM_READWRITE8(mcu_ram_r, mcu_ram_w, 0x00ff) AM_RANGE(0x180000, 0x180001) AM_READ_PORT("IN1") AM_WRITE(soundlatch_word_w) // LSB: sound latch AM_RANGE(0x184000, 0x184001) AM_WRITE(equites_flip0_w) - AM_RANGE(0x188000, 0x188001) AM_WRITE(mcu_halt_clear_w) // 8404 control port1 - AM_RANGE(0x18c000, 0x18c001) AM_WRITENOP // 8404 control port2 + AM_RANGE(0x188000, 0x188001) AM_MIRROR(0x020000) AM_MASK(0x020000) AM_WRITE(mcu_start_w) + AM_RANGE(0x18c000, 0x18c001) AM_MIRROR(0x020000) AM_MASK(0x020000) AM_WRITE(mcu_switch_w) AM_RANGE(0x1a4000, 0x1a4001) AM_WRITE(equites_flip1_w) - AM_RANGE(0x1a8000, 0x1a8001) AM_WRITE(mcu_halt_assert_w) // 8404 control port3 - AM_RANGE(0x1ac000, 0x1ac001) AM_WRITENOP // 8404 control port4 AM_RANGE(0x1c0000, 0x1c0001) AM_READ_PORT("IN0") AM_WRITE(equites_scrollreg_w) // scroll register[XXYY] AM_RANGE(0x380000, 0x380001) AM_WRITE(equites_bgcolor_w) // bg color register[CC--] // 580000 unknown (protection?) (gekisou only, installed by DRIVER_INIT) @@ -708,21 +714,20 @@ static ADDRESS_MAP_START( equites_map, AS_PROGRAM, 16, equites_state ) ADDRESS_MAP_END static ADDRESS_MAP_START( splndrbt_map, AS_PROGRAM, 16, equites_state ) + ADDRESS_MAP_UNMAP_HIGH AM_RANGE(0x000000, 0x00ffff) AM_ROM AM_RANGE(0x040000, 0x040fff) AM_RAM AM_SHARE("workram") // work RAM AM_RANGE(0x080000, 0x080001) AM_READ_PORT("IN0") // joyport [2211] AM_RANGE(0x0c0000, 0x0c0001) AM_READ_PORT("IN1") AM_WRITE(splndrbt_flip0_w) // [MMLL] MM: bg color register, LL: normal screen - AM_RANGE(0x0c4000, 0x0c4001) AM_WRITE(mcu_halt_clear_w) // 8404 control port1 - AM_RANGE(0x0c8000, 0x0c8001) AM_WRITENOP // 8404 control port2 + AM_RANGE(0x0c4000, 0x0c4001) AM_MIRROR(0x020000) AM_MASK(0x020000) AM_WRITE(mcu_start_w) + AM_RANGE(0x0c8000, 0x0c8001) AM_MIRROR(0x020000) AM_MASK(0x020000) AM_WRITE(mcu_switch_w) AM_RANGE(0x0cc000, 0x0cc001) AM_WRITE(splndrbt_selchar0_w) // select active char map AM_RANGE(0x0e0000, 0x0e0001) AM_WRITE(splndrbt_flip1_w) // [MMLL] MM: not used, LL: flip screen - AM_RANGE(0x0e4000, 0x0e4001) AM_WRITE(mcu_halt_assert_w) // 8404 control port3 - AM_RANGE(0x0e8000, 0x0e8001) AM_WRITENOP // 8404 control port4 AM_RANGE(0x0ec000, 0x0ec001) AM_WRITE(splndrbt_selchar1_w) // select active char map AM_RANGE(0x100000, 0x100001) AM_WRITE(splndrbt_bg_scrollx_w) AM_RANGE(0x140000, 0x140001) AM_WRITE(soundlatch_word_w) // LSB: sound command AM_RANGE(0x1c0000, 0x1c0001) AM_WRITE(splndrbt_bg_scrolly_w) - AM_RANGE(0x180000, 0x1807ff) AM_READWRITE(mcu_r, mcu_w) // 8-bit + AM_RANGE(0x180000, 0x1807ff) AM_READWRITE8(mcu_ram_r, mcu_ram_w, 0x00ff) AM_RANGE(0x200000, 0x200fff) AM_MIRROR(0x1000) AM_READWRITE(equites_fg_videoram_r, equites_fg_videoram_w) // 8-bit AM_RANGE(0x400000, 0x4007ff) AM_RAM_WRITE(equites_bg_videoram_w) AM_SHARE("bg_videoram") AM_RANGE(0x400800, 0x400fff) AM_RAM @@ -749,7 +754,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( mcu_map, AS_PROGRAM, 8, equites_state ) - AM_RANGE(0x0000, 0x03ff) AM_RAM AM_SHARE("mcu_ram") /* main CPU shared RAM */ + AM_RANGE(0x0000, 0x03ff) AM_RAM AM_SHARE("mcuram") /* main CPU shared RAM */ ADDRESS_MAP_END /******************************************************************************/ @@ -1212,8 +1217,8 @@ static MACHINE_CONFIG_START( equites, equites_state ) MCFG_FRAGMENT_ADD(common_sound) - MCFG_CPU_ADD("mcu", ALPHA8301, 4000000/8) - MCFG_CPU_PROGRAM_MAP(mcu_map) + MCFG_DEVICE_ADD("alpha_8201", ALPHA_8201, 4000000/8) // 8303 or 8304 (same device!) + MCFG_QUANTUM_PERFECT_CPU("alpha_8201:mcu") /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -1234,12 +1239,14 @@ static MACHINE_CONFIG_START( equites, equites_state ) MCFG_MACHINE_RESET_OVERRIDE(equites_state,equites) MACHINE_CONFIG_END - static MACHINE_CONFIG_DERIVED( gekisou, equites ) + // mcu not dumped, so add simulated mcu + MCFG_CPU_ADD("mcu", ALPHA8301L, 4000000/8) + MCFG_CPU_PROGRAM_MAP(mcu_map) + // gekisou has battery-backed RAM to store settings MCFG_NVRAM_ADD_0FILL("nvram") - MACHINE_CONFIG_END @@ -1252,8 +1259,8 @@ static MACHINE_CONFIG_START( splndrbt, equites_state ) MCFG_FRAGMENT_ADD(common_sound) - MCFG_CPU_ADD("mcu", ALPHA8301, 4000000/8) - MCFG_CPU_PROGRAM_MAP(mcu_map) + MCFG_DEVICE_ADD("alpha_8201", ALPHA_8201, 4000000/8) // 8303 or 8304 (same device!) + MCFG_QUANTUM_PERFECT_CPU("alpha_8201:mcu") /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -1274,6 +1281,13 @@ static MACHINE_CONFIG_START( splndrbt, equites_state ) MCFG_MACHINE_RESET_OVERRIDE(equites_state,equites) MACHINE_CONFIG_END +static MACHINE_CONFIG_DERIVED( hvoltage, splndrbt ) + + // mcu not dumped, so add simulated mcu + MCFG_CPU_ADD("mcu", ALPHA8301L, 4000000/8) + MCFG_CPU_PROGRAM_MAP(mcu_map) +MACHINE_CONFIG_END + /******************************************************************************/ // Equites ROM Map @@ -1311,8 +1325,8 @@ ROM_START( equites ) ROM_LOAD( "ev3.1k", 0x04000, 0x2000, CRC(10ff140b) SHA1(7c28f988a9c8b2a702d007096199e67b447a183c) ) ROM_LOAD( "ev4.1h", 0x06000, 0x2000, CRC(b7917264) SHA1(e58345fda088b171fd348959de15082f3cb42514) ) - ROM_REGION( 0x2000, "mcu", 0 ) - ROM_LOAD( "alpha-8303__44801b42.bin", 0x0000, 0x2000, CRC(66adcb37) SHA1(e1c72ecb161129dcbddc0b16dd90e716d0c79311) ) + ROM_REGION( 0x2000, "alpha_8201:mcu", 0 ) + ROM_LOAD( "alpha-8303_44801b42.bin", 0x0000, 0x2000, CRC(66adcb37) SHA1(e1c72ecb161129dcbddc0b16dd90e716d0c79311) ) ROM_REGION( 0x1000, "gfx1", 0 ) // chars ROM_LOAD( "ep9", 0x00000, 0x1000, CRC(0325be11) SHA1(d95667b439e3d97b08efeaf08022348546a4f385) ) @@ -1375,8 +1389,8 @@ ROM_START( equitess ) ROM_LOAD( "ev3.1k", 0x04000, 0x2000, CRC(10ff140b) SHA1(7c28f988a9c8b2a702d007096199e67b447a183c) ) ROM_LOAD( "ev4.1h", 0x06000, 0x2000, CRC(b7917264) SHA1(e58345fda088b171fd348959de15082f3cb42514) ) - ROM_REGION( 0x2000, "mcu", 0 ) - ROM_LOAD( "alpha-8303__44801b42.bin", 0x0000, 0x2000, CRC(66adcb37) SHA1(e1c72ecb161129dcbddc0b16dd90e716d0c79311) ) + ROM_REGION( 0x2000, "alpha_8201:mcu", 0 ) + ROM_LOAD( "alpha-8303_44801b42.bin", 0x0000, 0x2000, CRC(66adcb37) SHA1(e1c72ecb161129dcbddc0b16dd90e716d0c79311) ) ROM_REGION( 0x1000, "gfx1", 0 ) // chars ROM_LOAD( "epr-ep0.3e", 0x00000, 0x1000, CRC(3f5a81c3) SHA1(8fd5bc621f483bfa46be7e40e6480b25243bdf70) ) @@ -1433,8 +1447,8 @@ ROM_START( bullfgtr ) ROM_LOAD( "hv3vr.bin", 0x04000, 0x2000, CRC(51ee751c) SHA1(60bf848dfdfe313ab05df5a5c05819b0fa87ca50) ) ROM_LOAD( "hv4vr.bin", 0x06000, 0x2000, CRC(62c7a25b) SHA1(237d3cbdfbf45b33c2f65d30faba151380866a93) ) - ROM_REGION( 0x2000, "mcu", 0 ) - ROM_LOAD( "alpha-8303__44801b42.bin", 0x0000, 0x2000, CRC(66adcb37) SHA1(e1c72ecb161129dcbddc0b16dd90e716d0c79311) ) + ROM_REGION( 0x2000, "alpha_8201:mcu", 0 ) + ROM_LOAD( "alpha-8303_44801b42.bin", 0x0000, 0x2000, CRC(66adcb37) SHA1(e1c72ecb161129dcbddc0b16dd90e716d0c79311) ) ROM_REGION( 0x1000, "gfx1", 0 ) // chars ROM_LOAD( "h.bin", 0x000000, 0x1000, CRC(c6894c9a) SHA1(0d5a55cded4fd833211bdc733a78c6c8423897de) ) @@ -1515,8 +1529,8 @@ ROM_START( bullfgtrs ) ROM_LOAD( "hv3vr.bin", 0x04000, 0x2000, CRC(51ee751c) SHA1(60bf848dfdfe313ab05df5a5c05819b0fa87ca50) ) ROM_LOAD( "hv4vr.bin", 0x06000, 0x2000, CRC(62c7a25b) SHA1(237d3cbdfbf45b33c2f65d30faba151380866a93) ) - ROM_REGION( 0x2000, "mcu", 0 ) - ROM_LOAD( "alpha-8303__44801b42.bin", 0x0000, 0x2000, CRC(66adcb37) SHA1(e1c72ecb161129dcbddc0b16dd90e716d0c79311) ) + ROM_REGION( 0x2000, "alpha_8201:mcu", 0 ) + ROM_LOAD( "alpha-8303_44801b42.bin", 0x0000, 0x2000, CRC(66adcb37) SHA1(e1c72ecb161129dcbddc0b16dd90e716d0c79311) ) ROM_REGION( 0x1000, "gfx1", 0 ) // chars ROM_LOAD( "h.bin", 0x000000, 0x1000, CRC(c6894c9a) SHA1(0d5a55cded4fd833211bdc733a78c6c8423897de) ) @@ -1585,6 +1599,9 @@ ROM_START( kouyakyu ) ROM_LOAD( "epr-6699.bin", 0x08000, 0x2000, CRC(9bfa4a72) SHA1(8ac4d308dab0d67a26b4e3550c2e8064aaf36a74) ) ROM_LOAD( "epr-6698.bin", 0x0a000, 0x2000, CRC(7adfd1ff) SHA1(b543dd6734a681a187dabf602bea390de663039c) ) + ROM_REGION( 0x2000, "alpha_8201:mcu", 0 ) + ROM_LOAD( "alpha-8304_44801bxx.bin", 0x0000, 0x2000, BAD_DUMP CRC(66adcb37) SHA1(e1c72ecb161129dcbddc0b16dd90e716d0c79311) ) // 8304 is not dumped yet, using 8303 instead + ROM_REGION( 0x1000, "gfx1", 0 ) // chars ROM_LOAD( "epr-6710.bin", 0x00000, 0x1000, CRC(accda190) SHA1(265d2fd92574d65e7890e48d5f305bf903a67bc8) ) @@ -1647,6 +1664,9 @@ ROM_START( gekisou ) ROM_LOAD( "v2.1h", 0x04000, 0x4000, CRC(cb12582e) SHA1(ef378232e2744540cc4c9187cfb36d780dadc962) ) ROM_LOAD( "v3.1e", 0x08000, 0x4000, CRC(0ab5e777) SHA1(9177c42418f022a65d73c3302873b894c5a137a4) ) + ROM_REGION( 0x2000, "alpha_8201:mcu", 0 ) + ROM_LOAD( "alpha-8304_44801bxx.bin", 0x0000, 0x2000, BAD_DUMP CRC(66adcb37) SHA1(e1c72ecb161129dcbddc0b16dd90e716d0c79311) ) // 8304 is not dumped yet, using 8303 instead + ROM_REGION( 0x1000, "gfx1", 0 ) // chars ROM_LOAD( "0.5c", 0x00000, 0x1000, CRC(7e8bf4d1) SHA1(8abb82be006e8d1df449a5f83d59637314405119) ) @@ -1713,8 +1733,8 @@ ROM_START( splndrbt ) ROM_LOAD( "3_v.1k", 0x04000, 0x2000, CRC(bbee5346) SHA1(753cb784b04f081fa1f8590dc28056d9918f313b) ) ROM_LOAD( "4_v.1h", 0x06000, 0x2000, CRC(10f45af4) SHA1(00fa599bad8bf3ba6deee54165f381403096e8f9) ) - ROM_REGION( 0x2000, "mcu", 0 ) - ROM_LOAD( "alpha-8303__44801b42.bin", 0x0000, 0x2000, CRC(66adcb37) SHA1(e1c72ecb161129dcbddc0b16dd90e716d0c79311) ) + ROM_REGION( 0x2000, "alpha_8201:mcu", 0 ) + ROM_LOAD( "alpha-8303_44801b42.bin", 0x0000, 0x2000, CRC(66adcb37) SHA1(e1c72ecb161129dcbddc0b16dd90e716d0c79311) ) ROM_REGION( 0x2000, "gfx1", 0 ) // chars ROM_LOAD( "10.8c", 0x00000, 0x2000, CRC(501887d4) SHA1(3cf4401d6fddff1500066219a71ac3b30ecbdd28) ) @@ -1779,8 +1799,8 @@ ROM_START( hvoltage ) ROM_LOAD( "6_v.1h", 0x04000, 0x4000, CRC(e9542211) SHA1(482f2c90e842fe5cc31cc6a39025adf65ba47ce9) ) ROM_LOAD( "7_v.1e", 0x08000, 0x4000, CRC(44d38554) SHA1(6765971376eafa218fda1accb1e173a7c1850cc8) ) - ROM_REGION( 0x2000, "mcu", 0 ) - ROM_LOAD( "alpha-8304__44801bxx.bin", 0x0000, 0x2000, NO_DUMP ) + ROM_REGION( 0x2000, "alpha_8201:mcu", 0 ) + ROM_LOAD( "alpha-8304_44801bxx.bin", 0x0000, 0x2000, BAD_DUMP CRC(66adcb37) SHA1(e1c72ecb161129dcbddc0b16dd90e716d0c79311) ) // 8304 is not dumped yet, using 8303 instead ROM_REGION( 0x2000, "gfx1", 0 ) // chars ROM_LOAD( "5.8c", 0x00000, 0x2000, CRC(656d53cd) SHA1(9971ed7e7da0e8bf46e97e8f75a2c2201b33fc2f) ) @@ -1885,13 +1905,13 @@ DRIVER_INIT_MEMBER(equites_state,hvoltage) // Game Entries // Equites Hardware -GAME( 1984, equites, 0, equites, equites, equites_state, equites, ROT90, "Alpha Denshi Co.", "Equites", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) -GAME( 1984, equitess, equites, equites, equites, equites_state, equites, ROT90, "Alpha Denshi Co. (Sega license)", "Equites (Sega)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) -GAME( 1984, bullfgtr, 0, equites, bullfgtr, equites_state, bullfgtr, ROT90, "Alpha Denshi Co.", "Bull Fighter", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) +GAME( 1984, equites, 0, equites, equites, equites_state, equites, ROT90, "Alpha Denshi Co.", "Equites", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) +GAME( 1984, equitess, equites, equites, equites, equites_state, equites, ROT90, "Alpha Denshi Co. (Sega license)", "Equites (Sega)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) +GAME( 1984, bullfgtr, 0, equites, bullfgtr, equites_state, bullfgtr, ROT90, "Alpha Denshi Co.", "Bull Fighter", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) GAME( 1984, bullfgtrs,bullfgtr, equites, bullfgtr, equites_state, bullfgtr, ROT90, "Alpha Denshi Co. (Sega license)", "Bull Fighter (Sega)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) -GAME( 1985, kouyakyu, 0, equites, kouyakyu, equites_state, kouyakyu, ROT0, "Alpha Denshi Co.", "The Koukouyakyuh", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) -GAME( 1985, gekisou, 0, gekisou, gekisou, equites_state, gekisou, ROT90, "Eastern Corp.", "Gekisou (Japan)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) +GAME( 1985, kouyakyu, 0, equites, kouyakyu, equites_state, kouyakyu, ROT0, "Alpha Denshi Co.", "The Koukouyakyuh", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) +GAME( 1985, gekisou, 0, gekisou, gekisou, equites_state, gekisou, ROT90, "Eastern Corp.", "Gekisou (Japan)", MACHINE_UNEMULATED_PROTECTION | MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) // Splendor Blast Hardware GAME( 1985, splndrbt, 0, splndrbt, splndrbt, equites_state, splndrbt, ROT0, "Alpha Denshi Co.", "Splendor Blast", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) -GAME( 1985, hvoltage, 0, splndrbt, hvoltage, equites_state, hvoltage, ROT0, "Alpha Denshi Co.", "High Voltage", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) +GAME( 1985, hvoltage, 0, hvoltage, hvoltage, equites_state, hvoltage, ROT0, "Alpha Denshi Co.", "High Voltage", MACHINE_UNEMULATED_PROTECTION | MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/eti660.c b/src/mame/drivers/eti660.c index 238ec6d9b6f..d7d453b5823 100644 --- a/src/mame/drivers/eti660.c +++ b/src/mame/drivers/eti660.c @@ -219,7 +219,7 @@ READ8_MEMBER( eti660_state::pia_pa_r ) */ UINT8 i, data = 0xff; - + for (i = 0; i < 4; i++) if BIT(m_keylatch, i) return m_io_keyboard[i]->read(); diff --git a/src/mame/drivers/exelv.c b/src/mame/drivers/exelv.c index fc1ad3d0c0e..d2be5b34519 100644 --- a/src/mame/drivers/exelv.c +++ b/src/mame/drivers/exelv.c @@ -523,7 +523,7 @@ static MACHINE_CONFIG_START( exl100, exelv_state ) MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_linear_slot, "exelvision_cart") MCFG_GENERIC_EXTENSIONS("bin,rom") - MCFG_SOFTWARE_LIST_ADD("cart_list", "exl100_cart") + MCFG_SOFTWARE_LIST_ADD("cart_list", "exl100") MACHINE_CONFIG_END diff --git a/src/mame/drivers/firefox.c b/src/mame/drivers/firefox.c index 7d18687fed4..a7ce6872fad 100644 --- a/src/mame/drivers/firefox.c +++ b/src/mame/drivers/firefox.c @@ -267,7 +267,8 @@ UINT32 firefox_state::screen_update_firefox(screen_device &screen, bitmap_rgb32 TIMER_DEVICE_CALLBACK_MEMBER(firefox_state::video_timer_callback) { - m_screen->update_now(); +// m_screen->update_now(); + m_screen->update_partial(m_screen->vpos()); m_maincpu->set_input_line(M6809_IRQ_LINE, ASSERT_LINE ); } diff --git a/src/mame/drivers/firetrk.c b/src/mame/drivers/firetrk.c index 2eabe912933..38a8dc48282 100644 --- a/src/mame/drivers/firetrk.c +++ b/src/mame/drivers/firetrk.c @@ -230,8 +230,8 @@ READ8_MEMBER(firetrk_state::firetrk_input_r) /* update steering wheels */ for (i = 0; i < 2; i++) { - UINT32 new_dial = ioport((i ? "STEER_2" : "STEER_1"))->read_safe(0); - INT32 delta = new_dial - m_dial[i]; + UINT32 const new_dial = read_safe(ioport(i ? "STEER_2" : "STEER_1"), 0); + INT32 const delta = new_dial - m_dial[i]; if (delta != 0) { @@ -242,9 +242,9 @@ READ8_MEMBER(firetrk_state::firetrk_input_r) } } - return ((ioport("BIT_0")->read_safe(0) & (1 << offset)) ? 0x01 : 0) | - ((ioport("BIT_6")->read_safe(0) & (1 << offset)) ? 0x40 : 0) | - ((ioport("BIT_7")->read_safe(0) & (1 << offset)) ? 0x80 : 0); + return ((read_safe(ioport("BIT_0"), 0) & (1 << offset)) ? 0x01 : 0) | + ((read_safe(ioport("BIT_6"), 0) & (1 << offset)) ? 0x40 : 0) | + ((read_safe(ioport("BIT_7"), 0) & (1 << offset)) ? 0x80 : 0); } diff --git a/src/mame/drivers/gaelco3d.c b/src/mame/drivers/gaelco3d.c index da02df07eb6..0170d609e85 100644 --- a/src/mame/drivers/gaelco3d.c +++ b/src/mame/drivers/gaelco3d.c @@ -430,10 +430,10 @@ WRITE16_MEMBER(gaelco3d_state::analog_port_latch_w) { if (!(data & 0xff)) { - m_analog_ports[0] = ioport("ANALOG0")->read_safe(0); - m_analog_ports[1] = ioport("ANALOG1")->read_safe(0); - m_analog_ports[2] = ioport("ANALOG2")->read_safe(0); - m_analog_ports[3] = ioport("ANALOG3")->read_safe(0); + m_analog_ports[0] = read_safe(ioport("ANALOG0"), 0); + m_analog_ports[1] = read_safe(ioport("ANALOG1"), 0); + m_analog_ports[2] = read_safe(ioport("ANALOG2"), 0); + m_analog_ports[3] = read_safe(ioport("ANALOG3"), 0); } } else diff --git a/src/mame/drivers/galaxian.c b/src/mame/drivers/galaxian.c index bcd1651c2c7..1e78e367dcc 100644 --- a/src/mame/drivers/galaxian.c +++ b/src/mame/drivers/galaxian.c @@ -384,6 +384,252 @@ Stephh's notes (based on the games Z80 code and some tests) for games based on ' - When in "Free Play" mode, you only 3 lives at start. +Stephh's additional notes (based on the games Z80 code and some tests) for "Moon Cresta" and its numerous clones : + +a) 'mooncrst' + + - made by Nichibutsu + - inputs : + * player 1 controls are used by player 1 + * player 2 controls are used by player 2, even in an "upright" cabinet + - 2 coins slots with different settings : + * coin A : 1C_1C / 2C_1C / 3C_1C / 4C_1C + * coin B : 1C_1C / 1C_2C / 1C_3C / "Free Play" + - no writes to 0xa003, so no coin counters + - bonus life at 30000 or 50000 based on a Dip Switch + - possible partial Japanese text based on a Dip Switch + - hi-score : 11 chars (even if only 10 will be displayed), 60 seconds to enter + - players bullet speed : 4 pixels - lower limit : 0x04 + - ingame bug : if you reset the game when screen is flipped, it isn't flipped back + - driver possible bug (which occurs for all "Moon Cresta" sets but 'mooncrgx') : + when the screen is flipped, sprites are too shifted (see for example player 2 + score which misses ending '0') while bullets shall be good + as a consequence, square around letters is wrong when entering player name + for hi-score table when screen is flipped + +b) 'mooncrsu' + + - made by Nichibutsu + - very similar to 'mooncrst' with the only following differences : + * additional "USA" display after "Nichibutsu" (which is shifted left) + * writes to 0xb000 to 0xb0ff on reset ('mooncrst' only writes to 0xb000), + so there is no screen flipped ingame bug as in 'mooncrst' + +c) 'mooncrsa' + + - made by Nichibutsu + - additional "(c)" display before "Nichibutsu" + - "(c) 1980 NIHON BUSSAN CO. , LTD" display replaced with "May 1980" in yellow + - code at 0x1f00 has been removed ! I can't determine was is was supposed to do, + but it's based on number of enemies left (stored at 0x823c) and possible time + spent on the level (stored at 0x8226). Any hint is fully welcome ! + - this version is easier than 'mooncrst' : look at high nibbles that are stored + at 0x809b and 0x809c via code at 0x0cb8 (0x01 and 0x02 instead of 0x11 and 0x12). + - 2 coins slots, but same settings : 1C_1C / 1C_2C / 1C_3C / "Free Play" + - same other infos as in 'mooncrst' + - same ingame bug as in 'mooncrst' + +d) 'mooncrs2' + + - bootleg (possibily based on a Gremlin version we don't have) + - heavily based on 'mooncrsa' with additional RAM/ROM check routine at 0x3ea1 + - some "chars" have been erased from the GFX ROMS but some routines which + "prints" them are still there (but there are less than in 'mooncrsa') + - same other infos as in 'mooncrst' + - due to numerous writes in the RAM/ROM check routine, there is no screen flipped + ingame bug as in 'mooncrst' + +e) 'mooncrsb' + + - bootleg (possibily based on a Gremlin version we don't have) + - the only difference with 'mooncrs2' is that RAM/ROM check routine at 0x3ea1 + has completely been "noped" and the jump at address 0x0004 has been changed + - all "chars" from the GFX ROMS haven't been erased, so you can see the top + of the "Gremlin" logo as copyright and hi-scores names + - same ingame bug as in 'mooncrst' + +f) 'mooncrs3' + + - bootleg + - very similar to 'mooncrs2' with the only following differences : + * checksum of ROM area 0x0000-0x3fff is computed, but the result is discarded + (see "xor a" operation at 0x3fc0 instead of "and a") + * coins stuff is different (see below) + - 2 coins slots with different settings (same as 'mooncrst') : + * coin A : 1C_1C / 2C_1C / 3C_1C / 4C_1C + * coin B : 1C_1C / 1C_2C / 1C_3C / "Free Play" + - there are writes to 0xa003 (check code at 0x1b8e and 0x1b9e) which occur + when you insert a coin, but I can't confirm it's related to coin counters + as the same value is written when you press COIN1 or COIN2 + +g) 'mooncrsg' + + - made by Gremlin + - there are MANY changes and additions, and I wonder if there's such a Nichibutsu set; + anyway, closest set to this one seems to be 'mooncrst' + - Gremin "logo" on 2 lines instead of Nichibutsu copyright messages (2 lines) + - additional test for IN0 bit 7 (code at 0x0174) which always adds 1 credit + - there are writes to 0xa003 (check code at 0x0158 and 0x0160) which occur + when you insert a coin, but I can't confirm it's related to coin counters + as the same value is written when you press COIN1 or COIN2 + - only English text (Dip Switch has no effect due to code at 0x2f77) + - hi-score : 3 chars, 10 seconds to enter + - same difficulty as in 'monncrst' (but stored at 0x809e and 0x809f) + - same other infos as in 'mooncrst' + - same ingame bug as in 'mooncrst' + +h) 'fantazia' + + - made by Subelectro + - closest set to this one seems to be 'mooncrsb' + - all intro texts have been changed as well as colors + - inputs : + * player 1 controls are used by player 1 + * player 2 controls are used by player 2, only in a "cocktail" cabinet + look at additional routine at 0x29e0 + - 2 coins slots with different settings (inverted coin A/B compared to 'mooncrst') : + * coin A : 1C_1C / 1C_2C / 1C_3C / "Free Play" + * coin B : 1C_1C / 2C_1C / 3C_1C / 4C_1C + - only English text (Dip Switch has no effect due to code at 0x2f53) + - hi-score : 3 chars, 60 seconds to enter + - same other infos as in 'mooncrst' + - same ingame bug as in 'mooncrst' + +i) 'eagle' + + - made by Centuri + - very similar to 'mooncrsb' with the only following differences : + * only 3 chars for hi-score instead of 11 + * all other changes are modified "strings" to be displayed + (the intro texts but copyright remains though) as well as + new GFX (I can't test the sound for now to check) + - same ingame bug as in 'mooncrst' + +j) 'eagle2' + + - made by Centuri + - very similar to 'eagle' with the only following differences : + * only 20 seconds to enter hi-score instead of 60 + * coins stuff is different (see below) + * one GFX ROM is slighlty different + - 2 coins slots, but same settings : 1C_1C / 2C_1C / 3C_1C / 4C_1C + - previous "Coin B" Dip Switch is now only tested to see if in "Freeplay" mode + - same ingame bug as in 'mooncrst' + +k) 'eagle3' + + - made by Centuri + - PRG ROMS are the same as for 'eagle' while two GFX ROMS are slighly different + (so the game is having 'mooncrst' ships and 'eagle' enemies) + - same ingame bug as in 'mooncrst' + +l) 'spctbird' + + - made by Fortrek + - very similar to 'mooncrsb' with the only following difference : + * coins stuff is different (same as in 'eagle2' - see below) + - 2 coins slots, but same settings : 1C_1C / 2C_1C / 3C_1C / 4C_1C + - previous "Coin B" Dip Switch is now only tested to see if in "Freeplay" mode + - same ingame bug as in 'mooncrst' + +m) 'smooncrs' + + - made par Gremlin (bootleg based on a Nichibutsu version we don't have ?) + - same RAM/ROM check routine as in 'mooncrs2' (so there is no screen flipped + ingame bug as in 'mooncrst'), but LOTS of new features ! + - only top of the Gremlin logo is displayed and it is also used for hi-scores + - all intro texts have been changed + - "2'ST" instead of "2'ND" and "RECORD" instead of "HI-SCORE" + - additional "PLAYER 1/2" messages when player changes + - inputs : player 1 controls are used by players 1 and 2, even in a "cocktail" + cabinet (player 2 inputs are never read due to code at 0x2b1c and 0x3313) + - 2 coins slots with different settings : + * coin A : 1C_1C / 2C_1C / 3C_1C / 4C_1C + * coin B : 1C_1C / 1C_2C / 1C_3C / "Free Play" + additional wrong (Spanish) text displayed when "Coin B" set to 1C_1C + (check additional code at 0x0fae) : + * if "Coin A" set to 4C_1C, "1 MONEDA 1 PARTIDA" on one line + * if "Coin A" set to 2C_1C, "1 MONEDA 1 PARTIDA" on one line + and "2 MONEDAS 3 PARTIDAS" on another line below + when "Coin B" set to "Free Play", "CREDIT 04" instead of "FREE PLAY" string + (even if this number of credits is decremented when you press a START button, + it is put back to 04 when the game is over for all players) + - additional "POR" display after the number of credits + - bonus life always 50000 due to code at 0x2f68 + - only English text due to code at 0x2f53 + - hi-score : 3 chars, 60 seconds to enter + - players bullet speed : 9 or 12 pixels (using previous "Language" Dip Switch) - + lower limit : 0x0f (see additional routine at 0x0007 and call from 0x3407) + - game difficulty using previous "Bonus Life" Dip Switch (code at 0x2962) + however, even with "Easy" difficulty, the game is much harder as in 'mooncrs2' + as enemies as enemies move much faster and as they shoot on some levels + - docking stage is harder has there are gaps of 2 pixels instead of 1 + - when you complete the 8 stages, "O.K." "FANTASTIC" messages on 2 lines + instead of "FAR OUT !" message on 1 line + - same ingame bug as in 'mooncrst' + - another ingame bug : when in "cocktail mode", "PLAYER 1/2" messages are + displayed BEFORE the screen is flipped (back) + - driver other bugs : + * when screen is flipped, player's bullets aren't displayed + * when screen is flipped, enemies' bullets aren't flipped + +n) 'spcdrag' + + - bootleg + - heavily based on 'smooncrs' (so there's a RAM/ROM check) but some differences though + - same intro texts as in 'mooncrs2' + - 2 coins slots with different settings : + * coin A : 1C_1C / 2C_1C / 3C_1C / 4C_1C + * coin B : 1C_2C / 1C_3C / 1C_4C / "Free Play" + additional wrong (Engrish) text displayed when "Coin B" set to 1C_2C + (check additional code at 0x0fae) : + * if "Coin A" set to 4C_1C, "1 COIN 1 PLAY " on one line + * if "Coin A" set to 2C_1C, "1 COIN 1 PLAY " on one line + and "2 COINS 3 PLAYES " (notice the spelling) on another line below + when "Coin B" set to "Free Play", "CREDIT 04" instead of "FREE PLAY" string + (even if this number of credits is decremented when you press a START button, + it is put back to 04 when the game is over for all players) + - "CAP 2" display instead of "POR" after the number of credits + - hi-score : 11 chars (even if only 10 will be displayed), 60 seconds to enter + (same as in 'mooncrs2') + - players bullet speed : 6 or 9 pixels (using previous "Language" Dip Switch) - + lower limit : 0x04 (instead of speed 9/12 and lower limit 0x0f) + - even if there's also the "Difficulty" Dip Switch, the game is a little bit easier + (enemies speed is slower and docking stage is back to 1 pixel to fit 'mooncrs2') + - when you complete the 8 stages, same "FAR OUT !" message as in 'mooncrs2' + - driver bug : even if player's bullets are displayed when screen is flipped as in + other sets, enemies' bullets are still not flipped as in 'smooncrs' + +o) 'spcdraga' + + - bootleg ? (there's a Nichibutsu logo which is displayed in the "title" screen + as well as in the hi-scores) + - very similar to 'spcdrag' with the only following (comestical) differences : + * unused routine at 0x37a8 has been "noped" + * no text after the number of credits + * all texts have been translated to Spanish + +p) 'mooncrgx' + + - bootleg on "Galaxian" hardware + - very similar to 'mooncrsb' with the only following differences : + * all unused routines have been "noped" + * settings are different (see below) + - 2 coins slots with different settings : + * coin A : 1C_1C / 2C_1C + * coin B : 1C_3C / 1C_5C + - there are writes to 0x6003 when you press COIN1 but not when you press COIN2 + - there are also writes to (unmapped) 0x6804 when you press either COIN1 or COIN2 : + * when you press COIN1, 0x00 is written once + * when you press COIN2, 0x01 is written 5 times, then 0x00 is written once + - only English text (Dip Switch has no effect due to code at 0x2f4b) + - no ingame bug due to code at 0x2f77 + - driver possible bug : while sprites are now correct when screen is flipped, + they are too shifted when screen is not flipped (again, see for example player 2 + score which misses ending '0') while bullets shall be good + as a consequence, square around letters is wrong when entering player name + for hi-score table when screen not is flipped + TODO: @@ -442,7 +688,7 @@ INTERRUPT_GEN_MEMBER(galaxian_state::fakechange_interrupt_gen) { interrupt_gen(device); - if (ioport("FAKE_SELECT")->read_safe(0x00)) + if (read_safe(ioport("FAKE_SELECT"), 0x00)) { m_tenspot_current_game++; m_tenspot_current_game%=10; @@ -5235,7 +5481,8 @@ TIMER_DEVICE_CALLBACK_MEMBER(galaxian_state::timefgtr_scanline) // change spriteram base per each 64-line part of the screen if ((split & 0x3f) == 0) { - m_screen->update_now(); +// m_screen->update_now(); + m_screen->update_partial(m_screen->vpos()); m_sprites_base = 0x40 | (split << 2 & 0x300); } } @@ -5345,7 +5592,7 @@ static MACHINE_CONFIG_DERIVED( froggermc, galaxian_base ) /* alternate memory map */ MCFG_CPU_MODIFY("maincpu") MCFG_CPU_PROGRAM_MAP(mooncrst_map_base) /* no discrete sound ! */ - + MCFG_CPU_MODIFY("audiocpu") MCFG_CPU_IRQ_ACKNOWLEDGE_DEVICE(DEVICE_SELF, galaxian_state, froggermc_audiocpu_irq_ack) MACHINE_CONFIG_END @@ -6052,7 +6299,7 @@ READ8_MEMBER(galaxian_state::tenspot_dsw_read) { char tmp[64]; sprintf(tmp,"IN2_GAME%d", m_tenspot_current_game); - return ioport(tmp)->read_safe(0x00); + return read_safe(ioport(tmp), 0x00); } diff --git a/src/mame/drivers/galaxold.c b/src/mame/drivers/galaxold.c index 0b74004e5d7..62eb5441460 100644 --- a/src/mame/drivers/galaxold.c +++ b/src/mame/drivers/galaxold.c @@ -33,270 +33,6 @@ TODO: - $4800-4bff in Streaking/Ghost Muncher - -Moon Cresta versions supported: ------------------------------- - -mooncrst Nichibutsu - later revision with better demo mode and - text for docking. Encrypted. No ROM/RAM check -mooncrsu Nichibutsu USA - later revision with better demo mode and - text for docking. Unencrypted. No ROM/RAM check -mooncrsa Nichibutsu - older revision with better demo mode and - text for docking. Encrypted. No ROM/RAM check -mooncrs2 Nichibutsu - probably first revision (no patches) and ROM/RAM check code. - This came from a bootleg board, with the logos erased - from the graphics -mooncrsg Gremlin - same docking text as mooncrst -mooncrsb bootleg of mooncrs2. ROM/RAM check erased. - - -Stephh's additional notes (based on the games Z80 code and some tests) for "Moon Cresta" and its numerous clones : - -a) 'mooncrst' - - - made by Nichibutsu - - inputs : - * player 1 controls are used by player 1 - * player 2 controls are used by player 2, even in an "upright" cabinet - - 2 coins slots with different settings : - * coin A : 1C_1C / 2C_1C / 3C_1C / 4C_1C - * coin B : 1C_1C / 1C_2C / 1C_3C / "Free Play" - - no writes to 0xa003, so no coin counters - - bonus life at 30000 or 50000 based on a Dip Switch - - possible partial Japanese text based on a Dip Switch - - hi-score : 11 chars (even if only 10 will be displayed), 60 seconds to enter - - players bullet speed : 4 pixels - lower limit : 0x04 - - ingame bug : if you reset the game when screen is flipped, it isn't flipped back - - driver possible bug (which occurs for all "Moon Cresta" sets but 'mooncrgx') : - when the screen is flipped, sprites are too shifted (see for example player 2 - score which misses ending '0') while bullets shall be good - as a consequence, square around letters is wrong when entering player name - for hi-score table when screen is flipped - -b) 'mooncrsu' - - - made by Nichibutsu - - very similar to 'mooncrst' with the only following differences : - * additional "USA" display after "Nichibutsu" (which is shifted left) - * writes to 0xb000 to 0xb0ff on reset ('mooncrst' only writes to 0xb000), - so there is no screen flipped ingame bug as in 'mooncrst' - -c) 'mooncrsa' - - - made by Nichibutsu - - additional "(c)" display before "Nichibutsu" - - "(c) 1980 NIHON BUSSAN CO. , LTD" display replaced with "May 1980" in yellow - - code at 0x1f00 has been removed ! I can't determine was is was supposed to do, - but it's based on number of enemies left (stored at 0x823c) and possible time - spent on the level (stored at 0x8226). Any hint is fully welcome ! - - this version is easier than 'mooncrst' : look at high nibbles that are stored - at 0x809b and 0x809c via code at 0x0cb8 (0x01 and 0x02 instead of 0x11 and 0x12). - - 2 coins slots, but same settings : 1C_1C / 1C_2C / 1C_3C / "Free Play" - - same other infos as in 'mooncrst' - - same ingame bug as in 'mooncrst' - -d) 'mooncrs2' - - - bootleg (possibily based on a Gremlin version we don't have) - - heavily based on 'mooncrsa' with additional RAM/ROM check routine at 0x3ea1 - - some "chars" have been erased from the GFX ROMS but some routines which - "prints" them are still there (but there are less than in 'mooncrsa') - - same other infos as in 'mooncrst' - - due to numerous writes in the RAM/ROM check routine, there is no screen flipped - ingame bug as in 'mooncrst' - -e) 'mooncrsb' - - - bootleg (possibily based on a Gremlin version we don't have) - - the only difference with 'mooncrs2' is that RAM/ROM check routine at 0x3ea1 - has completely been "noped" and the jump at address 0x0004 has been changed - - all "chars" from the GFX ROMS haven't been erased, so you can see the top - of the "Gremlin" logo as copyright and hi-scores names - - same ingame bug as in 'mooncrst' - -f) 'mooncrs3' - - - bootleg - - very similar to 'mooncrs2' with the only following differences : - * checksum of ROM area 0x0000-0x3fff is computed, but the result is discarded - (see "xor a" operation at 0x3fc0 instead of "and a") - * coins stuff is different (see below) - - 2 coins slots with different settings (same as 'mooncrst') : - * coin A : 1C_1C / 2C_1C / 3C_1C / 4C_1C - * coin B : 1C_1C / 1C_2C / 1C_3C / "Free Play" - - there are writes to 0xa003 (check code at 0x1b8e and 0x1b9e) which occur - when you insert a coin, but I can't confirm it's related to coin counters - as the same value is written when you press COIN1 or COIN2 - -g) 'mooncrsg' - - - made by Gremlin - - there are MANY changes and additions, and I wonder if there's such a Nichibutsu set; - anyway, closest set to this one seems to be 'mooncrst' - - Gremin "logo" on 2 lines instead of Nichibutsu copyright messages (2 lines) - - additional test for IN0 bit 7 (code at 0x0174) which always adds 1 credit - - there are writes to 0xa003 (check code at 0x0158 and 0x0160) which occur - when you insert a coin, but I can't confirm it's related to coin counters - as the same value is written when you press COIN1 or COIN2 - - only English text (Dip Switch has no effect due to code at 0x2f77) - - hi-score : 3 chars, 10 seconds to enter - - same difficulty as in 'monncrst' (but stored at 0x809e and 0x809f) - - same other infos as in 'mooncrst' - - same ingame bug as in 'mooncrst' - -h) 'fantazia' - - - made by Subelectro - - closest set to this one seems to be 'mooncrsb' - - all intro texts have been changed as well as colors - - inputs : - * player 1 controls are used by player 1 - * player 2 controls are used by player 2, only in a "cocktail" cabinet - look at additional routine at 0x29e0 - - 2 coins slots with different settings (inverted coin A/B compared to 'mooncrst') : - * coin A : 1C_1C / 1C_2C / 1C_3C / "Free Play" - * coin B : 1C_1C / 2C_1C / 3C_1C / 4C_1C - - only English text (Dip Switch has no effect due to code at 0x2f53) - - hi-score : 3 chars, 60 seconds to enter - - same other infos as in 'mooncrst' - - same ingame bug as in 'mooncrst' - -i) 'eagle' - - - made by Centuri - - very similar to 'mooncrsb' with the only following differences : - * only 3 chars for hi-score instead of 11 - * all other changes are modified "strings" to be displayed - (the intro texts but copyright remains though) as well as - new GFX (I can't test the sound for now to check) - - same ingame bug as in 'mooncrst' - -j) 'eagle2' - - - made by Centuri - - very similar to 'eagle' with the only following differences : - * only 20 seconds to enter hi-score instead of 60 - * coins stuff is different (see below) - * one GFX ROM is slighlty different - - 2 coins slots, but same settings : 1C_1C / 2C_1C / 3C_1C / 4C_1C - - previous "Coin B" Dip Switch is now only tested to see if in "Freeplay" mode - - same ingame bug as in 'mooncrst' - -k) 'eagle3' - - - made by Centuri - - PRG ROMS are the same as for 'eagle' while two GFX ROMS are slighly different - (so the game is having 'mooncrst' ships and 'eagle' enemies) - - same ingame bug as in 'mooncrst' - -l) 'spctbird' - - - made by Fortrek - - very similar to 'mooncrsb' with the only following difference : - * coins stuff is different (same as in 'eagle2' - see below) - - 2 coins slots, but same settings : 1C_1C / 2C_1C / 3C_1C / 4C_1C - - previous "Coin B" Dip Switch is now only tested to see if in "Freeplay" mode - - same ingame bug as in 'mooncrst' - -m) 'smooncrs' - - - made par Gremlin (bootleg based on a Nichibutsu version we don't have ?) - - same RAM/ROM check routine as in 'mooncrs2' (so there is no screen flipped - ingame bug as in 'mooncrst'), but LOTS of new features ! - - only top of the Gremlin logo is displayed and it is also used for hi-scores - - all intro texts have been changed - - "2'ST" instead of "2'ND" and "RECORD" instead of "HI-SCORE" - - additional "PLAYER 1/2" messages when player changes - - inputs : player 1 controls are used by players 1 and 2, even in a "cocktail" - cabinet (player 2 inputs are never read due to code at 0x2b1c and 0x3313) - - 2 coins slots with different settings : - * coin A : 1C_1C / 2C_1C / 3C_1C / 4C_1C - * coin B : 1C_1C / 1C_2C / 1C_3C / "Free Play" - additional wrong (Spanish) text displayed when "Coin B" set to 1C_1C - (check additional code at 0x0fae) : - * if "Coin A" set to 4C_1C, "1 MONEDA 1 PARTIDA" on one line - * if "Coin A" set to 2C_1C, "1 MONEDA 1 PARTIDA" on one line - and "2 MONEDAS 3 PARTIDAS" on another line below - when "Coin B" set to "Free Play", "CREDIT 04" instead of "FREE PLAY" string - (even if this number of credits is decremented when you press a START button, - it is put back to 04 when the game is over for all players) - - additional "POR" display after the number of credits - - bonus life always 50000 due to code at 0x2f68 - - only English text due to code at 0x2f53 - - hi-score : 3 chars, 60 seconds to enter - - players bullet speed : 9 or 12 pixels (using previous "Language" Dip Switch) - - lower limit : 0x0f (see additional routine at 0x0007 and call from 0x3407) - - game difficulty using previous "Bonus Life" Dip Switch (code at 0x2962) - however, even with "Easy" difficulty, the game is much harder as in 'mooncrs2' - as enemies as enemies move much faster and as they shoot on some levels - - docking stage is harder has there are gaps of 2 pixels instead of 1 - - when you complete the 8 stages, "O.K." "FANTASTIC" messages on 2 lines - instead of "FAR OUT !" message on 1 line - - same ingame bug as in 'mooncrst' - - another ingame bug : when in "cocktail mode", "PLAYER 1/2" messages are - displayed BEFORE the screen is flipped (back) - - driver other bugs : - * when screen is flipped, player's bullets aren't displayed - * when screen is flipped, enemies' bullets aren't flipped - -n) 'spcdrag' - - - bootleg - - heavily based on 'smooncrs' (so there's a RAM/ROM check) but some differences though - - same intro texts as in 'mooncrs2' - - 2 coins slots with different settings : - * coin A : 1C_1C / 2C_1C / 3C_1C / 4C_1C - * coin B : 1C_2C / 1C_3C / 1C_4C / "Free Play" - additional wrong (Engrish) text displayed when "Coin B" set to 1C_2C - (check additional code at 0x0fae) : - * if "Coin A" set to 4C_1C, "1 COIN 1 PLAY " on one line - * if "Coin A" set to 2C_1C, "1 COIN 1 PLAY " on one line - and "2 COINS 3 PLAYES " (notice the spelling) on another line below - when "Coin B" set to "Free Play", "CREDIT 04" instead of "FREE PLAY" string - (even if this number of credits is decremented when you press a START button, - it is put back to 04 when the game is over for all players) - - "CAP 2" display instead of "POR" after the number of credits - - hi-score : 11 chars (even if only 10 will be displayed), 60 seconds to enter - (same as in 'mooncrs2') - - players bullet speed : 6 or 9 pixels (using previous "Language" Dip Switch) - - lower limit : 0x04 (instead of speed 9/12 and lower limit 0x0f) - - even if there's also the "Difficulty" Dip Switch, the game is a little bit easier - (enemies speed is slower and docking stage is back to 1 pixel to fit 'mooncrs2') - - when you complete the 8 stages, same "FAR OUT !" message as in 'mooncrs2' - - driver bug : even if player's bullets are displayed when screen is flipped as in - other sets, enemies' bullets are still not flipped as in 'smooncrs' - -o) 'spcdraga' - - - bootleg ? (there's a Nichibutsu logo which is displayed in the "title" screen - as well as in the hi-scores) - - very similar to 'spcdrag' with the only following (comestical) differences : - * unused routine at 0x37a8 has been "noped" - * no text after the number of credits - * all texts have been translated to Spanish - -p) 'mooncrgx' - - - bootleg on "Galaxian" hardware - - very similar to 'mooncrsb' with the only following differences : - * all unused routines have been "noped" - * settings are different (see below) - - 2 coins slots with different settings : - * coin A : 1C_1C / 2C_1C - * coin B : 1C_3C / 1C_5C - - there are writes to 0x6003 when you press COIN1 but not when you press COIN2 - - there are also writes to (unmapped) 0x6804 when you press either COIN1 or COIN2 : - * when you press COIN1, 0x00 is written once - * when you press COIN2, 0x01 is written 5 times, then 0x00 is written once - - only English text (Dip Switch has no effect due to code at 0x2f4b) - - no ingame bug due to code at 0x2f77 - - driver possible bug : while sprites are now correct when screen is flipped, - they are too shifted when screen is not flipped (again, see for example player 2 - score which misses ending '0') while bullets shall be good - as a consequence, square around letters is wrong when entering player name - for hi-score table when screen not is flipped - - Stephh's notes (based on the games Z80 code and some tests) for other games : 1) 'scramblb' and 'scramb2' @@ -3480,7 +3216,7 @@ ROM_END ROM_START( spcwarp ) // conversion of 'cosmos' (cvs.c) to Galaxian hardware - // notes: + // notes: // -came out of an unemulated games collection - may or may not be actually spcwarp but it's unique // -uses hunchbkg hardware with a different map // -the game likely calls a checksum check every 10 frames, causes game to freeze (probably because of bad ROM) diff --git a/src/mame/drivers/gatron.c b/src/mame/drivers/gatron.c index f89b3f91ec9..707bc13ce5c 100644 --- a/src/mame/drivers/gatron.c +++ b/src/mame/drivers/gatron.c @@ -7,9 +7,9 @@ Games running on this hardware: - * Poker 4-1, 1983, Game-A-Tron. - * Pull Tabs, 1983, Game-A-Tron. - * Bingo, 1983, Game-A-Tron. + * Four In One Poker, 1983, Game-A-Tron. + * Pull Tabs, 1983, Game-A-Tron. + * Bingo, 1983, Game-A-Tron. ***************************************************************************************** @@ -65,7 +65,8 @@ Identified the unknown writes as a init sequence for 1x PSG sound device. - The type/class is unknown due to almost all devices are plastic covered. + Is a SN76489/496 family device, and can't be identified accurately due to + almost all devices are plastic covered. * PCB 3: BINGO. @@ -132,10 +133,10 @@ You must to RESET (F3) the machine to initialize the NVRAM properly. NOTE: These games are intended to be for amusement only. - There is not such a payout system, so...Dont ask about it! + There is not such a payout system, so... Dont ask about it! - * Four in One Poker: + * Four In One Poker: Pressing SERVICE 1 (key 9) you enter the Test/Settings Mode. You can test inputs there, and change all the game settings. Press "DISCARD 1" (key Z) @@ -186,6 +187,30 @@ Press "LADY LUCK TICKET" (key X) to play with Lady Luck (center) Ticket. Press "BIG BAR TICKET" (key C) to play with Big Bar (right) Ticket. + A curiosity... + + The Pull Tabs flyer shows the following paytable: + + - Super Star - - Lady Luck - - Big Bar - + 3x Stars 75 3x Oranges 100 3x Bars 75 + 3x Hearts 8 3x Watermelons 25 3x Cherries 10 + 3x Cups 4 3x Horseshoes 10 3x Pears 6 + 3x Clubs 3 3x Licquors 5 3x Plums 4 + 3x Crowns 1 3x Bells 2 3x Bananas 2 + + ...but the game seems to have inverted objects importance: + + - Super Star - - Lady Luck - - Big Bar - + 3x Crowns 75 3x Bells 100 3x Bananas 75 + 3x Clubs 8 3x Licquors 25 3x Plums 10 + 3x Cups 4 3x Horseshoes 10 3x Pears 6 + 3x Hearts 3 3x Watermelons 5 3x Cherries 4 + 3x Stars 1 3x Oranges 2 3x Bars 2 + + Can't get an input or combination of them that change this logic. + Maybe the paytable is different in this set, or just the flyer doesn't + reflect the real thing. + * Bingo: @@ -244,10 +269,17 @@ DRIVER UPDATES: + [2015-10-22] + - Added siren/alarm input to Pull Tabs, and beeps/alarm input + to Four In One Poker. All these are present in the Test Mode. + However, their functions aren't clear. + - Switched the PSG to SN76489, since it's present in the Bingo PCB. + - Added technical notes and more documentation. + [2014-02-04] - Added Bingo (1983). PCB seems bootleg, but the game looks legit. - Worked from the scratch a whole set of inputs and button-lamps support for this game. - - Changed the poker41 description to Four in One Poker (as seen in the official brochure). + - Changed the poker41 description to Four In One Poker (as seen in the official brochure). - Added game and technical notes. [2008-10-14] @@ -415,7 +447,7 @@ static ADDRESS_MAP_START( gat_map, AS_PROGRAM, 8, gatron_state ) AM_RANGE(0x0000, 0x5fff) AM_ROM AM_RANGE(0x6000, 0x63ff) AM_RAM_WRITE(gat_videoram_w) AM_SHARE("videoram") AM_RANGE(0x8000, 0x87ff) AM_RAM AM_SHARE("nvram") /* battery backed RAM */ - AM_RANGE(0xa000, 0xa000) AM_DEVWRITE("snsnd", sn76496_device, write) /* PSG */ + AM_RANGE(0xa000, 0xa000) AM_DEVWRITE("snsnd", sn76489_device, write) /* PSG */ AM_RANGE(0xe000, 0xe000) AM_WRITE(output_port_0_w) /* lamps */ ADDRESS_MAP_END @@ -434,17 +466,17 @@ static INPUT_PORTS_START( poker41 ) PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_POKER_HOLD4 ) PORT_NAME("Discard 4") PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_BET ) PORT_NAME("Bet / Ante") PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_DEAL ) PORT_NAME("Deal / Hit") - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(2) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(2) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_STAND ) PORT_NAME("Free Bonus Draw / Stand") PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START1 ) PORT_NAME("Start") PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_POKER_HOLD5 ) PORT_NAME("Discard 5 / High / Double Down") PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_POKER_HOLD3 ) PORT_NAME("Discard 3") PORT_START("IN1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE3 ) PORT_NAME("Service 3 (Trigger bips/alarm in Test Mode)") PORT_CODE(KEYCODE_8) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_POKER_HOLD2 ) PORT_NAME("Discard 2") PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Service 2 (Test Mode Out / Coin Stuck)") - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* Payout? */ + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* Payout? */ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE ) PORT_NAME("Service 1 (Test/Settings)") PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) @@ -454,16 +486,16 @@ INPUT_PORTS_END static INPUT_PORTS_START( pulltabs ) PORT_START("IN0") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("Ante") PORT_CODE(KEYCODE_1) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("Ante") PORT_CODE(KEYCODE_1) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(2) /* Coin A */ + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(2) /* Coin A */ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("Big Bar Ticket") PORT_CODE(KEYCODE_C) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("Lady Luck Ticket") PORT_CODE(KEYCODE_X) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("Big Bar Ticket") PORT_CODE(KEYCODE_C) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("Lady Luck Ticket") PORT_CODE(KEYCODE_X) PORT_START("IN1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE3 ) PORT_NAME("Service 3 (Trigger siren/alarm in Test Mode)") PORT_CODE(KEYCODE_8) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_NAME("Service 2 (Test Mode Out / Coin Stuck)") PORT_CODE(KEYCODE_0) PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) @@ -478,14 +510,14 @@ static INPUT_PORTS_START( bingo ) PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("Ante") PORT_CODE(KEYCODE_1) // bet/ante PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("Change Game / High") PORT_CODE(KEYCODE_C) // change game (lucky game X-L-T-C-N-U) / change values in settings. - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(2) // coin in + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(2) // coin in PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("Change Card / Low") PORT_CODE(KEYCODE_Z) // change card / move down in settings PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("Start") PORT_CODE(KEYCODE_X) // start PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_START("IN1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE3 ) PORT_NAME("Service 3 (Trigger beeps in Test Mode)") PORT_CODE(KEYCODE_8) // beeps in test-settings mode + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE3 ) PORT_NAME("Service 3 (Trigger beeps/alarm in Test Mode)") PORT_CODE(KEYCODE_8) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_NAME("Service 2 (Test Mode Out / Coin Stuck)") PORT_CODE(KEYCODE_0) // exit test-settings mode PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) @@ -557,7 +589,7 @@ static MACHINE_CONFIG_START( gat, gatron_state ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") - MCFG_SOUND_ADD("snsnd", SN76496, MASTER_CLOCK/8 ) /* 2 MHz, guess */ + MCFG_SOUND_ADD("snsnd", SN76489, MASTER_CLOCK/8 ) // Present in Bingo PCB. Clock need to be verified. MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 2.00) MACHINE_CONFIG_END @@ -603,6 +635,6 @@ ROM_END *************************/ /* YEAR NAME PARENT MACHINE INPUT STATE INIT ROT COMPANY FULLNAME FLAGS LAYOUT */ -GAMEL( 1983, poker41, 0, gat, poker41, driver_device, 0, ROT0, "Game-A-Tron", "Four in One Poker", 0, layout_poker41 ) +GAMEL( 1983, poker41, 0, gat, poker41, driver_device, 0, ROT0, "Game-A-Tron", "Four In One Poker", 0, layout_poker41 ) GAMEL( 1983, pulltabs, 0, gat, pulltabs, driver_device, 0, ROT0, "Game-A-Tron", "Pull Tabs", 0, layout_pulltabs ) GAMEL( 1983, bingo, 0, gat, bingo, driver_device, 0, ROT0, "Game-A-Tron", "Bingo", 0, layout_bingo ) diff --git a/src/mame/drivers/gba.c b/src/mame/drivers/gba.c index b1e13241b04..7dae06fa9b7 100644 --- a/src/mame/drivers/gba.c +++ b/src/mame/drivers/gba.c @@ -21,7 +21,7 @@ #define VERBOSE_LEVEL (0) -INLINE void ATTR_PRINTF(3,4) verboselog(running_machine &machine, int n_level, const char *s_fmt, ...) +INLINE void ATTR_PRINTF(3,4) verboselog(device_t &device, int n_level, const char *s_fmt, ...) { if( VERBOSE_LEVEL >= n_level ) { @@ -30,7 +30,7 @@ INLINE void ATTR_PRINTF(3,4) verboselog(running_machine &machine, int n_level, c va_start( v, s_fmt ); vsprintf( buf, s_fmt, v ); va_end( v ); - logerror( "%08x: %s", machine.driver_data<gba_state>()->m_maincpu->pc(), buf ); + device.logerror( "%08x: %s", device.machine().driver_data<gba_state>()->m_maincpu->pc(), buf ); } } @@ -479,12 +479,12 @@ READ32_MEMBER(gba_state::gba_io_r) case 0x0000/4: if( (mem_mask) & 0x0000ffff ) { - verboselog(machine(), 2, "GBA IO Register Read: DISPCNT (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), m_DISPCNT ); + verboselog(*this, 2, "GBA IO Register Read: DISPCNT (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), m_DISPCNT ); retval |= m_DISPCNT; } if( (mem_mask) & 0xffff0000 ) { - verboselog(machine(), 2, "GBA IO Register Read: Green Swap (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, m_GRNSWAP ); + verboselog(*this, 2, "GBA IO Register Read: Green Swap (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, m_GRNSWAP ); retval |= m_GRNSWAP << 16; } break; @@ -494,229 +494,229 @@ READ32_MEMBER(gba_state::gba_io_r) case 0x0008/4: if( (mem_mask) & 0x0000ffff ) { - verboselog(machine(), 2, "GBA IO Register Read: BG0CNT (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), m_BG0CNT ); + verboselog(*this, 2, "GBA IO Register Read: BG0CNT (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), m_BG0CNT ); retval |= m_BG0CNT; } if( (mem_mask) & 0xffff0000 ) { - verboselog(machine(), 2, "GBA IO Register Read: BG1CNT (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, m_BG1CNT ); + verboselog(*this, 2, "GBA IO Register Read: BG1CNT (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, m_BG1CNT ); retval |= m_BG1CNT << 16; } break; case 0x000c/4: if( (mem_mask) & 0x0000ffff ) { - verboselog(machine(), 2, "GBA IO Register Read: BG2CNT (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), m_BG2CNT ); + verboselog(*this, 2, "GBA IO Register Read: BG2CNT (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), m_BG2CNT ); retval |= m_BG2CNT; } if( (mem_mask) & 0xffff0000 ) { - verboselog(machine(), 2, "GBA IO Register Read: BG3CNT (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, m_BG3CNT ); + verboselog(*this, 2, "GBA IO Register Read: BG3CNT (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, m_BG3CNT ); retval |= m_BG3CNT << 16; } break; case 0x0010/4: if( (mem_mask) & 0x0000ffff ) { - verboselog(machine(), 2, "GBA IO Register Read: BG0HOFS (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), 0 ); + verboselog(*this, 2, "GBA IO Register Read: BG0HOFS (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), 0 ); } if( (mem_mask) & 0xffff0000 ) { - verboselog(machine(), 2, "GBA IO Register Read: BG0VOFS (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); + verboselog(*this, 2, "GBA IO Register Read: BG0VOFS (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); } break; case 0x0014/4: if( (mem_mask) & 0x0000ffff ) { - verboselog(machine(), 2, "GBA IO Register Read: BG1HOFS (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), 0 ); + verboselog(*this, 2, "GBA IO Register Read: BG1HOFS (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), 0 ); } if( (mem_mask) & 0xffff0000 ) { - verboselog(machine(), 2, "GBA IO Register Read: BG1VOFS (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); + verboselog(*this, 2, "GBA IO Register Read: BG1VOFS (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); } break; case 0x0018/4: if( (mem_mask) & 0x0000ffff ) { - verboselog(machine(), 2, "GBA IO Register Read: BG2HOFS (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), 0 ); + verboselog(*this, 2, "GBA IO Register Read: BG2HOFS (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), 0 ); } if( (mem_mask) & 0xffff0000 ) { - verboselog(machine(), 2, "GBA IO Register Read: BG2VOFS (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); + verboselog(*this, 2, "GBA IO Register Read: BG2VOFS (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); } break; case 0x001c/4: if( (mem_mask) & 0x0000ffff ) { - verboselog(machine(), 2, "GBA IO Register Read: BG3HOFS (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), 0 ); + verboselog(*this, 2, "GBA IO Register Read: BG3HOFS (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), 0 ); } if( (mem_mask) & 0xffff0000 ) { - verboselog(machine(), 2, "GBA IO Register Read: BG3VOFS (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); + verboselog(*this, 2, "GBA IO Register Read: BG3VOFS (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); } break; case 0x0020/4: if( (mem_mask) & 0x0000ffff ) { - verboselog(machine(), 2, "GBA IO Register Read: BG2PA (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), 0 ); + verboselog(*this, 2, "GBA IO Register Read: BG2PA (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), 0 ); } if( (mem_mask) & 0xffff0000 ) { - verboselog(machine(), 2, "GBA IO Register Read: BG2PB (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); + verboselog(*this, 2, "GBA IO Register Read: BG2PB (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); } break; case 0x0024/4: if( (mem_mask) & 0x0000ffff ) { - verboselog(machine(), 2, "GBA IO Register Read: BG2PC (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), 0 ); + verboselog(*this, 2, "GBA IO Register Read: BG2PC (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), 0 ); } if( (mem_mask) & 0xffff0000 ) { - verboselog(machine(), 2, "GBA IO Register Read: BG2PD (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); + verboselog(*this, 2, "GBA IO Register Read: BG2PD (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); } break; case 0x0028/4: if( (mem_mask) & 0x0000ffff ) { - verboselog(machine(), 2, "GBA IO Register Read: BG2X_LSW (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), 0 ); + verboselog(*this, 2, "GBA IO Register Read: BG2X_LSW (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), 0 ); } if( (mem_mask) & 0xffff0000 ) { - verboselog(machine(), 2, "GBA IO Register Read: BG2X_MSW (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); + verboselog(*this, 2, "GBA IO Register Read: BG2X_MSW (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); } break; case 0x002c/4: if( (mem_mask) & 0x0000ffff ) { - verboselog(machine(), 2, "GBA IO Register Read: BG2Y_LSW (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), 0 ); + verboselog(*this, 2, "GBA IO Register Read: BG2Y_LSW (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), 0 ); } if( (mem_mask) & 0xffff0000 ) { - verboselog(machine(), 2, "GBA IO Register Read: BG2Y_MSW (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); + verboselog(*this, 2, "GBA IO Register Read: BG2Y_MSW (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); } break; case 0x0030/4: if( (mem_mask) & 0x0000ffff ) { - verboselog(machine(), 2, "GBA IO Register Read: BG3PA (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), 0 ); + verboselog(*this, 2, "GBA IO Register Read: BG3PA (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), 0 ); } if( (mem_mask) & 0xffff0000 ) { - verboselog(machine(), 2, "GBA IO Register Read: BG3PB (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); + verboselog(*this, 2, "GBA IO Register Read: BG3PB (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); } break; case 0x0034/4: if( (mem_mask) & 0x0000ffff ) { - verboselog(machine(), 2, "GBA IO Register Read: BG3PC (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), 0 ); + verboselog(*this, 2, "GBA IO Register Read: BG3PC (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), 0 ); } if( (mem_mask) & 0xffff0000 ) { - verboselog(machine(), 2, "GBA IO Register Read: BG3PD (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); + verboselog(*this, 2, "GBA IO Register Read: BG3PD (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); } break; case 0x0038/4: if( (mem_mask) & 0x0000ffff ) { - verboselog(machine(), 2, "GBA IO Register Read: BG3X_LSW (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), 0 ); + verboselog(*this, 2, "GBA IO Register Read: BG3X_LSW (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), 0 ); } if( (mem_mask) & 0xffff0000 ) { - verboselog(machine(), 2, "GBA IO Register Read: BG3X_MSW (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); + verboselog(*this, 2, "GBA IO Register Read: BG3X_MSW (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); } break; case 0x003c/4: if( (mem_mask) & 0x0000ffff ) { - verboselog(machine(), 2, "GBA IO Register Read: BG3Y_LSW (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), 0 ); + verboselog(*this, 2, "GBA IO Register Read: BG3Y_LSW (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), 0 ); } if( (mem_mask) & 0xffff0000 ) { - verboselog(machine(), 2, "GBA IO Register Read: BG3Y_MSW (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); + verboselog(*this, 2, "GBA IO Register Read: BG3Y_MSW (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); } break; case 0x0040/4: if( (mem_mask) & 0x0000ffff ) { - verboselog(machine(), 2, "GBA IO Register Read: WIN0H (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), 0 ); + verboselog(*this, 2, "GBA IO Register Read: WIN0H (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), 0 ); } if( (mem_mask) & 0xffff0000 ) { - verboselog(machine(), 2, "GBA IO Register Read: WIN1H (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); + verboselog(*this, 2, "GBA IO Register Read: WIN1H (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); } break; case 0x0044/4: if( (mem_mask) & 0x0000ffff ) { - verboselog(machine(), 2, "GBA IO Register Read: WIN0V (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), 0 ); + verboselog(*this, 2, "GBA IO Register Read: WIN0V (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), 0 ); } if( (mem_mask) & 0xffff0000 ) { - verboselog(machine(), 2, "GBA IO Register Read: WIN1V (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); + verboselog(*this, 2, "GBA IO Register Read: WIN1V (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); } break; case 0x0048/4: if( (mem_mask) & 0x0000ffff ) { - verboselog(machine(), 2, "GBA IO Register Read: WININ (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), m_WININ ); + verboselog(*this, 2, "GBA IO Register Read: WININ (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), m_WININ ); retval |= m_WININ; } if( (mem_mask) & 0xffff0000 ) { - verboselog(machine(), 2, "GBA IO Register Read: WINOUT (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, m_WINOUT ); + verboselog(*this, 2, "GBA IO Register Read: WINOUT (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, m_WINOUT ); retval |= m_WINOUT << 16; } break; case 0x004c/4: if( (mem_mask) & 0x0000ffff ) { - verboselog(machine(), 2, "GBA IO Register Read: MOSAIC (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), 0 ); + verboselog(*this, 2, "GBA IO Register Read: MOSAIC (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), 0 ); } if( (mem_mask) & 0xffff0000 ) { - verboselog(machine(), 2, "GBA IO Register Read: UNKNOWN (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); + verboselog(*this, 2, "GBA IO Register Read: UNKNOWN (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); } break; case 0x0050/4: if( (mem_mask) & 0x0000ffff ) { - verboselog(machine(), 2, "GBA IO Register Read: BLDCNT (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), m_BLDCNT ); + verboselog(*this, 2, "GBA IO Register Read: BLDCNT (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), m_BLDCNT ); retval |= m_BLDCNT; } if( (mem_mask) & 0xffff0000 ) { - verboselog(machine(), 2, "GBA IO Register Read: BLDALPHA (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, m_BLDALPHA ); + verboselog(*this, 2, "GBA IO Register Read: BLDALPHA (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, m_BLDALPHA ); retval |= m_BLDALPHA << 16; } break; case 0x0054/4: if( (mem_mask) & 0x0000ffff ) { - verboselog(machine(), 2, "GBA IO Register Read: BLDY (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), 0 ); + verboselog(*this, 2, "GBA IO Register Read: BLDY (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), 0 ); } if( (mem_mask) & 0xffff0000 ) { - verboselog(machine(), 2, "GBA IO Register Read: UNKNOWN (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); + verboselog(*this, 2, "GBA IO Register Read: UNKNOWN (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); } break; case 0x0058/4: if( (mem_mask) & 0x0000ffff ) { - verboselog(machine(), 2, "GBA IO Register Read: UNKNOWN (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), 0 ); + verboselog(*this, 2, "GBA IO Register Read: UNKNOWN (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), 0 ); } if( (mem_mask) & 0xffff0000 ) { - verboselog(machine(), 2, "GBA IO Register Read: UNKNOWN (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); + verboselog(*this, 2, "GBA IO Register Read: UNKNOWN (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); } break; case 0x005c/4: if( (mem_mask) & 0x0000ffff ) { - verboselog(machine(), 2, "GBA IO Register Read: UNKNOWN (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), 0 ); + verboselog(*this, 2, "GBA IO Register Read: UNKNOWN (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), 0 ); } if( (mem_mask) & 0xffff0000 ) { - verboselog(machine(), 2, "GBA IO Register Read: UNKNOWN (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); + verboselog(*this, 2, "GBA IO Register Read: UNKNOWN (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); } break; case 0x0060/4: @@ -747,7 +747,7 @@ READ32_MEMBER(gba_state::gba_io_r) retval = m_gbsound->sound_r(space, 0x14) | m_gbsound->sound_r(space, 0x15)<<8; if( (mem_mask) & 0xffff0000 ) { - verboselog(machine(), 2, "GBA IO Register Read: SOUNDCNT_H (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, m_SOUNDCNT_H ); + verboselog(*this, 2, "GBA IO Register Read: SOUNDCNT_H (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, m_SOUNDCNT_H ); retval |= m_SOUNDCNT_H << 16; } break; @@ -757,12 +757,12 @@ READ32_MEMBER(gba_state::gba_io_r) case 0x0088/4: if( (mem_mask) & 0x0000ffff ) { - verboselog(machine(), 2, "GBA IO Register Read: SOUNDBIAS (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), m_SOUNDBIAS ); + verboselog(*this, 2, "GBA IO Register Read: SOUNDBIAS (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), m_SOUNDBIAS ); retval |= m_SOUNDBIAS; } if( (mem_mask) & 0xffff0000 ) { - verboselog(machine(), 2, "GBA IO Register Read: UNKNOWN (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); + verboselog(*this, 2, "GBA IO Register Read: UNKNOWN (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); } break; case 0x0090/4: @@ -854,36 +854,36 @@ READ32_MEMBER(gba_state::gba_io_r) case 0x0120/4: if( (mem_mask) & 0x0000ffff ) { - verboselog(machine(), 2, "GBA IO Register Read: SIOMULTI0 (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), m_SIOMULTI0 ); + verboselog(*this, 2, "GBA IO Register Read: SIOMULTI0 (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), m_SIOMULTI0 ); retval |= m_SIOMULTI0; } if( (mem_mask) & 0xffff0000 ) { - verboselog(machine(), 2, "GBA IO Register Read: SIOMULTI1 (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, m_SIOMULTI1 ); + verboselog(*this, 2, "GBA IO Register Read: SIOMULTI1 (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, m_SIOMULTI1 ); retval |= m_SIOMULTI1 << 16; } break; case 0x0124/4: if( (mem_mask) & 0x0000ffff ) { - verboselog(machine(), 2, "GBA IO Register Read: SIOMULTI2 (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), m_SIOMULTI2 ); + verboselog(*this, 2, "GBA IO Register Read: SIOMULTI2 (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), m_SIOMULTI2 ); retval |= m_SIOMULTI2; } if( (mem_mask) & 0xffff0000 ) { - verboselog(machine(), 2, "GBA IO Register Read: SIOMULTI3 (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, m_SIOMULTI3 ); + verboselog(*this, 2, "GBA IO Register Read: SIOMULTI3 (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, m_SIOMULTI3 ); retval |= m_SIOMULTI3 << 16; } break; case 0x0128/4: if( (mem_mask) & 0x0000ffff ) { - verboselog(machine(), 2, "GBA IO Register Read: SIOCNT (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), m_SIOCNT ); + verboselog(*this, 2, "GBA IO Register Read: SIOCNT (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), m_SIOCNT ); retval |= m_SIOCNT; } if( (mem_mask) & 0xffff0000 ) { - verboselog(machine(), 2, "GBA IO Register Read: SIODATA8 (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, m_SIODATA8 ); + verboselog(*this, 2, "GBA IO Register Read: SIODATA8 (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, m_SIODATA8 ); retval |= m_SIODATA8 << 16; } break; @@ -894,65 +894,65 @@ READ32_MEMBER(gba_state::gba_io_r) } else if( (mem_mask) & 0xffff0000 ) { - verboselog(machine(), 2, "GBA IO Register Read: KEYCNT (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, m_KEYCNT ); + verboselog(*this, 2, "GBA IO Register Read: KEYCNT (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, m_KEYCNT ); retval |= m_KEYCNT << 16; } break; case 0x0134/4: if( (mem_mask) & 0x0000ffff ) { - verboselog(machine(), 2, "GBA IO Register Read: RCNT (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), m_RCNT ); + verboselog(*this, 2, "GBA IO Register Read: RCNT (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), m_RCNT ); retval |= m_RCNT; } if( (mem_mask) & 0xffff0000 ) { - verboselog(machine(), 2, "GBA IO Register Read: IR (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); + verboselog(*this, 2, "GBA IO Register Read: IR (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); } break; case 0x0140/4: if( (mem_mask) & 0x0000ffff ) { - verboselog(machine(), 2, "GBA IO Register Read: JOYCNT (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), m_JOYCNT ); + verboselog(*this, 2, "GBA IO Register Read: JOYCNT (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), m_JOYCNT ); retval |= m_JOYCNT; } if( (mem_mask) & 0xffff0000 ) { - verboselog(machine(), 2, "GBA IO Register Read: UNKNOWN (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); + verboselog(*this, 2, "GBA IO Register Read: UNKNOWN (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); } break; case 0x0150/4: if( (mem_mask) & 0x0000ffff ) { - verboselog(machine(), 2, "GBA IO Register Read: JOY_RECV_LSW (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), m_JOY_RECV & 0x0000ffff ); + verboselog(*this, 2, "GBA IO Register Read: JOY_RECV_LSW (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), m_JOY_RECV & 0x0000ffff ); retval |= m_JOY_RECV & 0x0000ffff; } if( (mem_mask) & 0xffff0000 ) { - verboselog(machine(), 2, "GBA IO Register Read: JOY_RECV_MSW (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, ( m_JOY_RECV & 0xffff0000 ) >> 16 ); + verboselog(*this, 2, "GBA IO Register Read: JOY_RECV_MSW (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, ( m_JOY_RECV & 0xffff0000 ) >> 16 ); retval |= m_JOY_RECV & 0xffff0000; } break; case 0x0154/4: if( (mem_mask) & 0x0000ffff ) { - verboselog(machine(), 2, "GBA IO Register Read: JOY_TRANS_LSW (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), m_JOY_TRANS & 0x0000ffff ); + verboselog(*this, 2, "GBA IO Register Read: JOY_TRANS_LSW (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), m_JOY_TRANS & 0x0000ffff ); retval |= m_JOY_TRANS & 0x0000ffff; } if( (mem_mask) & 0xffff0000 ) { - verboselog(machine(), 2, "GBA IO Register Read: JOY_TRANS_MSW (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, ( m_JOY_TRANS & 0xffff0000 ) >> 16 ); + verboselog(*this, 2, "GBA IO Register Read: JOY_TRANS_MSW (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, ( m_JOY_TRANS & 0xffff0000 ) >> 16 ); retval |= m_JOY_TRANS & 0xffff0000; } break; case 0x0158/4: if( (mem_mask) & 0x0000ffff ) { - verboselog(machine(), 2, "GBA IO Register Read: JOYSTAT (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), m_JOYSTAT ); + verboselog(*this, 2, "GBA IO Register Read: JOYSTAT (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), m_JOYSTAT ); retval |= m_JOYSTAT; } if( (mem_mask) & 0xffff0000 ) { - verboselog(machine(), 2, "GBA IO Register Read: UNKNOWN (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); + verboselog(*this, 2, "GBA IO Register Read: UNKNOWN (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); } break; case 0x0200/4: @@ -962,7 +962,7 @@ READ32_MEMBER(gba_state::gba_io_r) } if( (mem_mask) & 0xffff0000 ) { - verboselog(machine(), 2, "GBA IO Register Read: IF (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, m_IF ); + verboselog(*this, 2, "GBA IO Register Read: IF (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, m_IF ); } retval = m_IE | (m_IF<<16); @@ -970,30 +970,30 @@ READ32_MEMBER(gba_state::gba_io_r) case 0x0204/4: if( (mem_mask) & 0x0000ffff ) { - verboselog(machine(), 2, "GBA IO Register Read: WAITCNT (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), m_WAITCNT ); + verboselog(*this, 2, "GBA IO Register Read: WAITCNT (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), m_WAITCNT ); retval |= m_WAITCNT; } if( (mem_mask) & 0xffff0000 ) { - verboselog(machine(), 2, "GBA IO Register Read: UNKNOWN (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); + verboselog(*this, 2, "GBA IO Register Read: UNKNOWN (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); } break; case 0x0208/4: if( (mem_mask) & 0x0000ffff ) { - verboselog(machine(), 2, "GBA IO Register Read: IME (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), m_IME ); + verboselog(*this, 2, "GBA IO Register Read: IME (%08x) = %04x\n", 0x04000000 + ( offset << 2 ), m_IME ); retval |= m_IME; } if( (mem_mask) & 0xffff0000 ) { - verboselog(machine(), 2, "GBA IO Register Read: UNKNOWN (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); + verboselog(*this, 2, "GBA IO Register Read: UNKNOWN (%08x) = %04x\n", 0x04000000 + ( offset << 2 ) + 2, 0 ); } break; case 0x0300/4: retval = m_HALTCNT << 8; break; default: -// verboselog(machine(), 0, "Unknown GBA I/O register Read: %08x (%08x)\n", 0x04000000 + ( offset << 2 ), ~mem_mask ); +// verboselog(*this, 0, "Unknown GBA I/O register Read: %08x (%08x)\n", 0x04000000 + ( offset << 2 ), ~mem_mask ); break; } return retval; @@ -1006,7 +1006,7 @@ WRITE32_MEMBER(gba_state::gba_io_w) case 0x0000/4: if( (mem_mask) & 0x0000ffff ) { - verboselog(machine(), 2, "GBA IO Register Write: DISPCNT (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & 0x0000ffff, ~mem_mask ); + verboselog(*this, 2, "GBA IO Register Write: DISPCNT (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & 0x0000ffff, ~mem_mask ); m_DISPCNT = ( m_DISPCNT & ~mem_mask ) | ( data & mem_mask ); if(m_DISPCNT & (DISPCNT_WIN0_EN | DISPCNT_WIN1_EN)) { @@ -1019,7 +1019,7 @@ WRITE32_MEMBER(gba_state::gba_io_w) } if( (mem_mask) & 0xffff0000 ) { - verboselog(machine(), 2, "GBA IO Register Write: Green Swap (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & 0xffff0000 ) >> 16, ~mem_mask ); + verboselog(*this, 2, "GBA IO Register Write: Green Swap (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & 0xffff0000 ) >> 16, ~mem_mask ); m_GRNSWAP = ( m_GRNSWAP & ( ~mem_mask >> 16 ) ) | ( ( data & mem_mask ) >> 16 ); } break; @@ -1029,107 +1029,107 @@ WRITE32_MEMBER(gba_state::gba_io_w) case 0x0008/4: if( (mem_mask) & 0x0000ffff ) { - verboselog(machine(), 2, "GBA IO Register Write: BG0CNT (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & 0x0000ffff, ~mem_mask ); + verboselog(*this, 2, "GBA IO Register Write: BG0CNT (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & 0x0000ffff, ~mem_mask ); m_BG0CNT = ( m_BG0CNT & ~mem_mask ) | ( data & mem_mask ); } if( (mem_mask) & 0xffff0000 ) { - verboselog(machine(), 2, "GBA IO Register Write: BG1CNT (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & 0xffff0000 ) >> 16, ~mem_mask ); + verboselog(*this, 2, "GBA IO Register Write: BG1CNT (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & 0xffff0000 ) >> 16, ~mem_mask ); m_BG1CNT = ( m_BG1CNT & ( ~mem_mask >> 16 ) ) | ( ( data & mem_mask ) >> 16 ); } break; case 0x000c/4: if( (mem_mask) & 0x0000ffff ) { - verboselog(machine(), 2, "GBA IO Register Write: BG2CNT (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & 0x0000ffff, ~mem_mask ); + verboselog(*this, 2, "GBA IO Register Write: BG2CNT (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & 0x0000ffff, ~mem_mask ); m_BG2CNT = ( m_BG2CNT & ~mem_mask ) | ( data & mem_mask ); } if( (mem_mask) & 0xffff0000 ) { - verboselog(machine(), 2, "GBA IO Register Write: BG3CNT (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & 0xffff0000 ) >> 16, ~mem_mask ); + verboselog(*this, 2, "GBA IO Register Write: BG3CNT (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & 0xffff0000 ) >> 16, ~mem_mask ); m_BG3CNT = ( m_BG3CNT & ( ~mem_mask >> 16 ) ) | ( ( data & mem_mask ) >> 16 ); } break; case 0x0010/4: if( (mem_mask) & 0x0000ffff ) { - verboselog(machine(), 2, "GBA IO Register Write: BG0HOFS (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & 0x0000ffff, ~mem_mask ); + verboselog(*this, 2, "GBA IO Register Write: BG0HOFS (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & 0x0000ffff, ~mem_mask ); m_BG0HOFS = ( m_BG0HOFS & ~mem_mask ) | ( data & mem_mask ); } if( (mem_mask) & 0xffff0000 ) { - verboselog(machine(), 2, "GBA IO Register Write: BG0VOFS (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & 0xffff0000 ) >> 16, ~mem_mask ); + verboselog(*this, 2, "GBA IO Register Write: BG0VOFS (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & 0xffff0000 ) >> 16, ~mem_mask ); m_BG0VOFS = ( m_BG0VOFS & ( ~mem_mask >> 16 ) ) | ( ( data & mem_mask ) >> 16 ); } break; case 0x0014/4: if( (mem_mask) & 0x0000ffff ) { - verboselog(machine(), 2, "GBA IO Register Write: BG1HOFS (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & 0x0000ffff, ~mem_mask ); + verboselog(*this, 2, "GBA IO Register Write: BG1HOFS (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & 0x0000ffff, ~mem_mask ); m_BG1HOFS = ( m_BG1HOFS & ~mem_mask ) | ( data & mem_mask ); } if( (mem_mask) & 0xffff0000 ) { - verboselog(machine(), 2, "GBA IO Register Write: BG1VOFS (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & 0xffff0000 ) >> 16, ~mem_mask ); + verboselog(*this, 2, "GBA IO Register Write: BG1VOFS (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & 0xffff0000 ) >> 16, ~mem_mask ); m_BG1VOFS = ( m_BG1VOFS & ( ~mem_mask >> 16 ) ) | ( ( data & mem_mask ) >> 16 ); } break; case 0x0018/4: if( (mem_mask) & 0x0000ffff ) { - verboselog(machine(), 2, "GBA IO Register Write: BG2HOFS (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & 0x0000ffff, ~mem_mask ); + verboselog(*this, 2, "GBA IO Register Write: BG2HOFS (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & 0x0000ffff, ~mem_mask ); m_BG2HOFS = ( m_BG2HOFS & ~mem_mask ) | ( data & mem_mask ); } if( (mem_mask) & 0xffff0000 ) { - verboselog(machine(), 2, "GBA IO Register Write: BG2VOFS (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & 0xffff0000 ) >> 16, ~mem_mask ); + verboselog(*this, 2, "GBA IO Register Write: BG2VOFS (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & 0xffff0000 ) >> 16, ~mem_mask ); m_BG2VOFS = ( m_BG2VOFS & ( ~mem_mask >> 16 ) ) | ( ( data & mem_mask ) >> 16 ); } break; case 0x001c/4: if( (mem_mask) & 0x0000ffff ) { - verboselog(machine(), 2, "GBA IO Register Write: BG3HOFS (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & 0x0000ffff, ~mem_mask ); + verboselog(*this, 2, "GBA IO Register Write: BG3HOFS (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & 0x0000ffff, ~mem_mask ); m_BG3HOFS = ( m_BG3HOFS & ~mem_mask ) | ( data & mem_mask ); } if( (mem_mask) & 0xffff0000 ) { - verboselog(machine(), 2, "GBA IO Register Write: BG3VOFS (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & 0xffff0000 ) >> 16, ~mem_mask ); + verboselog(*this, 2, "GBA IO Register Write: BG3VOFS (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & 0xffff0000 ) >> 16, ~mem_mask ); m_BG3VOFS = ( m_BG3VOFS & ( ~mem_mask >> 16 ) ) | ( ( data & mem_mask ) >> 16 ); } break; case 0x0020/4: if( (mem_mask) & 0x0000ffff ) { - verboselog(machine(), 2, "GBA IO Register Write: BG2PA (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & 0x0000ffff, ~mem_mask ); + verboselog(*this, 2, "GBA IO Register Write: BG2PA (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & 0x0000ffff, ~mem_mask ); m_BG2PA = ( m_BG2PA & ~mem_mask ) | ( data & mem_mask ); } if( (mem_mask) & 0xffff0000 ) { - verboselog(machine(), 2, "GBA IO Register Write: BG2PB (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & 0xffff0000 ) >> 16, ~mem_mask ); + verboselog(*this, 2, "GBA IO Register Write: BG2PB (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & 0xffff0000 ) >> 16, ~mem_mask ); m_BG2PB = ( m_BG2PB & ( ~mem_mask >> 16 ) ) | ( ( data & mem_mask ) >> 16 ); } break; case 0x0024/4: if( (mem_mask) & 0x0000ffff ) { - verboselog(machine(), 2, "GBA IO Register Write: BG2PC (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & 0x0000ffff, ~mem_mask ); + verboselog(*this, 2, "GBA IO Register Write: BG2PC (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & 0x0000ffff, ~mem_mask ); m_BG2PC = ( m_BG2PC & ~mem_mask ) | ( data & mem_mask ); } if( (mem_mask) & 0xffff0000 ) { - verboselog(machine(), 2, "GBA IO Register Write: BG2PD (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & 0xffff0000 ) >> 16, ~mem_mask ); + verboselog(*this, 2, "GBA IO Register Write: BG2PD (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & 0xffff0000 ) >> 16, ~mem_mask ); m_BG2PD = ( m_BG2PD & ( ~mem_mask >> 16 ) ) | ( ( data & mem_mask ) >> 16 ); } break; case 0x0028/4: if( (mem_mask) & 0x0000ffff ) { - verboselog(machine(), 2, "GBA IO Register Write: BG2X_LSW (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & 0x0000ffff, ~mem_mask ); + verboselog(*this, 2, "GBA IO Register Write: BG2X_LSW (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & 0x0000ffff, ~mem_mask ); } if( (mem_mask) & 0xffff0000 ) { - verboselog(machine(), 2, "GBA IO Register Write: BG2X_MSW (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & 0xffff0000 ) >> 16, ~mem_mask ); + verboselog(*this, 2, "GBA IO Register Write: BG2X_MSW (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & 0xffff0000 ) >> 16, ~mem_mask ); } COMBINE_DATA(&m_BG2X); m_gfxBG2Changed |= 1; @@ -1137,11 +1137,11 @@ WRITE32_MEMBER(gba_state::gba_io_w) case 0x002c/4: if( (mem_mask) & 0x0000ffff ) { - verboselog(machine(), 2, "GBA IO Register Write: BG2Y_LSW (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & 0x0000ffff, ~mem_mask ); + verboselog(*this, 2, "GBA IO Register Write: BG2Y_LSW (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & 0x0000ffff, ~mem_mask ); } if( (mem_mask) & 0xffff0000 ) { - verboselog(machine(), 2, "GBA IO Register Write: BG2Y_MSW (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & 0xffff0000 ) >> 16, ~mem_mask ); + verboselog(*this, 2, "GBA IO Register Write: BG2Y_MSW (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & 0xffff0000 ) >> 16, ~mem_mask ); } COMBINE_DATA(&m_BG2Y); m_gfxBG2Changed |= 2; @@ -1149,35 +1149,35 @@ WRITE32_MEMBER(gba_state::gba_io_w) case 0x0030/4: if( (mem_mask) & 0x0000ffff ) { - verboselog(machine(), 2, "GBA IO Register Write: BG3PA (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & 0x0000ffff, ~mem_mask ); + verboselog(*this, 2, "GBA IO Register Write: BG3PA (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & 0x0000ffff, ~mem_mask ); m_BG3PA = ( m_BG3PA & ~mem_mask ) | ( data & mem_mask ); } if( (mem_mask) & 0xffff0000 ) { - verboselog(machine(), 2, "GBA IO Register Write: BG3PB (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & 0xffff0000 ) >> 16, ~mem_mask ); + verboselog(*this, 2, "GBA IO Register Write: BG3PB (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & 0xffff0000 ) >> 16, ~mem_mask ); m_BG3PB = ( m_BG3PB & ( ~mem_mask >> 16 ) ) | ( ( data & mem_mask ) >> 16 ); } break; case 0x0034/4: if( (mem_mask) & 0x0000ffff ) { - verboselog(machine(), 2, "GBA IO Register Write: BG3PC (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & 0x0000ffff, ~mem_mask ); + verboselog(*this, 2, "GBA IO Register Write: BG3PC (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & 0x0000ffff, ~mem_mask ); m_BG3PC = ( m_BG3PC & ~mem_mask ) | ( data & mem_mask ); } if( (mem_mask) & 0xffff0000 ) { - verboselog(machine(), 2, "GBA IO Register Write: BG3PD (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & 0xffff0000 ) >> 16, ~mem_mask ); + verboselog(*this, 2, "GBA IO Register Write: BG3PD (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & 0xffff0000 ) >> 16, ~mem_mask ); m_BG3PD = ( m_BG3PD & ( ~mem_mask >> 16 ) ) | ( ( data & mem_mask ) >> 16 ); } break; case 0x0038/4: if( (mem_mask) & 0x0000ffff ) { - verboselog(machine(), 2, "GBA IO Register Write: BG3X_LSW (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & 0x0000ffff, ~mem_mask ); + verboselog(*this, 2, "GBA IO Register Write: BG3X_LSW (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & 0x0000ffff, ~mem_mask ); } if( (mem_mask) & 0xffff0000 ) { - verboselog(machine(), 2, "GBA IO Register Write: BG3X_MSW (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & 0xffff0000 ) >> 16, ~mem_mask ); + verboselog(*this, 2, "GBA IO Register Write: BG3X_MSW (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & 0xffff0000 ) >> 16, ~mem_mask ); } COMBINE_DATA(&m_BG3X); m_gfxBG3Changed |= 1; @@ -1185,11 +1185,11 @@ WRITE32_MEMBER(gba_state::gba_io_w) case 0x003c/4: if( (mem_mask) & 0x0000ffff ) { - verboselog(machine(), 2, "GBA IO Register Write: BG3Y_LSW (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & 0x0000ffff, ~mem_mask ); + verboselog(*this, 2, "GBA IO Register Write: BG3Y_LSW (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & 0x0000ffff, ~mem_mask ); } if( (mem_mask) & 0xffff0000 ) { - verboselog(machine(), 2, "GBA IO Register Write: BG3Y_MSW (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & 0xffff0000 ) >> 16, ~mem_mask ); + verboselog(*this, 2, "GBA IO Register Write: BG3Y_MSW (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & 0xffff0000 ) >> 16, ~mem_mask ); } COMBINE_DATA(&m_BG3Y); m_gfxBG3Changed |= 2; @@ -1197,54 +1197,54 @@ WRITE32_MEMBER(gba_state::gba_io_w) case 0x0040/4: if( (mem_mask) & 0x0000ffff ) { - verboselog(machine(), 2, "GBA IO Register Write: WIN0H (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & 0x0000ffff, ~mem_mask ); + verboselog(*this, 2, "GBA IO Register Write: WIN0H (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & 0x0000ffff, ~mem_mask ); m_WIN0H = ( m_WIN0H & ~mem_mask ) | ( data & mem_mask ); } if( (mem_mask) & 0xffff0000 ) { - verboselog(machine(), 2, "GBA IO Register Write: WIN1H (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & 0xffff0000 ) >> 16, ~mem_mask ); + verboselog(*this, 2, "GBA IO Register Write: WIN1H (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & 0xffff0000 ) >> 16, ~mem_mask ); m_WIN1H = ( m_WIN1H & ( ~mem_mask >> 16 ) ) | ( ( data & mem_mask ) >> 16 ); } break; case 0x0044/4: if( (mem_mask) & 0x0000ffff ) { - verboselog(machine(), 2, "GBA IO Register Write: WIN0V (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & 0x0000ffff, ~mem_mask ); + verboselog(*this, 2, "GBA IO Register Write: WIN0V (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & 0x0000ffff, ~mem_mask ); m_WIN0V = ( m_WIN0V & ~mem_mask ) | ( data & mem_mask ); } if( (mem_mask) & 0xffff0000 ) { - verboselog(machine(), 2, "GBA IO Register Write: WIN1V (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & 0xffff0000 ) >> 16, ~mem_mask ); + verboselog(*this, 2, "GBA IO Register Write: WIN1V (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & 0xffff0000 ) >> 16, ~mem_mask ); m_WIN1V = ( m_WIN1V & ( ~mem_mask >> 16 ) ) | ( ( data & mem_mask ) >> 16 ); } break; case 0x0048/4: if( (mem_mask) & 0x0000ffff ) { - verboselog(machine(), 2, "GBA IO Register Write: WININ (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & 0x0000ffff, ~mem_mask ); + verboselog(*this, 2, "GBA IO Register Write: WININ (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & 0x0000ffff, ~mem_mask ); m_WININ = ( m_WININ & ~mem_mask ) | ( data & mem_mask ); } if( (mem_mask) & 0xffff0000 ) { - verboselog(machine(), 2, "GBA IO Register Write: WINOUT (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & 0xffff0000 ) >> 16, ~mem_mask ); + verboselog(*this, 2, "GBA IO Register Write: WINOUT (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & 0xffff0000 ) >> 16, ~mem_mask ); m_WINOUT = ( m_WINOUT & ( ~mem_mask >> 16 ) ) | ( ( data & mem_mask ) >> 16 ); } break; case 0x004c/4: if( (mem_mask) & 0x0000ffff ) { - verboselog(machine(), 2, "GBA IO Register Write: MOSAIC (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & 0x0000ffff, ~mem_mask ); + verboselog(*this, 2, "GBA IO Register Write: MOSAIC (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & 0x0000ffff, ~mem_mask ); m_MOSAIC = ( m_MOSAIC & ~mem_mask ) | ( data & mem_mask ); } if( (mem_mask) & 0xffff0000 ) { - verboselog(machine(), 2, "GBA IO Register Write: UNKNOWN (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & 0xffff0000 ) >> 16, ~mem_mask ); + verboselog(*this, 2, "GBA IO Register Write: UNKNOWN (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & 0xffff0000 ) >> 16, ~mem_mask ); } break; case 0x0050/4: if( (mem_mask) & 0x0000ffff ) { - verboselog(machine(), 2, "GBA IO Register Write: BLDCNT (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & 0x0000ffff, ~mem_mask ); + verboselog(*this, 2, "GBA IO Register Write: BLDCNT (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & 0x0000ffff, ~mem_mask ); m_BLDCNT = ( m_BLDCNT & ~mem_mask ) | ( data & mem_mask ); if(m_BLDCNT & BLDCNT_SFX) { @@ -1257,39 +1257,39 @@ WRITE32_MEMBER(gba_state::gba_io_w) } if( (mem_mask) & 0xffff0000 ) { - verboselog(machine(), 2, "GBA IO Register Write: BLDALPHA (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & 0xffff0000 ) >> 16, ~mem_mask ); + verboselog(*this, 2, "GBA IO Register Write: BLDALPHA (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & 0xffff0000 ) >> 16, ~mem_mask ); m_BLDALPHA = ( m_BLDALPHA & ( ~mem_mask >> 16 ) ) | ( ( data & mem_mask ) >> 16 ); } break; case 0x0054/4: if( (mem_mask) & 0x0000ffff ) { - verboselog(machine(), 2, "GBA IO Register Write: BLDY (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & 0x0000ffff, ~mem_mask ); + verboselog(*this, 2, "GBA IO Register Write: BLDY (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & 0x0000ffff, ~mem_mask ); m_BLDY = ( m_BLDY & ~mem_mask ) | ( data & mem_mask ); } if( (mem_mask) & 0xffff0000 ) { - verboselog(machine(), 2, "GBA IO Register Write: UNKNOWN (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & 0xffff0000 ) >> 16, ~mem_mask ); + verboselog(*this, 2, "GBA IO Register Write: UNKNOWN (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & 0xffff0000 ) >> 16, ~mem_mask ); } break; case 0x0058/4: if( (mem_mask) & 0x0000ffff ) { - verboselog(machine(), 2, "GBA IO Register Write: UNKNOWN (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & 0x0000ffff, ~mem_mask ); + verboselog(*this, 2, "GBA IO Register Write: UNKNOWN (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & 0x0000ffff, ~mem_mask ); } if( (mem_mask) & 0xffff0000 ) { - verboselog(machine(), 2, "GBA IO Register Write: UNKNOWN (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & 0xffff0000 ) >> 16, ~mem_mask ); + verboselog(*this, 2, "GBA IO Register Write: UNKNOWN (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & 0xffff0000 ) >> 16, ~mem_mask ); } break; case 0x005c/4: if( (mem_mask) & 0x0000ffff ) { - verboselog(machine(), 2, "GBA IO Register Write: UNKNOWN (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & 0x0000ffff, ~mem_mask ); + verboselog(*this, 2, "GBA IO Register Write: UNKNOWN (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & 0x0000ffff, ~mem_mask ); } if( (mem_mask) & 0xffff0000 ) { - verboselog(machine(), 2, "GBA IO Register Write: UNKNOWN (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & 0xffff0000 ) >> 16, ~mem_mask ); + verboselog(*this, 2, "GBA IO Register Write: UNKNOWN (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & 0xffff0000 ) >> 16, ~mem_mask ); } break; case 0x0060/4: @@ -1433,12 +1433,12 @@ WRITE32_MEMBER(gba_state::gba_io_w) case 0x0088/4: if( (mem_mask) & 0x0000ffff ) { - verboselog(machine(), 2, "GBA IO Register Write: SOUNDBIAS (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & 0x0000ffff, ~mem_mask ); + verboselog(*this, 2, "GBA IO Register Write: SOUNDBIAS (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & 0x0000ffff, ~mem_mask ); m_SOUNDBIAS = ( m_SOUNDBIAS & ~mem_mask ) | ( data & mem_mask ); } if( (mem_mask) & 0xffff0000 ) { - verboselog(machine(), 2, "GBA IO Register Write: UNKNOWN (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & 0xffff0000 ) >> 16, ~mem_mask ); + verboselog(*this, 2, "GBA IO Register Write: UNKNOWN (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & 0xffff0000 ) >> 16, ~mem_mask ); } break; case 0x0090/4: @@ -1647,31 +1647,31 @@ WRITE32_MEMBER(gba_state::gba_io_w) case 0x0120/4: if( (mem_mask) & 0x0000ffff ) { - verboselog(machine(), 2, "GBA IO Register Write: SIOMULTI0 (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & mem_mask, ~mem_mask ); + verboselog(*this, 2, "GBA IO Register Write: SIOMULTI0 (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & mem_mask, ~mem_mask ); m_SIOMULTI0 = ( m_SIOMULTI0 & ~mem_mask ) | ( data & mem_mask ); } if( (mem_mask) & 0xffff0000 ) { - verboselog(machine(), 2, "GBA IO Register Write: SIOMULTI1 (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & mem_mask ) >> 16, ~mem_mask ); + verboselog(*this, 2, "GBA IO Register Write: SIOMULTI1 (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & mem_mask ) >> 16, ~mem_mask ); m_SIOMULTI1 = ( m_SIOMULTI1 & ( ~mem_mask >> 16 ) ) | ( ( data & mem_mask ) >> 16 ); } break; case 0x0124/4: if( (mem_mask) & 0x0000ffff ) { - verboselog(machine(), 2, "GBA IO Register Write: SIOMULTI2 (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & mem_mask, ~mem_mask ); + verboselog(*this, 2, "GBA IO Register Write: SIOMULTI2 (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & mem_mask, ~mem_mask ); m_SIOMULTI2 = ( m_SIOMULTI2 & ~mem_mask ) | ( data & mem_mask ); } if( (mem_mask) & 0xffff0000 ) { - verboselog(machine(), 2, "GBA IO Register Write: SIOMULTI3 (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & mem_mask ) >> 16, ~mem_mask ); + verboselog(*this, 2, "GBA IO Register Write: SIOMULTI3 (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & mem_mask ) >> 16, ~mem_mask ); m_SIOMULTI3 = ( m_SIOMULTI3 & ( ~mem_mask >> 16 ) ) | ( ( data & mem_mask ) >> 16 ); } break; case 0x0128/4: if( (mem_mask) & 0x0000ffff ) { - verboselog(machine(), 2, "GBA IO Register Write: SIOCNT (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & mem_mask, ~mem_mask ); + verboselog(*this, 2, "GBA IO Register Write: SIOCNT (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & mem_mask, ~mem_mask ); // normal mode ? if (((m_RCNT & 0x8000) == 0) && ((data & 0x2000) == 0)) { @@ -1690,7 +1690,7 @@ WRITE32_MEMBER(gba_state::gba_io_w) } if( (mem_mask) & 0xffff0000 ) { - verboselog(machine(), 2, "GBA IO Register Write: SIODATA8 (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & mem_mask ) >> 16, ~mem_mask ); + verboselog(*this, 2, "GBA IO Register Write: SIODATA8 (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & mem_mask ) >> 16, ~mem_mask ); m_SIODATA8 = ( m_SIODATA8 & ( ~mem_mask >> 16 ) ) | ( ( data & mem_mask ) >> 16 ); } break; @@ -1698,66 +1698,66 @@ WRITE32_MEMBER(gba_state::gba_io_w) if( (mem_mask) & 0xffff0000 ) { // printf("KEYCNT = %04x\n", data>>16); - verboselog(machine(), 2, "GBA IO Register Write: KEYCNT (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & mem_mask ) >> 16, ~mem_mask ); + verboselog(*this, 2, "GBA IO Register Write: KEYCNT (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & mem_mask ) >> 16, ~mem_mask ); m_KEYCNT = ( m_KEYCNT & ( ~mem_mask >> 16 ) ) | ( ( data & mem_mask ) >> 16 ); } break; case 0x0134/4: if( (mem_mask) & 0x0000ffff ) { - verboselog(machine(), 2, "GBA IO Register Write: RCNT (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & mem_mask, ~mem_mask ); + verboselog(*this, 2, "GBA IO Register Write: RCNT (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & mem_mask, ~mem_mask ); m_RCNT = ( m_RCNT & ~mem_mask ) | ( data & mem_mask ); } if( (mem_mask) & 0xffff0000 ) { - verboselog(machine(), 2, "GBA IO Register Write: IR (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & mem_mask ) >> 16, ~mem_mask ); + verboselog(*this, 2, "GBA IO Register Write: IR (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & mem_mask ) >> 16, ~mem_mask ); m_IR = ( m_IR & ( ~mem_mask >> 16 ) ) | ( ( data & mem_mask ) >> 16 ); } break; case 0x0140/4: if( (mem_mask) & 0x0000ffff ) { - verboselog(machine(), 2, "GBA IO Register Write: JOYCNT (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & mem_mask, ~mem_mask ); + verboselog(*this, 2, "GBA IO Register Write: JOYCNT (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & mem_mask, ~mem_mask ); m_JOYCNT = ( m_JOYCNT & ~mem_mask ) | ( data & mem_mask ); } if( (mem_mask) & 0xffff0000 ) { - verboselog(machine(), 2, "GBA IO Register Write: UNKNOWN (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & mem_mask ) >> 16, ~mem_mask ); + verboselog(*this, 2, "GBA IO Register Write: UNKNOWN (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & mem_mask ) >> 16, ~mem_mask ); } break; case 0x0150/4: if( (mem_mask) & 0x0000ffff ) { - verboselog(machine(), 2, "GBA IO Register Write: JOY_RECV_LSW (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & mem_mask, ~mem_mask ); + verboselog(*this, 2, "GBA IO Register Write: JOY_RECV_LSW (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & mem_mask, ~mem_mask ); m_JOY_RECV = ( m_JOY_RECV & ~mem_mask ) | ( data & mem_mask ); } if( (mem_mask) & 0xffff0000 ) { - verboselog(machine(), 2, "GBA IO Register Write: JOY_RECV_MSW (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & mem_mask ) >> 16, ~mem_mask ); + verboselog(*this, 2, "GBA IO Register Write: JOY_RECV_MSW (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & mem_mask ) >> 16, ~mem_mask ); m_JOY_RECV = ( m_JOY_RECV & ( ~mem_mask >> 16 ) ) | ( ( data & mem_mask ) >> 16 ); } break; case 0x0154/4: if( (mem_mask) & 0x0000ffff ) { - verboselog(machine(), 2, "GBA IO Register Write: JOY_TRANS_LSW (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & mem_mask, ~mem_mask ); + verboselog(*this, 2, "GBA IO Register Write: JOY_TRANS_LSW (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & mem_mask, ~mem_mask ); m_JOY_TRANS = ( m_JOY_TRANS & ~mem_mask ) | ( data & mem_mask ); } if( (mem_mask) & 0xffff0000 ) { - verboselog(machine(), 2, "GBA IO Register Write: JOY_TRANS_MSW (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & mem_mask ) >> 16, ~mem_mask ); + verboselog(*this, 2, "GBA IO Register Write: JOY_TRANS_MSW (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & mem_mask ) >> 16, ~mem_mask ); m_JOY_TRANS = ( m_JOY_TRANS & ( ~mem_mask >> 16 ) ) | ( ( data & mem_mask ) >> 16 ); } break; case 0x0158/4: if( (mem_mask) & 0x0000ffff ) { - verboselog(machine(), 2, "GBA IO Register Write: JOYSTAT (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & mem_mask, ~mem_mask ); + verboselog(*this, 2, "GBA IO Register Write: JOYSTAT (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & mem_mask, ~mem_mask ); m_JOYSTAT = ( m_JOYSTAT & ~mem_mask ) | ( data & mem_mask ); } if( (mem_mask) & 0xffff0000 ) { - verboselog(machine(), 2, "GBA IO Register Write: UNKNOWN (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & mem_mask ) >> 16, ~mem_mask ); + verboselog(*this, 2, "GBA IO Register Write: UNKNOWN (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & mem_mask ) >> 16, ~mem_mask ); } break; case 0x0200/4: @@ -1774,7 +1774,7 @@ WRITE32_MEMBER(gba_state::gba_io_w) } if( (mem_mask) & 0xffff0000 ) { - verboselog(machine(), 2, "GBA IO Register Write: IF (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ) + 2, ( data & mem_mask ) >> 16, ~mem_mask ); + verboselog(*this, 2, "GBA IO Register Write: IF (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ) + 2, ( data & mem_mask ) >> 16, ~mem_mask ); m_IF &= ~( ( data & mem_mask ) >> 16 ); // if we still have interrupts, yank the IRQ line again @@ -1787,18 +1787,18 @@ WRITE32_MEMBER(gba_state::gba_io_w) case 0x0204/4: if( (mem_mask) & 0x0000ffff ) { - verboselog(machine(), 2, "GBA IO Register Write: WAITCNT (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & mem_mask, ~mem_mask ); + verboselog(*this, 2, "GBA IO Register Write: WAITCNT (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & mem_mask, ~mem_mask ); m_WAITCNT = ( m_WAITCNT & ~mem_mask ) | ( data & mem_mask ); } if( (mem_mask) & 0xffff0000 ) { - verboselog(machine(), 2, "GBA IO Register Write: UNKNOWN (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & mem_mask ) >> 16, ~mem_mask ); + verboselog(*this, 2, "GBA IO Register Write: UNKNOWN (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & mem_mask ) >> 16, ~mem_mask ); } break; case 0x0208/4: if( (mem_mask) & 0x0000ffff ) { - verboselog(machine(), 3, "GBA IO Register Write: IME (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & mem_mask, ~mem_mask ); + verboselog(*this, 3, "GBA IO Register Write: IME (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), data & mem_mask, ~mem_mask ); m_IME = ( m_IME & ~mem_mask ) | ( data & mem_mask ); if (m_IF) { @@ -1807,7 +1807,7 @@ WRITE32_MEMBER(gba_state::gba_io_w) } if( (mem_mask) & 0xffff0000 ) { - verboselog(machine(), 3, "GBA IO Register Write: UNKNOWN (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & mem_mask ) >> 16, ~mem_mask ); + verboselog(*this, 3, "GBA IO Register Write: UNKNOWN (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & mem_mask ) >> 16, ~mem_mask ); } break; case 0x0300/4: @@ -1815,7 +1815,7 @@ WRITE32_MEMBER(gba_state::gba_io_w) { if( (mem_mask) & 0x000000ff ) { - verboselog(machine(), 2, "GBA IO Register Write: POSTFLG (%08x) = %02x (%08x)\n", 0x04000000 + ( offset << 2 ), data & 0x000000ff, ~mem_mask ); + verboselog(*this, 2, "GBA IO Register Write: POSTFLG (%08x) = %02x (%08x)\n", 0x04000000 + ( offset << 2 ), data & 0x000000ff, ~mem_mask ); m_POSTFLG = data & 0x000000ff; } else @@ -1828,7 +1828,7 @@ WRITE32_MEMBER(gba_state::gba_io_w) } if( (mem_mask) & 0xffff0000 ) { - verboselog(machine(), 2, "GBA IO Register Write: UNKNOWN (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & 0xffff0000 ) >> 16, ~mem_mask ); + verboselog(*this, 2, "GBA IO Register Write: UNKNOWN (%08x) = %04x (%08x)\n", 0x04000000 + ( offset << 2 ), ( data & 0xffff0000 ) >> 16, ~mem_mask ); } break; default: diff --git a/src/mame/drivers/goldnpkr.c b/src/mame/drivers/goldnpkr.c index 4714aedeca0..959c82b9487 100644 --- a/src/mame/drivers/goldnpkr.c +++ b/src/mame/drivers/goldnpkr.c @@ -3483,6 +3483,70 @@ static INPUT_PORTS_START( videtron ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) INPUT_PORTS_END +static INPUT_PORTS_START( super98 ) + /* Multiplexed - 4x5bits */ + PORT_INCLUDE( bsuerte ) + + PORT_MODIFY("IN0-0") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Attendant Key") PORT_CODE(KEYCODE_0) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Supervisor Key") PORT_CODE(KEYCODE_9) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_D_UP ) // Key '3' + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_DEAL ) PORT_NAME("Deal / Settings") // Key '2' + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_POKER_CANCEL ) // Key 'N' + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + + PORT_MODIFY("IN0-1") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(3) PORT_NAME("Note In") // Key '5' + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("Payout") PORT_CODE(KEYCODE_W) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_TAKE ) // Key '4' + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_HIGH ) PORT_NAME("Big / Black") // Key 'A' + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_LOW ) PORT_NAME("Small / Red") // Key 'S' + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + + PORT_MODIFY("IN0-2") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_POKER_HOLD1 ) // Key 'Z' + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_POKER_HOLD2 ) // Key 'X' + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_POKER_HOLD3 ) // Key 'C' + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_POKER_HOLD4 ) // Key 'V' + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_POKER_HOLD5 ) // Key 'B' + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + + PORT_MODIFY("IN0-3") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Unknown IN0-3 0x01") PORT_CODE(KEYCODE_H) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Unknown IN0-3 0x02") PORT_CODE(KEYCODE_J) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Unknown IN0-3 0x04") PORT_CODE(KEYCODE_K) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_BET ) // Key 'M' + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Unknown IN0-3 0x10") PORT_CODE(KEYCODE_L) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + + PORT_MODIFY("SW1") + /* only bits 4-7 are connected here and were routed to SW1 1-4 */ + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_DIPNAME( 0x10, 0x00, "Hand Games" ) + PORT_DIPSETTING( 0x10, "2 Hand Games" ) + PORT_DIPSETTING( 0x00, "3 Hand Games" ) + PORT_DIPNAME( 0x20, 0x00, "Turbo" ) + PORT_DIPSETTING( 0x20, DEF_STR( No ) ) + PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) + PORT_DIPNAME( 0x40, 0x40, "Bonus" ) + PORT_DIPSETTING( 0x40, DEF_STR( No ) ) + PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) + PORT_DIPNAME( 0x80, 0x80, "Royal Flush" ) + PORT_DIPSETTING( 0x80, DEF_STR( No ) ) + PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) +INPUT_PORTS_END + /********************************************* * Graphics Layouts * @@ -5456,6 +5520,33 @@ ROM_START( genie ) ROM_LOAD( "n82s129.9c", 0x0000, 0x0100, BAD_DUMP CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) ROM_END +// Unknown on Blue PCB ICP-1 +// Attract works, but hang when coin. +// Need to improve the memory map... +// checking the connected CPU addressing lines. +// and guess how map the ROM 15a (vectors + a few routines) +ROM_START( geniea ) + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD( "2732.16a", 0x2000, 0x1000, CRC(c96ef87b) SHA1(a67f290d13fbe33dc7c29271be6f5ef0ec13e927) ) + ROM_LOAD( "2732.17a", 0x3000, 0x1000, CRC(dcbfc29b) SHA1(a512b4bd4ab682810d8c432cca03f4320df9928b) ) + + ROM_REGION( 0x1000, "temp", 0 ) // Only has vectors and a couple of routines. Just till know how to map it... + ROM_LOAD( "2732.15a", 0x0000, 0x1000, CRC(7137aa06) SHA1(1a2af7dfe41e54fc9c3b4e641319d1a504e84a18) ) + + ROM_REGION( 0x3000, "gfx1", 0 ) + ROM_FILL( 0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */ + ROM_LOAD( "2732.9a", 0x2000, 0x1000, BAD_DUMP CRC(ffb7bca3) SHA1(b58175c0342f963cb42a04195e296db952e071b6) ) /* chars + bitplane3 */ + + ROM_REGION( 0x1800, "gfx2", 0 ) + ROM_LOAD( "2716.4a", 0x0000, 0x0800, CRC(40c52b9d) SHA1(64145bd2aa19b584fa56022303dc595320952c24) ) /* tiles, bitplane1 */ + ROM_LOAD( "2716.6a", 0x0800, 0x0800, CRC(b0b61ffa) SHA1(d0a01027bd6acd7c72eb5bbdb37d6dd97df8aced) ) /* tiles, bitplane2 */ + ROM_COPY( "gfx1", 0x2800, 0x1000, 0x0800 ) /* cards deck gfx, bitplane3. found in the 2nd quarter of the text layer rom */ + + ROM_REGION( 0x0100, "proms", 0 ) /* using original golden poker color prom */ + ROM_LOAD( "n82s129.9c", 0x0000, 0x0100, BAD_DUMP CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) +ROM_END + + /**************************************************** Silver Game. @@ -9746,6 +9837,41 @@ ROM_START( pokersis ) ROM_END +/* + Unknown poker entitled 'Super 98 ICP-1', + running in the ICP-1 boardset. + + Program seems to fill some zeropage registers + and check for existent values and changes... + Maybe an external device is writting them. + This is NVRAM zone, so some values could be + previously harcoded. + + Also seems to expect some inputs combination entered to boot. + + To run... + 1) Start the game. + 2) Break into debugger and do a pc=cfa1 +*/ + +ROM_START( super98 ) + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD( "27c256.17a", 0x0000, 0x8000, CRC(dfa319c5) SHA1(e1b2ef40350ee1f40272604cbe33b245210de003) ) + + ROM_REGION( 0x3000, "gfx1", 0 ) + ROM_FILL( 0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */ + ROM_LOAD( "2732.9a", 0x2000, 0x1000, CRC(9a478c39) SHA1(614171fa3184f6ceb663d5650d05fac4d4025c9f) ) /* char ROM */ + + ROM_REGION( 0x3000, "gfx2", 0 ) + ROM_LOAD( "2732.4a", 0x0000, 0x1000, CRC(733b72f0) SHA1(b9255b9de24d9bd7277b18d8d1e12c7cdd3813fb) ) /* cards deck gfx, bitplane1 */ + ROM_LOAD( "2732.6a", 0x1000, 0x1000, CRC(02595bcf) SHA1(5d01baed66152cca4b7a14fdfee83f31304e3be3) ) /* cards deck gfx, bitplane2 */ + ROM_LOAD( "2732.7a", 0x2000, 0x1000, CRC(42072981) SHA1(1cfbbfe33afc6f147ce5828d96455f5aeb090cd3) ) /* cards deck gfx, bitplane3 */ + + ROM_REGION( 0x0100, "proms", 0 ) + ROM_LOAD( "bipolar_prom.bin", 0x0000, 0x0100, BAD_DUMP CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */ +ROM_END + + /********************************************* * Driver Init * *********************************************/ @@ -10294,7 +10420,8 @@ GAMEL( 1989, brasil89, 0, witchcrd, bsuerte, driver_device, 0, GAMEL( 1989, brasil89a, brasil89, witchcrd, bsuerte, driver_device, 0, ROT0, "<unknown>", "Brasil 89 (set 2)", 0, layout_goldnpkr ) GAME( 1993, brasil93, 0, witchcrd, bsuerte, driver_device, 0, ROT0, "<unknown>", "Brasil 93", 0 ) // no lamps GAME( 1991, poker91, 0, witchcrd, poker91, driver_device, 0, ROT0, "<unknown>", "Poker 91", 0 ) -GAME( 198?, genie, 0, genie, genie, driver_device, 0, ROT0, "Video Fun Games Ltd.", "Genie", 0 ) +GAME( 198?, genie, 0, genie, genie, driver_device, 0, ROT0, "Video Fun Games Ltd.", "Genie (ICP-1, set 1)", 0 ) +GAME( 198?, geniea, genie, genie, genie, driver_device, 0, ROT0, "<unknown>", "Genie (ICP-1, set 2)", MACHINE_NOT_WORKING ) GAMEL( 1983, silverga, 0, goldnpkr, goldnpkr, driver_device, 0, ROT0, "<unknown>", "Silver Game", 0, layout_goldnpkr ) GAME( 1987, caspoker, 0, goldnpkr, caspoker, driver_device, 0, ROT0, "PM / Beck Elektronik", "Casino Poker (Ver PM86LO-35-5, German)", MACHINE_IMPERFECT_COLORS ) @@ -10304,3 +10431,5 @@ GAME( 198?, pokerduc, 0, goldnpkr, goldnpkr, goldnpkr_state, icp1db, GAMEL( 198?, bchancep, 0, bchancep, goldnpkr, goldnpkr_state, bchancep, ROT0, "<unknown>", "Bonne Chance! (Golden Poker prequel HW)", MACHINE_NOT_WORKING, layout_goldnpkr ) GAME( 1987, pokermon, 0, mondial, mondial, driver_device, 0, ROT0, "<unknown>", "Mundial/Mondial (Italian/French)", 0 ) // banked selectable program GAME( 198?, pokersis, 0, bchancep, goldnpkr, driver_device, 0, ROT0, "Sisteme France", "unknown Sisteme France Poker", MACHINE_NOT_WORKING ) // fix banking (4 prgs?)... + +GAME( 1998, super98, bsuerte, witchcrd, super98, driver_device, 0, ROT0, "<unknown>", "Super 98 (3-hands, ICP-1)", MACHINE_NOT_WORKING ) // program checks zeropage registers for changes... diff --git a/src/mame/drivers/goldstar.c b/src/mame/drivers/goldstar.c index 4cf3d0b06bd..d3f739a36bc 100644 --- a/src/mame/drivers/goldstar.c +++ b/src/mame/drivers/goldstar.c @@ -9033,6 +9033,47 @@ ROM_START( cmasterf ) ROM_END +ROM_START( cmast99 ) + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD( "cm99-041-8.u81", 0x0000, 0x1000, CRC(e0872d9f) SHA1(6d8f5e09e5c9daf834d5c74434eae86e5dd7e194) ) + ROM_CONTINUE(0x4000,0x1000) + ROM_CONTINUE(0x3000,0x1000) + ROM_CONTINUE(0x7000,0x1000) + ROM_CONTINUE(0x1000,0x1000) + ROM_CONTINUE(0x6000,0x1000) /* maybe wrong */ + ROM_CONTINUE(0x2000,0x1000) + ROM_CONTINUE(0x5000,0x1000) /* maybe wrong */ + ROM_CONTINUE(0x8000,0x1000) + ROM_CONTINUE(0x9000,0x1000) /* maybe wrong */ + ROM_CONTINUE(0xa000,0x1000) /* maybe wrong */ + ROM_CONTINUE(0xb000,0x1000) /* maybe wrong */ + ROM_CONTINUE(0xc000,0x1000) /* maybe wrong */ + ROM_CONTINUE(0xd000,0x3000) /* padding that isn't visible to CPU (RAM mapped here) */ + + ROM_REGION( 0x18000, "gfx1", 0 ) + ROM_LOAD( "cm99-041-7.u16", 0x00000, 0x8000, CRC(69e2aef2) SHA1(195faec239734650dcd777d55a8da84e3a0ed50c) ) + ROM_LOAD( "cm99-041-6.u11", 0x08000, 0x8000, CRC(900f36f5) SHA1(0fd41f8c8cb2f7940b653a1fad93df2e3f28a34b) ) + ROM_LOAD( "cm99-041-5.u4", 0x10000, 0x8000, CRC(3e465e38) SHA1(847dc27e45d495cb924b3fd5ce8e68a1cb83ffc8) ) + + ROM_REGION( 0x8000, "gfx2", 0 ) + ROM_LOAD( "cm99-041-4.u15", 0x0000, 0x2000, CRC(6b870b29) SHA1(d65f24817d9d45c148cb857439b46e9e75dabfe7) ) + ROM_LOAD( "cm99-041-3.u10", 0x2000, 0x2000, CRC(8a0b205f) SHA1(3afea0464b793526bf23610cac6736a31edc7ec2) ) + ROM_LOAD( "cm99-041-2.u14", 0x4000, 0x2000, CRC(c84dba45) SHA1(ab4ac891a23d6b9a216df046d516e868c77e8a36) ) + ROM_LOAD( "cm99-041-1.u9", 0x6000, 0x2000, CRC(44046c31) SHA1(c9703ce2371cf86bc597e5fdb9c0d4dd6d91f7dc) ) + + ROM_REGION( 0x10000, "user1", 0 ) + ROM_FILL( 0x0000, 0x10000, 0xff ) // U53 (girl bitmaps) not populated + + /* proms taken from cmv4, probably wrong */ + ROM_REGION( 0x200, "proms", 0 ) + ROM_LOAD( "82s129.u84", 0x0000, 0x0100, CRC(0489b760) SHA1(78f8632b17a76335183c5c204cdec856988368b0) BAD_DUMP ) + ROM_LOAD( "82s129.u70", 0x0100, 0x0100, CRC(21eb5b19) SHA1(9b8425bdb97f11f4855c998c7792c3291fd07470) BAD_DUMP ) + + ROM_REGION( 0x100, "proms2", 0 ) + ROM_LOAD( "82s129.u46", 0x0000, 0x0100, CRC(50ec383b) SHA1(ae95b92bd3946b40134bcdc22708d5c6b0f4c23e) BAD_DUMP ) +ROM_END + + ROM_START( chryangl ) ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "8.u6", 0x0000, 0x10000, CRC(331961e4) SHA1(50c7e0e983aed1f199f238442bb8fafce1849f84) ) @@ -13275,6 +13316,7 @@ GAMEL( 1991, cmasterbv, cmaster, cm, cmasterb, cmaster_state, cmv4, GAMEL( 1991, cmasterd, cmaster, cm, cmasterb, cmaster_state, cmv4, ROT0, "Dyna", "Cherry Master I (ver.1.01, set 5)", 0, layout_cmasterb ) GAMEL( 1991, cmastere, cmaster, cm, cmasterb, cmaster_state, cmv4, ROT0, "Dyna", "Cherry Master I (ver.1.01, set 6)", 0, layout_cmasterb ) GAMEL( 1991, cmasterf, cmaster, cm, cmasterb, cmaster_state, cmv4, ROT0, "Dyna", "Cherry Master I (ver.1.01, set 7)", 0, layout_cmasterb ) +GAME( 199?, cmast99, 0, cm, cmv4, cmaster_state, cmv4, ROT0, "????", "Cherry Master '99", MACHINE_NOT_WORKING ) GAMEL( 1991, tonypok, 0, cm, tonypok, cmaster_state, tonypok, ROT0, "Corsica", "Poker Master (Tony-Poker V3.A, hack?)", 0 , layout_tonypok ) diff --git a/src/mame/drivers/gomoku.c b/src/mame/drivers/gomoku.c index 8906d78ffac..c7c86df9ca7 100644 --- a/src/mame/drivers/gomoku.c +++ b/src/mame/drivers/gomoku.c @@ -36,7 +36,7 @@ READ8_MEMBER(gomoku_state::input_port_r) res = 0; for (i = 0; i < 8; i++) - res |= ((ioport(portnames[i])->read_safe(0xff) >> offset) & 1) << i; + res |= ((read_safe(ioport(portnames[i]), 0xff) >> offset) & 1) << i; return res; } diff --git a/src/mame/drivers/gottlieb.c b/src/mame/drivers/gottlieb.c index 401417418d2..ef6232a3b0a 100644 --- a/src/mame/drivers/gottlieb.c +++ b/src/mame/drivers/gottlieb.c @@ -283,8 +283,8 @@ CUSTOM_INPUT_MEMBER(gottlieb_state::analog_delta_r) WRITE8_MEMBER(gottlieb_state::gottlieb_analog_reset_w) { /* reset the trackball counters */ - m_track[0] = ioport("TRACKX")->read_safe(0); - m_track[1] = ioport("TRACKY")->read_safe(0); + m_track[0] = read_safe(ioport("TRACKX"), 0); + m_track[1] = read_safe(ioport("TRACKY"), 0); } diff --git a/src/mame/drivers/gp32.c b/src/mame/drivers/gp32.c index 26dc298a2ff..4306da394e5 100644 --- a/src/mame/drivers/gp32.c +++ b/src/mame/drivers/gp32.c @@ -24,7 +24,7 @@ #define VERBOSE_LEVEL ( 0 ) -INLINE void ATTR_PRINTF(3,4) verboselog(running_machine &machine, int n_level, const char *s_fmt, ...) +INLINE void ATTR_PRINTF(3,4) verboselog(device_t &device, int n_level, const char *s_fmt, ...) { if (VERBOSE_LEVEL >= n_level) { @@ -33,7 +33,7 @@ INLINE void ATTR_PRINTF(3,4) verboselog(running_machine &machine, int n_level, c va_start( v, s_fmt); vsprintf( buf, s_fmt, v); va_end( v); - logerror( "%s: %s", machine.describe_context( ), buf); + device.logerror( "%s: %s", device.machine().describe_context( ), buf); } } @@ -72,7 +72,7 @@ void gp32_state::s3c240x_lcd_dma_reload() m_s3c240x_lcd.offsize = BITS( m_s3c240x_lcd_regs[7], 21, 11); m_s3c240x_lcd.pagewidth_cur = 0; m_s3c240x_lcd.pagewidth_max = BITS( m_s3c240x_lcd_regs[7], 10, 0); - verboselog( machine(), 3, "LCD - vramaddr %08X %08X offsize %08X pagewidth %08X\n", m_s3c240x_lcd.vramaddr_cur, m_s3c240x_lcd.vramaddr_max, m_s3c240x_lcd.offsize, m_s3c240x_lcd.pagewidth_max); + verboselog(*this, 3, "LCD - vramaddr %08X %08X offsize %08X pagewidth %08X\n", m_s3c240x_lcd.vramaddr_cur, m_s3c240x_lcd.vramaddr_max, m_s3c240x_lcd.offsize, m_s3c240x_lcd.pagewidth_max); } void gp32_state::s3c240x_lcd_dma_init() @@ -244,15 +244,15 @@ void gp32_state::s3c240x_lcd_render_16( ) TIMER_CALLBACK_MEMBER(gp32_state::s3c240x_lcd_timer_exp) { screen_device *screen = machine().first_screen(); - verboselog( machine(), 2, "LCD timer callback\n"); + verboselog(*this, 2, "LCD timer callback\n"); m_s3c240x_lcd.vpos = screen->vpos(); m_s3c240x_lcd.hpos = screen->hpos(); - verboselog( machine(), 3, "LCD - vpos %d hpos %d\n", m_s3c240x_lcd.vpos, m_s3c240x_lcd.hpos); + verboselog(*this, 3, "LCD - vpos %d hpos %d\n", m_s3c240x_lcd.vpos, m_s3c240x_lcd.hpos); if (m_s3c240x_lcd.vramaddr_cur >= m_s3c240x_lcd.vramaddr_max) { s3c240x_lcd_dma_reload(); } - verboselog( machine(), 3, "LCD - vramaddr %08X\n", m_s3c240x_lcd.vramaddr_cur); + verboselog(*this, 3, "LCD - vramaddr %08X\n", m_s3c240x_lcd.vramaddr_cur); while (m_s3c240x_lcd.vramaddr_cur < m_s3c240x_lcd.vramaddr_max) { switch (m_s3c240x_lcd.bppmode) @@ -262,7 +262,7 @@ TIMER_CALLBACK_MEMBER(gp32_state::s3c240x_lcd_timer_exp) case BPPMODE_TFT_04 : s3c240x_lcd_render_04(); break; case BPPMODE_TFT_08 : s3c240x_lcd_render_08(); break; case BPPMODE_TFT_16 : s3c240x_lcd_render_16(); break; - default : verboselog( machine(), 0, "s3c240x_lcd_timer_exp: bppmode %d not supported\n", m_s3c240x_lcd.bppmode); break; + default : verboselog(*this, 0, "s3c240x_lcd_timer_exp: bppmode %d not supported\n", m_s3c240x_lcd.bppmode); break; } if ((m_s3c240x_lcd.vpos == 0) && (m_s3c240x_lcd.hpos == 0)) break; } @@ -295,7 +295,7 @@ READ32_MEMBER(gp32_state::s3c240x_lcd_r) } break; } - verboselog( machine(), 9, "(LCD) %08X -> %08X (PC %08X)\n", 0x14A00000 + (offset << 2), data, space.device().safe_pc( )); + verboselog(*this, 9, "(LCD) %08X -> %08X (PC %08X)\n", 0x14A00000 + (offset << 2), data, space.device().safe_pc( )); return data; } @@ -315,20 +315,20 @@ void gp32_state::s3c240x_lcd_configure() hozval = BITS( m_s3c240x_lcd_regs[2], 18, 8); clkval = BITS( m_s3c240x_lcd_regs[0], 17, 8); hclk = s3c240x_get_hclk(MPLLCON); - verboselog( machine(), 3, "LCD - vspw %d vbpd %d lineval %d vfpd %d hspw %d hbpd %d hfpd %d hozval %d clkval %d hclk %d\n", vspw, vbpd, lineval, vfpd, hspw, hbpd, hfpd, hozval, clkval, hclk); + verboselog(*this, 3, "LCD - vspw %d vbpd %d lineval %d vfpd %d hspw %d hbpd %d hfpd %d hozval %d clkval %d hclk %d\n", vspw, vbpd, lineval, vfpd, hspw, hbpd, hfpd, hozval, clkval, hclk); vclk = (double)(hclk / ((clkval + 1) * 2)); - verboselog( machine(), 3, "LCD - vclk %f\n", vclk); + verboselog(*this, 3, "LCD - vclk %f\n", vclk); framerate = vclk / (((vspw + 1) + (vbpd + 1) + (lineval + 1) + (vfpd + 1)) * ((hspw + 1) + (hbpd + 1) + (hfpd + 1) + (hozval + 1))); - verboselog( machine(), 3, "LCD - framerate %f\n", framerate); + verboselog(*this, 3, "LCD - framerate %f\n", framerate); visarea.set(0, hozval, 0, lineval); - verboselog( machine(), 3, "LCD - visarea min_x %d min_y %d max_x %d max_y %d\n", visarea.min_x, visarea.min_y, visarea.max_x, visarea.max_y); + verboselog(*this, 3, "LCD - visarea min_x %d min_y %d max_x %d max_y %d\n", visarea.min_x, visarea.min_y, visarea.max_x, visarea.max_y); screen->configure(hozval + 1, lineval + 1, visarea, HZ_TO_ATTOSECONDS( framerate)); } void gp32_state::s3c240x_lcd_start() { screen_device *screen = machine().first_screen(); - verboselog( machine(), 1, "LCD start\n"); + verboselog(*this, 1, "LCD start\n"); s3c240x_lcd_configure(); s3c240x_lcd_dma_init(); m_s3c240x_lcd_timer->adjust( screen->time_until_pos(0, 0)); @@ -336,7 +336,7 @@ void gp32_state::s3c240x_lcd_start() void gp32_state::s3c240x_lcd_stop() { - verboselog( machine(), 1, "LCD stop\n"); + verboselog(*this, 1, "LCD stop\n"); m_s3c240x_lcd_timer->adjust( attotime::never); } @@ -355,7 +355,7 @@ void gp32_state::s3c240x_lcd_recalc() WRITE32_MEMBER(gp32_state::s3c240x_lcd_w) { UINT32 old_value = m_s3c240x_lcd_regs[offset]; - verboselog( machine(), 9, "(LCD) %08X <- %08X (PC %08X)\n", 0x14A00000 + (offset << 2), data, space.device().safe_pc( )); + verboselog(*this, 9, "(LCD) %08X <- %08X (PC %08X)\n", 0x14A00000 + (offset << 2), data, space.device().safe_pc( )); COMBINE_DATA(&m_s3c240x_lcd_regs[offset]); switch (offset) { @@ -377,17 +377,17 @@ WRITE32_MEMBER(gp32_state::s3c240x_lcd_w) READ32_MEMBER(gp32_state::s3c240x_lcd_palette_r) { UINT32 data = m_s3c240x_lcd_palette[offset]; - verboselog( machine(), 9, "(LCD) %08X -> %08X (PC %08X)\n", 0x14A00400 + (offset << 2), data, space.device().safe_pc( )); + verboselog(*this, 9, "(LCD) %08X -> %08X (PC %08X)\n", 0x14A00400 + (offset << 2), data, space.device().safe_pc( )); return data; } WRITE32_MEMBER(gp32_state::s3c240x_lcd_palette_w) { - verboselog( machine(), 9, "(LCD) %08X <- %08X (PC %08X)\n", 0x14A00400 + (offset << 2), data, space.device().safe_pc( )); + verboselog(*this, 9, "(LCD) %08X <- %08X (PC %08X)\n", 0x14A00400 + (offset << 2), data, space.device().safe_pc( )); COMBINE_DATA(&m_s3c240x_lcd_palette[offset]); if (mem_mask != 0xffffffff) { - verboselog( machine(), 0, "s3c240x_lcd_palette_w: unknown mask %08x\n", mem_mask); + verboselog(*this, 0, "s3c240x_lcd_palette_w: unknown mask %08x\n", mem_mask); } m_palette->set_pen_color( offset, s3c240x_get_color_5551( data & 0xFFFF)); } @@ -432,13 +432,13 @@ UINT32 gp32_state::s3c240x_get_pclk(int reg) READ32_MEMBER(gp32_state::s3c240x_clkpow_r) { UINT32 data = m_s3c240x_clkpow_regs[offset]; - verboselog( machine(), 9, "(CLKPOW) %08X -> %08X (PC %08X)\n", 0x14800000 + (offset << 2), data, space.device().safe_pc( )); + verboselog(*this, 9, "(CLKPOW) %08X -> %08X (PC %08X)\n", 0x14800000 + (offset << 2), data, space.device().safe_pc( )); return data; } WRITE32_MEMBER(gp32_state::s3c240x_clkpow_w) { - verboselog( machine(), 9, "(CLKPOW) %08X <- %08X (PC %08X)\n", 0x14800000 + (offset << 2), data, space.device().safe_pc( )); + verboselog(*this, 9, "(CLKPOW) %08X <- %08X (PC %08X)\n", 0x14800000 + (offset << 2), data, space.device().safe_pc( )); COMBINE_DATA(&m_s3c240x_clkpow_regs[offset]); switch (offset) { @@ -477,7 +477,7 @@ void gp32_state::s3c240x_check_pending_irq() void gp32_state::s3c240x_request_irq(UINT32 int_type) { - verboselog( machine(), 5, "request irq %d\n", int_type); + verboselog(*this, 5, "request irq %d\n", int_type); if (m_s3c240x_irq_regs[0] == 0) { m_s3c240x_irq_regs[0] |= (1 << int_type); // SRCPND @@ -496,14 +496,14 @@ void gp32_state::s3c240x_request_irq(UINT32 int_type) READ32_MEMBER(gp32_state::s3c240x_irq_r) { UINT32 data = m_s3c240x_irq_regs[offset]; - verboselog( machine(), 9, "(IRQ) %08X -> %08X (PC %08X)\n", 0x14400000 + (offset << 2), data, space.device().safe_pc( )); + verboselog(*this, 9, "(IRQ) %08X -> %08X (PC %08X)\n", 0x14400000 + (offset << 2), data, space.device().safe_pc( )); return data; } WRITE32_MEMBER(gp32_state::s3c240x_irq_w) { UINT32 old_value = m_s3c240x_irq_regs[offset]; - verboselog( machine(), 9, "(IRQ) %08X <- %08X (PC %08X)\n", 0x14400000 + (offset << 2), data, space.device().safe_pc( )); + verboselog(*this, 9, "(IRQ) %08X <- %08X (PC %08X)\n", 0x14400000 + (offset << 2), data, space.device().safe_pc( )); COMBINE_DATA(&m_s3c240x_irq_regs[offset]); switch (offset) { @@ -553,7 +553,7 @@ static const char *const timer_reg_names[] = READ32_MEMBER(gp32_state::s3c240x_pwm_r) { UINT32 data = m_s3c240x_pwm_regs[offset]; - verboselog( machine(), 9, "(PWM) %08X -> %08X (PC %08X)\n", 0x15100000 + (offset << 2), data, space.device().safe_pc( )); + verboselog(*this, 9, "(PWM) %08X -> %08X (PC %08X)\n", 0x15100000 + (offset << 2), data, space.device().safe_pc( )); return data; } @@ -566,7 +566,7 @@ void gp32_state::s3c240x_pwm_start(int timer) const UINT32 *regs = &m_s3c240x_pwm_regs[3+timer*3]; UINT32 prescaler, mux, cnt, cmp, auto_reload; double freq, hz; - verboselog( machine(), 1, "PWM %d start\n", timer); + verboselog(*this, 1, "PWM %d start\n", timer); prescaler = (m_s3c240x_pwm_regs[0] >> prescaler_shift[timer]) & 0xFF; mux = (m_s3c240x_pwm_regs[1] >> mux_shift[timer]) & 0x0F; freq = s3c240x_get_pclk(MPLLCON) / (prescaler + 1) / mux_table[mux]; @@ -582,7 +582,7 @@ void gp32_state::s3c240x_pwm_start(int timer) auto_reload = BIT( m_s3c240x_pwm_regs[2], tcon_shift[timer] + 2); } hz = freq / (cnt - cmp + 1); - verboselog( machine(), 5, "PWM %d - FCLK=%d HCLK=%d PCLK=%d prescaler=%d div=%d freq=%f cnt=%d cmp=%d auto_reload=%d hz=%f\n", timer, s3c240x_get_fclk(MPLLCON), s3c240x_get_hclk(MPLLCON), s3c240x_get_pclk(MPLLCON), prescaler, mux_table[mux], freq, cnt, cmp, auto_reload, hz); + verboselog(*this, 5, "PWM %d - FCLK=%d HCLK=%d PCLK=%d prescaler=%d div=%d freq=%f cnt=%d cmp=%d auto_reload=%d hz=%f\n", timer, s3c240x_get_fclk(MPLLCON), s3c240x_get_hclk(MPLLCON), s3c240x_get_pclk(MPLLCON), prescaler, mux_table[mux], freq, cnt, cmp, auto_reload, hz); if (auto_reload) { m_s3c240x_pwm_timer[timer]->adjust( attotime::from_hz( hz), timer, attotime::from_hz( hz)); @@ -595,7 +595,7 @@ void gp32_state::s3c240x_pwm_start(int timer) void gp32_state::s3c240x_pwm_stop(int timer) { - verboselog( machine(), 1, "PWM %d stop\n", timer); + verboselog(*this, 1, "PWM %d stop\n", timer); m_s3c240x_pwm_timer[timer]->adjust( attotime::never); } @@ -615,7 +615,7 @@ void gp32_state::s3c240x_pwm_recalc(int timer) WRITE32_MEMBER(gp32_state::s3c240x_pwm_w) { UINT32 old_value = m_s3c240x_pwm_regs[offset]; - verboselog( machine(), 9, "(PWM) %08X <- %08X (PC %08X)\n", 0x15100000 + (offset << 2), data, space.device().safe_pc( )); + verboselog(*this, 9, "(PWM) %08X <- %08X (PC %08X)\n", 0x15100000 + (offset << 2), data, space.device().safe_pc( )); COMBINE_DATA(&m_s3c240x_pwm_regs[offset]); switch (offset) { @@ -650,7 +650,7 @@ TIMER_CALLBACK_MEMBER(gp32_state::s3c240x_pwm_timer_exp) { int ch = param; static const int ch_int[] = { INT_TIMER0, INT_TIMER1, INT_TIMER2, INT_TIMER3, INT_TIMER4 }; - verboselog( machine(), 2, "PWM %d timer callback\n", ch); + verboselog(*this, 2, "PWM %d timer callback\n", ch); if (BITS( m_s3c240x_pwm_regs[1], 23, 20) == (ch + 1)) { s3c240x_dma_request_pwm(); @@ -679,7 +679,7 @@ void gp32_state::s3c240x_dma_trigger(int dma) address_space &space = m_maincpu->space( AS_PROGRAM); int dsz, inc_src, inc_dst, servmode; static const UINT32 ch_int[] = { INT_DMA0, INT_DMA1, INT_DMA2, INT_DMA3 }; - verboselog( machine(), 5, "DMA %d trigger\n", dma); + verboselog(*this, 5, "DMA %d trigger\n", dma); curr_tc = BITS( regs[3], 19, 0); curr_src = BITS( regs[4], 28, 0); curr_dst = BITS( regs[5], 28, 0); @@ -687,7 +687,7 @@ void gp32_state::s3c240x_dma_trigger(int dma) servmode = BIT( regs[2], 26); inc_src = BIT( regs[0], 29); inc_dst = BIT( regs[1], 29); - verboselog( machine(), 5, "DMA %d - curr_src %08X curr_dst %08X curr_tc %d dsz %d\n", dma, curr_src, curr_dst, curr_tc, dsz); + verboselog(*this, 5, "DMA %d - curr_src %08X curr_dst %08X curr_tc %d dsz %d\n", dma, curr_src, curr_dst, curr_tc, dsz); while (curr_tc > 0) { curr_tc--; @@ -731,7 +731,7 @@ void gp32_state::s3c240x_dma_trigger(int dma) void gp32_state::s3c240x_dma_request_iis() { UINT32 *regs = &m_s3c240x_dma_regs[2<<3]; - verboselog( machine(), 5, "s3c240x_dma_request_iis\n"); + verboselog(*this, 5, "s3c240x_dma_request_iis\n"); if ((BIT( regs[6], 1) != 0) && (BIT( regs[2], 23) != 0) && (BITS( regs[2], 25, 24) == 0)) { s3c240x_dma_trigger(2); @@ -741,7 +741,7 @@ void gp32_state::s3c240x_dma_request_iis() void gp32_state::s3c240x_dma_request_pwm() { int i; - verboselog( machine(), 5, "s3c240x_dma_request_pwm\n"); + verboselog(*this, 5, "s3c240x_dma_request_pwm\n"); for (i = 0; i < 4; i++) { if (i != 1) @@ -761,7 +761,7 @@ void gp32_state::s3c240x_dma_start(int dma) UINT32 *regs = &m_s3c240x_dma_regs[dma<<3]; UINT32 dsz, tsz, reload; int inc_src, inc_dst, _int, servmode, swhwsel, hwsrcsel; - verboselog( machine(), 1, "DMA %d start\n", dma); + verboselog(*this, 1, "DMA %d start\n", dma); addr_src = BITS( regs[0], 28, 0); addr_dst = BITS( regs[1], 28, 0); tc = BITS( regs[2], 19, 0); @@ -774,8 +774,8 @@ void gp32_state::s3c240x_dma_start(int dma) swhwsel = BIT( regs[2], 23); reload = BIT( regs[2], 22); dsz = BITS( regs[2], 21, 20); - verboselog( machine(), 5, "DMA %d - addr_src %08X inc_src %d addr_dst %08X inc_dst %d int %d tsz %d servmode %d hwsrcsel %d swhwsel %d reload %d dsz %d tc %d\n", dma, addr_src, inc_src, addr_dst, inc_dst, _int, tsz, servmode, hwsrcsel, swhwsel, reload, dsz, tc); - verboselog( machine(), 5, "DMA %d - copy %08X bytes from %08X (%s) to %08X (%s)\n", dma, tc << dsz, addr_src, inc_src ? "fix" : "inc", addr_dst, inc_dst ? "fix" : "inc"); + verboselog(*this, 5, "DMA %d - addr_src %08X inc_src %d addr_dst %08X inc_dst %d int %d tsz %d servmode %d hwsrcsel %d swhwsel %d reload %d dsz %d tc %d\n", dma, addr_src, inc_src, addr_dst, inc_dst, _int, tsz, servmode, hwsrcsel, swhwsel, reload, dsz, tc); + verboselog(*this, 5, "DMA %d - copy %08X bytes from %08X (%s) to %08X (%s)\n", dma, tc << dsz, addr_src, inc_src ? "fix" : "inc", addr_dst, inc_dst ? "fix" : "inc"); s3c240x_dma_reload(dma); if (swhwsel == 0) { @@ -785,7 +785,7 @@ void gp32_state::s3c240x_dma_start(int dma) void gp32_state::s3c240x_dma_stop(int dma) { - verboselog( machine(), 1, "DMA %d stop\n", dma); + verboselog(*this, 1, "DMA %d stop\n", dma); } void gp32_state::s3c240x_dma_recalc(int dma) @@ -803,14 +803,14 @@ void gp32_state::s3c240x_dma_recalc(int dma) READ32_MEMBER(gp32_state::s3c240x_dma_r) { UINT32 data = m_s3c240x_dma_regs[offset]; - verboselog( machine(), 9, "(DMA) %08X -> %08X (PC %08X)\n", 0x14600000 + (offset << 2), data, space.device().safe_pc( )); + verboselog(*this, 9, "(DMA) %08X -> %08X (PC %08X)\n", 0x14600000 + (offset << 2), data, space.device().safe_pc( )); return data; } WRITE32_MEMBER(gp32_state::s3c240x_dma_w) { UINT32 old_value = m_s3c240x_dma_regs[offset]; - verboselog( machine(), 9, "(DMA) %08X <- %08X (PC %08X)\n", 0x14600000 + (offset << 2), data, space.device().safe_pc( )); + verboselog(*this, 9, "(DMA) %08X <- %08X (PC %08X)\n", 0x14600000 + (offset << 2), data, space.device().safe_pc( )); COMBINE_DATA(&m_s3c240x_dma_regs[offset]); switch (offset) { @@ -880,14 +880,14 @@ WRITE32_MEMBER(gp32_state::s3c240x_dma_w) TIMER_CALLBACK_MEMBER(gp32_state::s3c240x_dma_timer_exp) { int ch = param; - verboselog( machine(), 2, "DMA %d timer callback\n", ch); + verboselog(*this, 2, "DMA %d timer callback\n", ch); } // SMARTMEDIA void gp32_state::smc_reset() { - verboselog( machine(), 5, "smc_reset\n"); + verboselog(*this, 5, "smc_reset\n"); m_smc.add_latch = 0; m_smc.chip = 0; m_smc.cmd_latch = 0; @@ -900,7 +900,7 @@ void gp32_state::smc_reset() void gp32_state::smc_init() { - verboselog( machine(), 5, "smc_init\n"); + verboselog(*this, 5, "smc_init\n"); smc_reset(); } @@ -908,28 +908,28 @@ UINT8 gp32_state::smc_read() { UINT8 data; data = m_smartmedia->data_r(); - verboselog( machine(), 5, "smc_read %08X\n", data); + verboselog(*this, 5, "smc_read %08X\n", data); return data; } void gp32_state::smc_write(UINT8 data) { - verboselog( machine(), 5, "smc_write %08X\n", data); + verboselog(*this, 5, "smc_write %08X\n", data); if ((m_smc.chip) && (!m_smc.read)) { if (m_smc.cmd_latch) { - verboselog( machine(), 5, "smartmedia_command_w %08X\n", data); + verboselog(*this, 5, "smartmedia_command_w %08X\n", data); m_smartmedia->command_w(data); } else if (m_smc.add_latch) { - verboselog( machine(), 5, "smartmedia_address_w %08X\n", data); + verboselog(*this, 5, "smartmedia_address_w %08X\n", data); m_smartmedia->address_w(data); } else { - verboselog( machine(), 5, "smartmedia_data_w %08X\n", data); + verboselog(*this, 5, "smartmedia_data_w %08X\n", data); m_smartmedia->data_w(data); } } @@ -962,7 +962,7 @@ void gp32_state::smc_update() void gp32_state::i2s_reset() { - verboselog( machine(), 5, "i2s_reset\n"); + verboselog(*this, 5, "i2s_reset\n"); m_i2s.l3d = 0; m_i2s.l3m = 0; m_i2s.l3c = 0; @@ -970,7 +970,7 @@ void gp32_state::i2s_reset() void gp32_state::i2s_init() { - verboselog( machine(), 5, "i2s_init\n"); + verboselog(*this, 5, "i2s_init\n"); i2s_reset(); } @@ -982,7 +982,7 @@ void gp32_state::i2s_write(int line, int data) { if (data != m_i2s.l3c) { - verboselog( machine(), 5, "I2S L3C %d\n", data); + verboselog(*this, 5, "I2S L3C %d\n", data); m_i2s.l3c = data; } } @@ -991,7 +991,7 @@ void gp32_state::i2s_write(int line, int data) { if (data != m_i2s.l3m) { - verboselog( machine(), 5, "I2S L3M %d\n", data); + verboselog(*this, 5, "I2S L3M %d\n", data); m_i2s.l3m = data; } } @@ -1000,7 +1000,7 @@ void gp32_state::i2s_write(int line, int data) { if (data != m_i2s.l3d) { - verboselog( machine(), 5, "I2S L3D %d\n", data); + verboselog(*this, 5, "I2S L3D %d\n", data); m_i2s.l3d = data; } } @@ -1058,14 +1058,14 @@ READ32_MEMBER(gp32_state::s3c240x_gpio_r) } break; } - verboselog( machine(), 9, "(GPIO) %08X -> %08X (PC %08X)\n", 0x15600000 + (offset << 2), data, space.device().safe_pc( )); + verboselog(*this, 9, "(GPIO) %08X -> %08X (PC %08X)\n", 0x15600000 + (offset << 2), data, space.device().safe_pc( )); return data; } WRITE32_MEMBER(gp32_state::s3c240x_gpio_w) { COMBINE_DATA(&m_s3c240x_gpio[offset]); - verboselog( machine(), 9, "(GPIO) %08X <- %08X (PC %08X)\n", 0x15600000 + (offset << 2), data, space.device().safe_pc( )); + verboselog(*this, 9, "(GPIO) %08X <- %08X (PC %08X)\n", 0x15600000 + (offset << 2), data, space.device().safe_pc( )); switch (offset) { // PBCON @@ -1125,13 +1125,13 @@ WRITE32_MEMBER(gp32_state::s3c240x_gpio_w) READ32_MEMBER(gp32_state::s3c240x_memcon_r) { UINT32 data = m_s3c240x_memcon_regs[offset]; - verboselog( machine(), 9, "(MEMCON) %08X -> %08X (PC %08X)\n", 0x14000000 + (offset << 2), data, space.device().safe_pc( )); + verboselog(*this, 9, "(MEMCON) %08X -> %08X (PC %08X)\n", 0x14000000 + (offset << 2), data, space.device().safe_pc( )); return data; } WRITE32_MEMBER(gp32_state::s3c240x_memcon_w) { - verboselog( machine(), 9, "(MEMCON) %08X <- %08X (PC %08X)\n", 0x14000000 + (offset << 2), data, space.device().safe_pc( )); + verboselog(*this, 9, "(MEMCON) %08X <- %08X (PC %08X)\n", 0x14000000 + (offset << 2), data, space.device().safe_pc( )); COMBINE_DATA(&m_s3c240x_memcon_regs[offset]); } @@ -1141,13 +1141,13 @@ WRITE32_MEMBER(gp32_state::s3c240x_memcon_w) READ32_MEMBER(gp32_state::s3c240x_usb_host_r) { UINT32 data = m_s3c240x_usb_host_regs[offset]; - verboselog( machine(), 9, "(USB H) %08X -> %08X (PC %08X)\n", 0x14200000 + (offset << 2), data, space.device().safe_pc( )); + verboselog(*this, 9, "(USB H) %08X -> %08X (PC %08X)\n", 0x14200000 + (offset << 2), data, space.device().safe_pc( )); return data; } WRITE32_MEMBER(gp32_state::s3c240x_usb_host_w) { - verboselog( machine(), 9, "(USB H) %08X <- %08X (PC %08X)\n", 0x14200000 + (offset << 2), data, space.device().safe_pc( )); + verboselog(*this, 9, "(USB H) %08X <- %08X (PC %08X)\n", 0x14200000 + (offset << 2), data, space.device().safe_pc( )); COMBINE_DATA(&m_s3c240x_usb_host_regs[offset]); } @@ -1166,13 +1166,13 @@ READ32_MEMBER(gp32_state::s3c240x_uart_0_r) } break; } - verboselog( machine(), 9, "(UART 0) %08X -> %08X (PC %08X)\n", 0x15000000 + (offset << 2), data, space.device().safe_pc( )); + verboselog(*this, 9, "(UART 0) %08X -> %08X (PC %08X)\n", 0x15000000 + (offset << 2), data, space.device().safe_pc( )); return data; } WRITE32_MEMBER(gp32_state::s3c240x_uart_0_w) { - verboselog( machine(), 9, "(UART 0) %08X <- %08X (PC %08X)\n", 0x15000000 + (offset << 2), data, space.device().safe_pc( )); + verboselog(*this, 9, "(UART 0) %08X <- %08X (PC %08X)\n", 0x15000000 + (offset << 2), data, space.device().safe_pc( )); COMBINE_DATA(&m_s3c240x_uart_0_regs[offset]); } @@ -1191,13 +1191,13 @@ READ32_MEMBER(gp32_state::s3c240x_uart_1_r) } break; } - verboselog( machine(), 9, "(UART 1) %08X -> %08X (PC %08X)\n", 0x15004000 + (offset << 2), data, space.device().safe_pc( )); + verboselog(*this, 9, "(UART 1) %08X -> %08X (PC %08X)\n", 0x15004000 + (offset << 2), data, space.device().safe_pc( )); return data; } WRITE32_MEMBER(gp32_state::s3c240x_uart_1_w) { - verboselog( machine(), 9, "(UART 1) %08X <- %08X (PC %08X)\n", 0x15004000 + (offset << 2), data, space.device().safe_pc( )); + verboselog(*this, 9, "(UART 1) %08X <- %08X (PC %08X)\n", 0x15004000 + (offset << 2), data, space.device().safe_pc( )); COMBINE_DATA(&m_s3c240x_uart_1_regs[offset]); } @@ -1207,13 +1207,13 @@ WRITE32_MEMBER(gp32_state::s3c240x_uart_1_w) READ32_MEMBER(gp32_state::s3c240x_usb_device_r) { UINT32 data = m_s3c240x_usb_device_regs[offset]; - verboselog( machine(), 9, "(USB D) %08X -> %08X (PC %08X)\n", 0x15200140 + (offset << 2), data, space.device().safe_pc( )); + verboselog(*this, 9, "(USB D) %08X -> %08X (PC %08X)\n", 0x15200140 + (offset << 2), data, space.device().safe_pc( )); return data; } WRITE32_MEMBER(gp32_state::s3c240x_usb_device_w) { - verboselog( machine(), 9, "(USB D) %08X <- %08X (PC %08X)\n", 0x15200140 + (offset << 2), data, space.device().safe_pc( )); + verboselog(*this, 9, "(USB D) %08X <- %08X (PC %08X)\n", 0x15200140 + (offset << 2), data, space.device().safe_pc( )); COMBINE_DATA(&m_s3c240x_usb_device_regs[offset]); } @@ -1223,13 +1223,13 @@ WRITE32_MEMBER(gp32_state::s3c240x_usb_device_w) READ32_MEMBER(gp32_state::s3c240x_watchdog_r) { UINT32 data = m_s3c240x_watchdog_regs[offset]; - verboselog( machine(), 9, "(WDOG) %08X -> %08X (PC %08X)\n", 0x15300000 + (offset << 2), data, space.device().safe_pc( )); + verboselog(*this, 9, "(WDOG) %08X -> %08X (PC %08X)\n", 0x15300000 + (offset << 2), data, space.device().safe_pc( )); return data; } WRITE32_MEMBER(gp32_state::s3c240x_watchdog_w) { - verboselog( machine(), 9, "(WDOG) %08X <- %08X (PC %08X)\n", 0x15300000 + (offset << 2), data, space.device().safe_pc( )); + verboselog(*this, 9, "(WDOG) %08X <- %08X (PC %08X)\n", 0x15300000 + (offset << 2), data, space.device().safe_pc( )); COMBINE_DATA(&m_s3c240x_watchdog_regs[offset]); } @@ -1239,13 +1239,13 @@ UINT8 gp32_state::eeprom_read(UINT16 address) { UINT8 data; data = m_eeprom_data[address]; - verboselog( machine(), 5, "EEPROM %04X -> %02X\n", address, data); + verboselog(*this, 5, "EEPROM %04X -> %02X\n", address, data); return data; } void gp32_state::eeprom_write(UINT16 address, UINT8 data) { - verboselog( machine(), 5, "EEPROM %04X <- %02X\n", address, data); + verboselog(*this, 5, "EEPROM %04X <- %02X\n", address, data); m_eeprom_data[address] = data; } @@ -1309,20 +1309,20 @@ void gp32_state::i2cmem_stop( ) void gp32_state::iic_start() { - verboselog( machine(), 1, "IIC start\n"); + verboselog(*this, 1, "IIC start\n"); m_s3c240x_iic.data_index = 0; m_s3c240x_iic_timer->adjust( attotime::from_msec( 1)); } void gp32_state::iic_stop() { - verboselog( machine(), 1, "IIC stop\n"); + verboselog(*this, 1, "IIC stop\n"); m_s3c240x_iic_timer->adjust( attotime::never); } void gp32_state::iic_resume() { - verboselog( machine(), 1, "IIC resume\n"); + verboselog(*this, 1, "IIC resume\n"); m_s3c240x_iic_timer->adjust( attotime::from_msec( 1)); } @@ -1338,13 +1338,13 @@ READ32_MEMBER(gp32_state::s3c240x_iic_r) } break; } - verboselog( machine(), 9, "(IIC) %08X -> %08X (PC %08X)\n", 0x15400000 + (offset << 2), data, space.device().safe_pc( )); + verboselog(*this, 9, "(IIC) %08X -> %08X (PC %08X)\n", 0x15400000 + (offset << 2), data, space.device().safe_pc( )); return data; } WRITE32_MEMBER(gp32_state::s3c240x_iic_w) { - verboselog( machine(), 9, "(IIC) %08X <- %08X (PC %08X)\n", 0x15400000 + (offset << 2), data, space.device().safe_pc( )); + verboselog(*this, 9, "(IIC) %08X <- %08X (PC %08X)\n", 0x15400000 + (offset << 2), data, space.device().safe_pc( )); COMBINE_DATA(&m_s3c240x_iic_regs[offset]); switch (offset) { @@ -1394,7 +1394,7 @@ WRITE32_MEMBER(gp32_state::s3c240x_iic_w) TIMER_CALLBACK_MEMBER(gp32_state::s3c240x_iic_timer_exp) { int enable_interrupt, mode_selection; - verboselog( machine(), 2, "IIC timer callback\n"); + verboselog(*this, 2, "IIC timer callback\n"); mode_selection = BITS( m_s3c240x_iic_regs[1], 7, 6); switch (mode_selection) { @@ -1404,12 +1404,12 @@ TIMER_CALLBACK_MEMBER(gp32_state::s3c240x_iic_timer_exp) if (m_s3c240x_iic.data_index == 0) { UINT8 data_shift = m_s3c240x_iic_regs[3] & 0xFF; - verboselog( machine(), 5, "IIC write %02X\n", data_shift); + verboselog(*this, 5, "IIC write %02X\n", data_shift); } else { UINT8 data_shift = eeprom_read(m_s3c240x_iic.address); - verboselog( machine(), 5, "IIC read %02X\n", data_shift); + verboselog(*this, 5, "IIC read %02X\n", data_shift); m_s3c240x_iic_regs[3] = (m_s3c240x_iic_regs[3] & ~0xFF) | data_shift; } m_s3c240x_iic.data_index++; @@ -1419,7 +1419,7 @@ TIMER_CALLBACK_MEMBER(gp32_state::s3c240x_iic_timer_exp) case 3 : { UINT8 data_shift = m_s3c240x_iic_regs[3] & 0xFF; - verboselog( machine(), 5, "IIC write %02X\n", data_shift); + verboselog(*this, 5, "IIC write %02X\n", data_shift); m_s3c240x_iic.data[m_s3c240x_iic.data_index++] = data_shift; if (m_s3c240x_iic.data_index == 3) { @@ -1446,19 +1446,19 @@ void gp32_state::s3c240x_iis_start() static const UINT32 codeclk_table[] = { 256, 384 }; double freq; int prescaler_enable, prescaler_control_a, prescaler_control_b, codeclk; - verboselog( machine(), 1, "IIS start\n"); + verboselog(*this, 1, "IIS start\n"); prescaler_enable = BIT( m_s3c240x_iis_regs[0], 1); prescaler_control_a = BITS( m_s3c240x_iis_regs[2], 9, 5); prescaler_control_b = BITS( m_s3c240x_iis_regs[2], 4, 0); codeclk = BIT( m_s3c240x_iis_regs[1], 2); freq = (double)(s3c240x_get_pclk(MPLLCON) / (prescaler_control_a + 1) / codeclk_table[codeclk]) * 2; // why do I have to multiply by two? - verboselog( machine(), 5, "IIS - pclk %d psc_enable %d psc_a %d psc_b %d codeclk %d freq %f\n", s3c240x_get_pclk(MPLLCON), prescaler_enable, prescaler_control_a, prescaler_control_b, codeclk_table[codeclk], freq); + verboselog(*this, 5, "IIS - pclk %d psc_enable %d psc_a %d psc_b %d codeclk %d freq %f\n", s3c240x_get_pclk(MPLLCON), prescaler_enable, prescaler_control_a, prescaler_control_b, codeclk_table[codeclk], freq); m_s3c240x_iis_timer->adjust( attotime::from_hz( freq), 0, attotime::from_hz( freq)); } void gp32_state::s3c240x_iis_stop() { - verboselog( machine(), 1, "IIS stop\n"); + verboselog(*this, 1, "IIS stop\n"); m_s3c240x_iis_timer->adjust( attotime::never); } @@ -1488,14 +1488,14 @@ READ32_MEMBER(gp32_state::s3c240x_iis_r) break; } #endif - verboselog( machine(), 9, "(IIS) %08X -> %08X (PC %08X)\n", 0x15508000 + (offset << 2), data, space.device().safe_pc( )); + verboselog(*this, 9, "(IIS) %08X -> %08X (PC %08X)\n", 0x15508000 + (offset << 2), data, space.device().safe_pc( )); return data; } WRITE32_MEMBER(gp32_state::s3c240x_iis_w) { UINT32 old_value = m_s3c240x_iis_regs[offset]; - verboselog( machine(), 9, "(IIS) %08X <- %08X (PC %08X)\n", 0x15508000 + (offset << 2), data, space.device().safe_pc( )); + verboselog(*this, 9, "(IIS) %08X <- %08X (PC %08X)\n", 0x15508000 + (offset << 2), data, space.device().safe_pc( )); COMBINE_DATA(&m_s3c240x_iis_regs[offset]); switch (offset) { @@ -1529,7 +1529,7 @@ WRITE32_MEMBER(gp32_state::s3c240x_iis_w) TIMER_CALLBACK_MEMBER(gp32_state::s3c240x_iis_timer_exp) { - verboselog( machine(), 2, "IIS timer callback\n"); + verboselog(*this, 2, "IIS timer callback\n"); s3c240x_dma_request_iis(); } @@ -1539,13 +1539,13 @@ TIMER_CALLBACK_MEMBER(gp32_state::s3c240x_iis_timer_exp) READ32_MEMBER(gp32_state::s3c240x_rtc_r) { UINT32 data = m_s3c240x_rtc_regs[offset]; - verboselog( machine(), 9, "(RTC) %08X -> %08X (PC %08X)\n", 0x15700040 + (offset << 2), data, space.device().safe_pc( )); + verboselog(*this, 9, "(RTC) %08X -> %08X (PC %08X)\n", 0x15700040 + (offset << 2), data, space.device().safe_pc( )); return data; } WRITE32_MEMBER(gp32_state::s3c240x_rtc_w) { - verboselog( machine(), 9, "(RTC) %08X <- %08X (PC %08X)\n", 0x15700040 + (offset << 2), data, space.device().safe_pc( )); + verboselog(*this, 9, "(RTC) %08X <- %08X (PC %08X)\n", 0x15700040 + (offset << 2), data, space.device().safe_pc( )); COMBINE_DATA(&m_s3c240x_rtc_regs[offset]); } @@ -1555,13 +1555,13 @@ WRITE32_MEMBER(gp32_state::s3c240x_rtc_w) READ32_MEMBER(gp32_state::s3c240x_adc_r) { UINT32 data = m_s3c240x_adc_regs[offset]; - verboselog( machine(), 9, "(ADC) %08X -> %08X (PC %08X)\n", 0x15800000 + (offset << 2), data, space.device().safe_pc( )); + verboselog(*this, 9, "(ADC) %08X -> %08X (PC %08X)\n", 0x15800000 + (offset << 2), data, space.device().safe_pc( )); return data; } WRITE32_MEMBER(gp32_state::s3c240x_adc_w) { - verboselog( machine(), 9, "(ADC) %08X <- %08X (PC %08X)\n", 0x15800000 + (offset << 2), data, space.device().safe_pc( )); + verboselog(*this, 9, "(ADC) %08X <- %08X (PC %08X)\n", 0x15800000 + (offset << 2), data, space.device().safe_pc( )); COMBINE_DATA(&m_s3c240x_adc_regs[offset]); } @@ -1571,13 +1571,13 @@ WRITE32_MEMBER(gp32_state::s3c240x_adc_w) READ32_MEMBER(gp32_state::s3c240x_spi_r) { UINT32 data = m_s3c240x_spi_regs[offset]; - verboselog( machine(), 9, "(SPI) %08X -> %08X (PC %08X)\n", 0x15900000 + (offset << 2), data, space.device().safe_pc( )); + verboselog(*this, 9, "(SPI) %08X -> %08X (PC %08X)\n", 0x15900000 + (offset << 2), data, space.device().safe_pc( )); return data; } WRITE32_MEMBER(gp32_state::s3c240x_spi_w) { - verboselog( machine(), 9, "(SPI) %08X <- %08X (PC %08X)\n", 0x15900000 + (offset << 2), data, space.device().safe_pc( )); + verboselog(*this, 9, "(SPI) %08X <- %08X (PC %08X)\n", 0x15900000 + (offset << 2), data, space.device().safe_pc( )); COMBINE_DATA(&m_s3c240x_spi_regs[offset]); } @@ -1587,13 +1587,13 @@ WRITE32_MEMBER(gp32_state::s3c240x_spi_w) READ32_MEMBER(gp32_state::s3c240x_mmc_r) { UINT32 data = m_s3c240x_mmc_regs[offset]; - verboselog( machine(), 9, "(MMC) %08X -> %08X (PC %08X)\n", 0x15A00000 + (offset << 2), data, space.device().safe_pc( )); + verboselog(*this, 9, "(MMC) %08X -> %08X (PC %08X)\n", 0x15A00000 + (offset << 2), data, space.device().safe_pc( )); return data; } WRITE32_MEMBER(gp32_state::s3c240x_mmc_w) { - verboselog( machine(), 9, "(MMC) %08X <- %08X (PC %08X)\n", 0x15A00000 + (offset << 2), data, space.device().safe_pc( )); + verboselog(*this, 9, "(MMC) %08X <- %08X (PC %08X)\n", 0x15A00000 + (offset << 2), data, space.device().safe_pc( )); COMBINE_DATA(&m_s3c240x_mmc_regs[offset]); } diff --git a/src/mame/drivers/gunpey.c b/src/mame/drivers/gunpey.c index 9c00a3b9e8d..ec8995be89e 100644 --- a/src/mame/drivers/gunpey.c +++ b/src/mame/drivers/gunpey.c @@ -334,7 +334,7 @@ UINT8 gunpey_state::draw_gfx(bitmap_ind16 &bitmap,const rectangle &cliprect,int unused = m_wram[count+6]&~0x00ff; if (unused) printf("unused bits set in word 6 - %04x\n", unused); unused = m_wram[count+7]&~0xff00; if (unused) printf("unused bits set in word 7 - %04x\n", unused); - if ((zoomwidth != sourcewidth) || (zoomheight!= zoomheight)) + if ((zoomwidth != sourcewidth) || (zoomheight != sourceheight)) { //printf("zoomed widths %02x %02x heights %02x %02x\n", sourcewidth, zoomwidth, sourceheight, zoomheight); } diff --git a/src/mame/drivers/hyperscan.c b/src/mame/drivers/hyperscan.c index 15e1bb8da72..baa1c767773 100644 --- a/src/mame/drivers/hyperscan.c +++ b/src/mame/drivers/hyperscan.c @@ -157,7 +157,7 @@ private: #if LOG_SPG290_REGISTER_ACCESS -static void log_spg290_regs(UINT8 module, UINT16 reg, UINT32 mem_mask, bool write, UINT32 data=0) +static void log_spg290_regs(device_t *device,UINT8 module, UINT16 reg, UINT32 mem_mask, bool write, UINT32 data=0) { static const char *const modules_name[] = { @@ -168,19 +168,19 @@ static void log_spg290_regs(UINT8 module, UINT16 reg, UINT32 mem_mask, bool writ }; if (module < 0x25) - logerror("SPG: %-10s", modules_name[module]); + device->logerror("SPG: %-10s", modules_name[module]); else - logerror("SPG: mod 0x%02x ", module); + device->logerror("SPG: mod 0x%02x ", module); if (!write) - logerror(" R 0x%04x", reg); + device->logerror(" R 0x%04x", reg); else - logerror(" W 0x%04x = 0x%08x", reg, data); + device->logerror(" W 0x%04x = 0x%08x", reg, data); if (mem_mask != 0xffffffffu) - logerror(" (0x%08x)\n", mem_mask); + device->logerror(" (0x%08x)\n", mem_mask); else - logerror("\n"); + device->logerror("\n"); } #endif @@ -224,7 +224,7 @@ READ32_MEMBER(hyperscan_state::spg290_regs_r) //else { if (!space.debugger_access()) - log_spg290_regs((offset >> 14) & 0xff, (offset<<2) & 0xffff, mem_mask, false); + log_spg290_regs(this,(offset >> 14) & 0xff, (offset<<2) & 0xffff, mem_mask, false); } #endif @@ -387,7 +387,7 @@ WRITE32_MEMBER(hyperscan_state::spg290_regs_w) //else { if (!space.debugger_access()) - log_spg290_regs((offset >> 14) & 0xff, (offset<<2) & 0xffff, mem_mask, true, data); + log_spg290_regs(this,(offset >> 14) & 0xff, (offset<<2) & 0xffff, mem_mask, true, data); } #endif } diff --git a/src/mame/drivers/i7000.c b/src/mame/drivers/i7000.c index a1dc4b0b24c..6938dbecc44 100644 --- a/src/mame/drivers/i7000.c +++ b/src/mame/drivers/i7000.c @@ -389,19 +389,19 @@ ROM_START( i7000 ) ROM_REGION( 0x0800, "gfx1", 0 ) ROM_LOAD( "i7000_chargen.rom", 0x0000, 0x0800, CRC(fb7383e9) SHA1(71a6561bb9ff3cbf74711fa7ab445f9b43f15626) ) - /* - The character generator ROM originally dumped had - some corrupt data that was manually fixed: - - ROM address | Originally dumped value | Manually fixed value | Comment - 0x06A2 | 0xF7 | 0xFE | This is a fix to the upper right portion of a 2x2 tile image of a big filled circle - 0x06A3 | 0xF7 | 0xFE | This is another fix to the same tile (character value: 0xD4) - - Also, characters 0x05, 0x06, 0x07 and 0x08 - as well as lowercase 'x' (0x78), uppercase 'Y' (0x59) - may contain corrupt data, but we can't be sure, - unless we find another Itautec I7000 computer and - redump it's ROMs to double-check. + /* + The character generator ROM originally dumped had + some corrupt data that was manually fixed: + + ROM address | Originally dumped value | Manually fixed value | Comment + 0x06A2 | 0xF7 | 0xFE | This is a fix to the upper right portion of a 2x2 tile image of a big filled circle + 0x06A3 | 0xF7 | 0xFE | This is another fix to the same tile (character value: 0xD4) + + Also, characters 0x05, 0x06, 0x07 and 0x08 + as well as lowercase 'x' (0x78), uppercase 'Y' (0x59) + may contain corrupt data, but we can't be sure, + unless we find another Itautec I7000 computer and + redump it's ROMs to double-check. */ ROM_REGION( 0x1000, "drive", 0 ) diff --git a/src/mame/drivers/ibmpcjr.c b/src/mame/drivers/ibmpcjr.c index 13f421bf12e..6c5fff8b633 100644 --- a/src/mame/drivers/ibmpcjr.c +++ b/src/mame/drivers/ibmpcjr.c @@ -117,6 +117,7 @@ DRIVER_INIT_MEMBER(pcjr_state, pcjr) m_pc_int_delay_timer = timer_alloc(TIMER_IRQ_DELAY); m_pcjr_watchdog = timer_alloc(TIMER_WATCHDOG); m_keyb_signal_timer = timer_alloc(TIMER_KB_SIGNAL); + membank( "bank10" )->set_base( m_ram->pointer() ); } void pcjr_state::machine_reset() diff --git a/src/mame/drivers/imds2.c b/src/mame/drivers/imds2.c index aae8a4506f7..ed05a682f77 100644 --- a/src/mame/drivers/imds2.c +++ b/src/mame/drivers/imds2.c @@ -172,7 +172,6 @@ imds2_state::imds2_state(const machine_config &mconfig, device_type type, const m_ioctimer(*this , "ioctimer"), m_iocfdc(*this , "iocfdc"), m_flop0(*this, "iocfdc:0"), - m_flop1(*this, "iocfdc:1"), m_iocpio(*this , "iocpio"), m_kbcpu(*this , "kbcpu"), m_palette(*this , "palette"), @@ -552,17 +551,6 @@ I8275_DRAW_CHARACTER_MEMBER(imds2_state::crtc_display_pixels) } } -int imds2_state::floppy_load(floppy_image_device *dev) -{ - dev->mon_w(0); - return IMAGE_INIT_PASS; -} - -void imds2_state::floppy_unload(floppy_image_device *dev) -{ - dev->mon_w(1); -} - void imds2_state::driver_start() { // Allocate 64k for IPC RAM @@ -578,11 +566,7 @@ void imds2_state::driver_start() void imds2_state::machine_start() { - // As far as I can tell from the schmatic, there's no software motor control - m_flop0->get_device()->setup_load_cb(floppy_image_device::load_cb(FUNC(imds2_state::floppy_load), this)); - m_flop0->get_device()->setup_unload_cb(floppy_image_device::unload_cb(FUNC(imds2_state::floppy_unload), this)); - m_flop1->get_device()->setup_load_cb(floppy_image_device::load_cb(FUNC(imds2_state::floppy_load), this)); - m_flop1->get_device()->setup_unload_cb(floppy_image_device::unload_cb(FUNC(imds2_state::floppy_unload), this)); + m_iocfdc->set_ready_line_connected(true); } void imds2_state::video_start() @@ -595,8 +579,6 @@ void imds2_state::machine_reset() m_iocbeep->set_frequency(IOC_BEEP_FREQ); m_ipc_control = 0x00; m_ipc_ioc_status = 0x0f; - m_flop0->get_device()->mon_w(!m_flop0->get_device()->exists()); - m_flop1->get_device()->mon_w(!m_flop1->get_device()->exists()); m_iocfdc->set_rate(500000); // The IMD images show a rate of 500kbps } @@ -830,7 +812,7 @@ static MACHINE_CONFIG_START(imds2 , imds2_state) MCFG_DEVICE_ADD("iocfdc" , I8271 , IOC_XTAL_Y1 / 2) MCFG_I8271_DRQ_CALLBACK(DEVWRITELINE("iocdma" , i8257_device , dreq1_w)) MCFG_FLOPPY_DRIVE_ADD("iocfdc:0", imds2_floppies, "8sssd", floppy_image_device::default_floppy_formats) - MCFG_FLOPPY_DRIVE_ADD("iocfdc:1", imds2_floppies, "8sssd", floppy_image_device::default_floppy_formats) + MCFG_SLOT_FIXED(true) MCFG_CPU_ADD("iocpio" , I8041 , IOC_XTAL_Y3) MCFG_CPU_IO_MAP(pio_io_map) diff --git a/src/mame/drivers/jackal.c b/src/mame/drivers/jackal.c index 0218cbb8108..58e42c5c4c1 100644 --- a/src/mame/drivers/jackal.c +++ b/src/mame/drivers/jackal.c @@ -87,7 +87,7 @@ Address Dir Data Description READ8_MEMBER(jackal_state::jackalr_rotary_r) { - return (1 << ioport(offset ? "DIAL1" : "DIAL0")->read_safe(0x00)) ^ 0xff; + return (1 << read_safe(ioport(offset ? "DIAL1" : "DIAL0"), 0x00)) ^ 0xff; } WRITE8_MEMBER(jackal_state::jackal_flipscreen_w) diff --git a/src/mame/drivers/konamigq.c b/src/mame/drivers/konamigq.c index d9591e493ae..458737b8556 100644 --- a/src/mame/drivers/konamigq.c +++ b/src/mame/drivers/konamigq.c @@ -47,7 +47,7 @@ 3- trigger 4- +5v 5- reload (see below) - + The Crypt Killer shotguns have 6 wires coming out of the gun. The wire colors and connections are.... Black - Ground; joined to CN6/7/8 pin 2 @@ -56,7 +56,7 @@ White - Trigger; joined to CN6/7/8 pin 3 Purple - Reload; joined to CN6/7/8 pin 5 Grey - Reload ground; this wire must be joined to any ground for the reload to work - + CN3 - For connection of extra controls/buttons (e.g. player 3 start etc) CN14 - For connection of additional speaker for stereo output 68000 - Clock input 8.000MHz [32/4] diff --git a/src/mame/drivers/konamim2.c b/src/mame/drivers/konamim2.c index 63c293fa1be..886eafa471a 100644 --- a/src/mame/drivers/konamim2.c +++ b/src/mame/drivers/konamim2.c @@ -191,7 +191,7 @@ Notes: #include "emu.h" #include "cdrom.h" #include "cpu/powerpc/ppc.h" - +#include "imagedev/chd_cd.h" struct CDE_DMA { @@ -1187,6 +1187,11 @@ static MACHINE_CONFIG_START( m2, konamim2_state ) MCFG_PALETTE_ADD_RRRRRGGGGGBBBBB("palette") + /*cd-rom*/ + MCFG_CDROM_ADD( "cdrom" ) + MCFG_CDROM_INTERFACE("3do_m2_cdrom") + + MCFG_SOFTWARE_LIST_ADD("cd_list","3do_m2") MACHINE_CONFIG_END diff --git a/src/mame/drivers/lindbergh.c b/src/mame/drivers/lindbergh.c index 3d94a5ea9ed..3511d246509 100644 --- a/src/mame/drivers/lindbergh.c +++ b/src/mame/drivers/lindbergh.c @@ -168,8 +168,8 @@ Sticker: 838-14673 | |SLOT | IDE40 ATX_POWER | |------------------|---------|-------------------------------| Notes: - CPU - Lindbergh RED: Intel Celeron D 335 SL8HM 2.8GHz 256k L2 cache, 533MHz FSB. - Lindbergh YELLOW: Intel Pentium 4 3.00GHz/1M/800 SL8JZ + CPU - Lindbergh RED: Intel Celeron D 335 SL8HM 2.8GHz 256k L2 cache, 533MHz FSB. + Lindbergh YELLOW: Intel Pentium 4 3.00GHz/1M/800 SL8JZ SIMM1 - Lindbergh RED: 512M DDR PC3200 Lindbergh YELLOW: 1GB DDR PC3200 82541PI - Intel Gigabit Ethernet Controller diff --git a/src/mame/drivers/m107.c b/src/mame/drivers/m107.c index d857157672b..599d1da3167 100644 --- a/src/mame/drivers/m107.c +++ b/src/mame/drivers/m107.c @@ -45,21 +45,21 @@ confirmed for m107 games as well. #define M107_TRIGGER_IRQ3 m_maincpu->set_input_line_and_vector(0, HOLD_LINE, m_upd71059c->HACK_get_base_vector()+3 ); /* Sound cpu->Main cpu interrupt */ // not used due to HOLD LINE logic #define M107_CLEAR_IRQ0 ; -#define M107_CLEAR_IRQ1 ; +#define M107_CLEAR_IRQ1 ; #define M107_CLEAR_IRQ2 ; #define M107_CLEAR_IRQ3 ; #else -#define M107_TRIGGER_IRQ0 m_upd71059c->ir0_w(1); -#define M107_TRIGGER_IRQ1 m_upd71059c->ir1_w(1); -#define M107_TRIGGER_IRQ2 m_upd71059c->ir2_w(1); -#define M107_TRIGGER_IRQ3 m_upd71059c->ir3_w(1); +#define M107_TRIGGER_IRQ0 m_upd71059c->ir0_w(1); +#define M107_TRIGGER_IRQ1 m_upd71059c->ir1_w(1); +#define M107_TRIGGER_IRQ2 m_upd71059c->ir2_w(1); +#define M107_TRIGGER_IRQ3 m_upd71059c->ir3_w(1); // not sure when these should happen, probably the source of our issues -#define M107_CLEAR_IRQ0 m_upd71059c->ir0_w(0); -#define M107_CLEAR_IRQ1 m_upd71059c->ir1_w(0); -#define M107_CLEAR_IRQ2 m_upd71059c->ir2_w(0); -#define M107_CLEAR_IRQ3 m_upd71059c->ir3_w(0); +#define M107_CLEAR_IRQ0 m_upd71059c->ir0_w(0); +#define M107_CLEAR_IRQ1 m_upd71059c->ir1_w(0); +#define M107_CLEAR_IRQ2 m_upd71059c->ir2_w(0); +#define M107_CLEAR_IRQ3 m_upd71059c->ir3_w(0); #endif diff --git a/src/mame/drivers/m72.c b/src/mame/drivers/m72.c index 4cb93f3a8d6..2fad012c24c 100644 --- a/src/mame/drivers/m72.c +++ b/src/mame/drivers/m72.c @@ -13,90 +13,90 @@ M72 - 3 board stack, 2 known variants M72-B-D (bottom) / M72-A-C (middle) / M72-ROM-C (top) - This is the original hardware used by R-type + This is the original hardware used by R-type Z80 program uploaded to RAM rather than having a ROM each of the 2 tile layers uses it's own set of ROMs. - Flip bits are with the tile num, so 0x3fff max tiles - per layer + Flip bits are with the tile num, so 0x3fff max tiles + per layer - M72-B-D (bottom) / M72-A-C (middle) / M72-C-A (top) + M72-B-D (bottom) / M72-A-C (middle) / M72-C-A (top) - This is used by all other M72 games, adds support - for an I8751 MCU and sample playback + This is used by all other M72 games, adds support + for an I8751 MCU and sample playback M81 - 2 PCB Stack - M81-A-B (top board) (seen on Dragon Breed) - CPUs, program roms etc. + M81-A-B (top board) (seen on Dragon Breed) + CPUs, program roms etc. - M81-B-B (bottom board) (seen on Dragon Breed) - supports - 8 sprite ROMS - 4 tile roms for FG layer (A0-A3) - (Jumper J3 also allows them to be used for BG) - 4 tile roms for BG layer (B0-B3) + M81-B-B (bottom board) (seen on Dragon Breed) + supports + 8 sprite ROMS + 4 tile roms for FG layer (A0-A3) + (Jumper J3 also allows them to be used for BG) + 4 tile roms for BG layer (B0-B3) - The Jumper at J3 seems to be an important difference - from M72, it allows both the FG and BG layers to - operate from a single set of ROMs. - W - use both sets of ROMs - S - use a single set of ROMs (A0-A3) + The Jumper at J3 seems to be an important difference + from M72, it allows both the FG and BG layers to + operate from a single set of ROMs. + W - use both sets of ROMs + S - use a single set of ROMs (A0-A3) - revised hardware, Z80 uses a ROM, no MCU, same video + revised hardware, Z80 uses a ROM, no MCU, same video system as M72 (some layer offsets - why?) M82 - board made for Major Title, Z80 has a rom, no MCU has an extra sprite layer, rowscroll, and a larger - tilemap. Tile data from both tile layers now comes - from a single set of ROMs, flip bits moved to 2nd - word meaning max of 0xffff tiles. + tilemap. Tile data from both tile layers now comes + from a single set of ROMs, flip bits moved to 2nd + word meaning max of 0xffff tiles. - * Some games were converted to run on this board, - leaving the extra sprite HW unused. + * Some games were converted to run on this board, + leaving the extra sprite HW unused. M84 - 2 PCB stack functionally same as M82 but without the extra sprite hw?? - - M84-A-A (bottom board) (most games) - supports - 4 program roms - 8 tile roms - 1 snd prg, 1 voice rom - CPUs and some customs etc. - - M84-D-B (bottom board) (found on lightning swords / kengo) - redesigned version of above but - for V35 CPU? (seems to lack the UPD71059C interrupt - controller which isn't needed when with the V35) - - M84-C-A (top board) (listed as for Hammering Harry) - 4 sprite roms (in a row) - 6 larger chips with detail removed - etc. - - M84-B-A (top board) (found on rytpe 2) - M84-B-B (top board) (lightning swords / kengo) - these both look very similar, if not the same - - 4 sprite roms (in a square) - various NANAO marked customs - KNA70H016(12) NANAO 0201 - KNA65005 17 NANAO 9048KS - KNA71H010(15) NANAO 0X2002 - KNA72H010(14) NANAO 0Z2001 - KNA71H009(13) NANAO 122001 - KNA70H015(11) NANAO 092002 - KNA91H014 NANAO 0Z2001V - etc. + + M84-A-A (bottom board) (most games) + supports + 4 program roms + 8 tile roms + 1 snd prg, 1 voice rom + CPUs and some customs etc. + + M84-D-B (bottom board) (found on lightning swords / kengo) + redesigned version of above but + for V35 CPU? (seems to lack the UPD71059C interrupt + controller which isn't needed when with the V35) + + M84-C-A (top board) (listed as for Hammering Harry) + 4 sprite roms (in a row) + 6 larger chips with detail removed + etc. + + M84-B-A (top board) (found on rytpe 2) + M84-B-B (top board) (lightning swords / kengo) + these both look very similar, if not the same + + 4 sprite roms (in a square) + various NANAO marked customs + KNA70H016(12) NANAO 0201 + KNA65005 17 NANAO 9048KS + KNA71H010(15) NANAO 0X2002 + KNA72H010(14) NANAO 0Z2001 + KNA71H009(13) NANAO 122001 + KNA70H015(11) NANAO 092002 + KNA91H014 NANAO 0Z2001V + etc. M85 - Pound for Pound uses this, possibly just M84 with a modified sound section? - - most Jamma inputs not connected, trackball only + - most Jamma inputs not connected, trackball only Year Board Protected? @@ -147,7 +147,7 @@ TODO: IRQ controller -------------- -The IRQ controller is a UPD71059C +The IRQ controller is a UPD71059C The initialization consists of one write to port 0x40 and multiple writes (2 or 3) to port 0x42. The first value written to 0x42 is the IRQ vector base. @@ -212,21 +212,21 @@ other supported games as well. #define M72_TRIGGER_IRQ3 m_maincpu->set_input_line_and_vector(0, HOLD_LINE, m_upd71059c->HACK_get_base_vector()+3 ); /* Sound cpu->Main cpu interrupt */ // not used due to HOLD LINE logic #define M72_CLEAR_IRQ0 ; -#define M72_CLEAR_IRQ1 ; +#define M72_CLEAR_IRQ1 ; #define M72_CLEAR_IRQ2 ; #define M72_CLEAR_IRQ3 ; #else -#define M72_TRIGGER_IRQ0 m_upd71059c->ir0_w(1); -#define M72_TRIGGER_IRQ1 m_upd71059c->ir1_w(1); -#define M72_TRIGGER_IRQ2 m_upd71059c->ir2_w(1); -#define M72_TRIGGER_IRQ3 m_upd71059c->ir3_w(1); +#define M72_TRIGGER_IRQ0 m_upd71059c->ir0_w(1); +#define M72_TRIGGER_IRQ1 m_upd71059c->ir1_w(1); +#define M72_TRIGGER_IRQ2 m_upd71059c->ir2_w(1); +#define M72_TRIGGER_IRQ3 m_upd71059c->ir3_w(1); // not sure when these should happen, probably the source of our issues -#define M72_CLEAR_IRQ0 m_upd71059c->ir0_w(0); -#define M72_CLEAR_IRQ1 m_upd71059c->ir1_w(0); -#define M72_CLEAR_IRQ2 m_upd71059c->ir2_w(0); -#define M72_CLEAR_IRQ3 m_upd71059c->ir3_w(0); +#define M72_CLEAR_IRQ0 m_upd71059c->ir0_w(0); +#define M72_CLEAR_IRQ1 m_upd71059c->ir1_w(0); +#define M72_CLEAR_IRQ2 m_upd71059c->ir2_w(0); +#define M72_CLEAR_IRQ3 m_upd71059c->ir3_w(0); #endif @@ -957,8 +957,7 @@ M72_CPU1_MEMORY( dbreedm72, 0x80000, 0x90000 ) AM_RANGE(0xd0000, 0xd3fff) AM_RAM_WRITE(videoram1_w) AM_SHARE("videoram1") \ AM_RANGE(0xd8000, 0xdbfff) AM_RAM_WRITE(videoram2_w) AM_SHARE("videoram2") \ AM_RANGE(0xffff0, 0xfffff) AM_ROM \ -ADDRESS_MAP_END \ - +ADDRESS_MAP_END /* WORKRAM */ M81_CPU1_MEMORY( xmultipl, 0x9c000 ) M81_CPU1_MEMORY( dbreed, 0x88000 ) @@ -979,8 +978,7 @@ M81_CPU1_MEMORY( hharry, 0xa0000 ) AM_RANGE(PALETTERAM2, PALETTERAM2+0xbff) AM_READWRITE(palette2_r, palette2_w) AM_SHARE("paletteram2") \ AM_RANGE(0xe0000, 0xe3fff) AM_RAM /* work RAM */ \ AM_RANGE(0xffff0, 0xfffff) AM_ROM \ -ADDRESS_MAP_END \ - +ADDRESS_MAP_END M84_CPU1_MEMORY( rtype2, 0xd0000, 0xc8000, 0xd8000 ) M84_CPU1_MEMORY( hharryu, 0xd0000, 0xa0000, 0xa8000 ) M84_CPU1_MEMORY( kengo, 0x80000, 0xa0000, 0xa8000 ) @@ -1988,7 +1986,7 @@ static MACHINE_CONFIG_DERIVED( m81_xmultipl, m81_hharry ) MCFG_VIDEO_START_OVERRIDE(m72_state,xmultipl) // different offsets MACHINE_CONFIG_END - + static MACHINE_CONFIG_DERIVED( m81_dbreed, m81_xmultipl ) MCFG_CPU_MODIFY("maincpu") MCFG_CPU_PROGRAM_MAP(dbreed_map) @@ -2049,7 +2047,7 @@ static MACHINE_CONFIG_START( cosmccop, m72_state ) MCFG_CPU_PROGRAM_MAP(kengo_map) MCFG_CPU_IO_MAP(m84_v33_portmap) //#ifndef USE_HACKED_IRQS -// MCFG_CPU_IRQ_ACKNOWLEDGE_DEVICE("upd71059c", pic8259_device, inta_cb) +// MCFG_CPU_IRQ_ACKNOWLEDGE_DEVICE("upd71059c", pic8259_device, inta_cb) //#endif MCFG_CPU_ADD("soundcpu", Z80, SOUND_CLOCK) @@ -2058,8 +2056,8 @@ static MACHINE_CONFIG_START( cosmccop, m72_state ) MCFG_CPU_PERIODIC_INT_DRIVER(m72_state, nmi_line_pulse, 128*55) /* clocked by V1? (Vigilante) */ /* IRQs are generated by main Z80 and YM2151 */ -// MCFG_PIC8259_ADD( "upd71059c", INPUTLINE("maincpu", 0), VCC, NULL) - +// MCFG_PIC8259_ADD( "upd71059c", INPUTLINE("maincpu", 0), VCC, NULL) + MCFG_MACHINE_START_OVERRIDE(m72_state,kengo) MCFG_MACHINE_RESET_OVERRIDE(m72_state,kengo) @@ -2085,7 +2083,7 @@ MACHINE_CONFIG_END /****************************************** M82 ***********************************************/ -/* Major Title uses +/* Major Title uses M82-A-A as the top board M82-B-A and as the bottom board @@ -2123,7 +2121,7 @@ static MACHINE_CONFIG_START( m82, m72_state ) MACHINE_CONFIG_END -/* Pound for Pound uses +/* Pound for Pound uses M85-A-B / M85-B */ @@ -2143,7 +2141,7 @@ static MACHINE_CONFIG_START( poundfor, m72_state ) /* IRQs are generated by main Z80 and YM2151 */ MCFG_PIC8259_ADD( "upd71059c", INPUTLINE("maincpu", 0), VCC, NULL) - + /* video hardware */ MCFG_GFXDECODE_ADD("gfxdecode", "palette", rtype2) MCFG_PALETTE_ADD("palette", 512) @@ -3474,7 +3472,7 @@ ROM_START( rtype2j ) ROM_REGION( 0x0200, "proms", 0 ) /* located on M84-B-A */ ROM_LOAD( "rt2_b-4n-.bin", 0x0000, 0x0100, CRC(b460c438) SHA1(00e20cf754b6fd5138ee4d2f6ec28dff9e292fe6) ) - ROM_LOAD( "rt2_b-4p-.bin", 0x0100, 0x0100, CRC(a4f2c4bc) SHA1(f13b0a4b52dcc6704063b676f09d83dcba170133) ) + ROM_LOAD( "rt2_b-4p-.bin", 0x0100, 0x0100, CRC(a4f2c4bc) SHA1(f13b0a4b52dcc6704063b676f09d83dcba170133) ) ROM_END ROM_START( rtype2jc ) @@ -3677,7 +3675,7 @@ ROM_START( kengoa ) ROM_REGION( 0x0200, "proms", 0 ) /* located on M84-B-B */ ROM_LOAD( "KEN_B-4N-.IC23", 0x0000, 0x0100, CRC(b460c438) SHA1(00e20cf754b6fd5138ee4d2f6ec28dff9e292fe6) ) - ROM_LOAD( "KEN_B-4P-.IC24", 0x0100, 0x0100, CRC(526f10ca) SHA1(e0ecd4db0720a4a37489e4d725843a2fbf266ebf) ) // differs from rtype 2 / ninja spirit + ROM_LOAD( "KEN_B-4P-.IC24", 0x0100, 0x0100, CRC(526f10ca) SHA1(e0ecd4db0720a4a37489e4d725843a2fbf266ebf) ) // differs from rtype 2 / ninja spirit ROM_END diff --git a/src/mame/drivers/m92.c b/src/mame/drivers/m92.c index 7ac6630ef16..6f06921f32b 100644 --- a/src/mame/drivers/m92.c +++ b/src/mame/drivers/m92.c @@ -223,21 +223,21 @@ psoldier dip locations still need verification. #define M92_TRIGGER_IRQ3 m_maincpu->set_input_line_and_vector(0, HOLD_LINE, m_upd71059c->HACK_get_base_vector()+3 ); /* Sound cpu->Main cpu interrupt */ // not used due to HOLD LINE logic #define M92_CLEAR_IRQ0 ; -#define M92_CLEAR_IRQ1 ; +#define M92_CLEAR_IRQ1 ; #define M92_CLEAR_IRQ2 ; #define M92_CLEAR_IRQ3 ; #else -#define M92_TRIGGER_IRQ0 m_upd71059c->ir0_w(1); -#define M92_TRIGGER_IRQ1 m_upd71059c->ir1_w(1); -#define M92_TRIGGER_IRQ2 m_upd71059c->ir2_w(1); -#define M92_TRIGGER_IRQ3 m_upd71059c->ir3_w(1); +#define M92_TRIGGER_IRQ0 m_upd71059c->ir0_w(1); +#define M92_TRIGGER_IRQ1 m_upd71059c->ir1_w(1); +#define M92_TRIGGER_IRQ2 m_upd71059c->ir2_w(1); +#define M92_TRIGGER_IRQ3 m_upd71059c->ir3_w(1); // not sure when these should happen, probably the source of our issues -#define M92_CLEAR_IRQ0 m_upd71059c->ir0_w(0); -#define M92_CLEAR_IRQ1 m_upd71059c->ir1_w(0); -#define M92_CLEAR_IRQ2 m_upd71059c->ir2_w(0); -#define M92_CLEAR_IRQ3 m_upd71059c->ir3_w(0); +#define M92_CLEAR_IRQ0 m_upd71059c->ir0_w(0); +#define M92_CLEAR_IRQ1 m_upd71059c->ir1_w(0); +#define M92_CLEAR_IRQ2 m_upd71059c->ir2_w(0); +#define M92_CLEAR_IRQ3 m_upd71059c->ir3_w(0); #endif diff --git a/src/mame/drivers/macpci.c b/src/mame/drivers/macpci.c index 10f938d108f..97cb494ca73 100644 --- a/src/mame/drivers/macpci.c +++ b/src/mame/drivers/macpci.c @@ -110,6 +110,8 @@ static MACHINE_CONFIG_START( pippin, macpci_state ) MCFG_SOUND_ROUTE( 1, "rspeaker", 1.00 ) MCFG_CDROM_ADD("cdrom") + MCFG_CDROM_INTERFACE("pippin_cdrom") + MCFG_SOFTWARE_LIST_ADD("cd_list","pippin") MCFG_RAM_ADD(RAM_TAG) MCFG_RAM_DEFAULT_SIZE("32M") diff --git a/src/mame/drivers/maxaflex.c b/src/mame/drivers/maxaflex.c index 558b9eb9c12..8b5dfa5151f 100644 --- a/src/mame/drivers/maxaflex.c +++ b/src/mame/drivers/maxaflex.c @@ -389,12 +389,12 @@ INPUT_PORTS_END READ8_MEMBER(maxaflex_state::pia_pa_r) { - return atari_input_disabled() ? 0xff : m_joy01->read_safe(0); + return atari_input_disabled() ? 0xff : read_safe(m_joy01, 0); } READ8_MEMBER(maxaflex_state::pia_pb_r) { - return atari_input_disabled() ? 0xff : m_joy23->read_safe(0); + return atari_input_disabled() ? 0xff : read_safe(m_joy23, 0); } diff --git a/src/mame/drivers/mediagx.c b/src/mame/drivers/mediagx.c index 57cca0c4b97..cf5aa01f122 100644 --- a/src/mame/drivers/mediagx.c +++ b/src/mame/drivers/mediagx.c @@ -520,7 +520,7 @@ READ32_MEMBER(mediagx_state::parallel_port_r) if (ACCESSING_BITS_8_15) { - UINT8 nibble = m_parallel_latched;//(ioport(m_portnames[m_parallel_pointer / 3])->read_safe(0) >> (4 * (m_parallel_pointer % 3))) & 15; + UINT8 nibble = m_parallel_latched;//(read_safe(ioport(m_portnames[m_parallel_pointer / 3]), 0) >> (4 * (m_parallel_pointer % 3))) & 15; r |= ((~nibble & 0x08) << 12) | ((nibble & 0x07) << 11); logerror("%08X:parallel_port_r()\n", space.device().safe_pc()); #if 0 @@ -573,7 +573,7 @@ WRITE32_MEMBER(mediagx_state::parallel_port_w) logerror("%08X:", space.device().safe_pc()); - m_parallel_latched = (ioport(portnames[m_parallel_pointer / 3])->read_safe(0) >> (4 * (m_parallel_pointer % 3))) & 15; + m_parallel_latched = (read_safe(ioport(portnames[m_parallel_pointer / 3]), 0) >> (4 * (m_parallel_pointer % 3))) & 15; //parallel_pointer++; //logerror("[%02X] Advance pointer to %d\n", data, parallel_pointer); switch (data & 0xfc) diff --git a/src/mame/drivers/megadriv.c b/src/mame/drivers/megadriv.c index 63164a11d0f..f49b0a0b098 100644 --- a/src/mame/drivers/megadriv.c +++ b/src/mame/drivers/megadriv.c @@ -735,6 +735,7 @@ static MACHINE_CONFIG_START( mdj_scd, md_cons_state ) MCFG_SOFTWARE_LIST_ADD("cd_list","megacdj") MACHINE_CONFIG_END +/******************SEGA CD + 32X****************************/ static MACHINE_CONFIG_DERIVED( genesis_32x_scd, genesis_32x ) @@ -752,9 +753,46 @@ static MACHINE_CONFIG_DERIVED( genesis_32x_scd, genesis_32x ) MCFG_GENERIC_LOAD(md_cons_state, _32x_cart) //MCFG_QUANTUM_PERFECT_CPU("32x_master_sh2") + MCFG_SOFTWARE_LIST_ADD("cd_list", "segacd") MACHINE_CONFIG_END +static MACHINE_CONFIG_DERIVED( md_32x_scd, md_32x ) + MCFG_DEVICE_ADD("segacd", SEGA_SEGACD_EUROPE, 0) + MCFG_GFX_PALETTE("gen_vdp:palette") + + MCFG_CDROM_ADD( "cdrom" ) + MCFG_CDROM_INTERFACE("scd_cdrom") + + MCFG_MACHINE_START_OVERRIDE(md_cons_state, ms_megacd) + + MCFG_DEVICE_REMOVE("cartslot") + MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "_32x_cart") + MCFG_GENERIC_EXTENSIONS("32x,bin") + MCFG_GENERIC_LOAD(md_cons_state, _32x_cart) + + //MCFG_QUANTUM_PERFECT_CPU("32x_master_sh2") + MCFG_SOFTWARE_LIST_ADD("cd_list", "megacd") +MACHINE_CONFIG_END + +static MACHINE_CONFIG_DERIVED( mdj_32x_scd, mdj_32x ) + + MCFG_DEVICE_ADD("segacd", SEGA_SEGACD_JAPAN, 0) + MCFG_GFX_PALETTE("gen_vdp:palette") + + MCFG_CDROM_ADD( "cdrom" ) + MCFG_CDROM_INTERFACE("scd_cdrom") + + MCFG_MACHINE_START_OVERRIDE(md_cons_state, ms_megacd) + + MCFG_DEVICE_REMOVE("cartslot") + MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "_32x_cart") + MCFG_GENERIC_EXTENSIONS("32x,bin") + MCFG_GENERIC_LOAD(md_cons_state, _32x_cart) + + //MCFG_QUANTUM_PERFECT_CPU("32x_master_sh2") + MCFG_SOFTWARE_LIST_ADD("cd_list", "megacdj") +MACHINE_CONFIG_END /* We need proper names for most of these BIOS ROMs! */ ROM_START( segacd ) @@ -902,6 +940,58 @@ ROM_START( 32x_scd ) ROM_LOAD( "32x_s_bios.bin", 0x000000, 0x000400, CRC(bfda1fe5) SHA1(4103668c1bbd66c5e24558e73d4f3f92061a109a) ) ROM_END +ROM_START( 32x_mcd ) + ROM_REGION16_BE( 0x400000, "maincpu", ROMREGION_ERASE00 ) + + ROM_REGION16_BE( 0x400000, "gamecart", 0 ) /* 68000 Code */ + ROM_LOAD( "megacd_model1_bios_1_00_e.bin", 0x000000, 0x020000, CRC(529ac15a) SHA1(f891e0ea651e2232af0c5c4cb46a0cae2ee8f356) ) + + ROM_REGION32_BE( 0x400000, "gamecart_sh2", 0 ) /* Copy for the SH2 */ + ROM_COPY( "gamecart", 0x0, 0x0, 0x400000) + + ROM_REGION16_BE( 0x400000, "32x_68k_bios", 0 ) /* 68000 Code */ + ROM_LOAD( "32x_g_bios.bin", 0x000000, 0x000100, CRC(5c12eae8) SHA1(dbebd76a448447cb6e524ac3cb0fd19fc065d944) ) + + ROM_REGION32_BE( 0x400000, "master", 0 ) /* SH2 Code */ + ROM_LOAD( "32x_m_bios.bin", 0x000000, 0x000800, CRC(dd9c46b8) SHA1(1e5b0b2441a4979b6966d942b20cc76c413b8c5e) ) + + ROM_REGION32_BE( 0x400000, "slave", 0 ) /* SH2 Code */ + ROM_LOAD( "32x_s_bios.bin", 0x000000, 0x000400, CRC(bfda1fe5) SHA1(4103668c1bbd66c5e24558e73d4f3f92061a109a) ) +ROM_END + +ROM_START( 32x_mcdj ) + ROM_REGION16_BE( 0x400000, "maincpu", ROMREGION_ERASE00 ) + + ROM_REGION16_BE( 0x400000, "gamecart", 0 ) /* 68000 Code */ + ROM_DEFAULT_BIOS("v100g") // this seems the only revision where the cursor in CD menu works, allowing to boot games + /* Confirmed by ElBarto */ + ROM_SYSTEM_BIOS(0, "v100s", "v1.00S") + ROMX_LOAD( "mpr-14088h.bin", 0x000000, 0x020000, CRC(3773d5aa) SHA1(bbf729a1aaa1667b783749299e1ad932aaf5f253), ROM_BIOS(1) | ROM_GROUPWORD | ROM_REVERSE) + /* Confirmed by ElBarto */ + ROM_SYSTEM_BIOS(1, "v100g", "v1.00G") + ROMX_LOAD( "epr-14088b.bin", 0x000000, 0x020000, CRC(69ed6ccd) SHA1(27d11c3836506f01ee81cd142c0cd8b51abebbd2), ROM_BIOS(2) | ROM_GROUPWORD | ROM_REVERSE) + /* Confirmed by ElBarto */ + ROM_SYSTEM_BIOS(2, "v100l", "v1.00L") + ROMX_LOAD( "mpr-14088c.bin", 0x000000, 0x020000, CRC(03134289) SHA1(d60cb5a53f26d6b13e354bc149217587f2301718), ROM_BIOS(3) | ROM_GROUPWORD | ROM_REVERSE) + /* Confirmed by ElBarto */ + ROM_SYSTEM_BIOS(3, "v100o", "v1.00O") + ROMX_LOAD( "epr-14088d.bin", 0x000000, 0x020000, CRC(dfa95ee9) SHA1(e13666c76fa0a2e94e2f651b26b0fd625bf55f07), ROM_BIOS(4) | ROM_GROUPWORD | ROM_REVERSE) + ROM_SYSTEM_BIOS(4, "v100p", "v1.00P") // CRC: e2e70bc8 when byteswapped + ROMX_LOAD( "epr-14088e.bin", 0x000000, 0x020000, CRC(9d2da8f2) SHA1(4846f448160059a7da0215a5df12ca160f26dd69), ROM_BIOS(5) ) + + ROM_REGION32_BE( 0x400000, "gamecart_sh2", 0 ) /* Copy for the SH2 */ + ROM_COPY( "gamecart", 0x0, 0x0, 0x400000) + + ROM_REGION16_BE( 0x400000, "32x_68k_bios", 0 ) /* 68000 Code */ + ROM_LOAD( "32x_g_bios.bin", 0x000000, 0x000100, CRC(5c12eae8) SHA1(dbebd76a448447cb6e524ac3cb0fd19fc065d944) ) + + ROM_REGION32_BE( 0x400000, "master", 0 ) /* SH2 Code */ + ROM_LOAD( "32x_m_bios.bin", 0x000000, 0x000800, CRC(dd9c46b8) SHA1(1e5b0b2441a4979b6966d942b20cc76c413b8c5e) ) + + ROM_REGION32_BE( 0x400000, "slave", 0 ) /* SH2 Code */ + ROM_LOAD( "32x_s_bios.bin", 0x000000, 0x000400, CRC(bfda1fe5) SHA1(4103668c1bbd66c5e24558e73d4f3f92061a109a) ) +ROM_END + /*************************************************************************** @@ -936,4 +1026,8 @@ CONS( 1992, wmega, xeye, 0, mdj_scd, md, md_cons_state, CONS( 1993, wmegam2, xeye, 0, mdj_scd, md, md_cons_state, md_jpn, "Victor", "Wondermega M2 (Japan, NTSC)", MACHINE_NOT_WORKING ) CONS( 1994, cdx, 0, 0, genesis_scd, md, md_cons_state, genesis, "Sega", "CDX (USA, NTSC)", MACHINE_NOT_WORKING ) CONS( 1994, multmega, cdx, 0, md_scd, md, md_cons_state, md_eur, "Sega", "Multi-Mega (Europe, PAL)", MACHINE_NOT_WORKING ) -CONS( 1994, 32x_scd, 0, 0, genesis_32x_scd, md, md_cons_state, genesis, "Sega", "Sega CD (USA, NTSC, w/32X)", MACHINE_NOT_WORKING ) + +//32X plugged in the cart slot + SegaCD plugged into the expansion port.. +CONS( 1994, 32x_scd, 0, 0, genesis_32x_scd, md, md_cons_state, genesis, "Sega", "Sega CD with 32X (USA, NTSC)", MACHINE_NOT_WORKING ) +CONS( 1995, 32x_mcd, 32x_scd, 0, md_32x_scd, md, md_cons_state, md_eur, "Sega", "Mega-CD with 32X (Europe, PAL)", MACHINE_NOT_WORKING ) +CONS( 1994, 32x_mcdj, 32x_scd, 0, mdj_32x_scd, md, md_cons_state, md_jpn, "Sega", "Mega-CD with 32X (Japan, NTSC)", MACHINE_NOT_WORKING ) diff --git a/src/mame/drivers/merit.c b/src/mame/drivers/merit.c index 7131d099cc5..46186a10e1a 100644 --- a/src/mame/drivers/merit.c +++ b/src/mame/drivers/merit.c @@ -232,7 +232,8 @@ WRITE8_MEMBER(merit_state::palette_w) { int co; - m_screen->update_now(); +// m_screen->update_now(); + m_screen->update_partial(m_screen->vpos()); data &= 0x0f; co = ((m_ram_attr[offset] & 0x7F) << 3) | (offset & 0x07); @@ -305,7 +306,8 @@ MC6845_UPDATE_ROW( merit_state::crtc_update_row ) WRITE_LINE_MEMBER(merit_state::hsync_changed) { /* update any video up to the current scanline */ - m_screen->update_now(); +// m_screen->update_now(); + m_screen->update_partial(m_screen->vpos()); } WRITE_LINE_MEMBER(merit_state::vsync_changed) diff --git a/src/mame/drivers/meyc8088.c b/src/mame/drivers/meyc8088.c index c60d5c7ca46..ddc5621cb69 100644 --- a/src/mame/drivers/meyc8088.c +++ b/src/mame/drivers/meyc8088.c @@ -231,10 +231,10 @@ READ8_MEMBER(meyc8088_state::meyc8088_input_r) UINT8 ret = 0xff; // multiplexed switch inputs - if (~m_common & 1) ret &= ioport("C0")->read_safe(0); // bit switches - if (~m_common & 2) ret &= ioport("C1")->read_safe(0); // control switches - if (~m_common & 4) ret &= ioport("C2")->read_safe(0); // light switches - if (~m_common & 8) ret &= ioport("C3")->read_safe(0); // light switches + if (~m_common & 1) ret &= read_safe(ioport("C0"), 0); // bit switches + if (~m_common & 2) ret &= read_safe(ioport("C1"), 0); // control switches + if (~m_common & 4) ret &= read_safe(ioport("C2"), 0); // light switches + if (~m_common & 8) ret &= read_safe(ioport("C3"), 0); // light switches return ret; } diff --git a/src/mame/drivers/micral.c b/src/mame/drivers/micral.c index 0defae8fad3..0dbbbe51938 100644 --- a/src/mame/drivers/micral.c +++ b/src/mame/drivers/micral.c @@ -200,31 +200,31 @@ INPUT_PORTS_END UINT32 micral_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) { -// for (int y = 0; y < 32*8; y++) -// { -// offs_t offset = (y / 8) * 128; +// for (int y = 0; y < 32*8; y++) +// { +// offs_t offset = (y / 8) * 128; -// for (int sx = 0; sx < 64; sx++) -// { -// UINT8 code = m_video_ram[offset++]; -// UINT8 attr = m_video_ram[offset++]; +// for (int sx = 0; sx < 64; sx++) +// { +// UINT8 code = m_video_ram[offset++]; +// UINT8 attr = m_video_ram[offset++]; -// offs_t char_offs = ((code & 0x7f) << 3) | (y & 0x07); -// if (BIT(code, 7)) char_offs = ((code & 0x7f) << 3) | ((y >> 1) & 0x07); +// offs_t char_offs = ((code & 0x7f) << 3) | (y & 0x07); +// if (BIT(code, 7)) char_offs = ((code & 0x7f) << 3) | ((y >> 1) & 0x07); -// UINT8 data = m_char_rom->base()[char_offs]; +// UINT8 data = m_char_rom->base()[char_offs]; -// rgb_t fg = m_palette->pen_color(attr & 0x07); -// rgb_t bg = m_palette->pen_color((attr >> 3) & 0x07); +// rgb_t fg = m_palette->pen_color(attr & 0x07); +// rgb_t bg = m_palette->pen_color((attr >> 3) & 0x07); -// for (int x = 0; x < 6; x++) -// { -// bitmap.pix32(y, (sx * 6) + x) = BIT(data, 7) ? fg : bg; +// for (int x = 0; x < 6; x++) +// { +// bitmap.pix32(y, (sx * 6) + x) = BIT(data, 7) ? fg : bg; -// data <<= 1; -// } -// } -// } +// data <<= 1; +// } +// } +// } return 0; } @@ -251,7 +251,7 @@ static MACHINE_CONFIG_START( micral, micral_state ) MCFG_CPU_ADD( "maincpu", Z80, XTAL_4MHz ) MCFG_CPU_PROGRAM_MAP(micral_mem) // no i/o ports on main cpu - MCFG_CPU_ADD( "keyboard", Z80, XTAL_1MHz ) // freq unknown + MCFG_CPU_ADD( "keyboard", Z80, XTAL_1MHz ) // freq unknown MCFG_CPU_PROGRAM_MAP(micral_kbd_mem) MCFG_CPU_IO_MAP(micral_kbd_io) diff --git a/src/mame/drivers/midvunit.c b/src/mame/drivers/midvunit.c index 8396fa76291..d39eb62b880 100644 --- a/src/mame/drivers/midvunit.c +++ b/src/mame/drivers/midvunit.c @@ -142,7 +142,7 @@ WRITE32_MEMBER(midvunit_state::midvunit_adc_w) int which = (data >> m_adc_shift) - 4; if (which < 0 || which > 2) logerror("adc_w: unexpected which = %02X\n", which + 4); - m_adc_data = ioport(adcnames[which])->read_safe(0); + m_adc_data = read_safe(ioport(adcnames[which]), 0); timer_set(attotime::from_msec(1), TIMER_ADC_READY); } else diff --git a/src/mame/drivers/model1.c b/src/mame/drivers/model1.c index d87fe481904..69f3882fe96 100644 --- a/src/mame/drivers/model1.c +++ b/src/mame/drivers/model1.c @@ -642,7 +642,7 @@ READ16_MEMBER(model1_state::io_r) static const char *const inputnames[] = { "IN0", "IN1", "IN2" }; if(offset < 0x8) - return ioport(analognames[offset])->read_safe(0x00); + return read_safe(ioport(analognames[offset]), 0x00); if(offset == 0x0f) return m_lamp_state; diff --git a/src/mame/drivers/model2.c b/src/mame/drivers/model2.c index b108d3d3065..2dbfe076114 100644 --- a/src/mame/drivers/model2.c +++ b/src/mame/drivers/model2.c @@ -539,7 +539,7 @@ CUSTOM_INPUT_MEMBER(model2_state::_1c0001c_r) if(m_analog_channel < 4) { static const char *const ports[] = { "ANA0", "ANA1", "ANA2", "ANA3" }; - iptval = ioport(ports[m_analog_channel])->read_safe(0); + iptval = read_safe(ioport(ports[m_analog_channel]), 0); ++m_analog_channel; } return iptval; @@ -557,7 +557,7 @@ CUSTOM_INPUT_MEMBER(model2_state::_1c0001c_r) /* Used specifically by Sega Rally, others might be different */ CUSTOM_INPUT_MEMBER(model2_state::srallyc_gearbox_r) { - UINT8 res = ioport("GEARS")->read_safe(0); + UINT8 res = read_safe(ioport("GEARS"), 0); int i; const UINT8 gearvalue[5] = { 0, 2, 1, 6, 5 }; @@ -1049,17 +1049,17 @@ READ32_MEMBER(model2_state::hotd_lightgun_r) UINT16 res = 0xffff; if(m_lightgun_mux < 8) - res = (ioport(ports[m_lightgun_mux >> 1])->read_safe(0) >> ((m_lightgun_mux & 1)*8)) & 0xff; + res = (read_safe(ioport(ports[m_lightgun_mux >> 1]), 0) >> ((m_lightgun_mux & 1)*8)) & 0xff; else { UINT16 p1x,p1y,p2x,p2y; res = 0xfffc; - p1x = ioport("P1_X")->read_safe(0); - p1y = ioport("P1_Y")->read_safe(0); - p2x = ioport("P2_X")->read_safe(0); - p2y = ioport("P2_Y")->read_safe(0); + p1x = read_safe(ioport("P1_X"), 0); + p1y = read_safe(ioport("P1_Y"), 0); + p2x = read_safe(ioport("P2_X"), 0); + p2y = read_safe(ioport("P2_Y"), 0); /* TODO: might be better, supposedly user has to calibrate guns in order to make these settings to work ... */ if(p1x <= 0x28 || p1x >= 0x3e0 || p1y <= 0x40 || p1y >= 0x3c0) @@ -1526,7 +1526,7 @@ READ8_MEMBER(model2_state::virtuacop_lightgun_r) static const char *const ports[] = { "P1_Y", "P1_X", "P2_Y", "P2_X" }; UINT8 res; - res = (ioport(ports[offset >> 1])->read_safe(0) >> ((offset & 1)*8)) & 0xff; + res = (read_safe(ioport(ports[offset >> 1]), 0) >> ((offset & 1)*8)) & 0xff; return res; } @@ -1537,10 +1537,10 @@ READ8_MEMBER(model2_state::virtuacop_lightgun_offscreen_r) UINT16 special_res = 0xfffc; UINT16 p1x,p1y,p2x,p2y; - p1x = ioport("P1_X")->read_safe(0); - p1y = ioport("P1_Y")->read_safe(0); - p2x = ioport("P2_X")->read_safe(0); - p2y = ioport("P2_Y")->read_safe(0); + p1x = read_safe(ioport("P1_X"), 0); + p1y = read_safe(ioport("P1_Y"), 0); + p2x = read_safe(ioport("P2_X"), 0); + p2y = read_safe(ioport("P2_Y"), 0); /* TODO: might be better, supposedly user has to calibrate guns in order to make these settings to work ... */ if(p1x <= 0x28 || p1x >= 0x3e0 || p1y <= 0x40 || p1y >= 0x3c0) diff --git a/src/mame/drivers/model3.c b/src/mame/drivers/model3.c index 9d10c48278e..a1de28a0cf4 100644 --- a/src/mame/drivers/model3.c +++ b/src/mame/drivers/model3.c @@ -1367,7 +1367,7 @@ READ64_MEMBER(model3_state::model3_ctrl_r) if (ACCESSING_BITS_24_31) /* ADC Data read */ { static const char *const adcnames[] = { "AN0", "AN1", "AN2", "AN3", "AN4", "AN5", "AN6", "AN7" }; - UINT8 adc_data = ioport(adcnames[m_adc_channel])->read_safe(0); + const UINT8 adc_data = read_safe(ioport(adcnames[m_adc_channel]), 0); m_adc_channel++; m_adc_channel &= 0x7; return (UINT64)adc_data << 24; diff --git a/src/mame/drivers/multigam.c b/src/mame/drivers/multigam.c index 3030c258208..0b77525e81e 100644 --- a/src/mame/drivers/multigam.c +++ b/src/mame/drivers/multigam.c @@ -337,7 +337,7 @@ WRITE8_MEMBER(multigam_state::multigam_IN0_w) m_in_1 = ioport("P2")->read(); m_in_dsw_shift = 0; - m_in_dsw = ioport("DSW")->read_safe(0); + m_in_dsw = read_safe(ioport("DSW"), 0); } READ8_MEMBER(multigam_state::multigam_IN1_r) diff --git a/src/mame/drivers/namcofl.c b/src/mame/drivers/namcofl.c index 8bef9d9c7d8..fac0b6a60dc 100644 --- a/src/mame/drivers/namcofl.c +++ b/src/mame/drivers/namcofl.c @@ -302,17 +302,17 @@ READ8_MEMBER(namcofl_state::port7_r) READ8_MEMBER(namcofl_state::dac7_r) { - return ioport("ACCEL")->read_safe(0xff); + return read_safe(ioport("ACCEL"), 0xff); } READ8_MEMBER(namcofl_state::dac6_r) { - return ioport("BRAKE")->read_safe(0xff); + return read_safe(ioport("BRAKE"), 0xff); } READ8_MEMBER(namcofl_state::dac5_r) { - return ioport("WHEEL")->read_safe(0xff); + return read_safe(ioport("WHEEL"), 0xff); } READ8_MEMBER(namcofl_state::dac4_r){ return 0xff; } diff --git a/src/mame/drivers/namconb1.c b/src/mame/drivers/namconb1.c index f67ea62e1c4..2aa577bef7d 100644 --- a/src/mame/drivers/namconb1.c +++ b/src/mame/drivers/namconb1.c @@ -738,7 +738,7 @@ READ8_MEMBER(namconb1_state::port7_r) switch (m_nbx_port6 & 0xf0) { case 0x00: - return ioport("P4")->read_safe(0xff); + return read_safe(ioport("P4"), 0xff); case 0x20: return ioport("MISC")->read(); @@ -761,42 +761,42 @@ READ8_MEMBER(namconb1_state::port7_r) // register full scale, so it works... READ8_MEMBER(namconb1_state::dac7_r)// bit 7 { - return ioport("P3")->read_safe(0xff)&0x80; + return read_safe(ioport("P3"), 0xff)&0x80; } READ8_MEMBER(namconb1_state::dac6_r)// bit 3 { - return (ioport("P3")->read_safe(0xff)<<1)&0x80; + return (read_safe(ioport("P3"), 0xff)<<1)&0x80; } READ8_MEMBER(namconb1_state::dac5_r)// bit 2 { - return (ioport("P3")->read_safe(0xff)<<2)&0x80; + return (read_safe(ioport("P3"), 0xff)<<2)&0x80; } READ8_MEMBER(namconb1_state::dac4_r)// bit 1 { - return (ioport("P3")->read_safe(0xff)<<3)&0x80; + return (read_safe(ioport("P3"), 0xff)<<3)&0x80; } READ8_MEMBER(namconb1_state::dac3_r)// bit 0 { - return (ioport("P3")->read_safe(0xff)<<4)&0x80; + return (read_safe(ioport("P3"), 0xff)<<4)&0x80; } READ8_MEMBER(namconb1_state::dac2_r)// bit 4 { - return (ioport("P3")->read_safe(0xff)<<5)&0x80; + return (read_safe(ioport("P3"), 0xff)<<5)&0x80; } READ8_MEMBER(namconb1_state::dac1_r)// bit 5 { - return (ioport("P3")->read_safe(0xff)<<6)&0x80; + return (read_safe(ioport("P3"), 0xff)<<6)&0x80; } READ8_MEMBER(namconb1_state::dac0_r)// bit 6 { - return (ioport("P3")->read_safe(0xff)<<7)&0x80; + return (read_safe(ioport("P3"), 0xff)<<7)&0x80; } static ADDRESS_MAP_START( namcoc75_io, AS_IO, 8, namconb1_state ) diff --git a/src/mame/drivers/namcops2.c b/src/mame/drivers/namcops2.c index d22aa7ab8c7..50205be53ec 100644 --- a/src/mame/drivers/namcops2.c +++ b/src/mame/drivers/namcops2.c @@ -538,7 +538,7 @@ Notes: J9 - 6-pin connector (not used) J10 - 80-pin Namco connector (not used, probably for an add-on PCB with ROMs for diagnostics) -This PCB is used with Cobra The Arcade. The game will boot with several I/O boards but in the test mode in 'I/O TEST' +This PCB is used with Cobra The Arcade. The game will boot with several I/O boards but in the test mode in 'I/O TEST' the I/O board is only reported as good with the RAYS PCB, otherwise it reports 'NG'. This same PCB is also used with the DX rear-projection-screen version of Crisis Zone (on System 23 Evolution 2 hardware). Note this board requires a CCD camera and infrared guns and infrared sensors. @@ -599,7 +599,7 @@ Notes: J101 - 6 pin connector for power input J102 - 60 pin flat cable connector J104 - 5 pin connector (not populated) - J204 - USB-B connector (also wired in-line with J104. Note the signal is still the + J204 - USB-B connector (also wired in-line with J104. Note the signal is still the normal Namco communication signal; i.e. RS485) J106 - 30 pin flat cable connector J108 - 4 pin connector @@ -613,9 +613,9 @@ Notes: V290 FCB PCB is almost identical to FCA PCB. The main differences are changed internal MCU code & PIC code, some extra/different connectors, less D1017 driver transistors and an added RS-232 IC. -The V290 FCB PCB is used with touchscreen games such as Dragon Chronicles, Druaga Online, Idol Master etc. +The V290 FCB PCB is used with touchscreen games such as Dragon Chronicles, Druaga Online, Idol Master etc. It supports a serial touchscreen interface, card readers and buttons. -The additional devices are supported via J108 which connects to another PCB 'XOU020-A' which contains a +The additional devices are supported via J108 which connects to another PCB 'XOU020-A' which contains a Texas Instruments TMS32VC540x DSP, TSOP32 flash ROM and other components. @@ -738,15 +738,15 @@ System246 PMOTHER PCB | |EP20K100E LC35256 RS5C348 J14 | | |QC208 | 32.768kHz BR9080F | | 16M |--------| |----------| -| 16M 66.666MHz C807U-1V86| -| 4MHz| -| J11 MM1537| -| |------| J10 | -| | C448 | 61C256 EPM3128 | -| | | | -| |------| | -| J9 | -| TMP95C061 | +| 16M 66.666MHz C807U-1V86| +| 4MHz| +| J11 MM1537| +| |------| J10 | +| | C448 | 61C256 EPM3128 | +| | | | +| |------| | +| J9 | +| TMP95C061 | J8 CXA2055P | | MAX232 ADM485 6358N J7 | J3 | @@ -764,7 +764,7 @@ Notes: J10 - 6-pin connector for programming EPM3128 CPLD (not populated) J11 - Flat cable connector joining to PS2 main board J12 - 40-pin IDE connector for CD/DVD/HDD drives - J13 - 4-pin power input connector (+5V/GND) + J13 - 4-pin power input connector (+5V/GND) J14 - 34-pin connector plugged directly into PS2 main board J15 - 4-pin power output connector plugged directly into PS2 main board (the PS2 main board PSU is not populated) C807U-1V86 - Toshiba TMP87PH47U microcontroller with 16k x8-bit OTP EPROM re-badged as 'SONY C8707U-1V86 (C)2000 SCEI' @@ -783,14 +783,14 @@ C807U-1V86 - Toshiba TMP87PH47U microcontroller with 16k x8-bit OTP EPROM re-bad RS5C348 - Ricoh RS5C348 RTC BR9080F - ROHN BR9080F 512 word x16-bit serial EEPROM MM1537 - Mitsumi MM1537 reset chip. No info available but pin 2 of MM1537 tied to TMP87PH47 reset pin 14 so it's a reset chip - MAX232 - Maxim MAX232 dual serial to TTL logic level driver/receiver + MAX232 - Maxim MAX232 dual serial to TTL logic level driver/receiver BATTERY - CR2032 3.0V battery - + This revision was initially used with Tekken 4, Time Crisis 3, Battle Gear 3 and Soul Calibur II. There are reports that the DVD-based games on this system are fussy about the model of DVD-ROM drive used. Powering the drive from an external PSU will help in some cases. -A PS2 main board (such as GH-006) is required and plugs into J14 & J15 directly and two flat cables +A PS2 main board (such as GH-006) is required and plugs into J14 & J15 directly and two flat cables from J9 & J11 also connect to the PS2 main board. The board documented here is green. A blue PCB has been seen used in Time Crisis 3. It's not known if the PCB is different to this one. diff --git a/src/mame/drivers/namcos11.c b/src/mame/drivers/namcos11.c index 5b813e8dbdc..682fccae8f0 100644 --- a/src/mame/drivers/namcos11.c +++ b/src/mame/drivers/namcos11.c @@ -289,7 +289,7 @@ JAMMA Harness: Pin 1 Parts Side - GND Pin 3 Parts Side - +5V Pin 22 Parts Side - Gun 1 Trigger -Pin 22 Solder Side - Gun 2 Trigger +Pin 22 Solder Side - Gun 2 Trigger ***************************************************************************/ diff --git a/src/mame/drivers/namcos12.c b/src/mame/drivers/namcos12.c index 3620838e9de..db8652c0ffa 100644 --- a/src/mame/drivers/namcos12.c +++ b/src/mame/drivers/namcos12.c @@ -966,8 +966,8 @@ Notes: This PCB was found on the following games (so far).... Ghoul Panic (OB2/VER.A) - Oh! Bakyuuun (OB1/VER.A) - Gunbarl (GNB4/VER.A) + Oh! Bakyuuun (OB1/VER.A) + Gunbarl (GNB4/VER.A) Point Blank 2 (GNB5/VER.A) To connect a normal (i.e. HAPP) light gun only 4 wires are needed. @@ -990,7 +990,7 @@ JAMMA Harness: Pin 1 Parts Side - GND Pin 3 Parts Side - +5V Pin 22 Parts Side - Gun 1 Trigger -Pin 22 Solder Side - Gun 2 Trigger +Pin 22 Solder Side - Gun 2 Trigger CDXA PCB @@ -1070,9 +1070,9 @@ Notes: J1/2/3/8 - Multi-pin connectors joining to controls and main PCB J9 - Power input connector -I/O board (for Attack Pla-Rail) +I/O board (for Attack Pla-Rail) ------------------------------- -Attack Pla-Rail requires an I/O board to boot. Several I/O boards are accepted including TSS-I/O, FCA, ASCA3, ASCA5 +Attack Pla-Rail requires an I/O board to boot. Several I/O boards are accepted including TSS-I/O, FCA, ASCA3, ASCA5 and also the common JVS I/O boards manufactured by Sega. The game uses 3 buttons and a 5k potentiometer for the lever. The button signals come from the I/O board. The lever must be wired to analog port 0 (pin B22 parts side) of the Namco 48-way edge connector. @@ -1527,7 +1527,7 @@ static ADDRESS_MAP_START( s12h8rwjvsmap, AS_PROGRAM, 16, namcos12_state ) AM_RANGE(0x280000, 0x287fff) AM_DEVREADWRITE("c352", c352_device, read, write) AM_RANGE(0x300000, 0x300001) AM_READ_PORT("DIN0") AM_RANGE(0x300002, 0x300003) AM_READ_PORT("DIN1") - AM_RANGE(0x300010, 0x300011) AM_NOP + AM_RANGE(0x300010, 0x300011) AM_NOP AM_RANGE(0x300030, 0x300031) AM_NOP // most S12 bioses write here simply to generate a wait state. there is no deeper meaning. ADDRESS_MAP_END @@ -1572,7 +1572,7 @@ READ16_MEMBER(namcos12_state::s12_mcu_p6_r) READ16_MEMBER(namcos12_state::s12_mcu_jvs_p8_r) { - return 0x12; // bit 4 = JVS enable. aplarail requires it to be on, soulclbr & others will require JVS I/O if it's on + return 0x12; // bit 4 = JVS enable. aplarail requires it to be on, soulclbr & others will require JVS I/O if it's on } static ADDRESS_MAP_START( s12h8iomap, AS_IO, 16, namcos12_state ) @@ -2017,14 +2017,14 @@ static INPUT_PORTS_START( aplarail ) PORT_BIT( 0xff3f, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_START("IN01") - PORT_BIT( 0x00000800, IP_ACTIVE_LOW, IPT_BUTTON1 ) // left - PORT_BIT( 0x00001000, IP_ACTIVE_LOW, IPT_START1 ) // OK / Start - PORT_BIT( 0x00002000, IP_ACTIVE_LOW, IPT_BUTTON2 ) // right + PORT_BIT( 0x00000800, IP_ACTIVE_LOW, IPT_BUTTON1 ) // left + PORT_BIT( 0x00001000, IP_ACTIVE_LOW, IPT_START1 ) // OK / Start + PORT_BIT( 0x00002000, IP_ACTIVE_LOW, IPT_BUTTON2 ) // right PORT_BIT( 0xc7ff, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_START("IN23") PORT_BIT( 0xf7ff, IP_ACTIVE_LOW, IPT_UNKNOWN) - PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_COIN1 ) // coin + PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_COIN1 ) // coin PORT_START("DIN0") PORT_BIT( 0xffff, IP_ACTIVE_LOW, IPT_UNKNOWN) @@ -2035,7 +2035,7 @@ static INPUT_PORTS_START( aplarail ) PORT_START("LEVER") PORT_BIT( 0x07ff, 0x03ff, IPT_AD_STICK_X ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_NAME("Speed Lever") PORT_REVERSE - + PORT_START("SERVICE") PORT_BIT(0xff, IP_ACTIVE_LOW, IPT_UNKNOWN) INPUT_PORTS_END @@ -3147,7 +3147,7 @@ ROM_START( aplarail ) ROM_REGION( 0x40000, "iocpu", 0) /* Truck K. I/O board */ ROM_LOAD( "asca1_io-a.ic2", 0x000000, 0x040000, CRC(77cdf69a) SHA1(497af1059f85c07bea2dd0d303481623f6019dcf) ) - ROM_REGION( 0x800, "at28c16", 0) /* pre-calibrated NVRAM */ + ROM_REGION( 0x800, "at28c16", 0) /* pre-calibrated NVRAM */ ROM_LOAD( "at28c16", 0x000000, 0x000800, CRC(db1b63c5) SHA1(01fc3386a2d1cb1bed1b7fd9bd2fd59e503832d3) ) ROM_END @@ -3172,7 +3172,7 @@ GAME( 1998, ehrgeiz, 0, coh700, namcos12, namcos12_state, namcos12, R GAME( 1998, ehrgeizaa, ehrgeiz, coh700, namcos12, namcos12_state, namcos12, ROT0, "Square / Namco", "Ehrgeiz (Asia, EG2/VER.A)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND ) /* KC021 */ GAME( 1998, ehrgeizja, ehrgeiz, coh700, namcos12, namcos12_state, namcos12, ROT0, "Square / Namco", "Ehrgeiz (Japan, EG1/VER.A)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND ) /* KC021 */ GAME( 1998, mdhorse, 0, coh700, namcos12, namcos12_state, namcos12, ROT0, "MOSS / Namco", "Derby Quiz My Dream Horse (Japan, MDH1/VER.A2)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND | MACHINE_NOT_WORKING ) /* KC035 */ -GAME( 1998, aplarail, 0, aplarail, aplarail, namcos12_state, namcos12, ROT0, "Namco / Tomy", "Attack Pla Rail (Japan, AP1/VER.A)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND | MACHINE_NOT_WORKING ) /* KC032 */ +GAME( 1998, aplarail, 0, aplarail, aplarail, namcos12_state, namcos12, ROT0, "Namco / Tomy", "Attack Pla Rail (Japan, AP1/VER.A)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND ) /* KC032 */ GAME( 1998, sws98, 0, coh700, namcos12, namcos12_state, namcos12, ROT0, "Namco", "Super World Stadium '98 (Japan, SS81/VER.A)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND ) /* KC0?? */ GAME( 1998, technodr, 0, technodr, technodr, namcos12_state, namcos12, ROT0, "Namco", "Techno Drive (Japan, TD2/VER.B)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND | MACHINE_NOT_WORKING ) /* KC056 */ GAME( 1998, tenkomor, 0, coh700, namcos12, namcos12_state, namcos12, ROT90,"Namco", "Tenkomori Shooting (Asia, TKM2/VER.A1)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND ) /* KC036 */ diff --git a/src/mame/drivers/namcos21.c b/src/mame/drivers/namcos21.c index 6168d6ad470..2ba363d3b59 100644 --- a/src/mame/drivers/namcos21.c +++ b/src/mame/drivers/namcos21.c @@ -294,6 +294,229 @@ CPU68 PCB: JP2 /D-ST /VBL JP3 + +***************************** + +Winning Run / Winning Run Suzuka GP/ Winning Run 91 +Namco 1988-91 + +These games run on Namco System 21 hardware. Note each set of PCBs for System 21 games are slightly different, +with some common PCBs and some unique-to-that-game PCBs. This covers the Winning Run series. +The PCBs are housed in a metal box. The front has a small filter board containing a 60-pin flat cable connector. +Underneath is a connector that plugs into PCB #3. +Inside at the bottom is a small MOTHER PCB containing 8 connectors where the PCBs plug in and the power input connector. +On Winning Run there is an additional PCB for the controls and cabinet motion. +The PAL labels suggest it was originally used with Metal Hawk. It may be used with other games too. + + +PCB Layouts +----------- + +In the layouts below, the jumpers set the ROM type. +If horizontally shorted the ROM type is 27C101 +If vertically shorted the ROM type is 27C301/27C1001 +ROM labels/locations shown are printed on the PCB. Not all ROM positions are used. +See the ROM loading below (per game) for ROM usage and actual label names. + +PCB#1 (top): + +2252960601 +(2252970601) +|--------------------------------------------------------------| +| POINT3L.7P POINT3U.5P DIP28_SOCKET(2P) | +| POINT2L.7N POINT2U.5N |-------| | +| JP5 O=O JP6 O=O | TMS | 40MHz | +| O=O 0=0 |320C25 | | +| POINT1U.8L MB8422 |-------| | +| PAL16L8 MB81C69 MB81C69 | +| POINT0U.8J MB8422 (WR-D2.4J) | +| MB81C69 MB81C69 | +| | +| | +|JP3 O=O | +| O=O | +| POINT1L.2E MB8422 62256 62256 | +| | +| POINT0L.8D MB8422 | +|JP4 O=O | +| O=O | +| | +| | +| PAL16L8 | +| (WR-D1.3B) | +| | +| | +|----|----------------------|----|------------------------|----| + |----------------------| |------------------------| + + +PCB#2 (2nd down): + +2252960701 +(2252970701) +|--------------------------------------------------------------| +| | +| 62256 62256 C157 C157 M5M5178 | +| | +| 62256 62256 C157 C157 M5M5178 | +| | +| 62256 62256 C157 C157 62256 | +| C150 | +| 62256 62256 C157 C157 62256 | +| | +| C157 C157 | +| | +| C157 C157 62256 | +| |-------| |-------| |-------| | +| |L7A0080| |L7A0080| |L7A0081| M5M5178 62256 | +| |110FAI | |110FAI | |111MUR | | +| |-------| |-------| |-------| M5M5178 62256 | +| | +| 2018 2018 |---------| 62256 | +| 20MHz | | | +| 2018 2018 2018 | C167 | | +| C157 C157 | | PAL16L8 | +| C157 C157 |---------| (WR-P1.1B)| +| | +|----|----------------------|----|------------------------|----| + |----------------------| |------------------------| + + +PCB#3 (3rd down): + +2252960101 +(2252970101) RGB_CABLE |------------------------| +|--------------------||||||------|------------------------|----| +| TL084C |---| MB3771 | +| MB87077 LB1760 |C65| PAL16L8 PC910 PC900| +|MB87077 34063 |---| (SYS87B-2.3W) | +|TL084C TL084C DSW1(8) M5M5179 | +|LC7880 YM3012 PAL12L10 SYS2C65C.5P |----| | +|MB8464 YM2151 (WR-C1.5P) |C139| | +| |----| C137 3.579545MHz HN58C65 |----| | +| |C121| 49.152MHz 8422 C149 | +| |----| PAL12L10 65256 65256 | +| (WR-C2.8K) | +| 2018 2018 62256 62256 MPRU.3K MPRL.1K | +| | +| VOI3.11E MB8464 68000 | +| | +| VOI2.11D |------| SND1.7D C148 C148 DATA3U.3D DATA3L.1D| +| | C140 | | +| VOI1.11C |------| SND0.7C 65256 65256 DATA2U.3C DATA2L.1C| +| | +| VOI0.11B 6809 SPRU.6B SPRL.4B DATA1U.3B DATA1L.1B| +| JP3 JP1 | +| O=O 68000 OO DATA0U.3A DATAOL.1A| +| O=O || | +| OO | +|----|----------------------|----|------------------------|----| + |----------------------| |------------------------| + + +PCB#4 (bottom): + +2252960401 +(2252970401) RGB_CABLE +|--------------------||||||------------------------------------| +| | +| |----| |----| | +| |C164| |C148| 68000 | +| |----| |----| | +| MB3771 | +| PAL20V8 62256 62256 | +| (WR-G3.4S) | +| 62256 GDT1L.3S GDT1U.1S | +| MB81461 MB81461 JP10 O-O JP9 OO| +| 62256 PAL16L8 GDT0L.3P GDT0U.1P ||| +| MB81461 MB81461 (WR-G2.4P) OO| +| 62256 GPR1L.3L GPR1U.1L | +| MB81461 MB81461 J J J JP8 OO| +| P P P GPR0L.3J GPR0U.1J ||| +| MB81461 MB81461 |----| 6 5 4 OO| +| |C138| O|O|O| JP12 | +| MB81461 MB81461 |----| O|O|O| O| JP7 OO| +| PAL16L8 O O O O| MB8422 ||| +| MB81461 MB81461 (WR-G4.7L) 49.152MHz O OO| +| C165 MB8422 | +| MB81461 MB81461 38.808MHz | +| PAL16L8 | +| MB81461 MB81461 (WR-G1.3A) | +|----|----------------------|----|------------------------|----| + |----------------------| |------------------------| + + +I/O & Drive Board For Motion Cabinet +------------------------------------ + +2286964100 (2286974100) +|--------------------------------| +|SW2 SW1 8255 8251 TLP521 | +|DSW(6) EMPTY_SOCKET | +| 4.9152MHz | +|RESET MB3773 ADC0809 J201| +| 68B09 EMPTY_SOCKET | +| WR_DR1.5A S1WB | +| 8464 LM324 | +| TLP521 | +| PAL20L10 S2VB | +|(MH1-DR2) A490 J205| +| A490 | +|J206 TLP511 | +| 8253 PAL14H8 TLP511| +|TLP511 (MH1-DR3) | +| J204 J202 J203 | +|TLP511 | +|BCR16DM BCR16DM BCR16DM BCR16DM | +|--------------------------------| +Notes: + J201 - 50 pin flat cable connector for controls + J202 - 6 pin Power connector + J203 - 2-pin Power connector + J204 - 3-pin Power connector + J205 - 4-pin connector for DC feedback motor + J206 - 5-pin connector for main board communication + S1WB - Bridge Rectifier + S2VB - Bridge Rectifier + A490 - Transistor + BCR16DM - Transistor + TLP511 - Toshiba TLP511 GAAS Infrared & Photo Thyristor + TLP521 - Toshiba TLP521 Programmable Controller AC/DC-Input Module Solid State Relay + 8255 - Mitsubishi M5L8255AP-5 Programmable Peripheral Interface + 8251 - Mitsubishi M5L8251AP-5 Programmable Communication Interface + 8253 - Mitsubishi M5L8253P-5 Programmable Interval Timer + ADC0809 - National Semiconductor ADC0809CCN 8-Bit Microprocessor Compatible A/D Converters with 8-Channel Multiplexer + 68B09 - Hitachi HD68B09EP CPU + 8464 - 8k x8-bit SRAM + LM324 - National Semiconductor LM324 General Purpose Operational Amplifier + MB3773 - Fujitsu MB3773 Power Supply Monitor with Watch-Dog Timer + + +Slot PCB +-------- +2252960502 (2252970502) +V21 MOTHER PCB +|--------------------------------------------------------------| +| PWR_CONN | +| |--------SLOT1---------| |---------SLOT5----------| | +| |--------SLOT2---------| |---------SLOT6----------| | +| |--------SLOT3---------| |---------SLOT7----------| | +| |--------SLOT4---------| |---------SLOT8----------| | +|--------------------------------------------------------------| + + +Filter Board +------------ +2252960801 (2252970801) +|--------------------------------| +| |----------------------| | +| |----------------------| | +| | +|-------|60-PIN FLAT CABLE|------| + |-------CONN------| + +**************************** + */ #include "emu.h" #include "cpu/m68000/m68000.h" diff --git a/src/mame/drivers/namcos22.c b/src/mame/drivers/namcos22.c index e1a28cb6272..b3f8443026a 100644 --- a/src/mame/drivers/namcos22.c +++ b/src/mame/drivers/namcos22.c @@ -1686,7 +1686,7 @@ READ16_MEMBER(namcos22_state::namcos22_portbit_r) WRITE16_MEMBER(namcos22_state::namcos22_portbit_w) { - m_portbits[offset] = ioport((offset == 0) ? "P1" : "P2")->read_safe(0xffff); + m_portbits[offset] = read_safe(ioport((offset == 0) ? "P1" : "P2"), 0xffff); } READ16_MEMBER(namcos22_state::namcos22_dipswitch_r) @@ -2771,9 +2771,9 @@ WRITE8_MEMBER(namcos22_state::mcu_port5_w) READ8_MEMBER(namcos22_state::mcu_port5_r) { if (m_p4 & 8) - return ioport("MCUP5A")->read_safe(0xff); + return read_safe(ioport("MCUP5A"), 0xff); else - return ioport("MCUP5B")->read_safe(0xff); + return read_safe(ioport("MCUP5B"), 0xff); } WRITE8_MEMBER(namcos22_state::mcu_port6_w) @@ -2798,7 +2798,7 @@ READ8_MEMBER(namcos22_state::mcu_port7_r) READ8_MEMBER(namcos22_state::namcos22s_mcu_adc_r) { - UINT16 adc = m_adc_ports[offset >> 1 & 7]->read_safe(0) << 2; + UINT16 adc = read_safe(m_adc_ports[offset >> 1 & 7], 0) << 2; return (offset & 1) ? adc >> 8 : adc; } diff --git a/src/mame/drivers/namcos23.c b/src/mame/drivers/namcos23.c index c2a86ec5ce7..5ae8044ca02 100644 --- a/src/mame/drivers/namcos23.c +++ b/src/mame/drivers/namcos23.c @@ -1286,12 +1286,13 @@ struct namcos23_render_data { running_machine *machine; const pen_t *pens; + bitmap_rgb32 *bitmap; UINT32 (*texture_lookup)(running_machine &machine, const pen_t *pens, float x, float y); }; class namcos23_state; -class namcos23_renderer : public poly_manager<float, namcos23_render_data, 5, POLY_MAX_ENTRIES> +class namcos23_renderer : public poly_manager<float, namcos23_render_data, 4, POLY_MAX_ENTRIES> { public: namcos23_renderer(namcos23_state &state); @@ -1301,7 +1302,6 @@ public: private: namcos23_state& m_state; - bitmap_rgb32 m_bitmap; float* m_zBuffer; }; @@ -1312,6 +1312,7 @@ struct namcos23_poly_entry namcos23_render_data rd; int front; int vertex_count; + float zkey; poly_vertex pv[16]; }; @@ -1367,6 +1368,7 @@ struct render_t int count[2]; namcos23_render_entry entries[2][RENDER_MAX_ENTRIES]; namcos23_poly_entry polys[POLY_MAX_ENTRIES]; + namcos23_poly_entry *poly_order[POLY_MAX_ENTRIES]; }; class namcos23_state : public driver_device @@ -1583,12 +1585,9 @@ UINT16 namcos23_state::nthword(const UINT32 *pSource, int offs) ***************************************************************************/ namcos23_renderer::namcos23_renderer(namcos23_state &state) - : poly_manager<float, namcos23_render_data, 5, POLY_MAX_ENTRIES>(state.machine()), - m_state(state), - m_bitmap(state.m_screen->width(), state.m_screen->height()) + : poly_manager<float, namcos23_render_data, 4, POLY_MAX_ENTRIES>(state.machine()), + m_state(state) { - const INT32 bufferSize = state.m_screen->visible_area().width() * state.m_screen->visible_area().height(); - m_zBuffer = auto_alloc_array(state.machine(), float, bufferSize); } // 3D hardware, to throw at least in part in video/namcos23.c @@ -1885,38 +1884,28 @@ void namcos23_renderer::render_scanline(INT32 scanline, const extent_t& extent, { const namcos23_render_data& rd = object; - float zz = extent.param[0].start; - float w = extent.param[1].start; - float u = extent.param[2].start; - float v = extent.param[3].start; - float l = extent.param[4].start; - float dz = extent.param[0].dpdx; - float dw = extent.param[1].dpdx; - float du = extent.param[2].dpdx; - float dv = extent.param[3].dpdx; - float dl = extent.param[4].dpdx; - - UINT32 *img = &m_bitmap.pix32(scanline, extent.startx); - float* zBuffer = &m_zBuffer[(scanline * m_state.m_screen->visible_area().width()) + extent.startx]; - + float w = extent.param[0].start; + float u = extent.param[1].start; + float v = extent.param[2].start; + float l = extent.param[3].start; + float dw = extent.param[0].dpdx; + float du = extent.param[1].dpdx; + float dv = extent.param[2].dpdx; + float dl = extent.param[3].dpdx; + + UINT32 *img = &object.bitmap->pix32(scanline, extent.startx); + for(int x = extent.startx; x < extent.stopx; x++) { - if (zz < *zBuffer) - { - float z = w ? 1/w : 0; - UINT32 pcol = rd.texture_lookup(*rd.machine, rd.pens, u*z, v*z); - float ll = l*z; - *img = (light(pcol >> 16, ll) << 16) | (light(pcol >> 8, ll) << 8) | light(pcol, ll); - - *zBuffer = zz; - } - - zz += dz; + float z = w ? 1/w : 0; + UINT32 pcol = rd.texture_lookup(*rd.machine, rd.pens, u*z, v*z); + float ll = l*z; + *img = (light(pcol >> 16, ll) << 16) | (light(pcol >> 8, ll) << 8) | light(pcol, ll); + w += dw; u += du; v += dv; l += dl; img++; - zBuffer++; } } @@ -1943,7 +1932,7 @@ void namcos23_state::render_project(poly_vertex &pv) pv.x = 320 + 768 * pv.x; pv.y = 240 - 768 * pv.y; - pv.p[1] = 1.0f / pv.p[1]; + pv.p[0] = 1.0f / pv.p[0]; } static UINT32 render_texture_lookup_nocache_point(running_machine &machine, const pen_t *pens, float x, float y) @@ -2047,29 +2036,19 @@ void namcos23_state::render_one_model(const namcos23_render_entry *re) namcos23_poly_entry *p = render.polys + render.poly_count; // Should be unnecessary now that frustum clipping happens, but this still culls polys behind the camera - p->vertex_count = render.polymgr->zclip_if_less(ne, pv, p->pv, 5, 0.001f); - + p->vertex_count = render.polymgr->zclip_if_less(ne, pv, p->pv, 4, 0.00001f); + // Project if you don't clip on the near plane if(p->vertex_count >= 3) { // Project the eye points frustum_clip_vertex<float, 3> clipVerts[10]; for(int i=0; i<p->vertex_count; i++) { - // A basic perspective transform - const float Z = p->pv[i].p[0]; - const float projX = p->pv[i].x / Z; - const float projY = p->pv[i].y / Z; - - const float near = 0.001f; - const float far = 1000.0f; - const float m22 = -(far / (far-near)); - const float m23 = -((far * near) / (far - near)); - const float projZ = -(Z * m22) + m23; - // Construct a frustum clipping vert from the NDCoords - clipVerts[i].x = projX; - clipVerts[i].y = projY; - clipVerts[i].z = projZ; - clipVerts[i].w = p->pv[i].p[0]; + const float Z = p->pv[i].p[0]; + clipVerts[i].x = p->pv[i].x / Z; + clipVerts[i].y = p->pv[i].y / Z; + clipVerts[i].z = Z; + clipVerts[i].w = Z; clipVerts[i].p[0] = p->pv[i].p[1]; clipVerts[i].p[1] = p->pv[i].p[2]; clipVerts[i].p[2] = p->pv[i].p[3]; @@ -2077,7 +2056,7 @@ void namcos23_state::render_one_model(const namcos23_render_entry *re) // Clip against all edges of the view frustum int num_vertices = frustum_clip_all<float, 3>(clipVerts, p->vertex_count, clipVerts); - + if (num_vertices != 0) { // Push the results back into the main vertices @@ -2085,26 +2064,26 @@ void namcos23_state::render_one_model(const namcos23_render_entry *re) { p->pv[i].x = clipVerts[i].x; p->pv[i].y = clipVerts[i].y; - p->pv[i].p[0] = clipVerts[i].z; - p->pv[i].p[1] = clipVerts[i].w; - p->pv[i].p[2] = clipVerts[i].p[0]; - p->pv[i].p[3] = clipVerts[i].p[1]; - p->pv[i].p[4] = clipVerts[i].p[2]; + p->pv[i].p[0] = clipVerts[i].w; + p->pv[i].p[1] = clipVerts[i].p[0]; + p->pv[i].p[2] = clipVerts[i].p[1]; + p->pv[i].p[3] = clipVerts[i].p[2]; } p->vertex_count = num_vertices; - + // This is our poor-man's projection matrix - for(int i=0; i<p->vertex_count; i++) + for(int i=0; i<p->vertex_count; i++) { render_project(p->pv[i]); - - const float w = p->pv[i].p[1]; + + float w = p->pv[i].p[0]; + p->pv[i].p[1] *= w; p->pv[i].p[2] *= w; p->pv[i].p[3] *= w; - p->pv[i].p[4] *= w; } - + // Compute an odd sorta'-Z thing that can situate the polygon wherever you want in Z-depth + p->zkey = 0.5f*(minz+maxz); p->front = !(h & 0x00000001); p->rd.machine = &machine(); p->rd.texture_lookup = render_texture_lookup_nocache_point; @@ -2118,6 +2097,17 @@ void namcos23_state::render_one_model(const namcos23_render_entry *re) } } +static int render_poly_compare(const void *i1, const void *i2) +{ + const namcos23_poly_entry *p1 = *(const namcos23_poly_entry **)i1; + const namcos23_poly_entry *p2 = *(const namcos23_poly_entry **)i2; + + if(p1->front != p2->front) + return p1->front ? 1 : -1; + + return p1->zkey < p2->zkey ? 1 : p1->zkey > p2->zkey ? -1 : 0; +} + void namcos23_renderer::render_flush(bitmap_rgb32& bitmap) { render_t &render = m_state.m_render; @@ -2125,32 +2115,30 @@ void namcos23_renderer::render_flush(bitmap_rgb32& bitmap) if(!render.poly_count) return; + for(int i=0; i<render.poly_count; i++) + render.poly_order[i] = &render.polys[i]; + + qsort(render.poly_order, render.poly_count, sizeof(namcos23_poly_entry *), render_poly_compare); + const static rectangle scissor(0, 639, 0, 479); for(int i=0; i<render.poly_count; i++) { - const namcos23_poly_entry *p = &render.polys[i]; + const namcos23_poly_entry *p = render.poly_order[i]; namcos23_render_data& extra = render.polymgr->object_data_alloc(); extra = p->rd; - + extra.bitmap = &bitmap; + // We should probably split the polygons into triangles ourselves to insure everything is being rendered properly if (p->vertex_count == 3) - render_triangle(scissor, render_delegate(FUNC(namcos23_renderer::render_scanline), this), 5, p->pv[0], p->pv[1], p->pv[2]); + render_triangle(scissor, render_delegate(FUNC(namcos23_renderer::render_scanline), this), 4, p->pv[0], p->pv[1], p->pv[2]); else if (p->vertex_count == 4) - render_polygon<4>(scissor, render_delegate(FUNC(namcos23_renderer::render_scanline), this), 5, p->pv); + render_polygon<4>(scissor, render_delegate(FUNC(namcos23_renderer::render_scanline), this), 4, p->pv); else if (p->vertex_count == 5) - render_polygon<5>(scissor, render_delegate(FUNC(namcos23_renderer::render_scanline), this), 5, p->pv); + render_polygon<5>(scissor, render_delegate(FUNC(namcos23_renderer::render_scanline), this), 4, p->pv); else if (p->vertex_count == 6) - render_polygon<6>(scissor, render_delegate(FUNC(namcos23_renderer::render_scanline), this), 5, p->pv); + render_polygon<6>(scissor, render_delegate(FUNC(namcos23_renderer::render_scanline), this), 4, p->pv); } render.poly_count = 0; - - copybitmap(bitmap, m_bitmap, 0, 0, 0, 0, scissor); - - // Reset the buffers - for (int i = 0; i < (m_state.m_screen->visible_area().width())*(m_state.m_screen->visible_area().height()); i++) - { - m_zBuffer[i] = 1000.0f; // TODO: set to far clipping plane value - } } void namcos23_state::render_run(bitmap_rgb32 &bitmap) @@ -2992,7 +2980,7 @@ WRITE16_MEMBER(namcos23_state::iob_p6_w) READ16_MEMBER(namcos23_state::iob_analog_r) { - return m_adc_ports[offset]->read_safe(0); + return read_safe(m_adc_ports[offset], 0); } diff --git a/src/mame/drivers/naomi.c b/src/mame/drivers/naomi.c index 73cc62f775f..dec0205d9b5 100644 --- a/src/mame/drivers/naomi.c +++ b/src/mame/drivers/naomi.c @@ -3,6 +3,7 @@ /* Sega Naomi / Naomi 2 / Atomiswave + Sega, 1998-2005 Driver by Samuele Zannoli, R. Belmont, ElSemi, David Haywood, Angelo Salese and Olivier Galibert @@ -93,15 +94,11 @@ TODO (game-specific): (more will come up soon ...) --------------------------------------------------------------------------------------------------------------------------------------------------- +Guru's Readmes +-------------- -Guru's Readme -------------- - -Sega NAOMI Mainboard -Sega, 1998-2005 - -PCB Layout ----------- +Sega NAOMI Mainboard PCB Layout +------------------------------- 837-13544-01 171-7772F 837-13707 (sticker) @@ -114,49 +111,111 @@ PCB Layout |ADM485 BIOS.IC27 5264165 5264165 | | 5264165 |-----| 5264165 | | CN2 | SH4 | | -| | | 33.3333MHZ | -|CN26 |-----| 27MHZ| +| | | 33.3333MHz | +|CN26 |-----| 27MHz| | CY2308SC-3| | KM416S4030 |------| HY57V161610 | | | POWER| HY57V161610 | -| C844G 315-6232 | VR2 | 32MHZ | -| 33.8688MHZ |------| HY57V161610 | -| xMHz HY57V161610 | +| C844 315-6232 | VR2 | 32MHz | +| 33.8688MHz |------| HY57V161610 | +| 32.768MHz HY57V161610 | | PCM1725 JP1 62256 | | HY57V161610 | | HY57V161610 | | 315-6145 | -|CN25 CY2308SC-1 315-6146 | +|CN25 CY2308SC-3 315-6146 | | LED1 93C46 | -| LED2 14.7456MHZ | +| LED2 14.7456MHz | |---------------------------------------------------| Notes: - CN1/2/3 - Connectors for ROM cart - CN25/26 - Connectors for filter board - EPF8452AQC160-3 - Altera FLEX EPF8452AQC160-3 FPGA (QFP160) - 315-6188.IC31 - Altera EPC1064 (DIP8) - According to the datasheet, it's an FPGA Configuration - Device which loads the Altera Flex EPF8452 with some info - on power-up. - JP1 - set to 2-3. Alt setting is 1-2 - JP4 - set to 2-3. Alt setting is 1-2 - 93C46 - 128 bytes serial EEPROM - A179B 96K - TI SN75179B Differential driver and receiver pair (like RS485) - ADM485 - Analog Devices ADM485 - BIOS.IC27 - 27C160 EPROM - 5264165 - Hitachi 5264165FTTA60 (video RAM) - HY57V161610 - Hyundai 57V161610DTC-8 (main program RAM) - CY2308SC-3 - Clock generator IC - KM416S4030 - Samsung KM416S4030 16MBit SDRAM (sound related RAM?) - 315-6232 - Sega Custom IC (QFP100) - 315-6145 - Sega Custom IC (QFP56) - 315-6146 - Sega Custom IC (QFP176) - C844G - ? (SOIC14) - 62256 - 32kx8 SRAM - PCM1725 - Burr-Brown PCM1725 - xMHz - Small round XTAL (possibly 32.768kHz for a clock?) - SH4 - Hitachi SH4 CPU (BGAxxx, with heatsink) - POWERVR2 - POWERVR2 video generator (BGAxxx, with heatsink and fan) + SH4 - Hitachi HD6417091 SH4 CPU (BGAxxx, with heatsink) + POWERVR2 - VideoLogic/NEC 'CLX2/HOLLY' chipset and PowerVR2 GPU (large BGAxxx, with heatsink and fan) +EPF8452AQC160-3 - Altera FLEX EPF8452AQC160-3 FPGA (QFP160) + 93C46 - 128 bytes serial EEPROM (SOIC8) + BIOS.IC27 - 27C160 EPROM (DIP42) + 5264165 - Hitachi 5264165FTTA60 1M x 16-bit x 4-banks (64Mbit) SDRAM (TSOPII-54) + HY57V161610 - Hynix HY57V161610DTC-8 512k x 16-bit x 2-banks (16Mbit) SDRAM (TSOPII-50) + KM416S4030 - Samsung KM416S4030 1M x 16-bit x 4 Banks SDRAM (TSOPII-54) + 62256 - 32k x8-bit SRAM (SOP28) + 315-6145 - video DAC/encoder, BU1426KS equivalent (QFP56) + 315-6146 - Sega Custom Z80-based MCU (QFP176) + 315-6188 - Altera EPC1064PC8 FPGA Configuration Device with sticker '315-6188' at IC31 (DIP8) + 315-6232 - Yamaha AICA SPU (QFP100) + CY2308SC-3 - Cypress CY2308SC-3 2-Bank 4-Output Tri-state PLL Programmable Clock Generator IC with 2X or 4X outputs and Zero Delay Buffer (SOIC16) + C844 - NEC uPC844 Quad Operational Amplifier (SOIC14) + A179B - TI SN75179B Differential Driver and Receiver Pair (DIP8) + ADM485 - Analog Devices ADM485 +5 V Low Power EIA RS-485 Transceiver (SOIC8) + PCM1725 - Burr-Brown PCM1725 Stereo Audio Digital to Analog Converter 16 Bits, 96kHz Sampling (SOIC14) + JP1 - set to 2-3. Alt setting is 1-2 + JP4 - set to 2-3. Alt setting is 1-2 + CN1/2/3 - Connectors for ROM cart or GDROM DIMM Unit + CN25/26 - Connectors for Filter Board + + +Sega NAOMI 2 Mainboard PCB Layout +--------------------------------- +837-14009-01 +171-8082C +837-14123 (sticker) +(C) SEGA 1999 +|---------------------------------------------------| +| CN1 32MHz BATTERY CN3 | +|PC910 315-6146 S-CAP 62256 315-6188.IC31| +|A179B 62256 *93C46 BIOS.IC27 EPF8452 | +| ADM485 14.7456MHz D4721| +| 5264165 315-6232 315-6268 93C46 | +|PCM1725 33.8688MHz 33.3333MHz | +| 32.768kHz | +| CN2 CY2308 |-----| | +| | SH4 | | +|CN26 | | | +| C844 *CY2308 |-----| | +| 315-6258 5264165 5264165 | +| 315-6269 *5264165 *5264165 16M 16M | +| 315-6258 *16M *16M | +| 16M|--------| |--------| |--------| | +| 16M|315-6267| |315-6289| |315-6267|16M| +| *16M| | | | | |16M| +| *16M| | | | | |*16M +|MC33470 |--------| |--------| |--------|*16M +|CN25 16M 16M 64M 64M | +|*3771 *16M *16M *64M *64M 3771 | +| 27MHz 3771 | +| LED2 LED1 *CY2308 CY2292 3773| +|---------------------------------------------------| +Notes: (* - these parts on other side of PCB) + SH4 - Hitachi HD6417091 SH4 CPU (BGAxxx, with heatsink) + BIOS.IC27 - 27C160 EPROM (DIP42) + EPF8452 - Altera FLEX EPF8452AQC160-3 FPGA (QFP160) + 93C46 - 128 bytes serial EEPROM (SOIC8) + 5264165 - Hitachi 5264165FTTA60 1M x 16-bit x 4-banks (64Mbit) SDRAM (TSOP-II 54) + 16M - Hynix HY57V161610DTC-8 512k x 16-bit x 2-banks (16Mbit) SDRAM (TSOP-II 50) + 64M - NEC D4564323 512k x 32-bit x 4-banks (64Mbit) SDRAM (TSOP-II 86) + 62256 - 32k x8-bit SRAM (SOP28) + 315-6146 - Sega Custom Z80-based MCU (QFP176) + 315-6188 - Altera EPC1064PC8 FPGA Configuration Device with sticker '315-6188' at IC31 (DIP8) + 315-6232 - Yamaha AICA SPU (QFP100) + 315-6258 - video DAC/encoder, BU1426KS equivalent (QFP56, x2) + 315-6267 - VideoLogic/NEC 'CLX2/HOLLY' chipset and PowerVR2 GPU (large BGAxxx, with heatsink and fan, x2) + 315-6268 - Altera EPM7032AELC44-10 CPLD with sticker '315-6268' (PLCC44) + 315-6269 - Altera MAX EPM7064AETC100-10 CPLD with sticker '315-6269' (TQFP100) + 315-6289 - VideoLogic/NEC 'ELAN' T&L coprocessor (large BGAxxx, with heatsink) + MC33470 - ON Semiconductor MC33470 Synchronous Rectification DC/DC Converter Programmable Integrated Controller (SOIC20) + CY2308 - Cypress CY2308SC-3 2-Bank 4-Output Tri-state PLL Programmable Clock Generator IC with 2X or 4X outputs and Zero Delay Buffer (SOIC16) + CY2292 - Cypress CY2292SL Three-PLL General-Purpose EPROM Programmable Clock Generator IC (SOIC16) + A179B - TI SN75179B Differential Driver and Receiver Pair (SOIC8) + ADM485 - Analog Devices ADM485 +5 V Low Power EIA RS-485 Transceiver (SOIC8) + PC910 - Sharp PC910 Ultra-high Speed Response OPIC Photocoupler (DIP8) + D4721 - NEC uPD4721GS RS-232 Line Driver/Receiver at 3.3V / 5V (TSSOP20) + 3771 - Fujitsu MB3771 Power Supply Monitor (i.e. reset) IC (SOIC8) + 3773 - Fujitsu MB3773 Power Supply Monitor with Watch-Dog Timer (SOIC8) + C844 - NEC uPC844 Quad Operational Amplifier (SOIC14) + PCM1725 - Burr-Brown PCM1725 Stereo Audio Digital to Analog Converter 16 Bits, 96kHz Sampling (SOIC14) + BATTERY - 3v Coin Battery + S-CAP - 5.5v 0.1f Supercap + LED1 / LED2 - Red LED / Green LED + CN1/2/3 - Connectors for ROM cart or GDROM DIMM Unit + CN25/26 - Connectors for Filter Board Filter Board @@ -173,23 +232,22 @@ Filter Board | CN7 CN6 CN4 CN3 CN2 CN1| |----------------------------------------------------| Notes: - CN1/CN2 - Power input - CN3 - HD15 (i.e. VGA connector) RGB Video Output @ 15kHz or 31.5kHz - CN4 - RCA Audio Output connectors - CN5 - USB connector (connection to I/O board) - CN6 - 10 pin connector labelled 'MAPLE 0-1' - CN7 - 11 pin connector labelled 'MAPLE 2-3' - CN8 - RS422 connector - CN9 - Midi connector - CNTX/CNRX - Network connectors - DIN1/DIN2 - Connectors joining to mainboard CN25/26 - SW1 - Test Switch - SW2 - Service Switch - DIPSW - 4-position DIP switch block - CN10 - 12 volt output for internal case exhaust fan - CN11 - RGB connector (not populated) - CN12 - 5 volt output connector - + CN1/CN2 - Power input + CN3 - HD15 (i.e. VGA connector) RGB Video Output @ 15kHz or 31.5kHz + CN4 - RCA Audio Output connectors + CN5 - USB connector (connection to I/O board) + CN6 - 10 pin connector labelled 'MAPLE 0-1' + CN7 - 11 pin connector labelled 'MAPLE 2-3' + CN8 - RS422 connector + CN9 - Midi connector + CNTX/CNRX - Network connectors + DIN1/DIN2 - Connectors joining to mainboard CN25/26 + SW1 - Test Switch + SW2 - Service Switch + DIPSW - 4-position DIP switch block + CN10 - 12 volt output for internal case exhaust fan + CN11 - RGB connector (not populated) + CN12 - 5 volt output connector --------------------------------------------------------- @@ -211,7 +269,6 @@ Naomi 2 / GD-ROM | | | --------------------------------------------------------- - NAOMI ROM cart usage ------------------------- There are 6 known types of carts manufactured by Sega: 171-7885A, 171-7919A, 171-7930B, 171-7978B, 171-8132B, 171-8346C @@ -363,7 +420,6 @@ Virtual On Oratorio Tangram M.S.B.S. ver5.66 840-0028C 23198 13 (64Mb) Zombie Revenge 840-0003C 21707 19 (64Mb) ? 315-6213 317-0249-COM joystick + 3 buttons - 171-7930B (C) Sega 1998 |------------------------------------------------------------------| | JJJJJJ SW2 ----CN2---- -| @@ -413,7 +469,6 @@ Game on cart IC16# # of SOP56 Notes Puyo Puyo Fever (prototype ver 0.01) * not present 22 (64Mb) no cart, only development PCB - 837-13801 171-7978B (C) Sega 1999 |---------------------------------------------------------| | ----CN2---- -| @@ -476,7 +531,6 @@ Virtua Fighter 4 Evolution 840-0106B 23934 Virtua Tennis 2 / Power Smash 2 (Rev A) 840-0084C 22327A 18 (64Mb) present 317-0320-COM - 837-14114-01 171-8132B (C) Sega 2000 |---------------------------------------------------------| | IC11 IC10 IC9 ----CN2---- -| @@ -541,7 +595,6 @@ WWF Royal Rumble 840-0040C 22261 8 (128Mb) 3 Zero Gunner 2 841-0020C 23689 5 (128Mb) 315-6319A 315-6213 317-5073-COM - 171-8346C (C) Sega 2005 |---------------------------------------------------------| | IC12 IC8 ----CN2---- -| @@ -596,7 +649,6 @@ Shooting Love 2007 841-0057C not present 4 Touch De Zunou (Rev A) 840-0166C not present 2 (512Mb) present 317-0435-JPN present IC4# is marked "18", requires 837-14672 sensor board (SH4 based) - MASK B (C) Namco 2000 |-------------------------------------------------------------------------------------| | ----CN2---- -| @@ -638,18 +690,18 @@ Notes: CN1/2/3 - connectors joining to main board Games known to use this PCB include.... - Cart Sticker FL0-FL3 FLASHROMs X76F100 EPM7064 EPM7064 315-5881 Known Game - Game Type on cart FLASHROM # of SOP48 IC @ 1F IC @ 1H IC @ 2K IC @ 1M code (1) Notes ------------------------------------------------------------------------------------------------------------------------------------------------------- + Cart Sticker FL0-FL3 FLASHROMs X76F100 EPM7064 EPM7064 315-5881 Known Game + Game Type on cart FLASHROM # of SOP48 IC @ 1F IC @ 1H IC @ 2K IC @ 1M code (1) Notes +------------------------------------------------------------------------------------------------------------------------------------------------------------- /Gun Survivor 2 Biohazard -\Code: Veronica F1X 25709801 1 (64Mb) 14 (128Mb) not present NAODEC2A NAODEC1B 317-5075-COM BHF1 uses Namco FCA JVS I/O (not dumped), will crash if COMM.BOARD not present +\Code: Veronica (Japan, Ver.E) F1X 25709801 1 (64Mb) 14 (128Mb) not present NAODEC2A NAODEC1B 317-5075-COM BHF1 uses Namco FCA JVS I/O (not dumped), will crash if COMM.BOARD not present /Gun Survivor 2 Biohazard -\Code: Veronica (Ver. E) F1X 25709801 1 (64Mb) 14 (128Mb) not present NAODEC2A NAODEC1B 317-5075-COM BHF2 -/Shin Nihon Prowrestling Toukon /FL0 & FL1 have pin55 raised from PCB. -\Retsuden 4 Arcade Edition (Ver. A) F2X 25349801 2 (64Mb) 15 (128Mb) not present NAODEC2A NAODEC1B 317-5040-COM TRF1 \They are connected togheter and go to pin89 on 2K. -World Kicks PCB (WKC1 Ver. A) F2 25509801 2 (64Mb) 9 (128Mb) not present NAODEC2A NAODEC1B 317-5040-COM WKC1 uses Namco V226 JVS I/O (not dumped) -World Kicks (WK2 Ver. A) F2 25209801 2 (64Mb) 9 (128Mb) not present NAODEC2A NAODEC1A 317-5040-COM WK2 -World Kicks (WK3 Ver. A) F2 25209801 2 (64Mb) 9 (128Mb) not present NAODEC2A NAODEC1A 317-5040-COM WK3 +\Code: Veronica (Asia, Ver.E) F1X 25709801 1 (64Mb) 14 (128Mb) not present NAODEC2A NAODEC1B 317-5075-COM BHF2 +/Shin Nihon Prowrestling Toukon /FL0 & FL1 have pin55 raised from PCB. +\Retsuden 4 Arcade Edition (Japan, Ver.A) F2X 25349801 2 (64Mb) 15 (128Mb) not present NAODEC2A NAODEC1B 317-5040-COM TRF1 \They are connected together and go to pin89 on 2K. +World Kicks PCB (Japan, WKC1 Ver.A) F2 25509801 2 (64Mb) 9 (128Mb) not present NAODEC2A NAODEC1B 317-5040-COM WKC1 uses Namco V226 JVS I/O (not dumped) +World Kicks (Asia, WK2 Ver.A) F2 25209801 2 (64Mb) 9 (128Mb) not present NAODEC2A NAODEC1A 317-5040-COM WK2 +World Kicks (US, WK3 Ver.A) F2 25209801 2 (64Mb) 9 (128Mb) not present NAODEC2A NAODEC1A 317-5040-COM WK3 (1) note: the number in the game code has the following meaning: 1 = Japan, 2 = Asia, 3 = US, 4 = World. @@ -692,33 +744,29 @@ Notes: CN1/2/3 - connectors joining to main board Games known to use this PCB include.... - Cart Sticker FL0-FL3 FLASHROMs X76F100 CY37128 315-5881 Known Game - Game Type on cart FLASHROM # of SOP48 IC @ 1F IC @ 2J IC @ 1M code (1) Notes --------------------------------------------------------------------------------------------------------------------------------- -Mazan: Flash of the Blade (Ver. A) F1X 25869812 1 (64Mb) 8 (128Mb) present NAODEC3 317-0266-COM MAZ2 uses 2x Namco FCB JVS I/O (not dumped) -Mazan: Flash of the Blade (Ver. A) F1X 25869812 1 (64Mb) 8 (128Mb) present NAODEC3 317-0266-COM MAZ3 -Ninja Assault (Ver. A) F3 25469801 3 (64Mb) 9 (128Mb) present NAODEC3 317-5068-COM NJA1 uses Namco JYU JVS I/O -Ninja Assault (Ver. A) F3 25469801 3 (64Mb) 9 (128Mb) present NAODEC3 317-5068-COM NJA2 -Ninja Assault (Ver. A) F3 25469801 3 (64Mb) 9 (128Mb) present NAODEC3 317-5068-COM NJA3 -Ninja Assault (Ver. A) F3 25469801 3 (64Mb) 9 (128Mb) present NAODEC3 317-5068-COM NJA4 + Cart Sticker FL0-FL3 FLASHROMs X76F100 CY37128 315-5881 Known Game + Game Type on cart FLASHROM # of SOP48 IC @ 1F IC @ 2J IC @ 1M code (1) Notes +---------------------------------------------------------------------------------------------------------------------------------------- +Mazan: Flash of the Blade (Asia, Ver.A) F1X 25869812 1 (64Mb) 8 (128Mb) present NAODEC3 317-0266-COM MAZ2 uses 2x Namco FCB JVS I/O (not dumped) +Mazan: Flash of the Blade (US, Ver.A) F1X 25869812 1 (64Mb) 8 (128Mb) present NAODEC3 317-0266-COM MAZ3 +Ninja Assault (Japan, Ver.A) F3 25469801 3 (64Mb) 9 (128Mb) present NAODEC3 317-5068-COM NJA1 uses Namco JYU JVS I/O +Ninja Assault (Asia, Ver.A) F3 25469801 3 (64Mb) 9 (128Mb) present NAODEC3 317-5068-COM NJA2 +Ninja Assault (US, Ver.A) F3 25469801 3 (64Mb) 9 (128Mb) present NAODEC3 317-5068-COM NJA3 +Ninja Assault (World, Ver.A) F3 25469801 3 (64Mb) 9 (128Mb) present NAODEC3 317-5068-COM NJA4 (1) note: the number in the game code has the following meaning: 1 = Japan, 2 = Asia, 3 = US, 4 = World. - - Note! Generally, games that require a special I/O board or controller will not boot at all with a standard NAOMI I/O board. Usually they display a message saying the I/O board is not acceptable or not connected properly. - Sega I/O boards --------------- These are used on NAOMI and all other Sega games from 1999 onwards. Not all I/O boards are listed here. If you know of others, please let us know. - 838-13683 838-13683-91 (sticker) 838-13683-92 (sticker) @@ -1200,16 +1248,12 @@ Pin Function I/O Pin Function I/O The bottom of the PCB contains nothing significant except some connectors. One for the game cart, one for special controls or I/O, one for a communication module, one for a cooling fan and one for the serial connection daughterboard. ---------------------------------------------------------------------------------------------------------------------------------- - - Atomiswave cart PCB layout and game usage (revision 1.0 26/2/2011 5:59pm) ----------------------------------------- Type 1 ROM Board: - AM3AGB-04 MROM PCB 2002 @@ -1292,7 +1336,6 @@ IC10 to IC17 - Custom-badged 128M TSOP48 mask ROMs. Type 2 ROM Board: - AM3ALW-02 MROM2 PCB 2005 @@ -1502,7 +1545,6 @@ Notes: CN - This connector plugs into the main board - Gun Sub Board ------------- @@ -8417,6 +8459,19 @@ ROM_START( initdv2e ) ROM_LOAD( "317-0357-exp.pic", 0x000000, 0x004000, CRC(38f84b4d) SHA1(03c12d8580da1a4b3a554e62fd8b1f3447b7ebbd) ) ROM_END +ROM_START( clubkcyc ) + NAOMI2_BIOS + NAOMI_DEFAULT_EEPROM + + DISK_REGION( "gdrom" ) + DISK_IMAGE_READONLY( "gds-0029a", 0, SHA1(8354828a505a26da726a686828f8860b11b15da3) ) + + ROM_REGION( 0x4000, "pic", ROMREGION_ERASEFF) + //PIC16C622A (317-0358-COM) + //(sticker 253-5508-0358) + ROM_LOAD( "317-0358-com.pic", 0x000000, 0x004000, CRC(dd33e50f) SHA1(c51712754022fc3adc350fa0714bf60fd0d163cf) ) +ROM_END + ROM_START( initdv3j ) NAOMI2_BIOS NAOMI_DEFAULT_EEPROM @@ -8508,6 +8563,18 @@ ROM_START( inidv3cy ) ROM_LOAD("317-0406-com.pic", 0x00, 0x4000, CRC(fe91a7af) SHA1(3562d8d454ac6e5b73a24d4dc8928ef24687cdf7) ) ROM_END +ROM_START( inidv3ca ) + NAOMI2_BIOS + NAOMI_DEFAULT_EEPROM + + DISK_REGION( "gdrom" ) + DISK_IMAGE_READONLY( "gds-0039a", 0, SHA1(44aab273f836aa81728b1a00fdfdc2561d0984aa) ) + + ROM_REGION( 0x4000, "pic", ROMREGION_ERASEFF) + //PIC16C621A (317-0406-COM) + //(sticker 253-5508-0406) + ROM_LOAD("317-0406-com.pic", 0x00, 0x4000, CRC(fe91a7af) SHA1(3562d8d454ac6e5b73a24d4dc8928ef24687cdf7) ) +ROM_END /********************************************** * @@ -9111,7 +9178,7 @@ ROM_END /* 0170-01*/GAME( 2007,manicpnc, naomi, naomim4, naomi, naomi_state, naomi, ROT0, "Sega", "Manic Panic Ghosts!", GAME_FLAGS ) /* 0170 */ GAME( 2007, pokasuka, manicpnc, naomim4, naomi, naomi_state, naomi, ROT0, "Sega", "Pokasuka Ghost!", GAME_FLAGS ) /* 0175 */ GAME( 2007, asndynmt, naomi, naomim4, naomi, naomi_state, naomi, ROT0, "Sega", "Asian Dynamite", GAME_FLAGS ) -/* 0177 */ GAME( 2007, rhytngk, naomi, naomim4, naomi, naomi_state, naomi, ROT0, "Sega / Nintendo", "Rhythm Tengoku", GAME_FLAGS ) +/* 0177 */ GAME( 2007, rhytngk, naomi, naomim4, naomi, naomi_state, naomi, ROT0, "Sega / Nintendo - J.P ROOM", "Rhythm Tengoku", GAME_FLAGS ) /* 0186 */ GAME( 2009, starhrpr, naomi, naomim4, naomi, naomi_state, naomi, ROT270,"Sega", "Star Horse Progress Returns (satellite)", GAME_FLAGS ) // 00xx Mayjinsen (Formation Battle in May) - prototype, never released @@ -9226,16 +9293,17 @@ GAME( 2003, puyofevp, naomi, naomim1, naomi, naomi_state, naomi, ROT0, "Sega", " /* 0025A */ GAME( 2002, initdexp, naomi2, naomi2gd, naomi, naomi_state, naomi2, ROT0, "Sega", "Initial D Arcade Stage (Export) (Rev A) (GDS-0025A)", GAME_FLAGS ) /* 0026 */ GAME( 2002, initdv2jo,initdv2j,naomi2gd, naomi, naomi_state, naomi2, ROT0, "Sega", "Initial D Arcade Stage Ver. 2 (Japan) (GDS-0026)", GAME_FLAGS ) // 0026A Initial D Arcade Stage Ver. 2 (Japan) (Rev A) -/* 0026B */ GAME( 2002, initdv2j, naomi2, naomi2gd, naomi, naomi_state, naomi2, ROT0, "Sega", "Initial D Arcade Stage Ver. 2 (Japan) (Rev. B) (GDS-0026B)", GAME_FLAGS ) +/* 0026B */ GAME( 2002, initdv2j, naomi2, naomi2gd, naomi, naomi_state, naomi2, ROT0, "Sega", "Initial D Arcade Stage Ver. 2 (Japan) (Rev B) (GDS-0026B)", GAME_FLAGS ) /* 0027 */ GAME( 2002, initdv2e, initdv2j,naomi2gd, naomi, naomi_state, naomi2, ROT0, "Sega", "Initial D Arcade Stage Ver. 2 (Export) (GDS-0027)", GAME_FLAGS ) // 0028 -// 0029 Club Kart Cycraft Edition +// 0029 +/* 0029A */ GAME( 2003, clubkcyc, naomi2, naomi2gd, naomi, naomi_state, naomi2, ROT0, "Sega", "Club Kart for Cycraft (Rev A) (GDS-0029A)", GAME_FLAGS ) // 0030 /* 0031 */ GAME( 2003, puyofev, naomigd, naomigd, naomi, naomi_state, naomigd, ROT0, "Sega", "Puyo Puyo Fever (GDS-0031)", GAME_FLAGS ) // 0032 Initial D Arcade Stage Ver. 3 (Japan) // 0032A Initial D Arcade Stage Ver. 3 (Japan) (Rev A) -/* 0032B */ GAME( 2004, initdv3jb,initdv3j,naomigd, naomi, naomi_state, naomi2, ROT0, "Sega", "Initial D Arcade Stage Ver. 3 (Japan) (Rev. B) (GDS-0032B)", GAME_FLAGS ) -/* 0032C */ GAME( 2004, initdv3j, naomi2, naomi2gd, naomi, naomi_state, naomi2, ROT0, "Sega", "Initial D Arcade Stage Ver. 3 (Japan) (Rev. C) (GDS-0032C)", GAME_FLAGS ) +/* 0032B */ GAME( 2004, initdv3jb,initdv3j,naomigd, naomi, naomi_state, naomi2, ROT0, "Sega", "Initial D Arcade Stage Ver. 3 (Japan) (Rev B) (GDS-0032B)", GAME_FLAGS ) +/* 0032C */ GAME( 2004, initdv3j, naomi2, naomi2gd, naomi, naomi_state, naomi2, ROT0, "Sega", "Initial D Arcade Stage Ver. 3 (Japan) (Rev C) (GDS-0032C)", GAME_FLAGS ) /* 0033 */ GAME( 2004, initdv3e, naomi2, naomi2gd, naomi, naomi_state, naomi2, ROT0, "Sega", "Initial D Arcade Stage Ver. 3 (Export) (GDS-0033)", GAME_FLAGS ) // 0034 // 0035 @@ -9249,8 +9317,8 @@ GAME( 2003, puyofevp, naomi, naomim1, naomi, naomi_state, naomi, ROT0, "Sega", " // 0037? Puyo Puyo Fever (Export) // 0038 // 0039 Initial D Arcade Stage Ver. 3 Cycraft Edition -// 0039A Initial D Arcade Stage Ver. 3 Cycraft Edition (Rev A) -/* 0039B */ GAME( 2006, inidv3cy, naomi2, naomigd, naomi, naomi_state, naomi2, ROT0, "Sega", "Initial D Arcade Stage Ver. 3 Cycraft Edition (Rev. B) (GDS-0039B)", GAME_FLAGS ) +/* 0039A */ GAME( 2006, inidv3ca, inidv3cy,naomigd, naomi, naomi_state, naomi2, ROT0, "Sega", "Initial D Arcade Stage Ver. 3 Cycraft Edition (Rev A) (GDS-0039A)", GAME_FLAGS ) +/* 0039B */ GAME( 2006, inidv3cy, naomi2, naomigd, naomi, naomi_state, naomi2, ROT0, "Sega", "Initial D Arcade Stage Ver. 3 Cycraft Edition (Rev B) (GDS-0039B)", GAME_FLAGS ) // 0040 // 0041 Dragon Treasure 3 // 0041A Dragon Treasure 3 (Rev A) diff --git a/src/mame/drivers/neogeo.c b/src/mame/drivers/neogeo.c index e9df2f8456c..82fbbf7abe3 100644 --- a/src/mame/drivers/neogeo.c +++ b/src/mame/drivers/neogeo.c @@ -642,7 +642,7 @@ CUSTOM_INPUT_MEMBER(neogeo_state::multiplexed_controller_r) { "IN0-0", "IN0-1" }, { "IN1-0", "IN1-1" } }; - return ioport(cntrl[port][m_controller_select & 0x01])->read_safe(0x00); + return read_safe(ioport(cntrl[port][m_controller_select & 0x01]), 0x00); } CUSTOM_INPUT_MEMBER(neogeo_state::kizuna4p_controller_r) @@ -654,7 +654,7 @@ CUSTOM_INPUT_MEMBER(neogeo_state::kizuna4p_controller_r) { "IN0-0", "IN0-1" }, { "IN1-0", "IN1-1" } }; - int ret = ioport(cntrl[port][m_controller_select & 0x01])->read_safe(0x00); + int ret = read_safe(ioport(cntrl[port][m_controller_select & 0x01]), 0x00); if (m_controller_select & 0x04) ret &= ((m_controller_select & 0x01) ? ~0x20 : ~0x10); return ret; diff --git a/src/mame/drivers/nmg5.c b/src/mame/drivers/nmg5.c index f54110c224a..642bb9a89b5 100644 --- a/src/mame/drivers/nmg5.c +++ b/src/mame/drivers/nmg5.c @@ -1442,7 +1442,7 @@ ROM_START( wondstcka ) ROM_REGION( 0x280000, "gfx2", 0 ) /* 16x16x5 */ ROM_LOAD( "8.u83 ", 0x000000, 0x80000, CRC(f51cf9c6) SHA1(6d0fc749bab918ff6a9d7fae8be7c65823349283) ) -// ROM_LOAD( "9.u82", 0x080000, 0x80000, CRC(8c6cff4d) SHA1(5a217ff60f10bf5c58091c189b3509d1361a16b3) ) // bad dump +// ROM_LOAD( "9.u82", 0x080000, 0x80000, CRC(8c6cff4d) SHA1(5a217ff60f10bf5c58091c189b3509d1361a16b3) ) // bad dump ROM_LOAD( "9.u82", 0x080000, 0x80000, CRC(ddd3c60c) SHA1(19b68a44c877d0bf630d07b18541ef9636f5adac) ) ROM_LOAD( "7.u105", 0x100000, 0x80000, CRC(a7fc624d) SHA1(b336ab6e16555db30f9366bf5b797b5ba3ea767c) ) ROM_LOAD( "6.u96", 0x180000, 0x80000, CRC(2369d8a3) SHA1(4224f50c9c31624dfcac6215d60a2acdd39bb477) ) diff --git a/src/mame/drivers/osborne1.c b/src/mame/drivers/osborne1.c index 4910ee5e0cc..9df40a118e6 100644 --- a/src/mame/drivers/osborne1.c +++ b/src/mame/drivers/osborne1.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Wilbert Pol +// copyright-holders:Wilbert Pol,Vas Crabb /*************************************************************************** Osborne-1 driver file @@ -10,63 +10,100 @@ Bank 1 simply consists of 64KB of RAM. The upper 4KB is used for the lower 8 bit of video RAM entries. Bank 2 holds the BIOS ROM and I/O area. Only addresses 0000-3FFF are used -by bank 2. Bank 2 is divided as follows: -3000-3FFF Unused +by bank 2 (4000-FFFF mirrors bank 1). Bank 2 is divided as follows: +3000-3FFF Nominally unused but acts as mirror of 2000-2FFF 2C00-2C03 Video PIA 2A00-2A01 Serial interface 2900-2903 488 PIA +2400-2400 SCREEN-PAC (if present) 2201-2280 Keyboard 2100-2103 Floppy -1000-1FFF Unused +1000-1FFF Nominally unused but acts as read mirror of BIOS ROM 0000-0FFF BIOS ROM +The logic is actually quite sloppy, and will cause bus fighting under many +circumstances since it doesn't actually check all four bits, just that two +are in the desired state. + Bank 3 has the ninth bit needed to complete the full Video RAM. These bits are stored at F000-FFFF. Only the highest bit is used. On bootup bank 2 is active. -The actual banking is done through I/O ports 00-03. -00 - Have both bank 2 and bank 1 active. This seems to be the power up default. -01 - Only have bank 1 active. -02 - Have both bank 2 and bank 3 active. (Not 100% sure, also bank 1 from 4000-EFFF?) -03 - Have both bank 2 and bank 1 active. +Banking is controlled by writes to I/O space. Only two low address bits are +used, and the value on the data bus is completley ignored. +00 - Activate bank 2 (also triggered by CPU reset) +01 - Activate bank 1 +02 - Set BIT 9 signal (map bank 3 into F000-FFFF) +03 - Clear BIT 9 signal (map bank 1/2 into F000-FFFF) + +Selecting between bank 1 and bank 2 is also affected by M1 and IRQACK +conditions using a set of three flipflops. + +The serial speed configuration implements wiring changes recommended in the +Osborne 1 Technical Manual. There's no way for software to read the +selected baud rates, so it will always call the low speed "300" and the high +speed "1200". You as the user have to keep this in mind using the system. + +Serial communications can be flaky when 600/2400 is selected. This is not a +bug in MAME. I've checked and double-checked the schematics to confirm it's +an original bug. The division ratio from the master clock to the baud rates +in this mode is effectively 16*24*64 or 16*24*16 giving actual data rates of +650 baud or 2600 baud, about 8.3% too fast (16*26*64 and 16*26*16 would give +the correct rates). MAME's bitbanger seems to be able to accept the ACIA +output at this rate, but the ACIA screws up when consuming data from MAME's +bitbanger. + +Schematics specify a WD1793 floppy controller, but we're using the Fujitsu +equivalent MB8877 here. Is it known that the original machines used one or +the other exclusively? In any case MAME emulates them identically. + TODO: - - Verify frequency of the beep/audio alarm. + +* Hook up the port direction control bits in the IEEE488 interface properly + and test it with some emulated peripheral. Also the BIOS can speak + Centronics parallel over the same physical interface, so this should be + tested, too. ***************************************************************************/ #include "includes/osborne1.h" +#include "bus/rs232/rs232.h" #define MAIN_CLOCK 15974400 static ADDRESS_MAP_START( osborne1_mem, AS_PROGRAM, 8, osborne1_state ) - AM_RANGE( 0x0000, 0x0FFF ) AM_READ_BANK("bank1") AM_WRITE( osborne1_0000_w ) - AM_RANGE( 0x1000, 0x1FFF ) AM_READ_BANK("bank2") AM_WRITE( osborne1_1000_w ) - AM_RANGE( 0x2000, 0x2FFF ) AM_READWRITE( osborne1_2000_r, osborne1_2000_w ) - AM_RANGE( 0x3000, 0x3FFF ) AM_READ_BANK("bank3") AM_WRITE( osborne1_3000_w ) + AM_RANGE( 0x0000, 0x0FFF ) AM_READ_BANK("bank_0xxx") AM_WRITE(bank_0xxx_w) + AM_RANGE( 0x1000, 0x1FFF ) AM_READ_BANK("bank_1xxx") AM_WRITE(bank_1xxx_w) + AM_RANGE( 0x2000, 0x3FFF ) AM_READWRITE(bank_2xxx_3xxx_r, bank_2xxx_3xxx_w) AM_RANGE( 0x4000, 0xEFFF ) AM_RAM - AM_RANGE( 0xF000, 0xFFFF ) AM_READ_BANK("bank4") AM_WRITE( osborne1_videoram_w ) + AM_RANGE( 0xF000, 0xFFFF ) AM_READ_BANK("bank_fxxx") AM_WRITE(videoram_w) +ADDRESS_MAP_END + + +static ADDRESS_MAP_START( osborne1_op, AS_DECRYPTED_OPCODES, 8, osborne1_state ) + AM_RANGE( 0x0000, 0xFFFF ) AM_READ(opcode_r) ADDRESS_MAP_END static ADDRESS_MAP_START( osborne1_io, AS_IO, 8, osborne1_state ) ADDRESS_MAP_UNMAP_HIGH ADDRESS_MAP_GLOBAL_MASK(0xff) - AM_RANGE( 0x00, 0x03 ) AM_WRITE( osborne1_bankswitch_w ) + AM_RANGE( 0x00, 0xff ) AM_WRITE(bankswitch_w) ADDRESS_MAP_END static INPUT_PORTS_START( osborne1 ) PORT_START("ROW0") - PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR('[') PORT_CHAR(']') + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR('[') PORT_CHAR(']') PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR('\'') PORT_CHAR('"') PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Return") PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13) PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_RSHIFT) PORT_CODE(KEYCODE_LSHIFT) PORT_CHAR(UCHAR_SHIFT_1) PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_UNUSED) - PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_LCONTROL) PORT_CODE(KEYCODE_RCONTROL) PORT_CHAR(UCHAR_SHIFT_2) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_LCONTROL) PORT_CODE(KEYCODE_RCONTROL) PORT_CHAR(UCHAR_SHIFT_2) PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_TAB) PORT_CHAR('\t') PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_ESC) PORT_CHAR(UCHAR_MAMEKEY(ESC)) @@ -141,15 +178,28 @@ static INPUT_PORTS_START( osborne1 ) PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_UNUSED) PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNUSED) PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED) -INPUT_PORTS_END + PORT_START("RESET") + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("RESET") PORT_CODE(KEYCODE_F12) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED) -static const z80_daisy_config osborne1_daisy_chain[] = -{ -/* { osborne1_z80_reset, osborne1_z80_irq_state, osborne1_z80_irq_ack, osborne1_z80_irq_reti, 0 }, */ - { "osborne1_daisy" }, - { NULL } -}; + PORT_START("CNF") + PORT_BIT(0xF8, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_CONFNAME(0x06, 0x00, "Serial Speed") + PORT_CONFSETTING(0x00, "300/1200") + PORT_CONFSETTING(0x02, "600/2400") + PORT_CONFSETTING(0x04, "1200/4800") + PORT_CONFSETTING(0x06, "2400/9600") + PORT_CONFNAME(0x01, 0x00, "Video Output") + PORT_CONFSETTING(0x00, "Standard") + PORT_CONFSETTING(0x01, "SCREEN-PAC") +INPUT_PORTS_END /* @@ -163,48 +213,47 @@ static const z80_daisy_config osborne1_daisy_chain[] = */ static SLOT_INTERFACE_START( osborne1_floppies ) - SLOT_INTERFACE( "525sssd", FLOPPY_525_SSSD ) // Siemens FDD 100-5, custom Osborne electronics - SLOT_INTERFACE( "525ssdd", FLOPPY_525_SSDD ) // MPI 52(?), custom Osborne electronics + SLOT_INTERFACE("525sssd", FLOPPY_525_SSSD) // Siemens FDD 100-5, custom Osborne electronics + SLOT_INTERFACE("525ssdd", FLOPPY_525_SSDD) // MPI 52(?), custom Osborne electronics SLOT_INTERFACE_END /* F4 Character Displayer */ static const gfx_layout osborne1_charlayout = { - 8, 10, /* 8 x 10 characters */ - 128, /* 128 characters */ - 1, /* 1 bits per pixel */ - { 0 }, /* no bitplanes */ - /* x offsets */ + 8, 10, // 8 x 10 characters + 128, // 128 characters + 1, // 1 bits per pixel + { 0 }, // no bitplanes + // x offsets { 0, 1, 2, 3, 4, 5, 6, 7 }, - /* y offsets */ + // y offsets { 0*128*8, 1*128*8, 2*128*8, 3*128*8, 4*128*8, 5*128*8, 6*128*8, 7*128*8, 8*128*8, 9*128*8 }, - 8 /* every char takes 16 x 1 bytes */ + 8 // every char takes 16 x 1 bytes }; static GFXDECODE_START( osborne1 ) - GFXDECODE_ENTRY( "chargen", 0x0000, osborne1_charlayout, 0, 1 ) + GFXDECODE_ENTRY("chargen", 0x0000, osborne1_charlayout, 0, 1) GFXDECODE_END static MACHINE_CONFIG_START( osborne1, osborne1_state ) - MCFG_CPU_ADD( "maincpu", Z80, MAIN_CLOCK/4 ) - MCFG_CPU_PROGRAM_MAP( osborne1_mem) - MCFG_CPU_IO_MAP( osborne1_io) - MCFG_CPU_CONFIG( osborne1_daisy_chain ) - - MCFG_DEVICE_ADD( "osborne1_daisy", OSBORNE1_DAISY, 0 ) + MCFG_CPU_ADD("maincpu", Z80, MAIN_CLOCK/4) + MCFG_CPU_PROGRAM_MAP(osborne1_mem) + MCFG_CPU_DECRYPTED_OPCODES_MAP(osborne1_op) + MCFG_CPU_IO_MAP(osborne1_io) + MCFG_Z80_SET_IRQACK_CALLBACK(WRITELINE(osborne1_state, irqack_w)) MCFG_SCREEN_ADD("screen", RASTER) MCFG_SCREEN_UPDATE_DRIVER(osborne1_state, screen_update) - MCFG_SCREEN_RAW_PARAMS( MAIN_CLOCK/2, 512, 0, 416, 260, 0, 240 ) + MCFG_SCREEN_RAW_PARAMS( MAIN_CLOCK, 1024, 0, 104*8, 260, 0, 24*10 ) MCFG_SCREEN_PALETTE("palette") MCFG_GFXDECODE_ADD("gfxdecode", "palette", osborne1) MCFG_PALETTE_ADD_MONOCHROME_GREEN_HIGHLIGHT("palette") - MCFG_SPEAKER_STANDARD_MONO( "mono" ) - MCFG_SOUND_ADD( "beeper", BEEP, 0 ) - MCFG_SOUND_ROUTE( ALL_OUTPUTS, "mono", 1.00 ) + MCFG_SPEAKER_STANDARD_MONO("mono") + MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0) + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) MCFG_DEVICE_ADD("pia_0", PIA6821, 0) MCFG_PIA_READPA_HANDLER(DEVREAD8(IEEE488_TAG, ieee488_device, dio_r)) @@ -215,24 +264,36 @@ static MACHINE_CONFIG_START( osborne1, osborne1_state ) MCFG_PIA_CB2_HANDLER(DEVWRITELINE(IEEE488_TAG, ieee488_device, ren_w)) MCFG_PIA_IRQA_HANDLER(WRITELINE(osborne1_state, ieee_pia_irq_a_func)) - MCFG_DEVICE_ADD( "pia_1", PIA6821, 0) + MCFG_IEEE488_BUS_ADD() + MCFG_IEEE488_SRQ_CALLBACK(DEVWRITELINE("pia_0", pia6821_device, ca2_w)) + + MCFG_DEVICE_ADD("pia_1", PIA6821, 0) MCFG_PIA_WRITEPA_HANDLER(WRITE8(osborne1_state, video_pia_port_a_w)) MCFG_PIA_WRITEPB_HANDLER(WRITE8(osborne1_state, video_pia_port_b_w)) MCFG_PIA_CB2_HANDLER(WRITELINE(osborne1_state, video_pia_out_cb2_dummy)) MCFG_PIA_IRQA_HANDLER(WRITELINE(osborne1_state, video_pia_irq_a_func)) + MCFG_DEVICE_ADD("acia", ACIA6850, 0) + MCFG_ACIA6850_TXD_HANDLER(DEVWRITELINE("rs232", rs232_port_device, write_txd)) + MCFG_ACIA6850_RTS_HANDLER(DEVWRITELINE("rs232", rs232_port_device, write_rts)) + MCFG_ACIA6850_IRQ_HANDLER(WRITELINE(osborne1_state, serial_acia_irq_func)) + + MCFG_RS232_PORT_ADD("rs232", default_rs232_devices, NULL) + MCFG_RS232_RXD_HANDLER(DEVWRITELINE("acia", acia6850_device, write_rxd)) + MCFG_RS232_DCD_HANDLER(DEVWRITELINE("acia", acia6850_device, write_dcd)) + MCFG_RS232_CTS_HANDLER(DEVWRITELINE("acia", acia6850_device, write_cts)) + MCFG_RS232_RI_HANDLER(DEVWRITELINE("pia_1", pia6821_device, ca2_w)) + MCFG_DEVICE_ADD("mb8877", MB8877, MAIN_CLOCK/16) MCFG_WD_FDC_FORCE_READY MCFG_FLOPPY_DRIVE_ADD("mb8877:0", osborne1_floppies, "525ssdd", floppy_image_device::default_floppy_formats) MCFG_FLOPPY_DRIVE_ADD("mb8877:1", osborne1_floppies, "525ssdd", floppy_image_device::default_floppy_formats) - MCFG_IEEE488_BUS_ADD() - MCFG_IEEE488_SRQ_CALLBACK(DEVWRITELINE("pia_0", pia6821_device, ca2_w)) - MCFG_SOFTWARE_LIST_ADD("flop_list","osborne1") - - /* internal ram */ + // internal ram MCFG_RAM_ADD(RAM_TAG) - MCFG_RAM_DEFAULT_SIZE("68K") /* 64KB Main RAM and 4Kbit video attribute RAM */ + MCFG_RAM_DEFAULT_SIZE("68K") // 64kB main RAM and 4kbit video attribute RAM + + MCFG_SOFTWARE_LIST_ADD("flop_list","osborne1") MACHINE_CONFIG_END @@ -259,4 +320,4 @@ ROM_START( osborne1 ) ROM_END /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */ -COMP( 1981, osborne1, 0, 0, osborne1, osborne1, osborne1_state, osborne1, "Osborne", "Osborne-1", 0 ) +COMP( 1981, osborne1, 0, 0, osborne1, osborne1, osborne1_state, osborne1, "Osborne", "Osborne-1", MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/othunder.c b/src/mame/drivers/othunder.c index 0e4bd82eef0..ddc4513a135 100644 --- a/src/mame/drivers/othunder.c +++ b/src/mame/drivers/othunder.c @@ -58,7 +58,7 @@ Notes: 6116.56 & 54 - Sprite attribute/enable RAM, tied to TC0320OBR Other 6116 RAM - Sprite RAM, connected to TC0020VAR & TC0050VDZ 6264.73 & 74 - Color RAM - + Taito Custom ICs - TC0220IOC TC0110PCR @@ -67,7 +67,7 @@ Notes: TC0320OBR TC0020VAR TC0050VDZ (x3) - TC0070RGB (ceramic module) + TC0070RGB (ceramic module) TC0310FAM (ceramic module) VSync: 60.0552Hz HSync: 15.4938kHz @@ -75,7 +75,7 @@ Notes: Note: The hardware outputs reversed video because the cabinet uses a mirror. The video can't be flipped/reversed with the DIPs, it's fixed in hardware. - PCB edge connector is 28-way non-JAMMA. + PCB edge connector is 28-way non-JAMMA. The gun is NOT a light gun, it uses two 5k-ohm potentiometers for the X-Y position Solder | Parts diff --git a/src/mame/drivers/pc.c b/src/mame/drivers/pc.c index e362880ef0c..4123fa93a82 100644 --- a/src/mame/drivers/pc.c +++ b/src/mame/drivers/pc.c @@ -22,7 +22,7 @@ Driver file for IBM PC, IBM PC XT, and related machines. IBM5550 ======= Information can be found at http://homepage3.nifty.com/ibm5550/index-e.html -It's an heavily modified IBM PC-XT machine, with a completely different +It's a heavily modified IBM PC-XT machine, with a completely different video HW too. ***************************************************************************/ @@ -173,6 +173,10 @@ static DEVICE_INPUT_DEFAULTS_START( pccga ) DEVICE_INPUT_DEFAULTS("DSW0", 0x30, 0x20) DEVICE_INPUT_DEFAULTS_END +static DEVICE_INPUT_DEFAULTS_START( siemens ) + DEVICE_INPUT_DEFAULTS("DSW0", 0x30, 0x30) +DEVICE_INPUT_DEFAULTS_END + #define MCFG_CPU_PC(mem, port, type, clock) \ MCFG_CPU_ADD("maincpu", type, clock) \ MCFG_CPU_PROGRAM_MAP(mem##_map) \ @@ -268,6 +272,30 @@ static MACHINE_CONFIG_START( zenith, pc_state ) MCFG_SOFTWARE_LIST_ADD("disk_list","ibm5150") MACHINE_CONFIG_END + + +static MACHINE_CONFIG_START( siemens, pc_state ) + /* basic machine hardware */ + MCFG_CPU_PC(pc8, pc8, I8088, XTAL_14_31818MHz/3) /* 4,77 MHz */ + + MCFG_IBM5150_MOTHERBOARD_ADD("mb", "maincpu") + MCFG_DEVICE_INPUT_DEFAULTS(siemens) + + MCFG_ISA8_SLOT_ADD("mb:isa", "isa1", pc_isa8_cards, "hercules", false) + MCFG_ISA8_SLOT_ADD("mb:isa", "isa2", pc_isa8_cards, "fdc_xt", false) + MCFG_ISA8_SLOT_ADD("mb:isa", "isa3", pc_isa8_cards, "lpt", false) + MCFG_ISA8_SLOT_ADD("mb:isa", "isa4", pc_isa8_cards, "com", false) + MCFG_ISA8_SLOT_ADD("mb:isa", "isa5", pc_isa8_cards, "hdc", false) + MCFG_ISA8_SLOT_ADD("mb:isa", "isa6", pc_isa8_cards, NULL, false) + + /* keyboard */ + MCFG_PC_KBDC_SLOT_ADD("mb:pc_kbdc", "kbd", pc_xt_keyboards, STR_KBD_IBM_PC_XT_83) + /* internal ram */ + MCFG_RAM_ADD(RAM_TAG) + MCFG_RAM_DEFAULT_SIZE("640K") + +MACHINE_CONFIG_END + static MACHINE_CONFIG_START( ibm5550, pc_state ) /* basic machine hardware */ MCFG_CPU_PC(ibm5550, ibm5550, I8086, 8000000) @@ -297,11 +325,21 @@ static MACHINE_CONFIG_DERIVED(mk88, poisk2) MCFG_SLOT_DEFAULT_OPTION("cga_ec1841") MACHINE_CONFIG_END +static MACHINE_CONFIG_DERIVED(eagle1600, pccga) + MCFG_DEVICE_REMOVE("maincpu") + MCFG_CPU_PC(pc16, pc16, I8086, 8000000) +MACHINE_CONFIG_END + ROM_START( bw230 ) ROM_REGION(0x100000,"maincpu", 0) ROM_LOAD("bondwell.bin", 0xfe000, 0x2000, CRC(d435a405) SHA1(a57c705d1144c7b61940b6f5c05d785c272fc9bb)) ROM_END +ROM_START( sicpc1605 ) + ROM_REGION(0x100000,"maincpu", 0) + ROM_LOAD("multitech pc-700 3.1.bin", 0xfe000, 0x2000, CRC(0ac7a2e1) SHA1(b9c8504e21213d81a068dde9f51f9c973d726e7b)) +ROM_END + ROM_START( zdsupers ) ROM_REGION(0x100000,"maincpu", 0) ROM_SYSTEM_BIOS( 0, "v31d", "v3.1d" ) @@ -443,6 +481,15 @@ ROM_START( ataripc3 ) ROM_LOAD( "c101681 6ffb.u60",0x000, 0x100, NO_DUMP ) // PAL20L10NC ROM_END +ROM_START( eagle1600 ) + ROM_REGION(0x100000,"maincpu", 0) + ROMX_LOAD( "eagle 1600 62-2732-001 rev e u403.bin",0xfe000, 0x1000, CRC(3da1e96a) SHA1(77861ba5ebd056da1daf048f5abd459e0528666d), ROM_SKIP(1)) + ROMX_LOAD( "eagle 1600 62-2732-002 rev e u404.bin",0xfe001, 0x1000, CRC(be6492d4) SHA1(ef25faf33e8336121d030e38e177be39be8afb7a), ROM_SKIP(1)) + + ROM_REGION(0x8000,"gfx1", 0) + ROM_LOAD("eagle 1600 video char gen u301.bin", 0x00000, 0x1000, CRC(1a7e552f) SHA1(749058783eec9d96a70dc5fdbfccb56196f889dc)) +ROM_END + /*************************************************************************** Game driver(s) @@ -455,12 +502,14 @@ COMP( 1985, bw230, ibm5150, 0, bondwell, bondwell, pc_state, COMP( 1984, compc1, ibm5150, 0, pccga, pccga, driver_device, 0, "Commodore Business Machines", "Commodore PC-1" , MACHINE_NOT_WORKING) COMP( 1987, pc10iii, ibm5150, 0, pccga, pccga, driver_device, 0, "Commodore Business Machines", "Commodore PC-10 III" , MACHINE_NOT_WORKING) + COMP( 1992, iskr3104, ibm5150, 0, iskr3104, pccga, driver_device, 0, "Schetmash", "Iskra 3104", MACHINE_NOT_WORKING) COMP( 1989, mk88, ibm5150, 0, mk88, pccga, driver_device, 0, "<unknown>", "MK-88", MACHINE_NOT_WORKING) COMP( 1991, poisk2, ibm5150, 0, poisk2, pccga, driver_device, 0, "<unknown>", "Poisk-2", MACHINE_NOT_WORKING) COMP( 1990, mc1702, ibm5150, 0, pccga, pccga, driver_device, 0, "<unknown>", "Elektronika MC-1702", MACHINE_NOT_WORKING) COMP( 1987, zdsupers, ibm5150, 0, zenith, pccga, driver_device, 0, "Zenith Data Systems", "SuperSport", 0) +COMP( 1985, sicpc1605, ibm5150, 0, siemens, pccga, driver_device, 0, "Siemens", "Sicomp PC16-05", 0) COMP( 198?, olivm15, ibm5150, 0, pccga, pccga, driver_device, 0, "Olivetti", "M15", MACHINE_NOT_WORKING | MACHINE_NO_SOUND) // is this a pc clone or not? @@ -473,3 +522,4 @@ COMP( 198?, mbc16, ibm5150, 0, pccga, pccga, driver_device COMP( 198?, ataripc3, ibm5150, 0, pccga, pccga, driver_device, 0, "Atari", "PC-3" , MACHINE_NOT_WORKING) COMP( 1989, ssam88s, ibm5150, 0, pccga, pccga, driver_device, 0, "Samsung", "Samtron 88S" , MACHINE_NOT_WORKING) +COMP( 1983, eagle1600, ibm5150, 0, eagle1600, pccga, driver_device, 0, "Eagle", "1600" , MACHINE_NOT_WORKING) diff --git a/src/mame/drivers/pcd.c b/src/mame/drivers/pcd.c index 8930cc3ed6d..a532aae7723 100644 --- a/src/mame/drivers/pcd.c +++ b/src/mame/drivers/pcd.c @@ -538,6 +538,7 @@ static MACHINE_CONFIG_START( pcd, pcd_state ) MCFG_MC146818_ADD("rtc", XTAL_32_768kHz) MCFG_MC146818_IRQ_HANDLER(DEVWRITELINE("pic1", pic8259_device, ir7_w)) MCFG_MC146818_BINARY(true) + MCFG_MC146818_BINARY_YEAR(true) MCFG_MC146818_EPOCH(1900) MCFG_MC146818_24_12(true) diff --git a/src/mame/drivers/pdp1.c b/src/mame/drivers/pdp1.c index f3827cf61b1..0e01f6d21c3 100644 --- a/src/mame/drivers/pdp1.c +++ b/src/mame/drivers/pdp1.c @@ -983,7 +983,7 @@ static void iot_rpa(device_t *device, int op2, int nac, int mb, int *io, int ac) { pdp1_state *state = device->machine().driver_data<pdp1_state>(); if (LOG_IOT_EXTRA) - logerror("Warning, RPA instruction not fully emulated: mb=0%06o, (%s)\n", (unsigned) mb, device->machine().describe_context()); + device->logerror("Warning, RPA instruction not fully emulated: mb=0%06o, (%s)\n", (unsigned) mb, device->machine().describe_context()); state->begin_tape_read(0, nac); } @@ -1021,7 +1021,7 @@ static void iot_rpb(device_t *device, int op2, int nac, int mb, int *io, int ac) { pdp1_state *state = device->machine().driver_data<pdp1_state>(); if (LOG_IOT_EXTRA) - logerror("Warning, RPB instruction not fully emulated: mb=0%06o, (%s)\n", (unsigned) mb, device->machine().describe_context()); + device->logerror("Warning, RPB instruction not fully emulated: mb=0%06o, (%s)\n", (unsigned) mb, device->machine().describe_context()); state->begin_tape_read(1, nac); } @@ -1033,7 +1033,7 @@ static void iot_rrb(device_t *device, int op2, int nac, int mb, int *io, int ac) { pdp1_state *state = device->machine().driver_data<pdp1_state>(); if (LOG_IOT_EXTRA) - logerror("RRB instruction: mb=0%06o, (%s)\n", (unsigned) mb, device->machine().describe_context()); + device->logerror("RRB instruction: mb=0%06o, (%s)\n", (unsigned) mb, device->machine().describe_context()); *io = state->m_tape_reader.rb; state->m_io_status &= ~io_st_ptr; @@ -1098,7 +1098,7 @@ static void iot_ppa(device_t *device, int op2, int nac, int mb, int *io, int ac) { pdp1_state *state = device->machine().driver_data<pdp1_state>(); if (LOG_IOT_EXTRA) - logerror("PPA instruction: mb=0%06o, (%s)\n", (unsigned) mb, device->machine().describe_context()); + device->logerror("PPA instruction: mb=0%06o, (%s)\n", (unsigned) mb, device->machine().describe_context()); state->tape_write(*io & 0377); state->m_io_status &= ~io_st_ptp; @@ -1106,7 +1106,7 @@ static void iot_ppa(device_t *device, int op2, int nac, int mb, int *io, int ac) if (LOG_IOT_OVERLAP) { if (state->m_tape_puncher.timer->enable(0)) - logerror("Error: overlapped PPA/PPB instructions: mb=0%06o, (%s)\n", (unsigned) mb, device->machine().describe_context()); + device->logerror("Error: overlapped PPA/PPB instructions: mb=0%06o, (%s)\n", (unsigned) mb, device->machine().describe_context()); } state->m_tape_puncher.timer->adjust(attotime::from_usec(15800), nac); @@ -1127,7 +1127,7 @@ static void iot_ppb(device_t *device, int op2, int nac, int mb, int *io, int ac) { pdp1_state *state = device->machine().driver_data<pdp1_state>(); if (LOG_IOT_EXTRA) - logerror("PPB instruction: mb=0%06o, (%s)\n", (unsigned) mb, device->machine().describe_context()); + device->logerror("PPB instruction: mb=0%06o, (%s)\n", (unsigned) mb, device->machine().describe_context()); state->tape_write((*io >> 12) | 0200); state->m_io_status &= ~io_st_ptp; @@ -1135,7 +1135,7 @@ static void iot_ppb(device_t *device, int op2, int nac, int mb, int *io, int ac) if (LOG_IOT_OVERLAP) { if (state->m_tape_puncher.timer->enable(0)) - logerror("Error: overlapped PPA/PPB instructions: mb=0%06o, (%s)\n", (unsigned) mb, device->machine().describe_context()); + device->logerror("Error: overlapped PPA/PPB instructions: mb=0%06o, (%s)\n", (unsigned) mb, device->machine().describe_context()); } state->m_tape_puncher.timer->adjust(attotime::from_usec(15800), nac); } @@ -1297,7 +1297,7 @@ static void iot_tyo(device_t *device, int op2, int nac, int mb, int *io, int ac) int ch, delay; if (LOG_IOT_EXTRA) - logerror("Warning, TYO instruction not fully emulated: mb=0%06o, (%s)\n", (unsigned) mb, device->machine().describe_context()); + device->logerror("Warning, TYO instruction not fully emulated: mb=0%06o, (%s)\n", (unsigned) mb, device->machine().describe_context()); ch = (*io) & 077; @@ -1325,7 +1325,7 @@ static void iot_tyo(device_t *device, int op2, int nac, int mb, int *io, int ac) if (LOG_IOT_OVERLAP) { if (state->m_typewriter.tyo_timer->enable(0)) - logerror("Error: overlapped TYO instruction: mb=0%06o, (%s)\n", (unsigned) mb, device->machine().describe_context()); + device->logerror("Error: overlapped TYO instruction: mb=0%06o, (%s)\n", (unsigned) mb, device->machine().describe_context()); } state->m_typewriter.tyo_timer->adjust(attotime::from_msec(delay), nac); @@ -1349,7 +1349,7 @@ static void iot_tyi(device_t *device, int op2, int nac, int mb, int *io, int ac) { pdp1_state *state = device->machine().driver_data<pdp1_state>(); if (LOG_IOT_EXTRA) - logerror("Warning, TYI instruction not fully emulated: mb=0%06o, (%s)\n", (unsigned) mb, device->machine().describe_context()); + device->logerror("Warning, TYI instruction not fully emulated: mb=0%06o, (%s)\n", (unsigned) mb, device->machine().describe_context()); *io = state->m_typewriter.tb; if (! (state->m_io_status & io_st_tyi)) @@ -1440,7 +1440,7 @@ static void iot_dpy(device_t *device, int op2, int nac, int mb, int *io, int ac) /* note that overlap detection is incomplete: it will only work if both DPY instructions require a completion pulse */ if (state->m_dpy_timer->enable(0)) - logerror("Error: overlapped DPY instruction: mb=0%06o, (%s)\n", (unsigned) mb, device->machine().describe_context()); + device->logerror("Error: overlapped DPY instruction: mb=0%06o, (%s)\n", (unsigned) mb, device->machine().describe_context()); } state->m_dpy_timer->adjust(attotime::from_usec(50)); } @@ -1658,7 +1658,7 @@ static void iot_cks(device_t *device, int op2, int nac, int mb, int *io, int ac) { pdp1_state *state = device->machine().driver_data<pdp1_state>(); if (LOG_IOT_EXTRA) - logerror("CKS instruction: mb=0%06o, (%s)\n", (unsigned) mb, device->machine().describe_context()); + device->logerror("CKS instruction: mb=0%06o, (%s)\n", (unsigned) mb, device->machine().describe_context()); *io = state->m_io_status; } diff --git a/src/mame/drivers/peplus.c b/src/mame/drivers/peplus.c index af60b1efb17..380ffe584b6 100644 --- a/src/mame/drivers/peplus.c +++ b/src/mame/drivers/peplus.c @@ -388,8 +388,8 @@ void peplus_state::device_timer(emu_timer &timer, device_timer_id id, int param, void peplus_state::handle_lightpen() { - int x_val = ioport("TOUCH_X")->read_safe(0x00); - int y_val = ioport("TOUCH_Y")->read_safe(0x00); + int x_val = read_safe(ioport("TOUCH_X"), 0x00); + int y_val = read_safe(ioport("TOUCH_Y"), 0x00); const rectangle &vis_area = m_screen->visible_area(); int xt, yt; @@ -563,7 +563,7 @@ READ8_MEMBER(peplus_state::peplus_input0_r) UINT64 curr_cycles = m_maincpu->total_cycles(); // Allow Bill Insert if DBV Enabled - if (m_bv_enable_state == 0x01 && ((ioport("DBV")->read_safe(0xff) & 0x01) == 0x00)) { + if (m_bv_enable_state == 0x01 && ((read_safe(ioport("DBV"), 0xff) & 0x01) == 0x00)) { // If not busy if (m_bv_busy == 0) { m_bv_busy = 1; @@ -786,7 +786,7 @@ READ8_MEMBER(peplus_state::peplus_input_bank_a_r) sda = m_i2cmem->read_sda(); } - if ((ioport("SENSOR")->read_safe(0x00) & 0x01) == 0x01 && m_coin_state == 0) { + if ((read_safe(ioport("SENSOR"), 0x00) & 0x01) == 0x01 && m_coin_state == 0) { m_coin_state = 1; // Start Coin Cycle m_last_cycles = m_maincpu->total_cycles(); } else { @@ -822,7 +822,7 @@ READ8_MEMBER(peplus_state::peplus_input_bank_a_r) } if (curr_cycles - m_last_door > door_wait) { - if ((ioport("DOOR")->read_safe(0xff) & 0x01) == 0x01) { + if ((read_safe(ioport("DOOR"), 0xff) & 0x01) == 0x01) { if (m_doorcycle) { m_door_open = (m_door_open ^ 0x01) & 0x01; } else { @@ -1946,7 +1946,7 @@ PayTable 10s+ 2PR 3K STR FL FH 4K SF RF (Bonus) ROM_LOAD( "pp0045_a45-a74.u68", 0x00000, 0x10000, CRC(9c7cf6d7) SHA1(3da9829678b853d85146b66b40800257a8eaa151) ) /* Game Version: A45, Library Version: A74 */ ROM_REGION( 0x020000, "gfx1", 0 ) - ROM_LOAD( "mro-cg1072.u72", 0x00000, 0x8000, CRC(8e5cf3bf) SHA1(a8c2fde9105a37eddc218ae1476cdbfb0271e314) ) /* Custom Annie Oakely's Central City graphics */ + ROM_LOAD( "mro-cg1072.u72", 0x00000, 0x8000, CRC(8e5cf3bf) SHA1(a8c2fde9105a37eddc218ae1476cdbfb0271e314) ) /* Custom Annie Oakley's Central City graphics */ ROM_LOAD( "mgo-cg1072.u73", 0x08000, 0x8000, CRC(a3c85c1b) SHA1(9b810c5779dde21db6da5bac5cf797bad65c2c1b) ) ROM_LOAD( "mbo-cg1072.u74", 0x10000, 0x8000, CRC(833371e1) SHA1(5d7a994aee61a751f89171885423276b86e872b6) ) /* These graphics will work for many other standard poker sets */ ROM_LOAD( "mxo-cg1072.u75", 0x18000, 0x8000, CRC(0df703b3) SHA1(2042251cc9c11687ff7fd920213a448974ff3050) ) /* However there is no support for Deuces Wild sets */ @@ -1956,6 +1956,27 @@ PayTable 10s+ 2PR 3K STR FL FH 4K SF RF (Bonus) ROM_LOAD( "cap740.u50", 0x0000, 0x0100, CRC(6fe619c4) SHA1(49e43dafd010ce0fe9b2a63b96a4ddedcb933c6d) ) /* BPROM type DM74LS471 (compatible with N82S135N) verified */ ROM_END +ROM_START( pepp0045d ) /* Normal board : 10's or Better (PP0045) */ +/* +PayTable 10s+ 2PR 3K STR FL FH 4K SF RF (Bonus) +---------------------------------------------------------- + P8A 1 1 3 4 5 8 25 50 300 800 + % Range: 84.6-86.6% Optimum: 88.6% Hit Frequency: 49.2% + Programs Available: PP0045, X000045P +*/ + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD( "pp0045_a45-a74.u68", 0x00000, 0x10000, CRC(9c7cf6d7) SHA1(3da9829678b853d85146b66b40800257a8eaa151) ) /* Game Version: A45, Library Version: A74 */ + + ROM_REGION( 0x020000, "gfx1", 0 ) + ROM_LOAD( "mro-cg881.u72", 0x00000, 0x8000, CRC(282a029f) SHA1(42b35761839d6379ddfb4eed20f90d9f7b145e64) ) /* Custom Las Vegas Rio graphics */ + ROM_LOAD( "mgo-cg881.u73", 0x08000, 0x8000, CRC(af433702) SHA1(fbd877c06eaab433332c94f135e13a8c041fa1a2) ) + ROM_LOAD( "mbo-cg881.u74", 0x10000, 0x8000, CRC(c5b0a0b3) SHA1(a989d21f4b10a09d3cfd0bbb9f53b4ad326561b9) ) /* These graphics will work for many other standard poker sets */ + ROM_LOAD( "mxo-cg881.u75", 0x18000, 0x8000, CRC(6a78bc1d) SHA1(7861465ab98df5219330d58a3e5a4bd37a393534) ) /* However there is no support for Deuces Wild sets */ + + ROM_REGION( 0x100, "proms", 0 ) + ROM_LOAD( "cap881.u50", 0x0000, 0x0100, CRC(e51990d5) SHA1(41946722b61e955d37808761d451fc894e6adc8a) ) +ROM_END + ROM_START( pepp0046 ) /* Normal board : 10's or Better (PP0046) */ /* PayTable 10s+ 2PR 3K STR FL FH 4K SF RF (Bonus) @@ -8880,7 +8901,7 @@ PayTable Js+ 2PR 3K STR FL FH 4K 4K 4A SF RF (Bonus) P435A 1 1 3 4 5 8 50 80 160 50 250 800 % Range: 90.2-92.2% Optimum: 94.2% Hit Frequency: 45.1% Programs Available: X002179P - + NOTE: Same as X000726P, except MAX Coin (set to 5) CANNOT be changed - NJ jurisdiction */ ROM_REGION( 0x10000, "maincpu", 0 ) @@ -8907,7 +8928,7 @@ PayTable Js+ 2PR 3K STR FL FH 4K 4K 4A SF RF (Bonus) P437A 1 1 3 4 5 6 50 80 160 50 250 800 % Range: 88.0-90.0% Optimum: 92.0% Hit Frequency: 45.1% Programs Available: X002180P - + NOTE: Same as X000728P, except MAX Coin (set to 5) CANNOT be changed - NJ jurisdiction */ ROM_REGION( 0x10000, "maincpu", 0 ) @@ -10290,7 +10311,7 @@ Double Bonus Poker P325A 97.80% ROM_LOAD( "mgo-cg2174.u78", 0x08000, 0x8000, CRC(cc46adb0) SHA1(6065aa5dcb9091ad80e499c7ee6dc629e79c865a) ) ROM_LOAD( "mbo-cg2174.u79", 0x10000, 0x8000, CRC(7291a0c8) SHA1(1068f35e6ef5fd88c584922860231840a90fb623) ) ROM_LOAD( "mxo-cg2174.u80", 0x18000, 0x8000, CRC(14f9480c) SHA1(59323f9fc5995277aea86d088893b6eb95b4e89b) ) - + ROM_REGION( 0x200, "proms", 0 ) ROM_LOAD( "capx2174.u43", 0x0000, 0x0200, CRC(50bdad55) SHA1(958d463c7effb3457c1f9c44c9b7822339c04e8b) ) ROM_END @@ -10832,6 +10853,7 @@ GAMEL(1987, pepp0045, pepp0002, peplus, peplus_poker, peplus_state, peplus, GAMEL(1987, pepp0045a, pepp0002, peplus, peplus_poker, peplus_state, peplus, ROT0, "IGT - International Game Technology", "Player's Edge Plus (PP0045) 10's or Better (Gambler Downtown Reno)", 0, layout_pe_poker ) GAMEL(1987, pepp0045b, pepp0002, peplus, peplus_poker, peplus_state, peplus, ROT0, "IGT - International Game Technology", "Player's Edge Plus (PP0045) 10's or Better (Par-A-Dice Riverboat Casino)", MACHINE_WRONG_COLORS, layout_pe_poker ) /* CAP1150 not dumped */ GAMEL(1987, pepp0045c, pepp0002, peplus, peplus_poker, peplus_state, peplus, ROT0, "IGT - International Game Technology", "Player's Edge Plus (PP0045) 10's or Better (Annie Oakley's Central City)", MACHINE_WRONG_COLORS, layout_pe_poker ) /* CAP1072 not dumped */ +GAMEL(1987, pepp0045d, pepp0002, peplus, peplus_poker, peplus_state, peplus, ROT0, "IGT - International Game Technology", "Player's Edge Plus (PP0045) 10's or Better (Las Vegas Rio)", 0, layout_pe_poker ) GAMEL(1987, pepp0046, pepp0002, peplus, peplus_poker, peplus_state, peplus, ROT0, "IGT - International Game Technology", "Player's Edge Plus (PP0046) 10's or Better (set 1)", 0, layout_pe_poker ) GAMEL(1987, pepp0046a, pepp0002, peplus, peplus_poker, peplus_state, peplus, ROT0, "IGT - International Game Technology", "Player's Edge Plus (PP0046) 10's or Better (International)",0, layout_pe_poker ) GAMEL(1987, pepp0046b, pepp0002, peplus, peplus_poker, peplus_state, nonplus, ROT0, "IGT - International Game Technology", "Player's Edge Plus (PP0046) 10's or Better (set 2)", 0, layout_pe_poker ) diff --git a/src/mame/drivers/pgm.c b/src/mame/drivers/pgm.c index b8a74f70d20..86eea22389e 100644 --- a/src/mame/drivers/pgm.c +++ b/src/mame/drivers/pgm.c @@ -3904,8 +3904,33 @@ ROM_START( ket ) ROM_REGION( 0x600000, "maincpu", 0 ) /* 68000 Code */ /* doesn't use a separate BIOS rom */ ROM_LOAD16_WORD_SWAP( "ketsui_v100.u38", 0x000000, 0x200000, CRC(dfe62f3b) SHA1(baa58d1ce47a707f84f65779ac0689894793e9d9) ) - // an alt version of this rom exists with 0xff fill in the unused area after 0x1443bc rather than random data like the one above, there are no code changes. - //ROM_LOAD16_WORD_SWAP( "ketsui_v100.u38", 0x000000, 0x200000, CRC(e140f8a4) SHA1(34fd25f8896935503d7537e89a4cd174e8995070) ) + + ROM_REGION( 0x4000, "prot", 0 ) /* ARM protection ASIC - internal rom */ + ROM_LOAD( "ket_igs027a.bin", 0x000000, 0x04000, NO_DUMP ) + + ROM_REGION( 0xc00000, "tiles", 0 ) /* 8x8 Text Tiles + 32x32 BG Tiles */ + ROM_LOAD( "pgm_t01s.rom", 0x000000, 0x200000, CRC(1a7123a0) SHA1(cc567f577bfbf45427b54d6695b11b74f2578af3) ) // same as standard PGM text bios - surface scratched to remove details + ROM_LOAD( "t04701w064.u19", 0x180000, 0x800000, CRC(2665b041) SHA1(fb1107778b66f2af0de77ac82e1ee2902f53a959) ) //text-1 + + ROM_REGION( 0x1000000, "sprcol", 0 ) /* Sprite Colour Data */ + ROM_LOAD( "a04701w064.u7", 0x0000000, 0x0800000, CRC(5ef1b94b) SHA1(f10dfa46e0a4d297c3a856aea5b49d648f98935c) ) //image-1 + ROM_LOAD( "a04702w064.u8", 0x0800000, 0x0800000, CRC(26d6da7f) SHA1(f20e07a7994f41b5ed917f8b0119dc5542f3541c) ) //image-2 + + ROM_REGION( 0x0800000, "sprmask", 0 ) /* Sprite Masks + Colour Indexes */ + ROM_LOAD( "b04701w064.u1", 0x0000000, 0x0800000, CRC(1bec008d) SHA1(07d117dc2eebb35727fb18a7c563acbaf25a8d36) ) //bitmap-1 + + ROM_REGION( 0x800000, "ics", ROMREGION_ERASE00 ) /* Samples - (8 bit mono 11025Hz) - */ + /* there is a position for the PGM audio bios rom, but it's unpopulated, and the M of PGM has been scratched off the PCB */ + ROM_LOAD( "m04701b032.u17", 0x400000, 0x400000, CRC(b46e22d1) SHA1(670853dc485942fb96380568494bdf3235f446ee) ) //music-1 + + ROM_REGION( 0x20000, "sram", 0 ) /* default settings */ + ROM_LOAD( "ket_defaults.nv", 0x0000000, 0x020000, CRC(3ca892d8) SHA1(67430df5217e453ae8140c5653deeadfad8fa684) ) +ROM_END + +ROM_START( ket1 ) // only difference between this and ket1 is the rom fill on the unused area + ROM_REGION( 0x600000, "maincpu", 0 ) /* 68000 Code */ + /* doesn't use a separate BIOS rom */ + ROM_LOAD16_WORD_SWAP( "ketsui_v100_alt_fill.u38", 0x000000, 0x200000, CRC(e140f8a4) SHA1(34fd25f8896935503d7537e89a4cd174e8995070) ) ROM_REGION( 0x4000, "prot", 0 ) /* ARM protection ASIC - internal rom */ ROM_LOAD( "ket_igs027a.bin", 0x000000, 0x04000, NO_DUMP ) @@ -3983,6 +4008,195 @@ ROM_START( ketb ) ROM_LOAD( "ket_defaults.nv", 0x0000000, 0x020000, CRC(3ca892d8) SHA1(67430df5217e453ae8140c5653deeadfad8fa684) ) ROM_END + +ROM_START( ketarr10 ) + ROM_REGION( 0x600000, "maincpu", 0 ) /* 68000 Code */ + /* doesn't use a separate BIOS rom */ + ROM_LOAD16_WORD_SWAP( "ketarr_v100.u38", 0x000000, 0x200000, CRC(d4c7a8ab) SHA1(65d104d17bd4fd03a2b44297a003ba03d746c7ee) ) + + ROM_REGION( 0x4000, "prot", 0 ) /* ARM protection ASIC - internal rom */ + ROM_LOAD( "ket_igs027a.bin", 0x000000, 0x04000, NO_DUMP ) + + ROM_REGION( 0xc00000, "tiles", 0 ) /* 8x8 Text Tiles + 32x32 BG Tiles */ + ROM_LOAD( "pgm_t01s.rom", 0x000000, 0x200000, CRC(1a7123a0) SHA1(cc567f577bfbf45427b54d6695b11b74f2578af3) ) // same as standard PGM text bios - surface scratched to remove details + ROM_LOAD( "t04701w064.u19", 0x180000, 0x800000, CRC(2665b041) SHA1(fb1107778b66f2af0de77ac82e1ee2902f53a959) ) //text-1 + + ROM_REGION( 0x1000000, "sprcol", 0 ) /* Sprite Colour Data */ + ROM_LOAD( "a04701w064.u7", 0x0000000, 0x0800000, CRC(5ef1b94b) SHA1(f10dfa46e0a4d297c3a856aea5b49d648f98935c) ) //image-1 + ROM_LOAD( "a04702w064.u8", 0x0800000, 0x0800000, CRC(26d6da7f) SHA1(f20e07a7994f41b5ed917f8b0119dc5542f3541c) ) //image-2 + + ROM_REGION( 0x0800000, "sprmask", 0 ) /* Sprite Masks + Colour Indexes */ + ROM_LOAD( "b04701w064.u1", 0x0000000, 0x0800000, CRC(1bec008d) SHA1(07d117dc2eebb35727fb18a7c563acbaf25a8d36) ) //bitmap-1 + + ROM_REGION( 0x800000, "ics", ROMREGION_ERASE00 ) /* Samples - (8 bit mono 11025Hz) - */ + /* there is a position for the PGM audio bios rom, but it's unpopulated, and the M of PGM has been scratched off the PCB */ + ROM_LOAD( "m04701b032.u17", 0x400000, 0x400000, CRC(b46e22d1) SHA1(670853dc485942fb96380568494bdf3235f446ee) ) //music-1 + + ROM_REGION( 0x20000, "sram", 0 ) /* default settings */ + ROM_LOAD( "ket_defaults.nv", 0x0000000, 0x020000, CRC(3ca892d8) SHA1(67430df5217e453ae8140c5653deeadfad8fa684) ) +ROM_END + + +ROM_START( ketarrf ) + ROM_REGION( 0x600000, "maincpu", 0 ) /* 68000 Code */ + /* doesn't use a separate BIOS rom */ + ROM_LOAD16_WORD_SWAP( "ketarrf_v100.u38", 0x000000, 0x200000, CRC(6ad17aa4) SHA1(791bd1a107433a3811c8a79ea26a73e66ddd296f) ) + + ROM_REGION( 0x4000, "prot", 0 ) /* ARM protection ASIC - internal rom */ + ROM_LOAD( "ket_igs027a.bin", 0x000000, 0x04000, NO_DUMP ) + + ROM_REGION( 0xc00000, "tiles", 0 ) /* 8x8 Text Tiles + 32x32 BG Tiles */ + ROM_LOAD( "pgm_t01s.rom", 0x000000, 0x200000, CRC(1a7123a0) SHA1(cc567f577bfbf45427b54d6695b11b74f2578af3) ) // same as standard PGM text bios - surface scratched to remove details + ROM_LOAD( "t04701w064.u19", 0x180000, 0x800000, CRC(2665b041) SHA1(fb1107778b66f2af0de77ac82e1ee2902f53a959) ) //text-1 + + ROM_REGION( 0x1000000, "sprcol", 0 ) /* Sprite Colour Data */ + ROM_LOAD( "a04701w064.u7", 0x0000000, 0x0800000, CRC(5ef1b94b) SHA1(f10dfa46e0a4d297c3a856aea5b49d648f98935c) ) //image-1 + ROM_LOAD( "a04702w064.u8", 0x0800000, 0x0800000, CRC(26d6da7f) SHA1(f20e07a7994f41b5ed917f8b0119dc5542f3541c) ) //image-2 + + ROM_REGION( 0x0800000, "sprmask", 0 ) /* Sprite Masks + Colour Indexes */ + ROM_LOAD( "b04701w064.u1", 0x0000000, 0x0800000, CRC(1bec008d) SHA1(07d117dc2eebb35727fb18a7c563acbaf25a8d36) ) //bitmap-1 + + ROM_REGION( 0x800000, "ics", ROMREGION_ERASE00 ) /* Samples - (8 bit mono 11025Hz) - */ + /* there is a position for the PGM audio bios rom, but it's unpopulated, and the M of PGM has been scratched off the PCB */ + ROM_LOAD( "m04701b032.u17", 0x400000, 0x400000, CRC(b46e22d1) SHA1(670853dc485942fb96380568494bdf3235f446ee) ) //music-1 + + ROM_REGION( 0x20000, "sram", 0 ) /* default settings */ + ROM_LOAD( "ket_defaults.nv", 0x0000000, 0x020000, CRC(3ca892d8) SHA1(67430df5217e453ae8140c5653deeadfad8fa684) ) +ROM_END + +ROM_START( ketarr15 ) + ROM_REGION( 0x600000, "maincpu", 0 ) /* 68000 Code */ + /* doesn't use a separate BIOS rom */ + ROM_LOAD16_WORD_SWAP( "ketarr15_v100.u38", 0x000000, 0x200000, CRC(552a7d95) SHA1(4f3fb13f34d58a7482e1d26623d38aa0b54ca8dd) ) + + ROM_REGION( 0x4000, "prot", 0 ) /* ARM protection ASIC - internal rom */ + ROM_LOAD( "ket_igs027a.bin", 0x000000, 0x04000, NO_DUMP ) + + ROM_REGION( 0xc00000, "tiles", 0 ) /* 8x8 Text Tiles + 32x32 BG Tiles */ + ROM_LOAD( "pgm_t01s.rom", 0x000000, 0x200000, CRC(1a7123a0) SHA1(cc567f577bfbf45427b54d6695b11b74f2578af3) ) // same as standard PGM text bios - surface scratched to remove details + ROM_LOAD( "t04701w064.u19", 0x180000, 0x800000, CRC(2665b041) SHA1(fb1107778b66f2af0de77ac82e1ee2902f53a959) ) //text-1 + + ROM_REGION( 0x1000000, "sprcol", 0 ) /* Sprite Colour Data */ + ROM_LOAD( "a04701w064.u7", 0x0000000, 0x0800000, CRC(5ef1b94b) SHA1(f10dfa46e0a4d297c3a856aea5b49d648f98935c) ) //image-1 + ROM_LOAD( "a04702w064.u8", 0x0800000, 0x0800000, CRC(26d6da7f) SHA1(f20e07a7994f41b5ed917f8b0119dc5542f3541c) ) //image-2 + + ROM_REGION( 0x0800000, "sprmask", 0 ) /* Sprite Masks + Colour Indexes */ + ROM_LOAD( "b04701w064.u1", 0x0000000, 0x0800000, CRC(1bec008d) SHA1(07d117dc2eebb35727fb18a7c563acbaf25a8d36) ) //bitmap-1 + + ROM_REGION( 0x800000, "ics", ROMREGION_ERASE00 ) /* Samples - (8 bit mono 11025Hz) - */ + /* there is a position for the PGM audio bios rom, but it's unpopulated, and the M of PGM has been scratched off the PCB */ + ROM_LOAD( "m04701b032.u17", 0x400000, 0x400000, CRC(b46e22d1) SHA1(670853dc485942fb96380568494bdf3235f446ee) ) //music-1 + + ROM_REGION( 0x20000, "sram", 0 ) /* default settings */ + ROM_LOAD( "ket_defaults.nv", 0x0000000, 0x020000, CRC(3ca892d8) SHA1(67430df5217e453ae8140c5653deeadfad8fa684) ) +ROM_END + +ROM_START( ketarrs15 ) + ROM_REGION( 0x600000, "maincpu", 0 ) /* 68000 Code */ + /* doesn't use a separate BIOS rom */ + ROM_LOAD16_WORD_SWAP( "ketarrs15_v100.u38", 0x000000, 0x200000, CRC(a95e71e0) SHA1(182c12e3581ebb20176d8abca41ee62aadcd63e0) ) + + ROM_REGION( 0x4000, "prot", 0 ) /* ARM protection ASIC - internal rom */ + ROM_LOAD( "ket_igs027a.bin", 0x000000, 0x04000, NO_DUMP ) + + ROM_REGION( 0xc00000, "tiles", 0 ) /* 8x8 Text Tiles + 32x32 BG Tiles */ + ROM_LOAD( "pgm_t01s.rom", 0x000000, 0x200000, CRC(1a7123a0) SHA1(cc567f577bfbf45427b54d6695b11b74f2578af3) ) // same as standard PGM text bios - surface scratched to remove details + ROM_LOAD( "t04701w064.u19", 0x180000, 0x800000, CRC(2665b041) SHA1(fb1107778b66f2af0de77ac82e1ee2902f53a959) ) //text-1 + + ROM_REGION( 0x1000000, "sprcol", 0 ) /* Sprite Colour Data */ + ROM_LOAD( "a04701w064.u7", 0x0000000, 0x0800000, CRC(5ef1b94b) SHA1(f10dfa46e0a4d297c3a856aea5b49d648f98935c) ) //image-1 + ROM_LOAD( "a04702w064.u8", 0x0800000, 0x0800000, CRC(26d6da7f) SHA1(f20e07a7994f41b5ed917f8b0119dc5542f3541c) ) //image-2 + + ROM_REGION( 0x0800000, "sprmask", 0 ) /* Sprite Masks + Colour Indexes */ + ROM_LOAD( "b04701w064.u1", 0x0000000, 0x0800000, CRC(1bec008d) SHA1(07d117dc2eebb35727fb18a7c563acbaf25a8d36) ) //bitmap-1 + + ROM_REGION( 0x800000, "ics", ROMREGION_ERASE00 ) /* Samples - (8 bit mono 11025Hz) - */ + /* there is a position for the PGM audio bios rom, but it's unpopulated, and the M of PGM has been scratched off the PCB */ + ROM_LOAD( "m04701b032.u17", 0x400000, 0x400000, CRC(b46e22d1) SHA1(670853dc485942fb96380568494bdf3235f446ee) ) //music-1 + + ROM_REGION( 0x20000, "sram", 0 ) /* default settings */ + ROM_LOAD( "ket_defaults.nv", 0x0000000, 0x020000, CRC(3ca892d8) SHA1(67430df5217e453ae8140c5653deeadfad8fa684) ) +ROM_END + +ROM_START( ketarr151 ) + ROM_REGION( 0x600000, "maincpu", 0 ) /* 68000 Code */ + /* doesn't use a separate BIOS rom */ + ROM_LOAD16_WORD_SWAP( "ketarr151_v100.u38", 0x000000, 0x200000, CRC(2b7c030d) SHA1(9aaba1242d7ce29915a31d40341da82985927f9d) ) + + ROM_REGION( 0x4000, "prot", 0 ) /* ARM protection ASIC - internal rom */ + ROM_LOAD( "ket_igs027a.bin", 0x000000, 0x04000, NO_DUMP ) + + ROM_REGION( 0xc00000, "tiles", 0 ) /* 8x8 Text Tiles + 32x32 BG Tiles */ + ROM_LOAD( "pgm_t01s.rom", 0x000000, 0x200000, CRC(1a7123a0) SHA1(cc567f577bfbf45427b54d6695b11b74f2578af3) ) // same as standard PGM text bios - surface scratched to remove details + ROM_LOAD( "t04701w064.u19", 0x180000, 0x800000, CRC(2665b041) SHA1(fb1107778b66f2af0de77ac82e1ee2902f53a959) ) //text-1 + + ROM_REGION( 0x1000000, "sprcol", 0 ) /* Sprite Colour Data */ + ROM_LOAD( "a04701w064.u7", 0x0000000, 0x0800000, CRC(5ef1b94b) SHA1(f10dfa46e0a4d297c3a856aea5b49d648f98935c) ) //image-1 + ROM_LOAD( "a04702w064.u8", 0x0800000, 0x0800000, CRC(26d6da7f) SHA1(f20e07a7994f41b5ed917f8b0119dc5542f3541c) ) //image-2 + + ROM_REGION( 0x0800000, "sprmask", 0 ) /* Sprite Masks + Colour Indexes */ + ROM_LOAD( "b04701w064.u1", 0x0000000, 0x0800000, CRC(1bec008d) SHA1(07d117dc2eebb35727fb18a7c563acbaf25a8d36) ) //bitmap-1 + + ROM_REGION( 0x800000, "ics", ROMREGION_ERASE00 ) /* Samples - (8 bit mono 11025Hz) - */ + /* there is a position for the PGM audio bios rom, but it's unpopulated, and the M of PGM has been scratched off the PCB */ + ROM_LOAD( "m04701b032.u17", 0x400000, 0x400000, CRC(b46e22d1) SHA1(670853dc485942fb96380568494bdf3235f446ee) ) //music-1 + + ROM_REGION( 0x20000, "sram", 0 ) /* default settings */ + ROM_LOAD( "ket_defaults.nv", 0x0000000, 0x020000, CRC(3ca892d8) SHA1(67430df5217e453ae8140c5653deeadfad8fa684) ) +ROM_END + +ROM_START( ketarrs151 ) + ROM_REGION( 0x600000, "maincpu", 0 ) /* 68000 Code */ + /* doesn't use a separate BIOS rom */ + ROM_LOAD16_WORD_SWAP( "ketarrs151_v100.u38", 0x000000, 0x200000, CRC(35c984e4) SHA1(d4517f318de0c40a3b30e41374f33bb355581434) ) + + ROM_REGION( 0x4000, "prot", 0 ) /* ARM protection ASIC - internal rom */ + ROM_LOAD( "ket_igs027a.bin", 0x000000, 0x04000, NO_DUMP ) + + ROM_REGION( 0xc00000, "tiles", 0 ) /* 8x8 Text Tiles + 32x32 BG Tiles */ + ROM_LOAD( "pgm_t01s.rom", 0x000000, 0x200000, CRC(1a7123a0) SHA1(cc567f577bfbf45427b54d6695b11b74f2578af3) ) // same as standard PGM text bios - surface scratched to remove details + ROM_LOAD( "t04701w064.u19", 0x180000, 0x800000, CRC(2665b041) SHA1(fb1107778b66f2af0de77ac82e1ee2902f53a959) ) //text-1 + + ROM_REGION( 0x1000000, "sprcol", 0 ) /* Sprite Colour Data */ + ROM_LOAD( "a04701w064.u7", 0x0000000, 0x0800000, CRC(5ef1b94b) SHA1(f10dfa46e0a4d297c3a856aea5b49d648f98935c) ) //image-1 + ROM_LOAD( "a04702w064.u8", 0x0800000, 0x0800000, CRC(26d6da7f) SHA1(f20e07a7994f41b5ed917f8b0119dc5542f3541c) ) //image-2 + + ROM_REGION( 0x0800000, "sprmask", 0 ) /* Sprite Masks + Colour Indexes */ + ROM_LOAD( "b04701w064.u1", 0x0000000, 0x0800000, CRC(1bec008d) SHA1(07d117dc2eebb35727fb18a7c563acbaf25a8d36) ) //bitmap-1 + + ROM_REGION( 0x800000, "ics", ROMREGION_ERASE00 ) /* Samples - (8 bit mono 11025Hz) - */ + /* there is a position for the PGM audio bios rom, but it's unpopulated, and the M of PGM has been scratched off the PCB */ + ROM_LOAD( "m04701b032.u17", 0x400000, 0x400000, CRC(b46e22d1) SHA1(670853dc485942fb96380568494bdf3235f446ee) ) //music-1 + + ROM_REGION( 0x20000, "sram", 0 ) /* default settings */ + ROM_LOAD( "ket_defaults.nv", 0x0000000, 0x020000, CRC(3ca892d8) SHA1(67430df5217e453ae8140c5653deeadfad8fa684) ) +ROM_END + +ROM_START( ketarr ) + ROM_REGION( 0x600000, "maincpu", 0 ) + ROM_LOAD16_WORD_SWAP( "ketarr17_v100.u38", 0x000000, 0x200000, CRC(2cb80b89) SHA1(e1aa072b8344890486e11795e02703aa2d234bb1) ) + + ROM_REGION( 0x4000, "prot", 0 ) + ROM_LOAD( "ket_igs027a.bin", 0x000000, 0x04000, NO_DUMP ) + + ROM_REGION( 0xc00000, "tiles", 0 ) + ROM_LOAD( "pgm_t01s.rom", 0x000000, 0x200000, CRC(1a7123a0) SHA1(cc567f577bfbf45427b54d6695b11b74f2578af3) ) + ROM_LOAD( "t04701w064.u19", 0x180000, 0x800000, CRC(2665b041) SHA1(fb1107778b66f2af0de77ac82e1ee2902f53a959) ) //text-1 + + ROM_REGION( 0x1000000, "sprcol", 0 ) + ROM_LOAD( "a04701w064.u7", 0x0000000, 0x0800000, CRC(5ef1b94b) SHA1(f10dfa46e0a4d297c3a856aea5b49d648f98935c) ) //image-1 + ROM_LOAD( "a04702w064.u8", 0x0800000, 0x0800000, CRC(26d6da7f) SHA1(f20e07a7994f41b5ed917f8b0119dc5542f3541c) ) //image-2 + + ROM_REGION( 0x0800000, "sprmask", 0 ) + ROM_LOAD( "b04701w064.u1", 0x0000000, 0x0800000, CRC(1bec008d) SHA1(07d117dc2eebb35727fb18a7c563acbaf25a8d36) ) //bitmap-1 + + ROM_REGION( 0x800000, "ics", ROMREGION_ERASE00 ) + ROM_LOAD( "m04701b032.u17", 0x400000, 0x400000, CRC(b46e22d1) SHA1(670853dc485942fb96380568494bdf3235f446ee) ) //music-1 + + ROM_REGION( 0x20000, "sram", 0 ) /* default settings */ + ROM_LOAD( "ket_defaults.nv", 0x0000000, 0x020000, CRC(3ca892d8) SHA1(67430df5217e453ae8140c5653deeadfad8fa684) ) +ROM_END + ROM_START( espgal ) ROM_REGION( 0x600000, "maincpu", 0 ) /* 68000 Code */ /* doesn't use a separate BIOS rom */ @@ -4312,10 +4526,31 @@ GAME( 2002, ddpdojblk, ddpdoj, pgm_arm_type1_cave, pgm, pgm_arm_type1_s GAME( 2002, ddpdojblka, ddpdoj, pgm_arm_type1_cave, pgm, pgm_arm_type1_state, ddp3, ROT270, "Cave (AMI license)", "DoDonPachi Dai-Ou-Jou (2002.10.07 Black Ver)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // Displays "2002.04.05.Master Ver" (old) or "2002.10.07 Black Ver" (new) // the exact text of the 'version' shows which revision of the game it is; the newest has 2 '.' symbols in the string, the oldest, none. +// the only difference between 'ket' and 'ket1' is the ROM fill at 0x1443bc-0x1c88cd, on ket1 it seems to be randomized / garbage data, on ket it's all 0xff, both have been seen on more than one PCB. GAME( 2002, ket, 0, pgm_arm_type1_cave, pgm, pgm_arm_type1_state, ket, ROT270, "Cave (AMI license)", "Ketsui: Kizuna Jigoku Tachi (2003/01/01. Master Ver.)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) +GAME( 2002, ket1, ket, pgm_arm_type1_cave, pgm, pgm_arm_type1_state, ket, ROT270, "Cave (AMI license)", "Ketsui: Kizuna Jigoku Tachi (2003/01/01. Master Ver.) (alt rom fill)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) GAME( 2002, keta, ket, pgm_arm_type1_cave, pgm, pgm_arm_type1_state, ket, ROT270, "Cave (AMI license)", "Ketsui: Kizuna Jigoku Tachi (2003/01/01 Master Ver.)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) GAME( 2002, ketb, ket, pgm_arm_type1_cave, pgm, pgm_arm_type1_state, ket, ROT270, "Cave (AMI license)", "Ketsui: Kizuna Jigoku Tachi (2003/01/01 Master Ver)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) +// these are modern hacks, some of them have been seen on original PCBs, also reportedly on a bootleg PCB with mostly original components but the ARM replaced with a custom chip. +// this is a significantly reworked version of the game +GAME( 2014, ketarr, ket, pgm_arm_type1_cave, pgm, pgm_arm_type1_state, ket, ROT270, "hack (trap15)", "Ketsui: Kizuna Jigoku Tachi (2014/07/16 ARRANGE 1.7 VER) (hack)", MACHINE_SUPPORTS_SAVE ) +GAME( 2012, ketarr151, ket, pgm_arm_type1_cave, pgm, pgm_arm_type1_state, ket, ROT270, "hack (trap15)", "Ketsui: Kizuna Jigoku Tachi (2012/06/26 ARRANGE 1.51 VER) (hack)", MACHINE_SUPPORTS_SAVE ) // this apparently crashes on an original PGM PCB when displaying the text after starting a game, find out why and reproduce the issue in MAME. +GAME( 2012, ketarr15, ket, pgm_arm_type1_cave, pgm, pgm_arm_type1_state, ket, ROT270, "hack (trap15)", "Ketsui: Kizuna Jigoku Tachi (2012/06/26 ARRANGE 1.5 VER) (hack)", MACHINE_SUPPORTS_SAVE ) +GAME( 2012, ketarr10, ket, pgm_arm_type1_cave, pgm, pgm_arm_type1_state, ket, ROT270, "hack (trap15)", "Ketsui: Kizuna Jigoku Tachi (2012/04/17 ARRANGE VER) (hack)", MACHINE_SUPPORTS_SAVE ) + +// these simplify the scoring system +GAME( 2012, ketarrs151, ket, pgm_arm_type1_cave, pgm, pgm_arm_type1_state, ket, ROT270, "hack (trap15)", "Ketsui: Kizuna Jigoku Tachi (2012/06/27 MR.STOIC 1.51 VER) (hack)", MACHINE_SUPPORTS_SAVE ) +GAME( 2012, ketarrs15, ket, pgm_arm_type1_cave, pgm, pgm_arm_type1_state, ket, ROT270, "hack (trap15)", "Ketsui: Kizuna Jigoku Tachi (2012/06/27 MR.STOIC 1.5 VER) (hack)", MACHINE_SUPPORTS_SAVE ) + +// this has the 'programmed slowdown' removed. +GAME( 2012, ketarrf, ket, pgm_arm_type1_cave, pgm, pgm_arm_type1_state, ket, ROT270, "hack (trap15)", "Ketsui: Kizuna Jigoku Tachi (2012/04/17 FAST. VER) (hack)", MACHINE_SUPPORTS_SAVE ) + +// this version is stupid, it just simulates what happens if the protection chip isn't returning proper values +// ROM_LOAD16_WORD_SWAP( "ketarrb_v100.u38", 0x000000, 0x200000, CRC(ec7a4f92) SHA1(6351fb386586956fbdb5f0730c481fb539cc267a) ) +// GAME( 2002, ketarrb, ket, pgm_arm_type1_cave, pgm, pgm_arm_type1_state, ket, ROT270, "trap15", "Ketsui: Kizuna Jigoku Tachi (2012/04/17 BACK. VER)", MACHINE_SUPPORTS_SAVE ) + + GAME( 2003, espgal, 0, pgm_arm_type1_cave, pgm, pgm_arm_type1_state, espgal, ROT270, "Cave (AMI license)", "Espgaluda (2003/10/15 Master Ver)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // protection simulated, but should be correct diff --git a/src/mame/drivers/playch10.c b/src/mame/drivers/playch10.c index 8d008f2bf17..4fccdd713dc 100644 --- a/src/mame/drivers/playch10.c +++ b/src/mame/drivers/playch10.c @@ -734,12 +734,25 @@ MACHINE_CONFIG_END ROM_SYSTEM_BIOS( 0, "dual", "Dual Monitor Version" ) \ ROM_LOAD_BIOS( 0, "pch1-c__8t_e-2.8t", 0x00000, 0x4000, CRC(d52fa07a) SHA1(55cabf52ae10c050c2229081a80b9fe5454ab8c5) ) \ ROM_SYSTEM_BIOS( 1, "single", "Single Monitor Version" ) \ - ROM_LOAD_BIOS( 1, "pck1-c.8t", 0x00000, 0x4000, CRC(503ee8b1) SHA1(3bd20bc71cac742d1b8c1430a6426d0a19db7ad0) ) + ROM_LOAD_BIOS( 1, "pck1-c.8t", 0x00000, 0x4000, CRC(503ee8b1) SHA1(3bd20bc71cac742d1b8c1430a6426d0a19db7ad0) ) \ + ROM_SYSTEM_BIOS( 2, "alt", "Alt Bios" ) /* this bios doens't work properly, selecting service mode causes it to hang, is it good? maybe different hw? */ \ + ROM_LOAD_BIOS( 2, "pch1-c_8te.8t", 0x00000, 0x4000, CRC(123ffa37) SHA1(3bef754a5a85a8498bb6222ddf5cb9021f264db5) ) + + #define BIOS_GFX \ ROM_REGION( 0x6000, "gfx1", 0 ) \ - ROM_LOAD( "pch1-c__8p_e-1.8p", 0x00000, 0x2000, CRC(30c15e23) SHA1(69166afdb2fe827c7f1919cdf4197caccbd961fa) ) \ - ROM_LOAD( "pch1-c__8m_e-1.8m", 0x02000, 0x2000, CRC(c1232eee) SHA1(beaf9fa2d091a3c7f70c51e966d885b1f9f0935f) ) \ - ROM_LOAD( "pch1-c__8k.8k", 0x04000, 0x2000, CRC(9acffb30) SHA1(b814f10ef23f2ca445fabafcbf7f25e2d454ba8c) ) \ + ROM_LOAD_BIOS( 0, "pch1-c__8p_e-1.8p", 0x00000, 0x2000, CRC(30c15e23) SHA1(69166afdb2fe827c7f1919cdf4197caccbd961fa) ) \ + ROM_LOAD_BIOS( 0, "pch1-c__8m_e-1.8m", 0x02000, 0x2000, CRC(c1232eee) SHA1(beaf9fa2d091a3c7f70c51e966d885b1f9f0935f) ) \ + ROM_LOAD_BIOS( 0, "pch1-c__8k.8k", 0x04000, 0x2000, CRC(9acffb30) SHA1(b814f10ef23f2ca445fabafcbf7f25e2d454ba8c) ) \ + \ + ROM_LOAD_BIOS( 1, "pch1-c__8p_e-1.8p", 0x00000, 0x2000, CRC(30c15e23) SHA1(69166afdb2fe827c7f1919cdf4197caccbd961fa) ) \ + ROM_LOAD_BIOS( 1, "pch1-c__8m_e-1.8m", 0x02000, 0x2000, CRC(c1232eee) SHA1(beaf9fa2d091a3c7f70c51e966d885b1f9f0935f) ) \ + ROM_LOAD_BIOS( 1, "pch1-c__8k.8k", 0x04000, 0x2000, CRC(9acffb30) SHA1(b814f10ef23f2ca445fabafcbf7f25e2d454ba8c) ) \ + \ + ROM_LOAD_BIOS( 2, "pch1-c_8p-8p", 0x00000, 0x2000, CRC(90e1b80c) SHA1(c4f4b135b2a11743518aaa0554c365b4a8cf299a) ) \ + ROM_LOAD_BIOS( 2, "pch1-c_8m.8m", 0x02000, 0x2000, CRC(83ebc7a3) SHA1(a7c607138f4f9b96ab5d3a82c47895f77672e296) ) \ + ROM_LOAD_BIOS( 2, "pch1-c__8k.8k", 0x04000, 0x2000, CRC(9acffb30) SHA1(b814f10ef23f2ca445fabafcbf7f25e2d454ba8c) ) \ + \ ROM_REGION( 0x0300, "proms", 0 ) \ ROM_LOAD( "pch1-c-6f.82s129an.6f", 0x0000, 0x0100, CRC(e5414ca3) SHA1(d2878411cda84ffe0afb2e538a67457f51bebffb) ) \ ROM_LOAD( "pch1-c-6e.82s129an.6e", 0x0100, 0x0100, CRC(a2625c6e) SHA1(a448b47c9289902e26a3d3c4c7d5a7968c385e81) ) \ @@ -747,6 +760,9 @@ MACHINE_CONFIG_END ROM_REGION( 0xc0, "palette", 0 ) \ ROM_LOAD( "rp2c0x.pal", 0x00, 0xc0, CRC(48de65dc) SHA1(d10acafc8da9ff479c270ec01180cca61efe62f5) ) + + + /******************************************************************************/ /* Standard Games */ diff --git a/src/mame/drivers/quizpun2.c b/src/mame/drivers/quizpun2.c index ec8e446456a..e35ec6e0f94 100644 --- a/src/mame/drivers/quizpun2.c +++ b/src/mame/drivers/quizpun2.c @@ -214,7 +214,7 @@ static void log_protection( address_space &space, const char *warning ) { quizpun2_state *state = space.machine().driver_data<quizpun2_state>(); struct prot_t &prot = state->m_prot; - logerror("%04x: protection - %s (state %x, wait %x, param %02x, cmd %02x, addr %02x)\n", space.device().safe_pc(), warning, + state->logerror("%04x: protection - %s (state %x, wait %x, param %02x, cmd %02x, addr %02x)\n", space.device().safe_pc(), warning, prot.state, prot.wait_param, prot.param, diff --git a/src/mame/drivers/rainbow.c b/src/mame/drivers/rainbow.c index aab93ed3d0f..05b697a3afa 100644 --- a/src/mame/drivers/rainbow.c +++ b/src/mame/drivers/rainbow.c @@ -1188,7 +1188,7 @@ hard_disk_file *(rainbow_state::rainbow_hdc_file(int drv)) } // LBA sector from CHS -static UINT32 get_and_print_lbasector(hard_disk_info *info, UINT16 cylinder, UINT8 head, UINT8 sector_number) +static UINT32 get_and_print_lbasector(device_t *device,hard_disk_info *info, UINT16 cylinder, UINT8 head, UINT8 sector_number) { if (info == NULL) return 0; @@ -1199,7 +1199,7 @@ static UINT32 get_and_print_lbasector(hard_disk_info *info, UINT16 cylinder, UIN lbasector *= info->sectors; // LBA : ( x 16 ) lbasector += (sector_number - 1); // + (sector number - 1) - logerror(" CYLINDER %u - HEAD %u - SECTOR NUMBER %u (LBA-SECTOR %u) ", cylinder, head, sector_number, lbasector); + device->logerror(" CYLINDER %u - HEAD %u - SECTOR NUMBER %u (LBA-SECTOR %u) ", cylinder, head, sector_number, lbasector); return lbasector; } @@ -1239,7 +1239,7 @@ WRITE_LINE_MEMBER(rainbow_state::hdc_read_sector) output_set_value("led1", 1); // Pointer to info + C + H + S - UINT32 lbasector = get_and_print_lbasector(info, cylinder, SDH & 0x07, sector_number); + UINT32 lbasector = get_and_print_lbasector(this, info, cylinder, SDH & 0x07, sector_number); if ((cylinder <= info->cylinders) && // filter invalid ranges (SECTOR_SIZES[(SDH >> 5) & 0x03] == info->sectorbytes) // may not vary in image! @@ -1361,7 +1361,7 @@ int rainbow_state::do_write_sector() return 50; } // Pointer to info + C + H + S - UINT32 lbasector = get_and_print_lbasector(info, cylinder, SDH & 0x07, sector_number); + UINT32 lbasector = get_and_print_lbasector(this,info, cylinder, SDH & 0x07, sector_number); if (sector_count != 1) // ignore all SECTOR_COUNTS != 1 { diff --git a/src/mame/drivers/rd100.c b/src/mame/drivers/rd100.c index 12f9ac627b2..46c20ff62ce 100644 --- a/src/mame/drivers/rd100.c +++ b/src/mame/drivers/rd100.c @@ -48,31 +48,31 @@ INPUT_PORTS_END UINT32 rd100_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) { -// for (int y = 0; y < 32*8; y++) -// { -// offs_t offset = (y / 8) * 128; +// for (int y = 0; y < 32*8; y++) +// { +// offs_t offset = (y / 8) * 128; -// for (int sx = 0; sx < 64; sx++) -// { -// UINT8 code = m_video_ram[offset++]; -// UINT8 attr = m_video_ram[offset++]; +// for (int sx = 0; sx < 64; sx++) +// { +// UINT8 code = m_video_ram[offset++]; +// UINT8 attr = m_video_ram[offset++]; -// offs_t char_offs = ((code & 0x7f) << 3) | (y & 0x07); -// if (BIT(code, 7)) char_offs = ((code & 0x7f) << 3) | ((y >> 1) & 0x07); +// offs_t char_offs = ((code & 0x7f) << 3) | (y & 0x07); +// if (BIT(code, 7)) char_offs = ((code & 0x7f) << 3) | ((y >> 1) & 0x07); -// UINT8 data = m_char_rom->base()[char_offs]; +// UINT8 data = m_char_rom->base()[char_offs]; -// rgb_t fg = m_palette->pen_color(attr & 0x07); -// rgb_t bg = m_palette->pen_color((attr >> 3) & 0x07); +// rgb_t fg = m_palette->pen_color(attr & 0x07); +// rgb_t bg = m_palette->pen_color((attr >> 3) & 0x07); -// for (int x = 0; x < 6; x++) -// { -// bitmap.pix32(y, (sx * 6) + x) = BIT(data, 7) ? fg : bg; +// for (int x = 0; x < 6; x++) +// { +// bitmap.pix32(y, (sx * 6) + x) = BIT(data, 7) ? fg : bg; -// data <<= 1; -// } -// } -// } +// data <<= 1; +// } +// } +// } return 0; } diff --git a/src/mame/drivers/replicator.c b/src/mame/drivers/replicator.c index 032e2246f8d..7ac2f528be1 100644 --- a/src/mame/drivers/replicator.c +++ b/src/mame/drivers/replicator.c @@ -151,39 +151,39 @@ class replicator_state : public driver_device { public: - replicator_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_lcdc(*this, "hd44780"), - m_dac(*this, "dac") - { - } - - virtual void machine_start(); - - UINT8 m_port_a; - UINT8 m_port_b; - UINT8 m_port_c; - UINT8 m_port_d; - UINT8 m_port_e; - UINT8 m_port_f; - UINT8 m_port_g; - UINT8 m_port_h; - UINT8 m_port_j; - UINT8 m_port_k; - UINT8 m_port_l; - - UINT8 shift_register_value; - - required_device<avr8_device> m_maincpu; - required_device<hd44780_device> m_lcdc; - required_device<dac_device> m_dac; - - DECLARE_READ8_MEMBER(port_r); - DECLARE_WRITE8_MEMBER(port_w); - DECLARE_DRIVER_INIT(replicator); - virtual void machine_reset(); - DECLARE_PALETTE_INIT(replicator); + replicator_state(const machine_config &mconfig, device_type type, const char *tag) + : driver_device(mconfig, type, tag), + m_maincpu(*this, "maincpu"), + m_lcdc(*this, "hd44780"), + m_dac(*this, "dac") + { + } + + virtual void machine_start(); + + UINT8 m_port_a; + UINT8 m_port_b; + UINT8 m_port_c; + UINT8 m_port_d; + UINT8 m_port_e; + UINT8 m_port_f; + UINT8 m_port_g; + UINT8 m_port_h; + UINT8 m_port_j; + UINT8 m_port_k; + UINT8 m_port_l; + + UINT8 shift_register_value; + + required_device<avr8_device> m_maincpu; + required_device<hd44780_device> m_lcdc; + required_device<dac_device> m_dac; + + DECLARE_READ8_MEMBER(port_r); + DECLARE_WRITE8_MEMBER(port_w); + DECLARE_DRIVER_INIT(replicator); + virtual void machine_reset(); + DECLARE_PALETTE_INIT(replicator); }; void replicator_state::machine_start() @@ -192,339 +192,339 @@ void replicator_state::machine_start() READ8_MEMBER(replicator_state::port_r) { - switch( offset ) - { - case AVR8_IO_PORTA: - { + switch( offset ) + { + case AVR8_IO_PORTA: + { #if LOG_PORTS - printf("[%08X] Port A READ (A-axis signals + B-axis STEP&DIR)\n", m_maincpu->m_shifted_pc); + printf("[%08X] Port A READ (A-axis signals + B-axis STEP&DIR)\n", m_maincpu->m_shifted_pc); #endif - return 0x00; - } - case AVR8_IO_PORTB: - { + return 0x00; + } + case AVR8_IO_PORTB: + { #if LOG_PORTS - printf("[%08X] Port B READ (SD-CS; 1280-MISO/MOSI/SCK; EX2-FAN/HEAT/PWR-CHECK; BLINK)\n", m_maincpu->m_shifted_pc); + printf("[%08X] Port B READ (SD-CS; 1280-MISO/MOSI/SCK; EX2-FAN/HEAT/PWR-CHECK; BLINK)\n", m_maincpu->m_shifted_pc); #endif - return 0x00; - } - case AVR8_IO_PORTC: - { + return 0x00; + } + case AVR8_IO_PORTC: + { #if LOG_PORTS - printf("[%08X] Port C READ (1280-EX1/EX2; LCD-signals; R&G-LED; DETECT)\n", m_maincpu->m_shifted_pc); + printf("[%08X] Port C READ (1280-EX1/EX2; LCD-signals; R&G-LED; DETECT)\n", m_maincpu->m_shifted_pc); #endif - return DETECT; //indicated that the Interface board is present. - } - case AVR8_IO_PORTD: - { + return DETECT; //indicated that the Interface board is present. + } + case AVR8_IO_PORTD: + { #if LOG_PORTS - printf("[%08X] Port D READ (SDA/SCL; 1280-EX-TX/RX)\n", m_maincpu->m_shifted_pc); + printf("[%08X] Port D READ (SDA/SCL; 1280-EX-TX/RX)\n", m_maincpu->m_shifted_pc); #endif - return 0x00; - } - case AVR8_IO_PORTE: - { + return 0x00; + } + case AVR8_IO_PORTE: + { #if LOG_PORTS - printf("[%08X] Port E READ (1280-TX/RX; THERMO-signals)\n", m_maincpu->m_shifted_pc); + printf("[%08X] Port E READ (1280-TX/RX; THERMO-signals)\n", m_maincpu->m_shifted_pc); #endif - return 0x00; - } - case AVR8_IO_PORTF: - { + return 0x00; + } + case AVR8_IO_PORTF: + { #if LOG_PORTS - printf("[%08X] Port F READ (X-axis & Y-axis signals)\n", m_maincpu->m_shifted_pc); + printf("[%08X] Port F READ (X-axis & Y-axis signals)\n", m_maincpu->m_shifted_pc); #endif - return 0x00; - } - case AVR8_IO_PORTG: - { + return 0x00; + } + case AVR8_IO_PORTG: + { #if LOG_PORTS - printf("[%08X] Port G READ (BUZZ; Cutoff-sr-check; B-axis EN; 1280-EX3/EX4)\n", m_maincpu->m_shifted_pc); + printf("[%08X] Port G READ (BUZZ; Cutoff-sr-check; B-axis EN; 1280-EX3/EX4)\n", m_maincpu->m_shifted_pc); #endif - return 0x00; - } - case AVR8_IO_PORTH: - { + return 0x00; + } + case AVR8_IO_PORTH: + { #if LOG_PORTS - printf("[%08X] Port H READ (cuttoff-text/reset; EX1-FAN/HEAT/PWR-CHECK; SD-CD/SD-WP)\n", m_maincpu->m_shifted_pc); + printf("[%08X] Port H READ (cuttoff-text/reset; EX1-FAN/HEAT/PWR-CHECK; SD-CD/SD-WP)\n", m_maincpu->m_shifted_pc); #endif - return 0x00; - } - case AVR8_IO_PORTJ: - { + return 0x00; + } + case AVR8_IO_PORTJ: + { #if LOG_PORTS - printf("[%08X] Port J READ (Interface buttons; POTS-SCL; B-axis-POT)\n", m_maincpu->m_shifted_pc); + printf("[%08X] Port J READ (Interface buttons; POTS-SCL; B-axis-POT)\n", m_maincpu->m_shifted_pc); #endif - return ioport("keypad")->read(); - } - case AVR8_IO_PORTK: - { + return ioport("keypad")->read(); + } + case AVR8_IO_PORTK: + { #if LOG_PORTS - printf("[%08X] Port K READ (Z-axis signals; HBP-THERM; 1280-EX5/6/7)\n", m_maincpu->m_shifted_pc); + printf("[%08X] Port K READ (Z-axis signals; HBP-THERM; 1280-EX5/6/7)\n", m_maincpu->m_shifted_pc); #endif - return 0x00; - } - case AVR8_IO_PORTL: - { + return 0x00; + } + case AVR8_IO_PORTL: + { #if LOG_PORTS - printf("[%08X] Port L READ (HBP; EXTRA-FET; X-MIN/MAX; Y-MIN/MAX; Z-MIN/MAX)\n", m_maincpu->m_shifted_pc); + printf("[%08X] Port L READ (HBP; EXTRA-FET; X-MIN/MAX; Y-MIN/MAX; Z-MIN/MAX)\n", m_maincpu->m_shifted_pc); #endif - return 0x00; - } - } - return 0; + return 0x00; + } + } + return 0; } WRITE8_MEMBER(replicator_state::port_w) { - switch( offset ) - { - case AVR8_IO_PORTA: - { - if (data == m_port_a) break; + switch( offset ) + { + case AVR8_IO_PORTA: + { + if (data == m_port_a) break; #if LOG_PORTS - UINT8 old_port_a = m_port_a; - UINT8 changed = data ^ old_port_a; - - printf("[%08X] ", m_maincpu->m_shifted_pc); - if(changed & A_AXIS_DIR) printf("[A] A_AXIS_DIR: %s\n", data & A_AXIS_DIR ? "HIGH" : "LOW"); - if(changed & A_AXIS_STEP) printf("[A] A_AXIS_STEP: %s\n", data & A_AXIS_STEP ? "HIGH" : "LOW"); - if(changed & A_AXIS_EN) printf("[A] A_AXIS_EN: %s\n", data & A_AXIS_EN ? "HIGH" : "LOW"); - if(changed & A_AXIS_POT) printf("[A] A_AXIS_POT: %s\n", data & A_AXIS_POT ? "HIGH" : "LOW"); - if(changed & B_AXIS_DIR) printf("[A] B_AXIS_DIR: %s\n", data & B_AXIS_DIR ? "HIGH" : "LOW"); - if(changed & B_AXIS_STEP) printf("[A] B_AXIS_STEP: %s\n", data & B_AXIS_STEP ? "HIGH" : "LOW"); + UINT8 old_port_a = m_port_a; + UINT8 changed = data ^ old_port_a; + + printf("[%08X] ", m_maincpu->m_shifted_pc); + if(changed & A_AXIS_DIR) printf("[A] A_AXIS_DIR: %s\n", data & A_AXIS_DIR ? "HIGH" : "LOW"); + if(changed & A_AXIS_STEP) printf("[A] A_AXIS_STEP: %s\n", data & A_AXIS_STEP ? "HIGH" : "LOW"); + if(changed & A_AXIS_EN) printf("[A] A_AXIS_EN: %s\n", data & A_AXIS_EN ? "HIGH" : "LOW"); + if(changed & A_AXIS_POT) printf("[A] A_AXIS_POT: %s\n", data & A_AXIS_POT ? "HIGH" : "LOW"); + if(changed & B_AXIS_DIR) printf("[A] B_AXIS_DIR: %s\n", data & B_AXIS_DIR ? "HIGH" : "LOW"); + if(changed & B_AXIS_STEP) printf("[A] B_AXIS_STEP: %s\n", data & B_AXIS_STEP ? "HIGH" : "LOW"); #endif - m_port_a = data; - break; - } - case AVR8_IO_PORTB: - { - if (data == m_port_b) break; + m_port_a = data; + break; + } + case AVR8_IO_PORTB: + { + if (data == m_port_b) break; #if LOG_PORTS - UINT8 old_port_b = m_port_b; - UINT8 changed = data ^ old_port_b; - - printf("[%08X] ", m_maincpu->m_shifted_pc); - if(changed & SD_CS) printf("[B] SD Card Chip Select: %s\n", data & SD_CS ? "HIGH" : "LOW"); - if(changed & SCK_1280) printf("[B] 1280-SCK: %s\n", data & SCK_1280 ? "HIGH" : "LOW"); - if(changed & MOSI_1280) printf("[B] 1280-MOSI: %s\n", data & MOSI_1280 ? "HIGH" : "LOW"); - if(changed & MISO_1280) printf("[B] 1280-MISO: %s\n", data & MISO_1280 ? "HIGH" : "LOW"); - if(changed & EX2_PWR_CHECK) printf("[B] EX2-PWR-CHECK: %s\n", data & EX2_PWR_CHECK ? "HIGH" : "LOW"); - if(changed & EX2_HEAT) printf("[B] EX2_HEAT: %s\n", data & EX2_HEAT ? "HIGH" : "LOW"); - if(changed & EX2_FAN) printf("[B] EX2_FAN: %s\n", data & EX2_FAN ? "HIGH" : "LOW"); - if(changed & BLINK) printf("[B] BLINK: %s\n", data & BLINK ? "HIGH" : "LOW"); + UINT8 old_port_b = m_port_b; + UINT8 changed = data ^ old_port_b; + + printf("[%08X] ", m_maincpu->m_shifted_pc); + if(changed & SD_CS) printf("[B] SD Card Chip Select: %s\n", data & SD_CS ? "HIGH" : "LOW"); + if(changed & SCK_1280) printf("[B] 1280-SCK: %s\n", data & SCK_1280 ? "HIGH" : "LOW"); + if(changed & MOSI_1280) printf("[B] 1280-MOSI: %s\n", data & MOSI_1280 ? "HIGH" : "LOW"); + if(changed & MISO_1280) printf("[B] 1280-MISO: %s\n", data & MISO_1280 ? "HIGH" : "LOW"); + if(changed & EX2_PWR_CHECK) printf("[B] EX2-PWR-CHECK: %s\n", data & EX2_PWR_CHECK ? "HIGH" : "LOW"); + if(changed & EX2_HEAT) printf("[B] EX2_HEAT: %s\n", data & EX2_HEAT ? "HIGH" : "LOW"); + if(changed & EX2_FAN) printf("[B] EX2_FAN: %s\n", data & EX2_FAN ? "HIGH" : "LOW"); + if(changed & BLINK) printf("[B] BLINK: %s\n", data & BLINK ? "HIGH" : "LOW"); #endif - m_port_b = data; - break; - } - case AVR8_IO_PORTC: - { - if (data == m_port_c) break; - - UINT8 old_port_c = m_port_c; - UINT8 changed = data ^ old_port_c; + m_port_b = data; + break; + } + case AVR8_IO_PORTC: + { + if (data == m_port_c) break; + + UINT8 old_port_c = m_port_c; + UINT8 changed = data ^ old_port_c; #if LOG_PORTS - printf("[%08X] ", m_maincpu->m_shifted_pc); - if(changed & EX2_1280) printf("[C] EX2_1280: %s\n", data & EX2_1280 ? "HIGH" : "LOW"); - if(changed & EX1_1280) printf("[C] EX1_1280: %s\n", data & EX1_1280 ? "HIGH" : "LOW"); - if(changed & LCD_CLK) printf("[C] LCD_CLK: %s\n", data & LCD_CLK ? "HIGH" : "LOW"); - if(changed & LCD_DATA) printf("[C] LCD_DATA: %s\n", data & LCD_DATA ? "HIGH" : "LOW"); - if(changed & LCD_STROBE) printf("[C] LCD_STROBE: %s\n", data & LCD_STROBE ? "HIGH" : "LOW"); - if(changed & RLED) printf("[C] RLED: %s\n", data & RLED ? "HIGH" : "LOW"); - if(changed & GLED) printf("[C] GLED: %s\n", data & GLED ? "HIGH" : "LOW"); - if(changed & DETECT) printf("[C] DETECT: %s\n", data & DETECT ? "HIGH" : "LOW"); + printf("[%08X] ", m_maincpu->m_shifted_pc); + if(changed & EX2_1280) printf("[C] EX2_1280: %s\n", data & EX2_1280 ? "HIGH" : "LOW"); + if(changed & EX1_1280) printf("[C] EX1_1280: %s\n", data & EX1_1280 ? "HIGH" : "LOW"); + if(changed & LCD_CLK) printf("[C] LCD_CLK: %s\n", data & LCD_CLK ? "HIGH" : "LOW"); + if(changed & LCD_DATA) printf("[C] LCD_DATA: %s\n", data & LCD_DATA ? "HIGH" : "LOW"); + if(changed & LCD_STROBE) printf("[C] LCD_STROBE: %s\n", data & LCD_STROBE ? "HIGH" : "LOW"); + if(changed & RLED) printf("[C] RLED: %s\n", data & RLED ? "HIGH" : "LOW"); + if(changed & GLED) printf("[C] GLED: %s\n", data & GLED ? "HIGH" : "LOW"); + if(changed & DETECT) printf("[C] DETECT: %s\n", data & DETECT ? "HIGH" : "LOW"); #endif - if (changed & LCD_CLK){ - /* The LCD is interfaced by an 8-bit shift register (74HC4094). */ - if (data & LCD_CLK){//CLK positive edge - shift_register_value = (shift_register_value << 1) | ((data & LCD_DATA) >> 3); - //printf("[%08X] ", m_maincpu->m_shifted_pc); - //printf("[C] LCD CLK positive edge. shift_register=0x%02X\n", shift_register_value); - } - } - - if(changed & LCD_STROBE){ - if (data & LCD_STROBE){ //STROBE positive edge - bool RS = (shift_register_value >> 1) & 1; - bool RW = (shift_register_value >> 2) & 1; - bool enable = (shift_register_value >> 3) & 1; - UINT8 lcd_data = shift_register_value & 0xF0; - - if (enable && RW==0){ - if (RS==0){ - m_lcdc->control_write(space, 0, lcd_data); - } else { - m_lcdc->data_write(space, 0, lcd_data); - } - } - } - } - m_port_c = data; - - break; - } - case AVR8_IO_PORTD: - { - if (data == m_port_d) break; + if (changed & LCD_CLK){ + /* The LCD is interfaced by an 8-bit shift register (74HC4094). */ + if (data & LCD_CLK){//CLK positive edge + shift_register_value = (shift_register_value << 1) | ((data & LCD_DATA) >> 3); + //printf("[%08X] ", m_maincpu->m_shifted_pc); + //printf("[C] LCD CLK positive edge. shift_register=0x%02X\n", shift_register_value); + } + } + + if(changed & LCD_STROBE){ + if (data & LCD_STROBE){ //STROBE positive edge + bool RS = (shift_register_value >> 1) & 1; + bool RW = (shift_register_value >> 2) & 1; + bool enable = (shift_register_value >> 3) & 1; + UINT8 lcd_data = shift_register_value & 0xF0; + + if (enable && RW==0){ + if (RS==0){ + m_lcdc->control_write(space, 0, lcd_data); + } else { + m_lcdc->data_write(space, 0, lcd_data); + } + } + } + } + m_port_c = data; + + break; + } + case AVR8_IO_PORTD: + { + if (data == m_port_d) break; #if LOG_PORTS - UINT8 old_port_d = m_port_d; - UINT8 changed = data ^ old_port_d; - - printf("[%08X] ", m_maincpu->m_shifted_pc); - if(changed & PORTD_SCL) printf("[D] PORTD_SCL: %s\n", data & PORTD_SCL ? "HIGH" : "LOW"); - if(changed & PORTD_SDA) printf("[D] PORTD_SDA: %s\n", data & PORTD_SDA ? "HIGH" : "LOW"); - if(changed & EX_RX_1280) printf("[D] EX_RX_1280: %s\n", data & EX_RX_1280 ? "HIGH" : "LOW"); - if(changed & EX_TX_1280) printf("[D] EX_TX_1280: %s\n", data & EX_TX_1280 ? "HIGH" : "LOW"); + UINT8 old_port_d = m_port_d; + UINT8 changed = data ^ old_port_d; + + printf("[%08X] ", m_maincpu->m_shifted_pc); + if(changed & PORTD_SCL) printf("[D] PORTD_SCL: %s\n", data & PORTD_SCL ? "HIGH" : "LOW"); + if(changed & PORTD_SDA) printf("[D] PORTD_SDA: %s\n", data & PORTD_SDA ? "HIGH" : "LOW"); + if(changed & EX_RX_1280) printf("[D] EX_RX_1280: %s\n", data & EX_RX_1280 ? "HIGH" : "LOW"); + if(changed & EX_TX_1280) printf("[D] EX_TX_1280: %s\n", data & EX_TX_1280 ? "HIGH" : "LOW"); #endif - m_port_d = data; - break; - } - case AVR8_IO_PORTE: - { - if (data == m_port_e) break; + m_port_d = data; + break; + } + case AVR8_IO_PORTE: + { + if (data == m_port_e) break; #if LOG_PORTS - UINT8 old_port_e = m_port_e; - UINT8 changed = data ^ old_port_e; - - printf("[%08X] ", m_maincpu->m_shifted_pc); - if(changed & RX_1280) printf("[E] 1280-RX: %s\n", data & RX_1280 ? "HIGH" : "LOW"); - if(changed & TX_1280) printf("[E] 1280-TX: %s\n", data & TX_1280 ? "HIGH" : "LOW"); - if(changed & THERMO_SCK) printf("[E] THERMO-SCK: %s\n", data & THERMO_SCK ? "HIGH" : "LOW"); - if(changed & THERMO_CS1) printf("[E] THERMO-CS1: %s\n", data & THERMO_CS1 ? "HIGH" : "LOW"); - if(changed & THERMO_CS2) printf("[E] THERMO-CS2: %s\n", data & THERMO_CS2 ? "HIGH" : "LOW"); - if(changed & THERMO_DO) printf("[E] THERMO-DO: %s\n", data & THERMO_DO ? "HIGH" : "LOW"); + UINT8 old_port_e = m_port_e; + UINT8 changed = data ^ old_port_e; + + printf("[%08X] ", m_maincpu->m_shifted_pc); + if(changed & RX_1280) printf("[E] 1280-RX: %s\n", data & RX_1280 ? "HIGH" : "LOW"); + if(changed & TX_1280) printf("[E] 1280-TX: %s\n", data & TX_1280 ? "HIGH" : "LOW"); + if(changed & THERMO_SCK) printf("[E] THERMO-SCK: %s\n", data & THERMO_SCK ? "HIGH" : "LOW"); + if(changed & THERMO_CS1) printf("[E] THERMO-CS1: %s\n", data & THERMO_CS1 ? "HIGH" : "LOW"); + if(changed & THERMO_CS2) printf("[E] THERMO-CS2: %s\n", data & THERMO_CS2 ? "HIGH" : "LOW"); + if(changed & THERMO_DO) printf("[E] THERMO-DO: %s\n", data & THERMO_DO ? "HIGH" : "LOW"); #endif - m_port_e = data; - break; - } - case AVR8_IO_PORTF: - { - if (data == m_port_f) break; + m_port_e = data; + break; + } + case AVR8_IO_PORTF: + { + if (data == m_port_f) break; #if LOG_PORTS - UINT8 old_port_f = m_port_f; - UINT8 changed = data ^ old_port_f; - - printf("[%08X] ", m_maincpu->m_shifted_pc); - if(changed & X_AXIS_DIR) printf("[F] X_AXIS_DIR: %s\n", data & X_AXIS_DIR ? "HIGH" : "LOW"); - if(changed & X_AXIS_STEP) printf("[F] X_AXIS_STEP: %s\n", data & X_AXIS_STEP ? "HIGH" : "LOW"); - if(changed & X_AXIS_EN) printf("[F] X_AXIS_EN: %s\n", data & X_AXIS_EN ? "HIGH" : "LOW"); - if(changed & X_AXIS_POT) printf("[F] X_AXIS_POT: %s\n", data & X_AXIS_POT ? "HIGH" : "LOW"); - if(changed & Y_AXIS_DIR) printf("[F] Y_AXIS_DIR: %s\n", data & Y_AXIS_DIR ? "HIGH" : "LOW"); - if(changed & Y_AXIS_STEP) printf("[F] Y_AXIS_STEP: %s\n", data & Y_AXIS_STEP ? "HIGH" : "LOW"); - if(changed & Y_AXIS_EN) printf("[F] Y_AXIS_EN: %s\n", data & Y_AXIS_EN ? "HIGH" : "LOW"); - if(changed & Y_AXIS_POT) printf("[F] Y_AXIS_POT: %s\n", data & Y_AXIS_POT ? "HIGH" : "LOW"); + UINT8 old_port_f = m_port_f; + UINT8 changed = data ^ old_port_f; + + printf("[%08X] ", m_maincpu->m_shifted_pc); + if(changed & X_AXIS_DIR) printf("[F] X_AXIS_DIR: %s\n", data & X_AXIS_DIR ? "HIGH" : "LOW"); + if(changed & X_AXIS_STEP) printf("[F] X_AXIS_STEP: %s\n", data & X_AXIS_STEP ? "HIGH" : "LOW"); + if(changed & X_AXIS_EN) printf("[F] X_AXIS_EN: %s\n", data & X_AXIS_EN ? "HIGH" : "LOW"); + if(changed & X_AXIS_POT) printf("[F] X_AXIS_POT: %s\n", data & X_AXIS_POT ? "HIGH" : "LOW"); + if(changed & Y_AXIS_DIR) printf("[F] Y_AXIS_DIR: %s\n", data & Y_AXIS_DIR ? "HIGH" : "LOW"); + if(changed & Y_AXIS_STEP) printf("[F] Y_AXIS_STEP: %s\n", data & Y_AXIS_STEP ? "HIGH" : "LOW"); + if(changed & Y_AXIS_EN) printf("[F] Y_AXIS_EN: %s\n", data & Y_AXIS_EN ? "HIGH" : "LOW"); + if(changed & Y_AXIS_POT) printf("[F] Y_AXIS_POT: %s\n", data & Y_AXIS_POT ? "HIGH" : "LOW"); #endif - m_port_f = data; - break; - } - case AVR8_IO_PORTG: - { - if (data == m_port_g) break; + m_port_f = data; + break; + } + case AVR8_IO_PORTG: + { + if (data == m_port_g) break; - UINT8 old_port_g = m_port_g; - UINT8 changed = data ^ old_port_g; + UINT8 old_port_g = m_port_g; + UINT8 changed = data ^ old_port_g; #if LOG_PORTS - printf("[%08X] ", m_maincpu->m_shifted_pc); - if(changed & EX4_1280) printf("[G] EX4_1280: %s\n", data & EX4_1280 ? "HIGH" : "LOW"); - if(changed & EX3_1280) printf("[G] EX3_1280: %s\n", data & EX3_1280 ? "HIGH" : "LOW"); - if(changed & B_AXIS_EN) printf("[G] B_AXIS_EN: %s\n", data & B_AXIS_EN ? "HIGH" : "LOW"); - if(changed & CUTOFF_SR_CHECK) printf("[G] CUTOFF_SR_CHECK: %s\n", data & CUTOFF_SR_CHECK ? "HIGH" : "LOW"); - if(changed & BUZZ) printf("[G] BUZZ: %s\n", data & BUZZ ? "HIGH" : "LOW"); + printf("[%08X] ", m_maincpu->m_shifted_pc); + if(changed & EX4_1280) printf("[G] EX4_1280: %s\n", data & EX4_1280 ? "HIGH" : "LOW"); + if(changed & EX3_1280) printf("[G] EX3_1280: %s\n", data & EX3_1280 ? "HIGH" : "LOW"); + if(changed & B_AXIS_EN) printf("[G] B_AXIS_EN: %s\n", data & B_AXIS_EN ? "HIGH" : "LOW"); + if(changed & CUTOFF_SR_CHECK) printf("[G] CUTOFF_SR_CHECK: %s\n", data & CUTOFF_SR_CHECK ? "HIGH" : "LOW"); + if(changed & BUZZ) printf("[G] BUZZ: %s\n", data & BUZZ ? "HIGH" : "LOW"); #endif - if(changed & BUZZ){ - /* FIX-ME: What is the largest sample value allowed? - I'm using 0x3F based on what I see in src/mame/drivers/craft.c - But as the method is called "write_unsigned8", I guess we could have samples with values up to 0xFF, right? - Anyway... With the 0x3F value we'll get a sound that is not so loud, which may be less annoying... :-) - */ - UINT8 audio_sample = (data & BUZZ) ? 0x3F : 0; - m_dac->write_unsigned8(audio_sample << 1); - } - - m_port_g = data; - break; - } - case AVR8_IO_PORTH: - { - if (data == m_port_h) break; + if(changed & BUZZ){ + /* FIX-ME: What is the largest sample value allowed? + I'm using 0x3F based on what I see in src/mame/drivers/craft.c + But as the method is called "write_unsigned8", I guess we could have samples with values up to 0xFF, right? + Anyway... With the 0x3F value we'll get a sound that is not so loud, which may be less annoying... :-) + */ + UINT8 audio_sample = (data & BUZZ) ? 0x3F : 0; + m_dac->write_unsigned8(audio_sample << 1); + } + + m_port_g = data; + break; + } + case AVR8_IO_PORTH: + { + if (data == m_port_h) break; #if LOG_PORTS - UINT8 old_port_h = m_port_h; - UINT8 changed = data ^ old_port_h; - - printf("[%08X] ", m_maincpu->m_shifted_pc); - if(changed & CUTOFF_TEST) printf("[H] CUTOFF_TEST: %s\n", data & CUTOFF_TEST ? "HIGH" : "LOW"); - if(changed & CUTOFF_RESET) printf("[H] CUTOFF_RESET: %s\n", data & CUTOFF_RESET ? "HIGH" : "LOW"); - if(changed & EX1_PWR_CHECK) printf("[H] EX1_PWR_CHECK: %s\n", data & EX1_PWR_CHECK ? "HIGH" : "LOW"); - if(changed & EX1_HEAT) printf("[H] EX1_HEAT: %s\n", data & EX1_HEAT ? "HIGH" : "LOW"); - if(changed & EX1_FAN) printf("[H] EX1_FAN: %s\n", data & EX1_FAN ? "HIGH" : "LOW"); - if(changed & SD_WP) printf("[H] SD_WP: %s\n", data & SD_WP ? "HIGH" : "LOW"); - if(changed & SD_CD) printf("[H] SD_CD: %s\n", data & SD_CD ? "HIGH" : "LOW"); + UINT8 old_port_h = m_port_h; + UINT8 changed = data ^ old_port_h; + + printf("[%08X] ", m_maincpu->m_shifted_pc); + if(changed & CUTOFF_TEST) printf("[H] CUTOFF_TEST: %s\n", data & CUTOFF_TEST ? "HIGH" : "LOW"); + if(changed & CUTOFF_RESET) printf("[H] CUTOFF_RESET: %s\n", data & CUTOFF_RESET ? "HIGH" : "LOW"); + if(changed & EX1_PWR_CHECK) printf("[H] EX1_PWR_CHECK: %s\n", data & EX1_PWR_CHECK ? "HIGH" : "LOW"); + if(changed & EX1_HEAT) printf("[H] EX1_HEAT: %s\n", data & EX1_HEAT ? "HIGH" : "LOW"); + if(changed & EX1_FAN) printf("[H] EX1_FAN: %s\n", data & EX1_FAN ? "HIGH" : "LOW"); + if(changed & SD_WP) printf("[H] SD_WP: %s\n", data & SD_WP ? "HIGH" : "LOW"); + if(changed & SD_CD) printf("[H] SD_CD: %s\n", data & SD_CD ? "HIGH" : "LOW"); #endif - m_port_h = data; - break; - } - case AVR8_IO_PORTJ: - { - if (data == m_port_j) break; + m_port_h = data; + break; + } + case AVR8_IO_PORTJ: + { + if (data == m_port_j) break; #if LOG_PORTS - UINT8 old_port_j = m_port_j; - UINT8 changed = data ^ old_port_j; - - printf("[%08X] ", m_maincpu->m_shifted_pc); - if(changed & BUTTON_CENTER) printf("[J] BUTTON_CENTER: %s\n", data & BUTTON_CENTER ? "HIGH" : "LOW"); - if(changed & BUTTON_RIGHT) printf("[J] BUTTON_RIGHT: %s\n", data & BUTTON_RIGHT ? "HIGH" : "LOW"); - if(changed & BUTTON_LEFT) printf("[J] BUTTON_LEFT: %s\n", data & BUTTON_LEFT ? "HIGH" : "LOW"); - if(changed & BUTTON_DOWN) printf("[J] BUTTON_DOWN: %s\n", data & BUTTON_DOWN ? "HIGH" : "LOW"); - if(changed & BUTTON_UP) printf("[J] BUTTON_UP: %s\n", data & BUTTON_UP ? "HIGH" : "LOW"); - if(changed & POTS_SCL) printf("[J] POTS_SCL: %s\n", data & POTS_SCL ? "HIGH" : "LOW"); - if(changed & B_AXIS_POT) printf("[J] B_AXIS_POT: %s\n", data & B_AXIS_POT ? "HIGH" : "LOW"); + UINT8 old_port_j = m_port_j; + UINT8 changed = data ^ old_port_j; + + printf("[%08X] ", m_maincpu->m_shifted_pc); + if(changed & BUTTON_CENTER) printf("[J] BUTTON_CENTER: %s\n", data & BUTTON_CENTER ? "HIGH" : "LOW"); + if(changed & BUTTON_RIGHT) printf("[J] BUTTON_RIGHT: %s\n", data & BUTTON_RIGHT ? "HIGH" : "LOW"); + if(changed & BUTTON_LEFT) printf("[J] BUTTON_LEFT: %s\n", data & BUTTON_LEFT ? "HIGH" : "LOW"); + if(changed & BUTTON_DOWN) printf("[J] BUTTON_DOWN: %s\n", data & BUTTON_DOWN ? "HIGH" : "LOW"); + if(changed & BUTTON_UP) printf("[J] BUTTON_UP: %s\n", data & BUTTON_UP ? "HIGH" : "LOW"); + if(changed & POTS_SCL) printf("[J] POTS_SCL: %s\n", data & POTS_SCL ? "HIGH" : "LOW"); + if(changed & B_AXIS_POT) printf("[J] B_AXIS_POT: %s\n", data & B_AXIS_POT ? "HIGH" : "LOW"); #endif - m_port_j = data; - break; - } - case AVR8_IO_PORTK: - { - if (data == m_port_k) break; + m_port_j = data; + break; + } + case AVR8_IO_PORTK: + { + if (data == m_port_k) break; #if LOG_PORTS - UINT8 old_port_k = m_port_k; - UINT8 changed = data ^ old_port_k; - - printf("[%08X] ", m_maincpu->m_shifted_pc); - if(changed & Z_AXIS_DIR) printf("[K] Z_AXIS_DIR: %s\n", data & Z_AXIS_DIR ? "HIGH" : "LOW"); - if(changed & Z_AXIS_STEP) printf("[K] Z_AXIS_STEP: %s\n", data & Z_AXIS_STEP ? "HIGH" : "LOW"); - if(changed & Z_AXIS_EN) printf("[K] Z_AXIS_EN: %s\n", data & Z_AXIS_EN ? "HIGH" : "LOW"); - if(changed & Z_AXIS_POT) printf("[K] Z_AXIS_POT: %s\n", data & Z_AXIS_POT ? "HIGH" : "LOW"); - if(changed & EX7_1280) printf("[K] EX7_1280: %s\n", data & EX7_1280 ? "HIGH" : "LOW"); - if(changed & EX6_1280) printf("[K] EX6_1280: %s\n", data & EX6_1280 ? "HIGH" : "LOW"); - if(changed & EX5_1280) printf("[K] EX5_1280: %s\n", data & EX5_1280 ? "HIGH" : "LOW"); - if(changed & HBP_THERM) printf("[K] HBP_THERM: %s\n", data & HBP_THERM ? "HIGH" : "LOW"); + UINT8 old_port_k = m_port_k; + UINT8 changed = data ^ old_port_k; + + printf("[%08X] ", m_maincpu->m_shifted_pc); + if(changed & Z_AXIS_DIR) printf("[K] Z_AXIS_DIR: %s\n", data & Z_AXIS_DIR ? "HIGH" : "LOW"); + if(changed & Z_AXIS_STEP) printf("[K] Z_AXIS_STEP: %s\n", data & Z_AXIS_STEP ? "HIGH" : "LOW"); + if(changed & Z_AXIS_EN) printf("[K] Z_AXIS_EN: %s\n", data & Z_AXIS_EN ? "HIGH" : "LOW"); + if(changed & Z_AXIS_POT) printf("[K] Z_AXIS_POT: %s\n", data & Z_AXIS_POT ? "HIGH" : "LOW"); + if(changed & EX7_1280) printf("[K] EX7_1280: %s\n", data & EX7_1280 ? "HIGH" : "LOW"); + if(changed & EX6_1280) printf("[K] EX6_1280: %s\n", data & EX6_1280 ? "HIGH" : "LOW"); + if(changed & EX5_1280) printf("[K] EX5_1280: %s\n", data & EX5_1280 ? "HIGH" : "LOW"); + if(changed & HBP_THERM) printf("[K] HBP_THERM: %s\n", data & HBP_THERM ? "HIGH" : "LOW"); #endif - m_port_k = data; - break; - } - case AVR8_IO_PORTL: - { - if (data == m_port_l) break; + m_port_k = data; + break; + } + case AVR8_IO_PORTL: + { + if (data == m_port_l) break; #if LOG_PORTS - UINT8 old_port_l = m_port_l; - UINT8 changed = data ^ old_port_l; - - printf("[%08X] ", m_maincpu->m_shifted_pc); - if(changed & X_MIN) printf("[L] X_MIN: %s\n", data & X_MIN ? "HIGH" : "LOW"); - if(changed & X_MAX) printf("[L] X_MAX: %s\n", data & X_MAX ? "HIGH" : "LOW"); - if(changed & Y_MIN) printf("[L] Y_MIN: %s\n", data & Y_MIN ? "HIGH" : "LOW"); - if(changed & Y_MAX) printf("[L] Y_MAX: %s\n", data & Y_MAX ? "HIGH" : "LOW"); - if(changed & HBP) printf("[L] HBP: %s\n", data & HBP ? "HIGH" : "LOW"); - if(changed & EXTRA_FET) printf("[L] EXTRA_FET: %s\n", data & EXTRA_FET ? "HIGH" : "LOW"); - if(changed & Z_MIN) printf("[L] Z_MIN: %s\n", data & Z_MIN ? "HIGH" : "LOW"); - if(changed & Z_MAX) printf("[L] Z_MAX: %s\n", data & Z_MAX ? "HIGH" : "LOW"); + UINT8 old_port_l = m_port_l; + UINT8 changed = data ^ old_port_l; + + printf("[%08X] ", m_maincpu->m_shifted_pc); + if(changed & X_MIN) printf("[L] X_MIN: %s\n", data & X_MIN ? "HIGH" : "LOW"); + if(changed & X_MAX) printf("[L] X_MAX: %s\n", data & X_MAX ? "HIGH" : "LOW"); + if(changed & Y_MIN) printf("[L] Y_MIN: %s\n", data & Y_MIN ? "HIGH" : "LOW"); + if(changed & Y_MAX) printf("[L] Y_MAX: %s\n", data & Y_MAX ? "HIGH" : "LOW"); + if(changed & HBP) printf("[L] HBP: %s\n", data & HBP ? "HIGH" : "LOW"); + if(changed & EXTRA_FET) printf("[L] EXTRA_FET: %s\n", data & EXTRA_FET ? "HIGH" : "LOW"); + if(changed & Z_MIN) printf("[L] Z_MIN: %s\n", data & Z_MIN ? "HIGH" : "LOW"); + if(changed & Z_MAX) printf("[L] Z_MAX: %s\n", data & Z_MAX ? "HIGH" : "LOW"); #endif - m_port_l = data; - break; - } - } + m_port_l = data; + break; + } + } } /****************************************************\ @@ -532,15 +532,15 @@ WRITE8_MEMBER(replicator_state::port_w) \****************************************************/ static ADDRESS_MAP_START( replicator_prg_map, AS_PROGRAM, 8, replicator_state ) - AM_RANGE(0x0000, 0x1FFFF) AM_ROM + AM_RANGE(0x0000, 0x1FFFF) AM_ROM ADDRESS_MAP_END static ADDRESS_MAP_START( replicator_data_map, AS_DATA, 8, replicator_state ) - AM_RANGE(0x0200, 0x21FF) AM_RAM /* ATMEGA1280 Internal SRAM */ + AM_RANGE(0x0200, 0x21FF) AM_RAM /* ATMEGA1280 Internal SRAM */ ADDRESS_MAP_END static ADDRESS_MAP_START( replicator_io_map, AS_IO, 8, replicator_state ) - AM_RANGE(AVR8_IO_PORTA, AVR8_IO_PORTL) AM_READWRITE( port_r, port_w ) + AM_RANGE(AVR8_IO_PORTA, AVR8_IO_PORTL) AM_READWRITE( port_r, port_w ) ADDRESS_MAP_END /****************************************************\ @@ -548,12 +548,12 @@ ADDRESS_MAP_END \****************************************************/ static INPUT_PORTS_START( replicator ) - PORT_START("keypad") - PORT_BIT(0x00000001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("CENTER") PORT_CODE(KEYCODE_M) - PORT_BIT(0x00000002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("RIGHT") PORT_CODE(KEYCODE_D) - PORT_BIT(0x00000004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("LEFT") PORT_CODE(KEYCODE_A) - PORT_BIT(0x00000008, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("DOWN") PORT_CODE(KEYCODE_S) - PORT_BIT(0x00000010, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("UP") PORT_CODE(KEYCODE_W) + PORT_START("keypad") + PORT_BIT(0x00000001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("CENTER") PORT_CODE(KEYCODE_M) + PORT_BIT(0x00000002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("RIGHT") PORT_CODE(KEYCODE_D) + PORT_BIT(0x00000004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("LEFT") PORT_CODE(KEYCODE_A) + PORT_BIT(0x00000008, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("DOWN") PORT_CODE(KEYCODE_S) + PORT_BIT(0x00000010, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("UP") PORT_CODE(KEYCODE_W) INPUT_PORTS_END /****************************************************\ @@ -566,161 +566,161 @@ DRIVER_INIT_MEMBER(replicator_state, replicator) void replicator_state::machine_reset() { - shift_register_value = 0; - m_port_a = 0; - m_port_b = 0; - m_port_c = 0; - m_port_d = 0; - m_port_e = 0; - m_port_f = 0; - m_port_g = 0; - m_port_h = 0; - m_port_j = 0; - m_port_k = 0; - m_port_l = 0; + shift_register_value = 0; + m_port_a = 0; + m_port_b = 0; + m_port_c = 0; + m_port_d = 0; + m_port_e = 0; + m_port_f = 0; + m_port_g = 0; + m_port_h = 0; + m_port_j = 0; + m_port_k = 0; + m_port_l = 0; } PALETTE_INIT_MEMBER(replicator_state, replicator) { //These colors were picked with the color picker in Inkscape, based on a photo of the LCD used in the Replicator 1 3d printer: - palette.set_pen_color(0, rgb_t(0xCA, 0xE7, 0xEB)); - palette.set_pen_color(1, rgb_t(0x78, 0xAB, 0xA8)); + palette.set_pen_color(0, rgb_t(0xCA, 0xE7, 0xEB)); + palette.set_pen_color(1, rgb_t(0x78, 0xAB, 0xA8)); } static const gfx_layout hd44780_charlayout = { - 5, 8, /* 5 x 8 characters */ - 256, /* 256 characters */ - 1, /* 1 bits per pixel */ - { 0 }, /* no bitplanes */ - { 3, 4, 5, 6, 7}, - { 0, 8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8}, - 8*8 /* 8 bytes */ + 5, 8, /* 5 x 8 characters */ + 256, /* 256 characters */ + 1, /* 1 bits per pixel */ + { 0 }, /* no bitplanes */ + { 3, 4, 5, 6, 7}, + { 0, 8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8}, + 8*8 /* 8 bytes */ }; static GFXDECODE_START( replicator ) - GFXDECODE_ENTRY( "hd44780:cgrom", 0x0000, hd44780_charlayout, 0, 1 ) + GFXDECODE_ENTRY( "hd44780:cgrom", 0x0000, hd44780_charlayout, 0, 1 ) GFXDECODE_END static MACHINE_CONFIG_START( replicator, replicator_state ) - MCFG_CPU_ADD("maincpu", ATMEGA1280, MASTER_CLOCK) - MCFG_CPU_PROGRAM_MAP(replicator_prg_map) - MCFG_CPU_DATA_MAP(replicator_data_map) - MCFG_CPU_IO_MAP(replicator_io_map) - - MCFG_CPU_AVR8_EEPROM("eeprom") - MCFG_CPU_AVR8_LFUSE(0xFF) - MCFG_CPU_AVR8_HFUSE(0xDA) - MCFG_CPU_AVR8_EFUSE(0xF4) - MCFG_CPU_AVR8_LOCK(0x0F) - - /*TODO: Add an ATMEGA8U2 for USB-Serial communications */ - - /* video hardware */ - MCFG_SCREEN_ADD("screen", LCD) - MCFG_SCREEN_REFRESH_RATE(50) - MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */ - MCFG_SCREEN_UPDATE_DEVICE("hd44780", hd44780_device, screen_update) - MCFG_SCREEN_SIZE(120, 18*2) //4x20 chars - MCFG_SCREEN_VISIBLE_AREA(0, 120-1, 0, 18*2-1) - MCFG_SCREEN_PALETTE("palette") - - MCFG_PALETTE_ADD("palette", 2) - MCFG_PALETTE_INIT_OWNER(replicator_state, replicator) - MCFG_GFXDECODE_ADD("gfxdecode", "palette", replicator) - MCFG_DEFAULT_LAYOUT(layout_lcd) - - MCFG_HD44780_ADD("hd44780") - MCFG_HD44780_LCD_SIZE(4, 20) - - /* sound hardware */ - /* A piezo is connected to the PORT G bit 5 (OC0B pin driven by Timer/Counter #4) */ - MCFG_SPEAKER_STANDARD_MONO("buzzer") - MCFG_SOUND_ADD("dac", DAC, 0) - MCFG_SOUND_ROUTE(0, "buzzer", 1.00) + MCFG_CPU_ADD("maincpu", ATMEGA1280, MASTER_CLOCK) + MCFG_CPU_PROGRAM_MAP(replicator_prg_map) + MCFG_CPU_DATA_MAP(replicator_data_map) + MCFG_CPU_IO_MAP(replicator_io_map) + + MCFG_CPU_AVR8_EEPROM("eeprom") + MCFG_CPU_AVR8_LFUSE(0xFF) + MCFG_CPU_AVR8_HFUSE(0xDA) + MCFG_CPU_AVR8_EFUSE(0xF4) + MCFG_CPU_AVR8_LOCK(0x0F) + + /*TODO: Add an ATMEGA8U2 for USB-Serial communications */ + + /* video hardware */ + MCFG_SCREEN_ADD("screen", LCD) + MCFG_SCREEN_REFRESH_RATE(50) + MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */ + MCFG_SCREEN_UPDATE_DEVICE("hd44780", hd44780_device, screen_update) + MCFG_SCREEN_SIZE(120, 18*2) //4x20 chars + MCFG_SCREEN_VISIBLE_AREA(0, 120-1, 0, 18*2-1) + MCFG_SCREEN_PALETTE("palette") + + MCFG_PALETTE_ADD("palette", 2) + MCFG_PALETTE_INIT_OWNER(replicator_state, replicator) + MCFG_GFXDECODE_ADD("gfxdecode", "palette", replicator) + MCFG_DEFAULT_LAYOUT(layout_lcd) + + MCFG_HD44780_ADD("hd44780") + MCFG_HD44780_LCD_SIZE(4, 20) + + /* sound hardware */ + /* A piezo is connected to the PORT G bit 5 (OC0B pin driven by Timer/Counter #4) */ + MCFG_SPEAKER_STANDARD_MONO("buzzer") + MCFG_SOUND_ADD("dac", DAC, 0) + MCFG_SOUND_ROUTE(0, "buzzer", 1.00) MACHINE_CONFIG_END ROM_START( replica1 ) - ROM_REGION( 0x20000, "maincpu", 0 ) - ROM_DEFAULT_BIOS("v750") - - /* Version 5.1 release: - - Initial firmware release - */ - ROM_SYSTEM_BIOS( 0, "v51", "V 5.1" ) - ROMX_LOAD("mighty-mb40-v5.1.bin", 0x0000, 0x10b90, CRC(20d65cd1) SHA1(da18c3eb5a29a6bc1eecd92eaae6063fe29d0305), ROM_BIOS(1)) - - /* Version 5.2 release: - - Nozzle Tolerance added to EEPROM - - Updated onboard menus - - X,Y calibration tool added - */ - ROM_SYSTEM_BIOS( 1, "v52", "V 5.2" ) - ROMX_LOAD("mighty-mb40-v5.2.bin", 0x0000, 0x126c4, CRC(555e47cf) SHA1(9d24a3dbeddce16669bb4d29c3366220ddf15d2a), ROM_BIOS(2)) - - /* Version 5.5 release: - - Acceleration added to motor motion - - Digipot updates - */ - ROM_SYSTEM_BIOS( 2, "v55", "V 5.5" ) - ROMX_LOAD("mighty-mb40-v5.5.bin", 0x0000, 0x1a420, CRC(9327d7e4) SHA1(d734ba2bda12f50ec3ac0035ab11591909d9edde), ROM_BIOS(3)) - - /* Version 6.2.0 release: - - Bug fix release to firmware 6.0 - - Addresses wavy print issue above 1cm - - Left extruder prints with makerware. - */ - ROM_SYSTEM_BIOS( 3, "v620", "V 6.2.0" ) - ROMX_LOAD("mighty_one_v6.2.0.bin", 0x0000, 0x1cf54, CRC(00df6f48) SHA1(db05afc2e1ebc104fb04753634a911187e396556), ROM_BIOS(4)) - - /* Version 7.0.0 release: - - Major upgrade to Stepper Motor Smoothness (via Sailfish team) - - X3G format introduced - - Heaters default to leaving 'preheat' on more of the time - */ - ROM_SYSTEM_BIOS( 4, "v700", "V 7.0.0" ) - ROMX_LOAD("mighty_one_v7.0.0.bin", 0x0000, 0x1cb52, CRC(aa2a5fcf) SHA1(934e642b0b2d007689249680bad03c9255ae016a), ROM_BIOS(5)) - - /* Version 7.2.0 release: - - Removes support for S3G files - - X3G is the recognized format - - Minor bug fixes - */ - ROM_SYSTEM_BIOS( 5, "v720", "V 7.2.0" ) - ROMX_LOAD("mighty_one_v7.2.0.bin", 0x0000, 0x1cb80, CRC(5e546706) SHA1(ed4aaf7522d5a5beea7eb69bf2c85d7a89f8f188), ROM_BIOS(6)) - - /* Version 7.3.0 release: - - Pause at Z Height - - Elapsed time displays during prints - - Minor bug fixes - */ - ROM_SYSTEM_BIOS( 6, "v730", "V 7.3.0" ) - ROMX_LOAD("mighty_one_v7.3.0.bin", 0x0000, 0x1d738, CRC(71811ff5) SHA1(6728ea600ab3ff4b589adca90b0d700d9b70bd18), ROM_BIOS(7)) - - /* Version 7.4.0 (bugfix) release: - - Fixes issues with Z Pause and elapsed print time - */ - ROM_SYSTEM_BIOS( 7, "v740", "V 7.4.0" ) - ROMX_LOAD("mighty_one_v7.4.0.bin", 0x0000, 0x1b9e2, CRC(97b05a27) SHA1(76ca2c9c1db2e006e501c3177a8a1aa693dda0f9), ROM_BIOS(8)) - - /* Version 7.5.0 (bugfix) release: - - Fixes issue with Heat Hold - */ - ROM_SYSTEM_BIOS( 8, "v750", "V 7.5.0" ) - ROMX_LOAD("mighty_one_v7.5.0.bin", 0x0000, 0x1b9c4, CRC(169d6709) SHA1(62b5aacd1bc46969042aea7a50531ec467a4ff1f), ROM_BIOS(9)) - - /* Sailfish firmware image - Metam??quina experimental build v7.5.0 */ - ROM_SYSTEM_BIOS( 9, "v750mm", "V 7.5.0 - Metam??quina" ) - ROMX_LOAD("mighty_one_v7.5.0.mm.bin", 0x0000, 0x1ef9a, CRC(0d36d9e7) SHA1(a53899775b4c4eea87b6903758ebb75f06710a69), ROM_BIOS(10)) - - - /*Arduino MEGA bootloader */ - ROM_LOAD( "atmegaboot_168_atmega1280.bin", 0x1f000, 0x0f16, CRC(c041f8db) SHA1(d995ebf360a264cccacec65f6dc0c2257a3a9224) ) - - /* on-die 4kbyte eeprom */ - ROM_REGION( 0x1000, "eeprom", ROMREGION_ERASEFF ) + ROM_REGION( 0x20000, "maincpu", 0 ) + ROM_DEFAULT_BIOS("v750") + + /* Version 5.1 release: + - Initial firmware release + */ + ROM_SYSTEM_BIOS( 0, "v51", "V 5.1" ) + ROMX_LOAD("mighty-mb40-v5.1.bin", 0x0000, 0x10b90, CRC(20d65cd1) SHA1(da18c3eb5a29a6bc1eecd92eaae6063fe29d0305), ROM_BIOS(1)) + + /* Version 5.2 release: + - Nozzle Tolerance added to EEPROM + - Updated onboard menus + - X,Y calibration tool added + */ + ROM_SYSTEM_BIOS( 1, "v52", "V 5.2" ) + ROMX_LOAD("mighty-mb40-v5.2.bin", 0x0000, 0x126c4, CRC(555e47cf) SHA1(9d24a3dbeddce16669bb4d29c3366220ddf15d2a), ROM_BIOS(2)) + + /* Version 5.5 release: + - Acceleration added to motor motion + - Digipot updates + */ + ROM_SYSTEM_BIOS( 2, "v55", "V 5.5" ) + ROMX_LOAD("mighty-mb40-v5.5.bin", 0x0000, 0x1a420, CRC(9327d7e4) SHA1(d734ba2bda12f50ec3ac0035ab11591909d9edde), ROM_BIOS(3)) + + /* Version 6.2.0 release: + - Bug fix release to firmware 6.0 + - Addresses wavy print issue above 1cm + - Left extruder prints with makerware. + */ + ROM_SYSTEM_BIOS( 3, "v620", "V 6.2.0" ) + ROMX_LOAD("mighty_one_v6.2.0.bin", 0x0000, 0x1cf54, CRC(00df6f48) SHA1(db05afc2e1ebc104fb04753634a911187e396556), ROM_BIOS(4)) + + /* Version 7.0.0 release: + - Major upgrade to Stepper Motor Smoothness (via Sailfish team) + - X3G format introduced + - Heaters default to leaving 'preheat' on more of the time + */ + ROM_SYSTEM_BIOS( 4, "v700", "V 7.0.0" ) + ROMX_LOAD("mighty_one_v7.0.0.bin", 0x0000, 0x1cb52, CRC(aa2a5fcf) SHA1(934e642b0b2d007689249680bad03c9255ae016a), ROM_BIOS(5)) + + /* Version 7.2.0 release: + - Removes support for S3G files + - X3G is the recognized format + - Minor bug fixes + */ + ROM_SYSTEM_BIOS( 5, "v720", "V 7.2.0" ) + ROMX_LOAD("mighty_one_v7.2.0.bin", 0x0000, 0x1cb80, CRC(5e546706) SHA1(ed4aaf7522d5a5beea7eb69bf2c85d7a89f8f188), ROM_BIOS(6)) + + /* Version 7.3.0 release: + - Pause at Z Height + - Elapsed time displays during prints + - Minor bug fixes + */ + ROM_SYSTEM_BIOS( 6, "v730", "V 7.3.0" ) + ROMX_LOAD("mighty_one_v7.3.0.bin", 0x0000, 0x1d738, CRC(71811ff5) SHA1(6728ea600ab3ff4b589adca90b0d700d9b70bd18), ROM_BIOS(7)) + + /* Version 7.4.0 (bugfix) release: + - Fixes issues with Z Pause and elapsed print time + */ + ROM_SYSTEM_BIOS( 7, "v740", "V 7.4.0" ) + ROMX_LOAD("mighty_one_v7.4.0.bin", 0x0000, 0x1b9e2, CRC(97b05a27) SHA1(76ca2c9c1db2e006e501c3177a8a1aa693dda0f9), ROM_BIOS(8)) + + /* Version 7.5.0 (bugfix) release: + - Fixes issue with Heat Hold + */ + ROM_SYSTEM_BIOS( 8, "v750", "V 7.5.0" ) + ROMX_LOAD("mighty_one_v7.5.0.bin", 0x0000, 0x1b9c4, CRC(169d6709) SHA1(62b5aacd1bc46969042aea7a50531ec467a4ff1f), ROM_BIOS(9)) + + /* Sailfish firmware image - Metam??quina experimental build v7.5.0 */ + ROM_SYSTEM_BIOS( 9, "v750mm", "V 7.5.0 - Metam??quina" ) + ROMX_LOAD("mighty_one_v7.5.0.mm.bin", 0x0000, 0x1ef9a, CRC(0d36d9e7) SHA1(a53899775b4c4eea87b6903758ebb75f06710a69), ROM_BIOS(10)) + + + /*Arduino MEGA bootloader */ + ROM_LOAD( "atmegaboot_168_atmega1280.bin", 0x1f000, 0x0f16, CRC(c041f8db) SHA1(d995ebf360a264cccacec65f6dc0c2257a3a9224) ) + + /* on-die 4kbyte eeprom */ + ROM_REGION( 0x1000, "eeprom", ROMREGION_ERASEFF ) ROM_END /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME */ diff --git a/src/mame/drivers/saturn.c b/src/mame/drivers/saturn.c index c28e60051f4..7ff3ba21fda 100644 --- a/src/mame/drivers/saturn.c +++ b/src/mame/drivers/saturn.c @@ -2,15 +2,402 @@ // copyright-holders:David Haywood, Angelo Salese, Olivier Galibert, Mariusz Wojcieszek, R. Belmont /************************************************************************************************** - Sega Saturn & Sega ST-V (Sega Titan Video) HW (c) 1994 Sega - Driver by David Haywood, Angelo Salese, Olivier Galibert & Mariusz Wojcieszek SCSP driver provided by R. Belmont, based on ElSemi's SCSP sound chip emulator Many thanks to Guru, Fabien, Runik and Charles MacDonald for the help given. -=================================================================================================== - +*************************************************************************************************** + +Sega Saturn +(C) Sega 1994/1995/1996/1997 + +The Sega Saturn is a 32-bit 5th-generation home video game console that was developed by Sega and released +on November 22nd 1994 in Japan, May 11th 1995 in North America, and July 8th 1995 in Europe as the successor +to the Sega Genesis. The Saturn has a dual-CPU architecture and a total of eight processors. +The games are on CD-ROM. + +Basic Hardware: + +Processors (8) +---------- +Two Hitachi SH2 32-bit RISC @ 28.63636MHz +One Hitachi SH1 32-bit RISC @ 20.0MHz +Two 32-bit video display processors (VDP 1 / VDP 2) +One Saturn Control Unit processor (SCU) @ 14.31818MHz +One Motorola 68EC000 sound processor @ 11.2896MHz +One Yamaha YMF292-F DSP sound processor @ 28.63636MHz + +Memory +------ +16 Megabits DRAM +12 Megabits VRAM (Video RAM) +4 Megabits Audio DRAM +4 Megabits CD-ROM Cache DRAM +256 Kbits battery-backed SRAM + +Video +----- +VDP 1 +- 32-bit video display processor +- Sprite, polygon, and geometry engine +- Dual 256Kb frame buffers for rotation and scaling effects +- Texture Mapping +- Goraud Shading +- 512Kb cache for textures +VDP 2 +- 32-bit background and scroll plane video display processor +- Background engine +- 5 simulataneous scrolling backgrounds +- 2 simultaneous rotating playfields +- 200,000 Texture Mapped Polygons/Second +- 500,000 Flat Shaded Polygons/Second +- Up to 60 frames per second animation +- 24-bit True Color Graphics +- 16 Million Available Colors +- 320x224, 640x224, and 720x576 Resolution + +Audio +----- +Motorola 68EC000 sound processor @ 11.2896MHz +Yamaha 24-bit Digital Signal Processor @ 28.63636MHz +- 32 PCM (Pulse Code Modulation) Channels +- 8 FM (Frequency Modulation) Channels +- 44.1 kHz Sampling Rate + +Storage +------- +CD-ROM (2X) +- 320 Kb/Second transfer speed +- Compatible with Audio CD, CD+G, CD+EG, CD Single (8cm) + and with optional hardware; Video CD, Photo CD & Digital Karaoke +- Optional additional memory cartridge + +Input/Output +------------ +High speed serial communications port +Internal 32-bit expansion port +Internal Multi AV port for optional Video CD (MPEG) decoder board +Composite video & stereo audio (Standard) +Optional RF(TV), S-Video & RGB outputs +2 ports for analog control pad, light gun or other controllers + + +PCB Layouts +----------- +There were *many* main board revisions. The two general 'sizes' are documented here. + +Small board (VA revision documented) +----------- +Main board with a separate small sub-board for the controller ports, power LED and reset button. +The power supply is slightly longer than the main board, has a 5 pin connector and outputs 9VDC, 5VDC and 3.3VDC + +837-12126 IC BD SATURN MAIN VA SG +171-7128B (C) SEGA 1995 PC BD SATURN MAIN VA SG +(This PCB was found in a USA Saturn, Model MK-80000, also known as Saturn model 1 with BIOS MPR-17941) + +837-12135 IC BD SATURN MAIN VA PAL SD +171-7131A (C) SEGA 1995 PC BD SATURN MAIN VA PAL SD +(This PCB was found in a PAL Saturn, Model MK-80200-50, also known as Saturn model 1 PAL with BIOS MPR-17942) + +(note both of these PCBs listed above are almost identical) + +|VIDEO--COMM-----------------------------------------------| +| CART_SLOT SW1 BATTERY | +|ADAC CXA1645M |--------| |-------| 20MHz | +| SW2 |315-5688| |YGR019B| TC514260 | +| ^4502161 | | | | |-------| | +| ^4502161 |--------| |--------| |-------| |HD6437097 | +| |--------| |315-5890| *D489020 | | | +| |315-5883| | | 81141625 81141625 |-------| | +| | | |--------| CARD_SLOT | +| |--------| ^4502161 HC08 | +| ^5241605 ^4502161 |----| |----| |--------| | +| 514270 |--------|HC04 |SH-2| |SH-2| |315-5914| | +| |-----| |315-5687|HC04 |----| |----| |--------| | +| |68000| | | |------|32.768kHz | +| |-----| |--------| 315-5744 LS245 TC514260 | +| ^74HC157 315-5746 |------| ^62257 ^ROM CN4| +| CN3 CN7 &14.31818MHz CN2 LS245 TC514260 | +|----------------------------------------------------------| +Notes: (all IC's shown. ^ denotes these parts are on the other side of the PCB) + ROM - SOP40 mask ROM for BIOS. + Chip is pin-compatible with Toshiba TC574200 or MX27C4100 and can be read with a simple 1:1 DIP40 to SOP40 adapter + JAPAN BIOS marked 'MPR-17940-MX' or 'MPR-17940-T' + USA BIOS marked 'MPR-17941-MX' or 'MPR-17941-T' + PAL BIOS marked 'MPR-17942-MX' or 'MPR-17942-T' + T = Toshiba, MX = Macronix. Both contain identical data + Other BIOSes known to exist include: + (These are mainly on the very MPR-16605-T + early version main boards VA0/VA1 MPR-16606-T + and are all DIP chips) MPR-16606A-T + MPR-17577-T + EPR-17578 HI-SATURN BOOT ROM VER 1.01 SUM AA44 '95 1/27 (EPROM) + 81141625 - Fujitsu 81141625-017 128k x16-bit x 2 banks (4Mbit) SDRAM \ compatible + 5241605 - Hitachi HM5241605TT17S or HM524165CTT17S 128k x16-bit x 2 banks (4Mbit) SDRAM / + The two 81141625 are the WORK RAM HIGH and the two TC514260 (near the ROM) make up the WORK RAM LOW + The 5241605 is the VDP1 Sprite RAM + D489020 - NEC D489020GF-A15 SGRAM (probably 8Mbit). *- This single chip is replaced by two 81141625 IC's on some boards + 4502161 - NEC D4502161G5-A12 or Sanyo LC382161T-17 64k x16-bit x 2 banks (2Mbit) SDRAM + Two chips are used for the VDP1 Frame RAM, the other two are for the VDP2 Video RAM + TC514260 - 256k x16-bit (4Mbit) DRAM. Any of the following compatible chips are used.... + Hitachi HM514260AJ7 / HM514260CJ7 + Toshiba TC514260BJ-70 + Fujitsu 814260-70 + Mitsubishi M5M44260CJ + Samsung KM416C256BJ-7 + Hyundai HY514260B JC-70 + Vanguard VG264260AJ + Panasonic MN414260CSJ-07 + HM514270 - Hitachi HM514270 256k x16-bit (4Mbit) DRAM, used for the sound WORK RAM + 62257 - Epson SRM20257LLM10 32k x8-bit (256kbit) battery-backed SRAM (also used SONY CXK58257AM-10L, NEC UPD43257B-10LL, UM62257AM-70LL) + ADAC - Dual CMOS Audio DAC. Either Burr-Brown BBPCM1710U or Philips TDA1386T + CXA1645M - Sony CXA1645M RGB to Composite Video Encoder + SH-2 - Hitachi HD6417095 SH-2 CPU. Clock input 28.63636MHz (14.31818*2) + 68000 - Motorola MC68EC000FN12 CPU. Clock input 11.2896MHz + & - Master Clock. 14.31818MHz for USA revision or 17.7344MHz for PAL revision + 315-5744 - Sega 315-5744 Hitachi HD404920 microcontroller used as the System Manager and Peripheral Controller (SMPC) + 315-5746 - Sega 315-5746 Phase-locked Loop (PLL) clock generator IC + 315-5883 - Sega 315-5883 Hitachi HD64440 Video Display Processor 1 (VDP1). Earliest revision is 315-5689 + 315-5687 - Sega 315-5687 Yamaha YMF292-F Saturn Custom Sound Processor (SCSP). Clock input 28.63636MHz (14.31818*2) + 315-5688 - Sega 315-5688 System Control Unit (SCU). Clock input 14.31818MHz + 315-5890 - Sega 315-5890 Video Display Processor 2 (VDP2) + 315-5914 - Sega 315-5914 DRAM controller. Earliest revision is 315-5778. Later revision is 315-5963 + HD6437097 - Hitachi HD6437097F20 SH1 (SH7034 family) microcontroller with 64k internal ROM. Clock input 20.000MHz + YGR019B - Hitachi YGR019B CD-Subsystem LSI. Earlier revision is YGR019A. Later revision combines this IC and the SH1 together + into one IC (YGR022 315-5962). The SH1 and the YGR019B make up the 'CD Block' CD Authentication and CD I/O data controller. + Another of it's functions is to prevent copied CDs from being played + VIDEO - 10-pin Mini-DIN video output port + COMM - Communication port + CARD_SLOT - Expansion slot for MPEG decoder card and other optional expansions + CART_SLOT - Expansion slot for plug-in RAM or ROM carts + SW1 - Master reset switch accessible behind the card slot/battery cover. Pressing this clears the battery-backed SRAM, resets the system + and the user has to set the language, date and time + BATTERY - CR2032 3V lithium coin battery. When the system is off the battery provides power to the backup SRAM and SMPC which contains an RTC + SW2 - CDROM cover open/close detection switch + CN2 - 24-pin flat cable connector for control port board + CN3 - 5-pin power connector + CN4 - Flat cable connector for CDROM data cable. On some main board revisions the connector is reversed and the cable is folded so it + is also reversed/flipped 180 degrees at the other end + CN7 - 5-pin connector for CDROM power + + +Control Port board +------------------ +839-0820 EXPORT +839-0821 PAL +PC BD SATURN PIO VA EXPORT 171-7112A (C) SEGA 1995 CSPD CAD-TEAM +|---------------------------------| +| FLAT-CABLE | +| | +| GREEN-LED RED-LED RESET| +|--PORT1-----PORT2----------------| Notes: + PORT1/2 - Controller ports for controller/joystick/lightgun etc + GREEN-LED - Power LED + RED-LED - CDROM drive access LED + RESET - Push-button reset switch + FLAT-CABLE - 24-pin flat cable joined to main board CN2 + + +Large board (VA7 revision documented) +----------- +This is a single main board containing everything. + +837-12643 IC BD SATURN MAIN VA7 USA SD +171-7208C (C) SEGA 1996 PC BD SATURN MAIN VA7 USA SD +(This PCB was found in a USA Saturn, Model MK-80000A, also known as Saturn model 2 with BIOS MPR-17941) + +837-12992 IC BD SATURN MAIN VA7 PAL +171-7424A (C) SEGA 1996 PC BD SATURN MAIN VA7 PAL +(This PCB was found in a PAL Saturn, Model MK-80200A-50, also known as Saturn model 2 PAL with BIOS MPR-17942) + +(note both of these PCBs listed above are almost identical) + +|VIDEO--COMM-----------------------------------------------| +| CART_SLOT BATTERY | +| SW2 |--------| | +|ADAC RGB |315-5966| |--------| ^TC514260 | +| | | |YGR022 | | +| |--------| |315-5962| | +| |--------| | +| |--------| |--------| 20MHz | +| |315-5687| |315-5964| CARD_SLOT | +| | | | | | +| |--------| |--------| |----| LS245 HC08 | +| ^HM514270 ^524165 HC04 |SH-2| | +| ^5221605 ^5221605 |----| TC514260 | +| ^5221605 ^5221605 | +| |--------| TC514260 | +| |-----| |315-5883| HC04 | +| |68000| | |&14.31818MHz |----| |--------| | +| |-----| |--------| %CY2292 |SH-2| |315-5977-01 | +|CN3 |------| |----| |--------| | +| 315-5744 62257 CN4| +| CN7 |------| | +|--| 32.768kHz LS245 81141625 81141625 ROM |--| + | GREEN-LED RESET | + |-------------------PORT1-----PORT2------------------| +Notes: (all IC's shown. ^ denotes these parts are on the other side of the PCB) + ROM - SOP40 mask ROM for BIOS. + Chip is pin-compatible with Toshiba TC574200 or MX27C4100 and can be read with a simple 1:1 DIP40 to SOP40 adapter + JAPAN BIOS marked 'MPR-17940-MX' or 'MPR-17940-T' + USA BIOS marked 'MPR-17941-MX' or 'MPR-17941-T' + PAL BIOS marked 'MPR-17942-MX' or 'MPR-17942-T' + T = Toshiba, MX = Macronix. Both contain identical data + 81141625 - Fujitsu 81141625-017 128k x16-bit x 2 banks (4Mbit) SDRAM + The two 81141625 are the WORK RAM HIGH and two TC514260 (near the SH-2) make up the WORK RAM LOW + 524165 - Hitachi HM524165CTT17S 128k x16-bit x 2 banks (4Mbit) SDRAM. This is the VDP1 Sprite RAM + 5221605 - Hitachi HM5221605TT17S 64k x16-bit x 2 banks (2Mbit) SDRAM + Two chips are used for the VDP1 Frame RAM, the other two are for the VDP2 Video RAM + TC514260 - 256k x16-bit (4Mbit) DRAM. Any of the following compatible chips are used.... + Hitachi HM514260AJ7 / HM514260CJ7 + Toshiba TC514260BJ-70 + Fujitsu 814260-70 + Mitsubishi M5M44260CJ + Samsung KM416C256BJ-7 + Hyundai HY514260B JC-70 + Vanguard VG264260AJ + Panasonic MN414260CSJ-07 + HM514270 - Hitachi HM514270 256k x16-bit (4Mbit) DRAM, used for the sound WORK RAM + 62257 - Epson SRM20257LLM10 32k x8-bit (256kbit) battery-backed SRAM (also used SONY CXK58257AM-10L, NEC UPD43257B-10LL, UM62257AM-70LL) + ADAC - Dual CMOS Audio DAC. Either Burr-Brown BBPCM1710U or Philips TDA1386T + RGB - RGB to Composite Video Encoder with PAL & NTSC output capability. IC is either Fujitsu MB3516A or ROHM BH7236AF + SH-2 - Hitachi HD6417095 SH-2 CPU. Clock input 28.63636MHz (14.31818*2) + 68000 - Motorola MC68EC000FN12 CPU. Clock input 11.2896MHz + CY2292 - Cypress CY2292SC-04 PLL clock generator IC. % = On the VA7 PAL version this chip is replaced with the older Sega PLL (315-5746) + & - Master Clock. 14.31818MHz for USA revision or 17.7344MHz for PAL revision + 315-5744 - Sega 315-5744 Hitachi HD404920 microcontroller used as the System Manager and Peripheral Controller (SMPC) + 315-5883 - Sega 315-5883 Hitachi HD64440 Video Display Processor 1 (VDP1). + 315-5687 - Sega 315-5687 Yamaha YMF292-F Saturn Custom Sound Processor (SCSP). Clock input 28.63636MHz (14.31818*2) + 315-5964 - Sega 315-5964 Video Display Processor 2 (VDP2) + 315-5966 - Sega 315-5966 System Control Unit (SCU). Clock input 14.31818MHz + 315-5977-01 - Sega 315-5977-01 DRAM controller + YGR022 - Hitachi YGR022 Sega 315-5962 single IC containing CD-Subsystem LSI and Hitachi SH-1 microcontroller with 64k internal ROM. Clock input 20.000MHz + VIDEO - 10-pin Mini-DIN video output port + COMM - Communication port + CARD_SLOT - Expansion slot for MPEG decoder card and other optional expansions + CART_SLOT - Expansion slot for plug-in RAM or ROM carts + BATTERY - CR2032 3V lithium coin battery. When the system is off the battery provides power to the backup SRAM and SMPC which contains an RTC + SW2 - CDROM cover open/close detection switch + CN3 - 4-pin or 5-pin power connector + CN4 - Flat cable connector for CDROM data cable + CN7 - 5-pin connector for CDROM power + PORT1/2 - Controller ports for controller/joystick/lightgun etc + GREEN-LED - Power LED + RESET - Push-button reset switch + + +Motherboard List +---------------- +Board types used in Model 1: VA0 to VA3 +Board types used in Model 2: VA2 to VA15 +If the VA-number is an even number the board uses a single 8Mbit SGRAM for some of the work RAM, if an odd number it uses two 4Mbit SDRAMs. +Note there are MANY missing. Please help to update this list if you have info for others not listed here. + +837-11076 IC BD SATURN MAIN VA0.5 171-6874E PC BD SATURN MAIN VA0.5 (C) SEGA 1994 +837-11076-01 IC BD SATURN MAIN VA0 CCI 171-6874D PC BD SATURN MAIN VA0.5 (C) SEGA 1994 +837-11491 IC BD SATURN MAIN VA0 171-6962A PC BD SATURN MAIN VA0 USA (C) SEGA 1995 +837-11493 IC BD SATURN MAIN VA0 PAL 171-6963B PC BD SATURN MAIN VA0 PAL (C) SEGA 1995 +837-11613-01 IC BD SATURN MAIN VA1 171-7006C PC BD SATURN MAIN VA1 (C) SEGA 1995 +837-11892-01 PAL 171-7069B MAIN (C) SEGA 1995 +837-12126 IC BD SATURN MAIN VA SG 171-7128B PC BD SATURN MAIN VA SG (C) SEGA 1995 +837-12126 IC BD SATURN MAIN VA SG 171-7128C PC BD SATURN MAIN VA SG (C) SEGA 1995 +837-12133 IC BD SATURN MAIN VA SD 171-7130C PC BD SATURN MAIN VA SD (C) SEGA 1995 +837-12134 IC BD SATURN MAIN VA USA SD 171-7130C PC BD SATURN MAIN VA USA SD (C) SEGA 1995 +837-12135 IC BD SATURN MAIN VA PAL SD 171-7131A PC BD SATURN MAIN VA PAL SD (C) SEGA 1995 +837-12459 IC BD SATURN MAIN VA6 JPN SG 171-7207A PC BD SATURN MAIN VA6 SG (C) SEGA 1996 +837-12468 IC BD SATURN MAIN VA8 JPN OCU 171-7209C PC BD SATURN MAIN VA8 OCU (C) SEGA 1996 +837-12643 IC BD SATURN MAIN VA7 USA SD 171-7208C PC BD SATURN MAIN VA7 USA SD (C) SEGA 1996 +(none) 171-7291B PC BD SATURN MAIN VA9 PAL (C) SEGA 1996 +(none) 171-7291C PC BD SATURN MAIN VA9 (C) SEGA 1996 +837-12650 IC BD SATURN MAIN VA13 JPN 171-7???? PC BD SATURN MAIN VA13 (C) SEGA 1996 +837-12845 IC BD SATURN MAIN VA13 USA 171-7???? PC BD SATURN MAIN VA13 (C) SEGA 1996 +837-12992 IC BD SATURN MAIN VA7 PAL 171-7424A PC BD SATURN MAIN VA7 PAL (C) SEGA 1996 +837-13100 IC BD SATURN MAIN VA13 PAL 171-7455D PC BD SATURN MAIN VA13 PAL (C) SEGA 1997 +837-13137 IC BD SATURN MAIN VA15 JPN 171-7462B PC BD SATURN MAIN VA15 (C) SEGA 1997 + + +Motherboard Variations Summary +------------------------------ + +NTSC +---- +- VA0: First revision. CD Block (YGR019A & HD6437097) is on a daughterboard. Power supply mounted on top casing. + Has 40 pin DIP EPROM or mask ROM for BIOS. Larger board with control ports on the main board. Uses JVC CD drive units ENR-007B/ENR-007D. +- VA1: marked as 'VA' on the main board. Power supply is now bottom mounted and plugs in on top into 5 pins on the main board. Most sub boards + integrated into the main board except the controller ports which are on a small sub board. BIOS is SOP40 mask ROM located on the bottom side of + the main board. Battery-backup RAM and the VRAM are also on the bottom side of the main board. Uses ENR-007D CD drive units. +- VA2 & VA3: Mostly same as VA1. VA2 is marked as 'VA SG' (uses SGRAM), and VA3 is marked as VA SD (uses SDRAM). Uses ENR-011A CD drive units. +- VA4 & VA5: Same as VA2 and VA3 but in a cheaper model 2 case. Uses ENR-011A CD drive units. +- VA6: One single PCB for everything. Uses an off-the-shelf PLL chip (CY2292). Some custom chips have been revised and have different 315-xxxx numbers. + BIOS and battery-backed RAM moved to the top side of the main board. Power supply has 4 pins and generates only +5VDC. Uses ENR-013A CD drive unit + or Sanyo 610-6185-30 CD drive unit. +- VA6 & VA7 has the CD Block reduced to a single IC (YGR022). Some custom chips have been revised and have different 315-xxxx numbers. +- VA8 & VA9 still has the CD Block ICs separated. VA9 uses the old type PLL chip (315-5746). +- VA10 to VA15: uses HQA-001A CD drive unit or Sanyo 610-6294-30 / 610-6473-30 CD drive unit. 68000 & YMF292 integrated into a single IC (315-5965). + The integrated sound IC has a bug with certain 68000 commands. +- VA11 has a small daughter board mounted on the main board to fix a design fault (possibly to fix the above sound IC problem?) +- VA11+ boards use a smaller TSSOP20 audio DAC, VA10 uses the old one. +- VA12, VA14 and VA16 might not exist. +- VA13 fixes the design fault on VA11 so the patch board is no longer needed. +- VA15 integrates the two SH-2 main CPUs into a larger single IC (HD6417098 / 315-6018). + +PAL (only the main differences to the above are listed) +--- +- No PAL board ever used SGRAM. +- All PAL boards have an odd VA-number. +- All PAL boards have a 5 pin power connector and use a 5 pin power supply. +- All PAL boards use different region & video output jumpers when compared to NTSC machines. +- All PAL boards use a 17.7344MHz master clock (NTSC units use 14.31818MHz). +- All PAL boards replace the composite sync output on the A/V OUT connector with 9VDC which is used for SCART auto switching. The 9VDC power comes from + pin 5 of the power supplies with a 5 pin connector. Composite sync is still there at TP4 on the bottom of the board but not wired into the A/V OUT port. +- VA0 PAL - has extra jumpers to set the master clock divider (JP18 & 19), functional but unpopulated 50/60Hz switch on the back (SW4). +- VA1 PAL - unpopulated 50/60Hz switch on the back (SW4). There is a design fault as it is still connected to the master clock divider select pin. + Therefore the switch does not work on its own, you have to cut or raise & ground the PLL pin 1 for the switch to work. +- VA3 PAL - has extra jumpers to set the master clock divider (JP20 & 21), functional but unpopulated 50/60Hz switch on the back (SW4). +- VA5 PAL - same as VA3 PAL. +- VA7 PAL - Unlike NTSC boards, this still uses the old PLL (315-5746) and pin 1 is connected to the PAL/NTSC and 50/60Hz selection pins on the video + encoder and the VDP2. +- VA9 - same as VA7 PAL. +- VA13 PAL - Other than a 5 pin power connector it's identical to the NTSC VA13 board. +- VA17 PAL - probably the final revision specifically for EU/PAL regions. Differences are unknown. + +Power supplies +-------------- +Type A is used on VA0 main boards and is mounted to the top casing. Pinout is GND, GND, 3.3V, 5V, (empty pin), 9V. (5 pins total) +Type B is used on VA1 to VA5 main boards and is bottom mounted. Pinout is GND, GND, 3.3V, 5V, 9V. (5 pins total) +Type C is used on VA6+ main boards and is bottom mounted. Pinout is GND, GND, 5V, 5V (4 pins total). +PAL units use either Type B or a 5-pin version of Type C power supplies. On earlier boards such as 'VA' the 9V pin is connected to pin 1 of the CD ROM +unit power supply cable connector on the main board. On later boards it's also connected to the A/V OUT port for SCART auto switching. + +CD Drives +--------- +With 20 pin flat cable connector, VA0-VA1: +- JVC ENR-007B EMW10447-003E +- JVC ENR-007B EMW10447-004E +- JVC ENR-007D EMW10447-005E +- JVC ENR-007D EMW10447-006E +- Hitachi JA00292 + +With 21 pin flat cable connector, VA2-VA5: +- JVC ENR-011A EMW10589-002 +- JVC ENR-011A EMW10589-003 + +With 21 pin flat cable connector, VA6-VA9: +- JVC ENR-013A EMW20035-002 610-6185-20 +- Sanyo 610-6185-30 (sometimes with an extra protection board where the flat cable plugs in) + +With 21 pin flat cable connector, VA10-VA15: +- JVC HQA-001A HQ100002-002 610-6294-20 +- Sanyo 610-6294-30 \ +- Sanyo 610-6473-30 / (sometimes with an extra protection board where the flat cable plugs in) +These are the same as the VA6-VA9 units but lack an oscillator and have a white border on the edges of the PCB. + +Optical pickups used - JVC drive: Optima-6, Hitachi drive: HOP-6, Sanyo drive: SF-P101 is used in the 610-6185-30 + +**************************************************************************************************** + +Emulation Notes: -To enter into an Advanced Test Mode,keep pressed the Test Button (F2) on the start-up. -Memo: Some tests done on the original & working PCB,to be implemented: -The AD-Stick returns 0x00 or a similar value. diff --git a/src/mame/drivers/sega_sawatte.c b/src/mame/drivers/sega_sawatte.c new file mode 100644 index 00000000000..a483910c724 --- /dev/null +++ b/src/mame/drivers/sega_sawatte.c @@ -0,0 +1,54 @@ +// license:BSD-3-Clause +// copyright-holders: + +/* Sega Sawatte / S-Pico + +a sound-only Pico type system (one of the boards even says S-PICO) + +CPU is unknown (I can't see one?!) cartridge dumps should be good, but not confirmed, might be data only for an MCU? +driver does nothing except allow the softlist to be connected to the -romident commands etc. + + +images supplied by Team Europe + +http://mamedev.emulab.it/haze/reference/sawatte/cartridge_pcb_front.jpg +http://mamedev.emulab.it/haze/reference/sawatte/cartridge_pcb_back.jpg + +http://mamedev.emulab.it/haze/reference/sawatte/PCB_Front.jpg +http://mamedev.emulab.it/haze/reference/sawatte/PCB_Back.jpg + +http://mamedev.emulab.it/haze/reference/sawatte/Console_Front.JPG +http://mamedev.emulab.it/haze/reference/sawatte/Console_Back.JPG + +http://mamedev.emulab.it/haze/reference/sawatte/cartridge_example.jpg + +*/ + +#include "emu.h" + + + +class sawatte_state : public driver_device +{ +public: + sawatte_state(const machine_config &mconfig, device_type type, const char *tag) + : driver_device(mconfig, type, tag) + { } + +protected: +}; + + +static INPUT_PORTS_START( sawatte ) +INPUT_PORTS_END + + +static MACHINE_CONFIG_START( sawatte, sawatte_state ) + MCFG_SOFTWARE_LIST_ADD("cart_list", "sawatte") +MACHINE_CONFIG_END + +ROM_START( sawatte ) +ROM_END + + +GAME( 1996?, sawatte, 0, sawatte, sawatte, driver_device, 0, ROT0, "Sega", "Sawatte", MACHINE_IS_SKELETON ) diff --git a/src/mame/drivers/segac2.c b/src/mame/drivers/segac2.c index b77bcc53289..56c92e7b2e1 100644 --- a/src/mame/drivers/segac2.c +++ b/src/mame/drivers/segac2.c @@ -30,6 +30,7 @@ 1992 Puyo Puyo Sega / Compile 317-0203 C2 171-5992A 1992 Tant-R (Japan) Sega 317-0211 C2 1992 Tant-R (Korea) Sega ? C2 + 1993 SegaSonic Popcorn Shop Sega 317-0140 C2 1994 PotoPoto (Japan) Sega 317-0218 C2 1994 Stack Columns (Japan) Sega 317-0219 C2 1994 Stack Columns (World) Sega 317-0223 C2 @@ -931,6 +932,61 @@ static INPUT_PORTS_START( soniccar ) INPUT_PORTS_END + +static INPUT_PORTS_START( sonicpop ) + PORT_INCLUDE( systemc_generic ) + + PORT_MODIFY("P1") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("Relay") // relay (must be ON by default or machine will instantly give an 'assistance' error) - pressing this advances the stages of operation (from type select, and during the turning of the wheel) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("Coinblock") // coinblock (inverted) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_NAME("Sensor") // sensor - causes an extra animation to play if you press it during attract and 'Sensor Advertise' dip is on + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 ) PORT_NAME("Cup Select 2") // cup select 2 - pressing Cup Select 1 and 2 registers as 'Cup Select 3', I presume these are lines from the mechanical part. + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START1 ) PORT_NAME("Cup Select 1") // cup select 1 + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("Handle B") // handle B + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("Handle A") // handle A + + PORT_MODIFY("P2") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON9 ) PORT_NAME("Sold Out LED1") // sold out LED 1 - are these actually output lines? + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON10 ) PORT_NAME("Sold Out LED2") // sold out LED 2 + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON11 ) PORT_NAME("Sold Out LED3") // sold out LED 3 + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_NAME("Sold Out SW2") // sold out SW 2 - holding these while coining up will show popcorn as unavailable, pressing all 3 will fault the machine + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON8 ) PORT_NAME("Sold Out SW3") // sold out SW 3 + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_NAME("Sold Out SW1") // sold out SW 1 + + PORT_MODIFY("SERVICE") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) // coin + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE2 ) // 'reset' + PORT_SERVICE_NO_TOGGLE( 0x04, IP_ACTIVE_LOW ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE1 ) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) + + PORT_MODIFY("DSW") + PORT_DIPNAME( 0x01, 0x01, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW2:1") + PORT_DIPSETTING( 0x01, DEF_STR( On ) ) + PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) + PORT_DIPNAME( 0x02, 0x02, "Trouble BGM" ) PORT_DIPLOCATION("SW2:2") + PORT_DIPSETTING( 0x02, DEF_STR( On ) ) + PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) + PORT_DIPNAME( 0x0c, 0x00, "Region" ) PORT_DIPLOCATION("SW2:3,4") + PORT_DIPSETTING( 0x00, DEF_STR( USA ) ) + PORT_DIPSETTING( 0x04, "Export" ) + PORT_DIPSETTING( 0x08, "USA (duplicate)" ) + PORT_DIPSETTING( 0x0c, DEF_STR( Japan ) ) + PORT_DIPNAME( 0x10, 0x10, "Sensor Advertise" ) PORT_DIPLOCATION("SW2:5") + PORT_DIPSETTING( 0x10, DEF_STR( On ) ) + PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) + PORT_DIPUNUSED_DIPLOC( 0x20, IP_ACTIVE_LOW, "SW2:6" ) + PORT_DIPUNUSED_DIPLOC( 0x40, IP_ACTIVE_LOW, "SW2:7" ) + PORT_DIPUNUSED_DIPLOC( 0x80, IP_ACTIVE_LOW, "SW2:8" ) +INPUT_PORTS_END + + static INPUT_PORTS_START( ribbit ) PORT_INCLUDE( systemc_generic ) @@ -1635,6 +1691,16 @@ ROM_START( soniccar ) /* Waku Waku Sonic Patrol Car (c)1991 Sega - 834-8401 SON ROM_LOAD( "epr-14394.ic4", 0x000000, 0x040000, CRC(476e30dd) SHA1(c9d381160c58b05763ea286a53c7ca6de074fda2) ) ROM_END +ROM_START( sonicpop ) /* Sega Sonic Popcorn Shop (Rev.B) (c)1993 Sega - 834-9555-02 (EMP5032 labeled 317-0140) */ + ROM_REGION( 0x200000, "maincpu", 0 ) + ROM_LOAD16_BYTE( "epr-14592b.ic32", 0x000000, 0x040000, CRC(bac586a1) SHA1(0208213bfa1a5093e76edb1a7e0ba5ebc862801d) ) + ROM_LOAD16_BYTE( "epr-15491b.ic31", 0x000001, 0x040000, CRC(527106c3) SHA1(97f08006bba4b87c304c7ad3b1480b77e99dff10) ) + ROM_LOAD16_BYTE( "epr-15494.ic34", 0x100000, 0x040000, CRC(0520df5e) SHA1(5a795a1630d841406a106a566228223583deef44) ) + ROM_LOAD16_BYTE( "epr-15493.ic33", 0x100001, 0x040000, CRC(d51b3b85) SHA1(66f6b4656841ab70ffde0141a613eaf91c06f86b) ) + + ROM_REGION( 0x040000, "upd", 0 ) + ROM_LOAD( "epr-15495.ic4", 0x000000, 0x040000, CRC(d3ee4c68) SHA1(557c57b22521339d94d9a3e6fd2af68a67a153b6) ) +ROM_END ROM_START( ribbit ) /* Ribbit (c)1991 Sega */ ROM_REGION( 0x200000, "maincpu", 0 ) @@ -2319,10 +2385,10 @@ DRIVER_INIT_MEMBER(segac2_state,pclubjv5) // YEAR, NAME, PARENT, MACHINE,INPUT, INIT, MONITOR,COMPANY,FULLNAME,FLAGS /* System C Games */ GAME( 1989, bloxeedc, bloxeed, segac, bloxeedc, segac2_state, bloxeedc, ROT0, "Sega / Elorg", "Bloxeed (World, C System)", 0 ) -GAME( 1989, bloxeedu, bloxeed, segac, bloxeedc, segac2_state, bloxeedc, ROT0, "Sega / Elorg", "Bloxeed (US, C System)", 0 ) +GAME( 1989, bloxeedu, bloxeed, segac, bloxeedc, segac2_state, bloxeedc, ROT0, "Sega / Elorg", "Bloxeed (US, C System, Rev A)", 0 ) GAME( 1990, columns, 0, segac, columns, segac2_state, columns, ROT0, "Sega", "Columns (World)", 0 ) -GAME( 1990, columnsu, columns, segac, columnsu, segac2_state, columns, ROT0, "Sega", "Columns (US, cocktail)", 0 ) // has cocktail mode dsw +GAME( 1990, columnsu, columns, segac, columnsu, segac2_state, columns, ROT0, "Sega", "Columns (US, cocktail, Rev A)", 0 ) // has cocktail mode dsw GAME( 1990, columnsj, columns, segac, columns, segac2_state, columns, ROT0, "Sega", "Columns (Japan)", 0 ) GAME( 1990, columns2, 0, segac, columns2, segac2_state, columns2, ROT0, "Sega", "Columns II: The Voyage Through Time (World)", 0 ) @@ -2353,6 +2419,9 @@ GAME( 1992, tantrbl, tantr, segac2, ichir, segac2_state, c2boot, ROT0, GAME( 1994, tantrbl2, tantr, segac, ichir, segac2_state, tantr, ROT0, "bootleg", "Puzzle & Action: Tant-R (Japan) (bootleg set 2)", 0 ) // Common bootleg in Europe, C board, no samples GAME( 1994, tantrbl3, tantr, segac, ichir, segac2_state, tantr, ROT0, "bootleg", "Puzzle & Action: Tant-R (Japan) (bootleg set 3)", 0 ) // Common bootleg in Europe, C board, no samples +// not really sure how this should hook up, things like the 'sold out' flags could be mechanical sensors, or from another MCU / CPU board in the actual popcorn part of the machine? +GAME( 1993, sonicpop, 0, segac2, sonicpop, segac2_state, bloxeedc, ROT0, "Sega", "SegaSonic Popcorn Shop (Rev B)", MACHINE_MECHANICAL ) // region DSW for USA / Export / Japan, still speaks Japanese tho. 'Mechanical' part isn't emulated + GAME( 1994, potopoto, 0, segac2, potopoto, segac2_state, potopoto, ROT0, "Sega", "Poto Poto (Japan)", 0 ) GAME( 1994, stkclmns, 0, segac2, stkclmns, segac2_state, stkclmns, ROT0, "Sega", "Stack Columns (World)", 0 ) diff --git a/src/mame/drivers/segahang.c b/src/mame/drivers/segahang.c index da4ae8fee9c..270f2f4f442 100644 --- a/src/mame/drivers/segahang.c +++ b/src/mame/drivers/segahang.c @@ -180,7 +180,7 @@ READ16_MEMBER( segahang_state::hangon_io_r ) case 0x3020/2: // ADC0804 data output { static const char *const adcports[] = { "ADC0", "ADC1", "ADC2", "ADC3" }; - return ioport(adcports[m_adc_select])->read_safe(0); + return read_safe(ioport(adcports[m_adc_select]), 0); } } @@ -241,7 +241,7 @@ READ16_MEMBER( segahang_state::sharrier_io_r ) case 0x0030/2: // ADC0804 data output { static const char *const adcports[] = { "ADC0", "ADC1", "ADC2", "ADC3" }; - return ioport(adcports[m_adc_select])->read_safe(0); + return read_safe(ioport(adcports[m_adc_select]), 0); } } diff --git a/src/mame/drivers/segaorun.c b/src/mame/drivers/segaorun.c index 776da18eae8..efd92584ce8 100644 --- a/src/mame/drivers/segaorun.c +++ b/src/mame/drivers/segaorun.c @@ -696,7 +696,7 @@ READ16_MEMBER( segaorun_state::outrun_custom_io_r ) case 0x30/2: { - return m_adc_ports[m_adc_select]->read_safe(0x0010); + return read_safe(m_adc_ports[m_adc_select], 0x0010); } case 0x60/2: @@ -782,7 +782,7 @@ READ16_MEMBER( segaorun_state::shangon_custom_io_r ) case 0x3020/2: { - return m_adc_ports[m_adc_select]->read_safe(0x0010); + return read_safe(m_adc_ports[m_adc_select], 0x0010); } default: diff --git a/src/mame/drivers/segas16a.c b/src/mame/drivers/segas16a.c index 95bafa9e7c8..4a1ddcce8ca 100644 --- a/src/mame/drivers/segas16a.c +++ b/src/mame/drivers/segas16a.c @@ -924,12 +924,12 @@ READ16_MEMBER( segas16a_state::sjryuko_custom_io_r ) switch (offset & 3) { case 1: - if (ioport(portname[m_mj_input_num])->read_safe(0xff) != 0xff) + if (read_safe(ioport(portname[m_mj_input_num]), 0xff) != 0xff) return 0xff & ~(1 << m_mj_input_num); return 0xff; case 2: - return ioport(portname[m_mj_input_num])->read_safe(0xff); + return read_safe(ioport(portname[m_mj_input_num]), 0xff); } break; } diff --git a/src/mame/drivers/segas16b.c b/src/mame/drivers/segas16b.c index 9d383175e6c..818044b0781 100644 --- a/src/mame/drivers/segas16b.c +++ b/src/mame/drivers/segas16b.c @@ -1593,7 +1593,7 @@ WRITE16_MEMBER( segas16b_state::hwchamp_custom_io_w ) switch (offset & 0x30/2) { case 0x20/2: - m_hwc_input_value = ioport(portname[offset & 3])->read_safe(0xff); + m_hwc_input_value = read_safe(ioport(portname[offset & 3]), 0xff); break; case 0x30/2: @@ -1672,12 +1672,12 @@ READ16_MEMBER( segas16b_state::sjryuko_custom_io_r ) switch (offset & 3) { case 1: - if (ioport(portname[m_mj_input_num])->read_safe(0xff) != 0xff) + if (read_safe(ioport(portname[m_mj_input_num]), 0xff) != 0xff) return 0xff & ~(1 << m_mj_input_num); return 0xff; case 2: - return ioport(portname[m_mj_input_num])->read_safe(0xff); + return read_safe(ioport(portname[m_mj_input_num]), 0xff); } break; } diff --git a/src/mame/drivers/segas24.c b/src/mame/drivers/segas24.c index 7a3a5f76a51..644b4f723c0 100644 --- a/src/mame/drivers/segas24.c +++ b/src/mame/drivers/segas24.c @@ -522,7 +522,7 @@ UINT8 segas24_state::hotrod_io_r(UINT8 port) case 1: return ioport("P2")->read(); case 2: - return ioport("P3")->read_safe(0xff); + return read_safe(ioport("P3"), 0xff); case 3: return 0xff; case 4: @@ -629,7 +629,7 @@ WRITE16_MEMBER( segas24_state::hotrod3_ctrl_w ) if(ACCESSING_BITS_0_7) { data &= 3; - hotrod_ctrl_cur = ioport(portnames[data])->read_safe(0); + hotrod_ctrl_cur = read_safe(ioport(portnames[data]), 0); } } @@ -641,21 +641,21 @@ READ16_MEMBER( segas24_state::hotrod3_ctrl_r ) { // Steering dials case 0: - return ioport("DIAL1")->read_safe(0) & 0xff; + return read_safe(ioport("DIAL1"), 0) & 0xff; case 1: - return ioport("DIAL1")->read_safe(0) >> 8; + return read_safe(ioport("DIAL1"), 0) >> 8; case 2: - return ioport("DIAL2")->read_safe(0) & 0xff; + return read_safe(ioport("DIAL2"), 0) & 0xff; case 3: - return ioport("DIAL2")->read_safe(0) >> 8; + return read_safe(ioport("DIAL2"), 0) >> 8; case 4: - return ioport("DIAL3")->read_safe(0) & 0xff; + return read_safe(ioport("DIAL3"), 0) & 0xff; case 5: - return ioport("DIAL3")->read_safe(0) >> 8; + return read_safe(ioport("DIAL3"), 0) >> 8; case 6: - return ioport("DIAL4")->read_safe(0) & 0xff; + return read_safe(ioport("DIAL4"), 0) & 0xff; case 7: - return ioport("DIAL4")->read_safe(0) >> 8; + return read_safe(ioport("DIAL4"), 0) >> 8; case 8: { @@ -878,8 +878,11 @@ TIMER_DEVICE_CALLBACK_MEMBER(segas24_state::irq_timer_cb) if(irq_allow1 & (1 << IRQ_TIMER)) m_subcpu->set_input_line(IRQ_TIMER+1, ASSERT_LINE); - if(irq_tmode == 1 || irq_tmode == 2) - m_screen->update_now(); + if (irq_tmode == 1 || irq_tmode == 2) + { + // m_screen->update_now(); + m_screen->update_partial(m_screen->vpos()); + } } TIMER_DEVICE_CALLBACK_MEMBER(segas24_state::irq_timer_clear_cb) diff --git a/src/mame/drivers/segas32.c b/src/mame/drivers/segas32.c index 88e7fce9b3c..6e107d3070c 100644 --- a/src/mame/drivers/segas32.c +++ b/src/mame/drivers/segas32.c @@ -828,7 +828,7 @@ UINT16 segas32_state::common_io_chip_r(address_space &space, int which, offs_t o return m_misc_io_data[which][offset]; /* otherwise, return an input port */ - return ioport(portnames[which][offset])->read_safe(0xffff); + return read_safe(ioport(portnames[which][offset]), 0xffff); /* 'SEGA' protection */ case 0x10/2: @@ -1097,7 +1097,7 @@ WRITE16_MEMBER(segas32_state::analog_custom_io_w) case 0x12/2: case 0x14/2: case 0x16/2: - m_analog_value[offset & 3] = ioport(names[offset & 3])->read_safe(0); + m_analog_value[offset & 3] = read_safe(ioport(names[offset & 3]), 0); return; } logerror("%06X:unknown analog_custom_io_w(%X) = %04X & %04X\n", space.device().safe_pc(), offset*2, data, mem_mask); @@ -1113,7 +1113,7 @@ READ16_MEMBER(segas32_state::extra_custom_io_r) case 0x22/2: case 0x24/2: case 0x26/2: - return ioport(names[offset & 3])->read_safe(0xffff); + return read_safe(ioport(names[offset & 3]), 0xffff); } logerror("%06X:unknown extra_custom_io_r(%X) & %04X\n", space.device().safe_pc(), offset*2, mem_mask); @@ -1130,7 +1130,7 @@ WRITE16_MEMBER(segas32_state::orunners_custom_io_w) case 0x12/2: case 0x14/2: case 0x16/2: - m_analog_value[offset & 3] = ioport(names[m_analog_bank * 4 + (offset & 3)])->read_safe(0); + m_analog_value[offset & 3] = read_safe(ioport(names[m_analog_bank * 4 + (offset & 3)]), 0); return; case 0x20/2: diff --git a/src/mame/drivers/segaxbd.c b/src/mame/drivers/segaxbd.c index 0e0f69bc86d..c2f93acb9c3 100644 --- a/src/mame/drivers/segaxbd.c +++ b/src/mame/drivers/segaxbd.c @@ -468,7 +468,7 @@ READ16_MEMBER( segaxbd_state::adc_r ) // on the write, latch the selected input port and stash the value int which = (m_iochip_regs[0][2] >> 2) & 7; - int value = ioport(ports[which])->read_safe(0x0010); + int value = read_safe(ioport(ports[which]), 0x0010); // reverse some port values if (m_adc_reverse[which]) @@ -929,7 +929,7 @@ void segaxbd_state::smgp_iochip0_motor_w(UINT8 data) UINT8 segaxbd_state::lastsurv_iochip1_port_r(UINT8 data) { static const char * const port_names[] = { "MUX0", "MUX1", "MUX2", "MUX3" }; - return ioport(port_names[m_lastsurv_mux])->read_safe(0xff); + return read_safe(ioport(port_names[m_lastsurv_mux]), 0xff); } diff --git a/src/mame/drivers/segaybd.c b/src/mame/drivers/segaybd.c index 3769515e903..a16afb43d43 100644 --- a/src/mame/drivers/segaybd.c +++ b/src/mame/drivers/segaybd.c @@ -109,7 +109,7 @@ READ16_MEMBER( segaybd_state::analog_r ) WRITE16_MEMBER( segaybd_state::analog_w ) { int selected = ((offset & 3) == 3) ? (3 + (m_misc_io_data[0x08/2] & 3)) : (offset & 3); - m_analog_data[offset & 3] = m_adc_ports[selected]->read_safe(0xff); + m_analog_data[offset & 3] = read_safe(m_adc_ports[selected], 0xff); } diff --git a/src/mame/drivers/seicross.c b/src/mame/drivers/seicross.c index bec57aa0e14..41d6b9ea23c 100644 --- a/src/mame/drivers/seicross.c +++ b/src/mame/drivers/seicross.c @@ -78,7 +78,7 @@ void seicross_state::machine_reset() READ8_MEMBER(seicross_state::portB_r) { - return (m_portb & 0x9f) | (ioport("DEBUG")->read_safe(0) & 0x60); + return (m_portb & 0x9f) | (read_safe(ioport("DEBUG"), 0) & 0x60); } WRITE8_MEMBER(seicross_state::portB_w) diff --git a/src/mame/drivers/seta.c b/src/mame/drivers/seta.c index c39c0dcfc2f..d3f652cfa6b 100644 --- a/src/mame/drivers/seta.c +++ b/src/mame/drivers/seta.c @@ -1396,7 +1396,7 @@ static void uPD71054_update_timer( running_machine &machine, device_t *cpu, int uPD71054->timer[no]->adjust( period, no ); } else { uPD71054->timer[no]->adjust( attotime::never, no); - logerror( "CPU #0 PC %06X: uPD71054 error, timer %d duration is 0\n", + state->logerror( "CPU #0 PC %06X: uPD71054 error, timer %d duration is 0\n", (cpu != NULL) ? cpu->safe_pc() : -1, no ); } } @@ -1962,7 +1962,7 @@ WRITE16_MEMBER(seta_state::zombraid_gun_w) READ16_MEMBER(seta_state::extra_r) { - return ioport("EXTRA")->read_safe(0xff); + return read_safe(ioport("EXTRA"), 0xff); } static ADDRESS_MAP_START( wrofaero_map, AS_PROGRAM, 16, seta_state ) diff --git a/src/mame/drivers/shougi.c b/src/mame/drivers/shougi.c index 233719c97ed..4d8b4aee09f 100644 --- a/src/mame/drivers/shougi.c +++ b/src/mame/drivers/shougi.c @@ -3,7 +3,6 @@ /*************************************************************************** Driver by Jarek Burczynski, started by Tomasz Slanina dox@space.pl -ALPHA 8201 MCU handling by Tatsuyuki satoh Lots of hardware info from Guru memory map : @@ -62,33 +61,29 @@ CUSTOM: ALPHA 8201 (42 pin DIP) DIPSW : 6 position (x1) Positions 1, 5 & 6 not used - 4 3 2 - ------------------------------ - OFF OFF OFF 1 minutes (time for the opponent to make his decision) - OFF OFF ON 2 - OFF ON OFF 3 - OFF ON ON 4 - ON OFF OFF 5 - ON OFF ON 10 - ON ON OFF 20 - ON ON ON 30 + 4 3 2 + ------------------------------ + OFF OFF OFF 1 minutes (time for the opponent to make his decision) + OFF OFF ON 2 + OFF ON OFF 3 + OFF ON ON 4 + ON OFF OFF 5 + ON OFF ON 10 + ON ON OFF 20 + ON ON ON 30 ROMs : All type 2732 PROM : Type MB7051 - - - **************************************************************************/ - - #include "emu.h" -#include "cpu/alph8201/alph8201.h" +#include "machine/alpha8201.h" #include "cpu/z80/z80.h" #include "sound/ay8910.h" #include "video/resnet.h" + class shougi_state : public driver_device { public: @@ -96,51 +91,65 @@ public: : driver_device(mconfig, type, tag), m_maincpu(*this, "maincpu"), m_subcpu(*this, "sub"), - m_mcu(*this, "mcu"), - m_videoram(*this, "videoram") { } + m_alpha_8201(*this, "alpha_8201"), + m_videoram(*this, "videoram") + { } + // devices/pointers required_device<cpu_device> m_maincpu; required_device<cpu_device> m_subcpu; - required_device<cpu_device> m_mcu; + required_device<alpha_8201_device> m_alpha_8201; required_shared_ptr<UINT8> m_videoram; - int m_nmi_enabled; + UINT8 m_control[8]; + UINT8 m_nmi_enabled; int m_r; - //UINT8 *m_cpu_sharedram; - //UINT8 m_cpu_sharedram_control_val; - - DECLARE_WRITE8_MEMBER(cpu_sharedram_sub_w); - DECLARE_WRITE8_MEMBER(cpu_sharedram_main_w); - DECLARE_READ8_MEMBER(cpu_sharedram_r); - DECLARE_WRITE8_MEMBER(cpu_shared_ctrl_sub_w); - DECLARE_WRITE8_MEMBER(cpu_shared_ctrl_main_w); - DECLARE_WRITE8_MEMBER(mcu_halt_off_w); - DECLARE_WRITE8_MEMBER(mcu_halt_on_w); - DECLARE_WRITE8_MEMBER(nmi_disable_and_clear_line_w); - DECLARE_WRITE8_MEMBER(nmi_enable_w); - DECLARE_READ8_MEMBER(dummy_r); + + DECLARE_WRITE8_MEMBER(control_w); + DECLARE_READ8_MEMBER(semaphore_r); DECLARE_PALETTE_INIT(shougi); - virtual void machine_start(); UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - INTERRUPT_GEN_MEMBER(vblank_nmi); + + virtual void machine_start(); + virtual void machine_reset(); }; void shougi_state::machine_start() { + // zerofill + memset(m_control, 0, sizeof(m_control)); + m_nmi_enabled = 0; + m_r = 0; + + // register for savestates + save_item(NAME(m_control)); save_item(NAME(m_nmi_enabled)); save_item(NAME(m_r)); } +void shougi_state::machine_reset() +{ + // 74LS259 is auto CLR on reset + for (int i = 0; i < 8; i++) + control_w(m_maincpu->space(), i, 0); +} + + /*************************************************************************** - Convert the color PROMs into a more useable format. + Video +***************************************************************************/ + +/*************************************************************************** + + Convert the color PROMs into a more useable format. bit 0 -- 1000 ohm resistor--\ bit 1 -- 470 ohm resistor --+--+--> RED @@ -153,22 +162,19 @@ void shougi_state::machine_start() ***************************************************************************/ - PALETTE_INIT_MEMBER(shougi_state, shougi) { const UINT8 *color_prom = memregion("proms")->base(); - int i; static const int resistances_b[2] = { 470, 220 }; static const int resistances_rg[3] = { 1000, 470, 220 }; double weights_r[3], weights_g[3], weights_b[2]; - - compute_resistor_weights(0, 255, -1.0, + compute_resistor_weights(0, 255, -1.0, 3, resistances_rg, weights_r, 1000, 0, 3, resistances_rg, weights_g, 1000, 0, 2, resistances_b, weights_b, 1000, 0); - for (i = 0;i < palette.entries();i++) + for (int i = 0; i < palette.entries(); i++) { int bit0,bit1,bit2,r,g,b; @@ -194,22 +200,16 @@ PALETTE_INIT_MEMBER(shougi_state, shougi) } - - UINT32 shougi_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - int offs; - - for (offs = 0;offs <0x4000; offs++) + for (int offs = 0; offs < 0x4000; offs++) { int sx, sy, x, data1, data2, color, data; sx = offs >> 8; /*00..0x3f (64*4=256)*/ sy = offs & 0xff; /*00..0xff*/ - //if (flipscreen[0]) sx = 31 - sx; - //if (flipscreen[1]) sy = 31 - sy; - data1 = m_videoram[offs]; /* color */ + data1 = m_videoram[offs]; /* color */ data2 = m_videoram[0x4000 + offs]; /* pixel data */ for (x=0; x<4; x++) /*4 pixels per byte (2 bitplanes in 2 nibbles: 1st=bits 7-4, 2nd=bits 3-0)*/ @@ -224,155 +224,121 @@ UINT32 shougi_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, return 0; } -#if 0 - -//to do: -// add separate sharedram/r/w() for both CPUs and use control value to verify access - -WRITE8_MEMBER(shougi_state::cpu_sharedram_sub_w) -{ - if (m_cpu_sharedram_control_val!=0) logerror("sub CPU access to shared RAM when access set for main cpu\n"); - m_cpu_sharedram[offset] = data; -} - -WRITE8_MEMBER(shougi_state::cpu_sharedram_main_w) -{ - if (m_cpu_sharedram_control_val!=1) logerror("main CPU access to shared RAM when access set for sub cpu\n"); - m_cpu_sharedram[offset] = data; -} -READ8_MEMBER(shougi_state::cpu_sharedram_r) -{ - return m_cpu_sharedram[offset]; -} - -#endif - -WRITE8_MEMBER(shougi_state::cpu_shared_ctrl_sub_w) -{ - //m_cpu_sharedram_control_val = 0; - //logerror("cpu_sharedram_ctrl=SUB"); -} - -WRITE8_MEMBER(shougi_state::cpu_shared_ctrl_main_w) -{ - //m_cpu_sharedram_control_val = 1; - //logerror("cpu_sharedram_ctrl=MAIN"); -} - -WRITE8_MEMBER(shougi_state::mcu_halt_off_w) -{ - /* logerror("mcu HALT OFF"); */ - m_mcu->set_input_line(INPUT_LINE_HALT, CLEAR_LINE); -} -WRITE8_MEMBER(shougi_state::mcu_halt_on_w) -{ - /* logerror("mcu HALT ON"); */ - m_mcu->set_input_line(INPUT_LINE_HALT,ASSERT_LINE); -} +/*************************************************************************** + I/O -WRITE8_MEMBER(shougi_state::nmi_disable_and_clear_line_w) -{ - m_nmi_enabled = 0; /* disable NMIs */ +***************************************************************************/ - /* NMI lines are tied together on both CPUs and connected to the LS74 /Q output */ - m_maincpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE); - m_subcpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE); -} +// maincpu side -WRITE8_MEMBER(shougi_state::nmi_enable_w) +WRITE8_MEMBER(shougi_state::control_w) { - m_nmi_enabled = 1; /* enable NMIs */ -} + // 4800-480f connected to the 74LS259, A3 is data line + // so 4800-4807 write 0, and 4808-480f write 1 + data = offset >> 3 & 1; + offset &= 7; -INTERRUPT_GEN_MEMBER(shougi_state::vblank_nmi) -{ - if ( m_nmi_enabled == 1 ) + switch (offset) { - /* NMI lines are tied together on both CPUs and connected to the LS74 /Q output */ - m_maincpu->set_input_line(INPUT_LINE_NMI, ASSERT_LINE); - m_subcpu->set_input_line(INPUT_LINE_NMI, ASSERT_LINE); + case 1: + m_nmi_enabled = data; + + // NMI lines are tied together on both CPUs and connected to the LS74 /Q output + if (!m_nmi_enabled) + { + m_maincpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE); + m_subcpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE); + } + break; + + case 3: + // start/halt ALPHA-8201 + m_alpha_8201->mcu_start_w(data); + break; + + case 4: + // ALPHA-8201 shared RAM bus direction: 0: mcu, 1: maincpu + m_alpha_8201->bus_dir_w(!data); + break; + + default: + // 0: 0: sharedram = sub, 1: sharedram = main (TODO!) + // 2: ? + // 7: nothing? connected to +5v via resistor + break; } + + m_control[offset] = data; } static ADDRESS_MAP_START( main_map, AS_PROGRAM, 8, shougi_state ) AM_RANGE(0x0000, 0x3fff) AM_ROM - AM_RANGE(0x4000, 0x43ff) AM_RAM /* 2114 x 2 (0x400 x 4bit each) */ - - /* 4800-480f connected to the 74LS259, A3 is data line so 4800-4807 write 0, and 4808-480f write 1 */ - AM_RANGE(0x4800, 0x4800) AM_READ_PORT("DSW") AM_WRITE(cpu_shared_ctrl_sub_w) - AM_RANGE(0x4801, 0x4801) AM_WRITE(nmi_disable_and_clear_line_w) - AM_RANGE(0x4802, 0x4802) AM_NOP - AM_RANGE(0x4803, 0x4803) AM_NOP - AM_RANGE(0x4804, 0x4804) AM_WRITE(mcu_halt_off_w) - AM_RANGE(0x4807, 0x4807) AM_WRITENOP //?????? connected to +5v via resistor - AM_RANGE(0x4808, 0x4808) AM_WRITE(cpu_shared_ctrl_main_w) - AM_RANGE(0x4809, 0x4809) AM_WRITE(nmi_enable_w) - AM_RANGE(0x480a, 0x480a) AM_NOP - AM_RANGE(0x480b, 0x480b) AM_NOP - AM_RANGE(0x480c, 0x480c) AM_WRITE(mcu_halt_on_w) - AM_RANGE(0x480f, 0x480f) AM_NOP - + AM_RANGE(0x4000, 0x43ff) AM_RAM /* 2114 x 2 (0x400 x 4bit each) */ + AM_RANGE(0x4800, 0x480f) AM_WRITE(control_w) + AM_RANGE(0x4800, 0x4800) AM_READ_PORT("DSW") AM_RANGE(0x5000, 0x5000) AM_READ_PORT("P1") - AM_RANGE(0x5800, 0x5800) AM_READ_PORT("P2") AM_WRITE(watchdog_reset_w) /* game won't boot if watchdog doesn't work */ + AM_RANGE(0x5800, 0x5800) AM_READ_PORT("P2") AM_WRITE(watchdog_reset_w) /* game won't boot if watchdog doesn't work */ AM_RANGE(0x6000, 0x6000) AM_DEVWRITE("aysnd", ay8910_device, address_w) AM_RANGE(0x6800, 0x6800) AM_DEVWRITE("aysnd", ay8910_device, data_w) - AM_RANGE(0x7000, 0x73ff) AM_RAM AM_SHARE("share1") /* 2114 x 2 (0x400 x 4bit each) */ - AM_RANGE(0x7800, 0x7bff) AM_RAM AM_SHARE("share2") /* 2114 x 2 (0x400 x 4bit each) */ - - AM_RANGE(0x8000, 0xffff) AM_RAM AM_SHARE("videoram") /* 4116 x 16 (32K) */ + AM_RANGE(0x7000, 0x73ff) AM_DEVREADWRITE("alpha_8201", alpha_8201_device, ext_ram_r, ext_ram_w) + AM_RANGE(0x7800, 0x7bff) AM_RAM AM_SHARE("sharedram") /* 2114 x 2 (0x400 x 4bit each) */ + AM_RANGE(0x8000, 0xffff) AM_RAM AM_SHARE("videoram") /* 4116 x 16 (32K) */ ADDRESS_MAP_END -/* sub */ -READ8_MEMBER(shougi_state::dummy_r) + +// subcpu side + +READ8_MEMBER(shougi_state::semaphore_r) { + // d0: waits for it to be set before handling NMI routine + // hmm it must be a signal from maincpu, but what? m_r ^= 1; - - if(m_r) - return 0xff; - else - return 0; + return m_r; } -static ADDRESS_MAP_START( readport_sub, AS_IO, 8, shougi_state ) - ADDRESS_MAP_GLOBAL_MASK( 0x00ff ) - AM_RANGE(0x00, 0x00) AM_READ(dummy_r) -ADDRESS_MAP_END static ADDRESS_MAP_START( sub_map, AS_PROGRAM, 8, shougi_state ) AM_RANGE(0x0000, 0x5fff) AM_ROM - AM_RANGE(0x6000, 0x63ff) AM_RAM AM_SHARE("share2") /* 2114 x 2 (0x400 x 4bit each) */ + AM_RANGE(0x6000, 0x63ff) AM_RAM AM_SHARE("sharedram") /* 2114 x 2 (0x400 x 4bit each) */ ADDRESS_MAP_END -static ADDRESS_MAP_START( mcu_map, AS_PROGRAM, 8, shougi_state ) - AM_RANGE(0x0000, 0x03ff) AM_RAM AM_SHARE("share1") +static ADDRESS_MAP_START( readport_sub, AS_IO, 8, shougi_state ) + ADDRESS_MAP_GLOBAL_MASK(0x00ff) + AM_RANGE(0x00, 0x00) AM_READ(semaphore_r) ADDRESS_MAP_END +/*************************************************************************** + + Inputs + +***************************************************************************/ + static INPUT_PORTS_START( shougi ) PORT_START("P1") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START2 ) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START1 ) - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_PLAYER(1) - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(1) - PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON2 ) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON1 ) + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_START("P2") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_PLAYER(2) PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(2) - PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2) + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2) + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_PLAYER(2) // dip switch order is not sequential. Only 2,3,4, and 5 identified. // 1 and 6 missing, with three possible positions (the third available @@ -413,23 +379,37 @@ INPUT_PORTS_END +/*************************************************************************** + + Machine Config + +***************************************************************************/ + +INTERRUPT_GEN_MEMBER(shougi_state::vblank_nmi) +{ + if (m_nmi_enabled) + { + m_maincpu->set_input_line(INPUT_LINE_NMI, ASSERT_LINE); + m_subcpu->set_input_line(INPUT_LINE_NMI, ASSERT_LINE); + } +} + + static MACHINE_CONFIG_START( shougi, shougi_state ) - MCFG_CPU_ADD("maincpu", Z80,10000000/4) + /* basic machine hardware */ + MCFG_CPU_ADD("maincpu", Z80, XTAL_10MHz/4) MCFG_CPU_PROGRAM_MAP(main_map) MCFG_CPU_VBLANK_INT_DRIVER("screen", shougi_state, vblank_nmi) - MCFG_CPU_ADD("sub", Z80,10000000/4) + MCFG_CPU_ADD("sub", Z80, XTAL_10MHz/4) MCFG_CPU_PROGRAM_MAP(sub_map) MCFG_CPU_IO_MAP(readport_sub) - /* NMIs triggered in vblank_nmi() */ - /* MCU */ - MCFG_CPU_ADD("mcu", ALPHA8201, 10000000/4/8) - MCFG_CPU_PROGRAM_MAP(mcu_map) + MCFG_DEVICE_ADD("alpha_8201", ALPHA_8201, XTAL_10MHz/4/8) - MCFG_QUANTUM_TIME(attotime::from_hz(600)) - MCFG_WATCHDOG_VBLANK_INIT(16) // assuming it's the same as champbas + MCFG_QUANTUM_PERFECT_CPU("maincpu") + MCFG_WATCHDOG_VBLANK_INIT(0x10) // assuming it's the same as champbas /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -446,12 +426,18 @@ static MACHINE_CONFIG_START( shougi, shougi_state ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") - MCFG_SOUND_ADD("aysnd", AY8910, 10000000/8) + MCFG_SOUND_ADD("aysnd", AY8910, XTAL_10MHz/8) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30) MACHINE_CONFIG_END +/*************************************************************************** + + Game driver(s) + +***************************************************************************/ + ROM_START( shougi ) ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "1.3a", 0x0000, 0x1000, CRC(b601303f) SHA1(ed07fb09053e15be49f4cb66e8916d1bdff48336) ) @@ -459,7 +445,7 @@ ROM_START( shougi ) ROM_LOAD( "2.3b", 0x2000, 0x1000, CRC(09cb831f) SHA1(5a83a22d9245f980fe6a495433e51437d1f95644) ) ROM_LOAD( "4.3d", 0x3000, 0x1000, CRC(ad1a642a) SHA1(d12b10f94a568d1126384e14af4b53c5e5b1a0d0) ) - ROM_REGION( 0x10000, "sub", 0 ) + ROM_REGION( 0x10000, "sub", ROMREGION_ERASE00 ) ROM_LOAD( "5.3e", 0x0000, 0x1000, CRC(ff1f07d0) SHA1(ae5bab09916b6d4ad8d3568ea39501850bdc6991) ) ROM_LOAD( "8.3j", 0x1000, 0x1000, CRC(6230c4c1) SHA1(0b2c81bb02c270ed3bb5b42c4bd4eb25023090cb) ) ROM_LOAD( "6.3f", 0x2000, 0x1000, CRC(d5a91b16) SHA1(1d21295667c3eb186f9e7f867763f2f2697fd350) ) @@ -467,13 +453,14 @@ ROM_START( shougi ) ROM_LOAD( "7.3h", 0x4000, 0x1000, CRC(7ea8ec4a) SHA1(d3b999a683f49c911871d0ae6bb2022e73e3cfb8) ) /* shougi has one socket empty */ - ROM_REGION( 0x2000, "mcu", 0 ) - ROM_LOAD( "alpha-8201__44801a75__2f25.bin", 0x0000, 0x2000, CRC(b77931ac) SHA1(405b02585e80d95a2821455538c5c2c31ce262d1) ) + ROM_REGION( 0x2000, "alpha_8201:mcu", 0 ) + ROM_LOAD( "alpha-8201_44801a75_2f25.bin", 0x0000, 0x2000, CRC(b77931ac) SHA1(405b02585e80d95a2821455538c5c2c31ce262d1) ) ROM_REGION( 0x0020, "proms", 0 ) ROM_LOAD( "pr.2l", 0x0000, 0x0020, CRC(cd3559ff) SHA1(a1291b06a8a337943660b2ef62c94c49d58a6fb5) ) ROM_END + ROM_START( shougi2 ) ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "1-2.3a", 0x0000, 0x1000, CRC(16d75306) SHA1(2d090396abd1fe2b31cb8450cc5d2fbde75e0230) ) @@ -489,14 +476,14 @@ ROM_START( shougi2 ) ROM_LOAD( "7-2.3h", 0x4000, 0x1000, CRC(5f37ebc6) SHA1(2e5c4c2f455979e2ad2c66c5aa9f4d92194796af) ) ROM_LOAD( "10-2.3l", 0x5000, 0x1000, CRC(a26385fd) SHA1(2adb21bb4f67a378014bc1edda48daca349d17e1) ) - ROM_REGION( 0x2000, "mcu", 0 ) - ROM_LOAD( "alpha-8201__44801a75__2f25.bin", 0x0000, 0x2000, CRC(b77931ac) SHA1(405b02585e80d95a2821455538c5c2c31ce262d1) ) + ROM_REGION( 0x2000, "alpha_8201:mcu", 0 ) + ROM_LOAD( "alpha-8201_44801a75_2f25.bin", 0x0000, 0x2000, CRC(b77931ac) SHA1(405b02585e80d95a2821455538c5c2c31ce262d1) ) ROM_REGION( 0x0020, "proms", 0 ) ROM_LOAD( "pr.2l", 0x0000, 0x0020, CRC(cd3559ff) SHA1(a1291b06a8a337943660b2ef62c94c49d58a6fb5) ) ROM_END - -GAME( 1982, shougi, 0, shougi, shougi, driver_device, 0, ROT0, "Alpha Denshi Co.", "Shougi", MACHINE_SUPPORTS_SAVE ) -GAME( 1982, shougi2, shougi, shougi, shougi2, driver_device, 0, ROT0, "Alpha Denshi Co.", "Shougi 2", MACHINE_SUPPORTS_SAVE ) +/* YEAR NAME PARENT MACHINE INPUT INIT MONITOR, COMPANY, FULLNAME, FLAGS */ +GAME( 1982, shougi, 0, shougi, shougi, driver_device, 0, ROT0, "Alpha Denshi Co. (Tehkan license)", "Shougi", MACHINE_SUPPORTS_SAVE ) +GAME( 1982, shougi2, 0, shougi, shougi2, driver_device, 0, ROT0, "Alpha Denshi Co. (Tehkan license)", "Shougi Part II", MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/sidearms.c b/src/mame/drivers/sidearms.c index a7e55ea6081..f2502075830 100644 --- a/src/mame/drivers/sidearms.c +++ b/src/mame/drivers/sidearms.c @@ -68,7 +68,7 @@ READ8_MEMBER(sidearms_state::turtship_ports_r) { int res = 0; for (int i = 0; i < 5;i++) - res |= ((m_ports[i]->read_safe(0) >> offset) & 1) << i; + res |= ((read_safe(m_ports[i], 0) >> offset) & 1) << i; return res; } diff --git a/src/mame/drivers/slotcarn.c b/src/mame/drivers/slotcarn.c index c5f0726a886..3d474f56f9a 100644 --- a/src/mame/drivers/slotcarn.c +++ b/src/mame/drivers/slotcarn.c @@ -82,7 +82,8 @@ WRITE8_MEMBER(slotcarn_state::palette_w) { int co; - m_screen->update_now(); +// m_screen->update_now(); + m_screen->update_partial(m_screen->vpos()); data &= 0x0f; co = ((m_ram_attr[offset] & 0x7F) << 3) | (offset & 0x07); @@ -157,7 +158,8 @@ MC6845_UPDATE_ROW( slotcarn_state::crtc_update_row ) WRITE_LINE_MEMBER(slotcarn_state::hsync_changed) { /* update any video up to the current scanline */ - m_screen->update_now(); +// m_screen->update_now(); + m_screen->update_partial(m_screen->vpos()); } WRITE_LINE_MEMBER(slotcarn_state::vsync_changed) diff --git a/src/mame/drivers/sorcerer.c b/src/mame/drivers/sorcerer.c index bff2e0820a2..e3c13dadc4f 100644 --- a/src/mame/drivers/sorcerer.c +++ b/src/mame/drivers/sorcerer.c @@ -489,22 +489,34 @@ DRIVER_INIT_MEMBER(sorcerer_state, sorcerer) ***************************************************************************/ ROM_START(sorcerer) ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF ) - ROM_LOAD("exmo1-1.dat", 0xe000, 0x0800, CRC(ac924f67) SHA1(72fcad6dd1ed5ec0527f967604401284d0e4b6a1) ) /* monitor roms */ - ROM_LOAD("exmo1-2.dat", 0xe800, 0x0800, CRC(ead1d0f6) SHA1(c68bed7344091bca135e427b4793cc7d49ca01be) ) - ROM_LOAD("exchr-1.dat", 0xf800, 0x0400, CRC(4a7e1cdd) SHA1(2bf07a59c506b6e0c01ec721fb7b747b20f5dced) ) /* char rom */ + ROM_LOAD("exmo1-1.1e", 0xe000, 0x0800, CRC(ac924f67) SHA1(72fcad6dd1ed5ec0527f967604401284d0e4b6a1) ) /* monitor roms */ + ROM_LOAD("exmo1-2.2e", 0xe800, 0x0800, CRC(ead1d0f6) SHA1(c68bed7344091bca135e427b4793cc7d49ca01be) ) + ROM_LOAD("exchr-1.20d", 0xf800, 0x0400, CRC(4a7e1cdd) SHA1(2bf07a59c506b6e0c01ec721fb7b747b20f5dced) ) /* char rom */ ROM_END ROM_START(sorcererd) ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF ) - ROM_LOAD("diskboot.dat",0xbc00, 0x0100, CRC(d82a40d6) SHA1(cd1ef5fb0312cd1640e0853d2442d7d858bc3e3b) ) - ROM_LOAD("exmo1-1.dat", 0xe000, 0x0800, CRC(ac924f67) SHA1(72fcad6dd1ed5ec0527f967604401284d0e4b6a1) ) /* monitor roms */ - ROM_LOAD("exmo1-2.dat", 0xe800, 0x0800, CRC(ead1d0f6) SHA1(c68bed7344091bca135e427b4793cc7d49ca01be) ) - ROM_LOAD("exchr-1.dat", 0xf800, 0x0400, CRC(4a7e1cdd) SHA1(2bf07a59c506b6e0c01ec721fb7b747b20f5dced) ) /* char rom */ + ROM_LOAD("diskboot.dat", 0xbc00, 0x0100, CRC(d82a40d6) SHA1(cd1ef5fb0312cd1640e0853d2442d7d858bc3e3b) ) + ROM_LOAD("exmo1-1.1e", 0xe000, 0x0800, CRC(ac924f67) SHA1(72fcad6dd1ed5ec0527f967604401284d0e4b6a1) ) /* monitor roms */ + ROM_LOAD("exmo1-2.2e", 0xe800, 0x0800, CRC(ead1d0f6) SHA1(c68bed7344091bca135e427b4793cc7d49ca01be) ) + ROM_LOAD("exchr-1.20d", 0xf800, 0x0400, CRC(4a7e1cdd) SHA1(2bf07a59c506b6e0c01ec721fb7b747b20f5dced) ) /* char rom */ ROM_REGION( 0x200, "proms", 0 ) - ROM_LOAD_OPTIONAL("bruce.dat", 0x0000, 0x0020, CRC(fae922cb) SHA1(470a86844cfeab0d9282242e03ff1d8a1b2238d1) ) /* video prom */ + ROM_LOAD_OPTIONAL("bruce.15b", 0x0000, 0x0020, CRC(fae922cb) SHA1(470a86844cfeab0d9282242e03ff1d8a1b2238d1) ) /* video prom type 6331 */ +ROM_END + +ROM_START(sorcerer2) + ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF ) + ROM_LOAD("exchr-1.20d", 0xf800, 0x0400, CRC(4a7e1cdd) SHA1(2bf07a59c506b6e0c01ec721fb7b747b20f5dced) ) /* char rom */ + ROM_SYSTEM_BIOS(0, "standard", "Standard") + ROMX_LOAD("exm011-1.1e", 0xe000, 0x0800, CRC(af9394dc) SHA1(d7e0ada64d72d33e0790690be86a36020b41fd0d), ROM_BIOS(1) ) + ROMX_LOAD("exm011-2.2e", 0xe800, 0x0800, CRC(49978d6c) SHA1(b94127bfe99e5dc1cf5dbbb7d1b099b0ca036cd0), ROM_BIOS(1) ) + ROM_SYSTEM_BIOS(1, "tvc", "TVI-MON-C-V1.5") + ROMX_LOAD("tvc-1.1e", 0xe000, 0x0800, CRC(efc15a18) SHA1(3dee821270a0d83453b18baed88a024dfd0d7a6c), ROM_BIOS(2) ) + ROMX_LOAD("tvc-2.2e", 0xe800, 0x0800, CRC(bc194487) SHA1(dcfd916558e3e3be22091c5558ea633c332cf6c7), ROM_BIOS(2) ) ROM_END /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME */ COMP(1979, sorcerer, 0, 0, sorcerer, sorcerer, sorcerer_state, sorcerer, "Exidy Inc", "Sorcerer", 0 ) +COMP(1979, sorcerer2, sorcerer, 0, sorcerer, sorcerer, sorcerer_state, sorcerer, "Exidy Inc", "Sorcerer 2", 0 ) COMP(1979, sorcererd, sorcerer, 0, sorcererd, sorcerer, sorcerer_state, sorcerer, "Exidy Inc", "Sorcerer (with floppy disks)", 0 ) diff --git a/src/mame/drivers/spoker.c b/src/mame/drivers/spoker.c index 9761d57902e..ff0e54a0321 100644 --- a/src/mame/drivers/spoker.c +++ b/src/mame/drivers/spoker.c @@ -139,10 +139,10 @@ CUSTOM_INPUT_MEMBER(spoker_state::hopper_r) return machine().input().code_pressed(KEYCODE_H); } -static void show_out(UINT8 *out) +static void show_out(running_machine &machine, UINT8 *out) { #ifdef MAME_DEBUG - popmessage("%02x %02x %02x", out[0], out[1], out[2]); + machine.popmessage("%02x %02x %02x", out[0], out[1], out[2]); #endif } @@ -167,7 +167,7 @@ WRITE8_MEMBER(spoker_state::nmi_and_coins_w) m_nmi_ack = data & 0x80; // nmi acknowledge, 0 -> 1 m_out[0] = data; - show_out(m_out); + show_out(machine(), m_out); } WRITE8_MEMBER(spoker_state::video_and_leds_w) @@ -179,7 +179,7 @@ WRITE8_MEMBER(spoker_state::video_and_leds_w) m_hopper = (~data)& 0x80; m_out[1] = data; - show_out(m_out); + show_out(machine(), m_out); } WRITE8_MEMBER(spoker_state::leds_w) @@ -191,7 +191,7 @@ WRITE8_MEMBER(spoker_state::leds_w) // data & 0x10? m_out[2] = data; - show_out(m_out); + show_out(machine(), m_out); } WRITE8_MEMBER(spoker_state::magic_w) diff --git a/src/mame/drivers/starfire.c b/src/mame/drivers/starfire.c index 8500218a862..a3a4b21ae3b 100644 --- a/src/mame/drivers/starfire.c +++ b/src/mame/drivers/starfire.c @@ -320,7 +320,7 @@ static const char *const starfire_sample_names[] = INTERRUPT_GEN_MEMBER(starfire_state::vblank_int) { // starfire has a jumper for disabling NMI, used to do a complete RAM test - if (ioport("NMI")->read_safe(0x01)) + if (read_safe(ioport("NMI"), 0x01)) device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } diff --git a/src/mame/drivers/subhuntr.c b/src/mame/drivers/subhuntr.c new file mode 100644 index 00000000000..a36f388ee70 --- /dev/null +++ b/src/mame/drivers/subhuntr.c @@ -0,0 +1,180 @@ +// license:BSD-3-Clause +// copyright-holders:David Haywood +/* + +QTY Type clock position function +2x 2636 Programmable Video Interface +1x 2650 OSC/2 = 1.7897725 MHz 8-bit Microprocessor - main +1x oscillator 3.579545 MHz + +ROMs +QTY Type position status +4x 2708 6F,6H,6L,6N dumped +1x N82S115 2B dumped + +RAMs +QTY Type position +2x 2101 + +*/ + +#include "emu.h" +#include "cpu/s2650/s2650.h" +#include "machine/s2636.h" + + +class subhuntr_state : public driver_device +{ +public: + subhuntr_state(const machine_config &mconfig, device_type type, const char *tag) + : driver_device(mconfig, type, tag), + m_maincpu(*this, "maincpu") + { + } + + required_device<cpu_device> m_maincpu; + + INTERRUPT_GEN_MEMBER(subhuntr_interrupt); + + virtual void machine_start(); + virtual void machine_reset(); + virtual void video_start(); + DECLARE_PALETTE_INIT(subhuntr); + UINT32 screen_update_subhuntr(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); +}; + + +/*************************************************************************** + + Video + +***************************************************************************/ + +PALETTE_INIT_MEMBER(subhuntr_state, subhuntr) +{ +} + +UINT32 subhuntr_state::screen_update_subhuntr(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) +{ + return 0; +} + +void subhuntr_state::video_start() +{ +} + + +/*************************************************************************** + + Memory Maps, I/O + +***************************************************************************/ + +static ADDRESS_MAP_START( subhuntr_map, AS_PROGRAM, 8, subhuntr_state ) + AM_RANGE(0x0000, 0x0fff) AM_ROM + AM_RANGE(0x1c00, 0x1fff) AM_RAM +ADDRESS_MAP_END + +static ADDRESS_MAP_START( subhuntr_io_map, AS_IO, 8, subhuntr_state ) +// AM_RANGE(S2650_CTRL_PORT, S2650_CTRL_PORT) AM_READWRITE( , ) +// AM_RANGE(S2650_DATA_PORT, S2650_DATA_PORT) AM_READWRITE( , ) + AM_RANGE(S2650_SENSE_PORT, S2650_SENSE_PORT) AM_READ_PORT("SENSE") +ADDRESS_MAP_END + +/*************************************************************************** + + Inputs + +***************************************************************************/ + +static INPUT_PORTS_START( subhuntr ) + PORT_START("SENSE") + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") +INPUT_PORTS_END + + +/*************************************************************************** + + Machine Config/Interface + +***************************************************************************/ + +void subhuntr_state::machine_start() +{ +} + +void subhuntr_state::machine_reset() +{ +} + +INTERRUPT_GEN_MEMBER(subhuntr_state::subhuntr_interrupt) +{ + device.execute().set_input_line_and_vector(0, HOLD_LINE, 0x03); +} + +static const gfx_layout tiles8x8_layout = +{ + 8,8, + RGN_FRAC(1,1), + 1, + { 0 }, + { 0, 1, 2, 3, 4, 5, 6, 7 }, + { 0*8,1*8,2*8,3*8,4*8,5*8,6*8,7*8 }, + 8*8 +}; + +static GFXDECODE_START( subhuntr ) + GFXDECODE_ENTRY( "gfx1", 0, tiles8x8_layout, 0, 1 ) +GFXDECODE_END + + +static MACHINE_CONFIG_START( subhuntr, subhuntr_state ) + + /* basic machine hardware */ + MCFG_CPU_ADD("maincpu", S2650, 14318180/4/2) + MCFG_CPU_PROGRAM_MAP(subhuntr_map) + MCFG_CPU_IO_MAP(subhuntr_io_map) + MCFG_CPU_VBLANK_INT_DRIVER("screen", subhuntr_state, subhuntr_interrupt) + +// MCFG_DEVICE_ADD("s2636", S2636, 0) +// MCFG_S2636_WORKRAM_SIZE(0x100) +// MCFG_S2636_OFFSETS(3, -21) +// MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.10) + + /* video hardware */ + MCFG_SCREEN_ADD("screen", RASTER) + MCFG_SCREEN_VIDEO_ATTRIBUTES(VIDEO_ALWAYS_UPDATE) + MCFG_SCREEN_REFRESH_RATE(50) + MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */) + MCFG_SCREEN_SIZE(256, 256) + MCFG_SCREEN_VISIBLE_AREA(1*8, 29*8-1, 2*8, 32*8-1) + MCFG_SCREEN_UPDATE_DRIVER(subhuntr_state, screen_update_subhuntr) + MCFG_SCREEN_PALETTE("palette") + + MCFG_GFXDECODE_ADD("gfxdecode", "palette", subhuntr) + + MCFG_PALETTE_ADD("palette", 26) + MCFG_PALETTE_INIT_OWNER(subhuntr_state, subhuntr) + + /* sound hardware */ + MCFG_SPEAKER_STANDARD_MONO("mono") + + /* discrete sound */ +MACHINE_CONFIG_END + + + +/******************************************************************************/ + +ROM_START( subhuntr ) + ROM_REGION( 0x1000, "maincpu", 0 ) + ROM_LOAD( "MR21.6F", 0x0000, 0x0400, CRC(27847939) SHA1(e6b41b511fefac1e1e207eff2dac8c2963d47c5c) ) + ROM_LOAD( "MR22.6G", 0x0400, 0x0400, CRC(e9af1ee8) SHA1(451e88407a120444377a58b06b65152c57503533) ) + ROM_LOAD( "MR25.6L", 0x0800, 0x0400, CRC(8271c975) SHA1(c7192658b50d781ab1b94c2e8cb75c5be3539820) ) + ROM_LOAD( "MR24.6N", 0x0c00, 0x0400, CRC(385c4944) SHA1(84050b0356c9a3a36528dba768f2684e28c6c7c4) ) + + ROM_REGION( 0x0200, "gfx1", 0 ) + ROM_LOAD( "82S115.2B", 0x0000, 0x0200, CRC(6946c9de) SHA1(956b4bebe6960a73609deb75e1493c4127fd7f77) ) // ASCII, not much else +ROM_END + +GAME(1979, subhuntr, 0, subhuntr, subhuntr, driver_device, 0, ROT0, "Model Racing", "Sub Hunter (Model Racing)", MACHINE_NOT_WORKING | MACHINE_NO_SOUND ) diff --git a/src/mame/drivers/suna16.c b/src/mame/drivers/suna16.c index fd90aebce16..3e0b4c4b864 100644 --- a/src/mame/drivers/suna16.c +++ b/src/mame/drivers/suna16.c @@ -939,6 +939,10 @@ static MACHINE_CONFIG_START( sunaq, suna16_state ) MCFG_QUANTUM_TIME(attotime::from_hz(6000)) + MCFG_MACHINE_START_OVERRIDE(suna16_state,uballoon) + MCFG_MACHINE_RESET_OVERRIDE(suna16_state,uballoon) + + /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) MCFG_SCREEN_REFRESH_RATE(60) diff --git a/src/mame/drivers/super6.c b/src/mame/drivers/super6.c index 687598f89f8..0ffbe7c20cd 100644 --- a/src/mame/drivers/super6.c +++ b/src/mame/drivers/super6.c @@ -191,7 +191,8 @@ READ8_MEMBER( super6_state::fdc_r ) */ - fatalerror("Z80 WAIT not supported by MAME core\n"); + // don't crash please... but it's true, WAIT does nothing in our Z80 + //fatalerror("Z80 WAIT not supported by MAME core\n"); m_maincpu->set_input_line(Z80_INPUT_LINE_WAIT, ASSERT_LINE); return !m_fdc->intrq_r() << 7; @@ -217,13 +218,16 @@ WRITE8_MEMBER( super6_state::fdc_w ) 6 7 + Codes passed to here during boot are 0x00, 0x08, 0x38 */ // disk drive select floppy_image_device *m_floppy = NULL; - if (BIT(data, 0)) m_floppy = m_floppy0->get_device(); - if (BIT(data, 1)) m_floppy = m_floppy1->get_device(); + if ((data & 3) == 0) + m_floppy = m_floppy0->get_device(); + if ((data & 3) == 1) + m_floppy = m_floppy1->get_device(); m_fdc->set_floppy(m_floppy); if (m_floppy) m_floppy->mon_w(0); diff --git a/src/mame/drivers/swyft.c b/src/mame/drivers/swyft.c new file mode 100644 index 00000000000..27827228b3b --- /dev/null +++ b/src/mame/drivers/swyft.c @@ -0,0 +1,893 @@ +// license:BSD-3-Clause +// copyright-holders:Miodrag Milanovic, Jonathan Gevaryahu +/*************************************************************************** + + IAI Swyft Model P0001 + Copyright (C) 2009-2013 Miodrag Milanovic and Jonathan Gevaryahu AKA Lord Nightmare + With information and help from John "Sandy" Bumgarner, Dwight Elvey, + Charles Springer, Terry Holmes, Jonathan Sand, Aza Raskin and others. + + See cat.c for the machine which the swyft later became. + + This driver is dedicated in memory of Jef Raskin and Dave Boulton + +IAI detailed credits: +Scott Kim - responsible for fonts on swyft and cat +Ralph Voorhees - Model construction and mockups (swyft 'flat cat') + +Cat HLSL stuff: +*scanlines: +the cat has somewhat visible and fairly close scanlines with very little fuzziness +try hlsl options: +hlsl_prescale_x 4 +hlsl_prescale_y 4 +scanline_alpha 0.3 +scanline_size 1.0 +scanline_height 0.7 +scanline_bright_scale 1.0 +scanline_bright_offset 0.6 +*phosphor persistence of the original cat CRT is VERY LONG and fades to a greenish-yellow color, though the main color itself is white +try hlsl option: +phosphor_life 0.93,0.95,0.87 +which is fairly close but may actually be too SHORT compared to the real thing. + + +Swyft versions: +There are at least 4 variants of machines called 'swyft': +* The earliest desktop units which use plexi or rubber-tooled case and an + angled monitor; about a dozen were made and at least two of clear plexi. + These are sometimes called "wrinkled" swyfts. 5.25" drive, they may be able + to read Apple2 Swyftware/Swyftdisk and Swyftcard-created disks. + It is possible no prototypes of this type got beyond the 'runs forth console only' stage. + http://archive.computerhistory.org/resources/access/physical-object/2011/09/102746929.01.01.lg.JPG + http://www.digibarn.com/collections/systems/swyft/Swyft-No2-05-1271.jpg + http://www.digibarn.com/friends/jef-raskin/slides/iai/A%20-687%20SWYFTPRO.JPG +* The early "flat cat" or "roadkill" portable LCD screen units with a white + case and just a keyboard. Model SP0001 + http://www.digibarn.com/collections/systems/swyft/Image82.jpg +* The later "ur-cat" desktop units which use a machine tooled case and look + more or less like the canon cat. Around 100-200 were made. 3.5" drive. + These have a fully functional EDDE editor as the cat does, and can even compile + forth programs. + (the 'swyft' driver is based on one of these) +* The very late portable LCD units with a dark grey case and a row of hotkey + buttons below the screen. Not dumped yet. At least one functional prototype exists. + At least one plastic mockup exists with no innards. + http://www.digibarn.com/collections/systems/swyft/swyft.jpg + +IAI Swyft: +Board name: 950-0001C +"INFORMATION APPLIANCE INC. COPYRIGHT 1985" + _________________|||||||||___________________________________________________________________________________ +| J8 [=======J3=======] ____ Trans- | +== / \ (E2) former | +==Jx 74LS107 J5 |PB1 | uA339 MC3403 -----| +| 7407 \____/ J7 = +| Y1 "TIMING B" 74LS132 74LS175 -----| +| ____________ 4N37 Relay -----| +| TMS4256 74LS161 "DECODE E" "DISK 3.5C" | | J6 = +| | MC6850P | -----| +| TMS4256 74LS166 74HCT259 74LS299 '------------' MC3403 MC3403 _____| +| ___________________ ___________________ || | = +| TMS4256 74LS373 | | | | J2 | J1 = +| | MC68008P8 | | R6522P | || I P R | = +| TMS4256 74F153 '-------------------' '-------------------' MN4053 || MN4053 N R E | B = +| (E1) D O S | R = +| TMS4256 74F153 74HCT08 __________ ___________________ MC14412 DS1489 U E T I | E = +| | | | | || C S E S | A = +| TMS4256 74F153 74HC4040E | AM27256 | | R6522P | || T D C T | K = +| '----------' '-------------------' || INFORMATION O T O | O = +| TMS4256 74F153 "VIDEO 2B" .----------. J4 APPLIANCE INC. R I R | U = +| | AM27256 | 74HC02 74HC374 || Copyright 1985 S O S | T = +| TMS4256 74F153 74LS393 B1|__________| || UM95089 Y2 N | = +|_____________________________[________J9___]__________________________________________________D13______|_____= + +*Devices of interest: +J1: breakout of joystick, serial/rs232, hex-keypad, parallel port, and forth switch (and maybe cassette?) pins + DIL 60 pin 2-row right-angle rectangular connector with metal shield contact; + not all 60 pins are populated in the connector, only pins 1-6, 8, 13-15, 17-18, 23-30, 35-60 are present + (traced partly by dwight) +J2: unpopulated 8-pin sip header, serial/rs232-related? + (vcc ? ? ? ? ? ? gnd) (random guess: txd, rxd, rts, cts, dsr, dtr, and one pin could be cd/ri though the modem circuit may do that separately?) +J3: Floppy Connector + (standard DIL 34 pin 2-row rectangular connector for mini-shugart/pc floppy cable; pin 2 IS connected somewhere and ?probably? is used for /DISKCHANGE like on an Amiga, with pin 34 being /TRUEREADY?) + (as opposed to normal ibm pc 3.5" drives where pin 2 is unconnected or is /DENSITY *input to drive*, and pin 34 is /DISKCHANGE) +J4: 18-pin sip header for keyboard ribbon cable; bottom edge of board is pin 1 + Pins: + 1: GND through 220k resistor r78 + 2: ? phone hook related? anode of diode d7; one of the pins of relay k2; topmost (boardwise) pin of transistor Q10 + 3: 74HCT34 pin + +J5: locking-tab-type "CONN HEADER VERT 4POS .100 TIN" connector for supplying power + through a small cable with a berg connector at the other end, to the floppy drive + (5v gnd gnd 12v) +J6: Phone connector, rj11 jack +J7: Line connector, rj11 jack +J8: 9-pin Video out/power in connector "CONN RECEPT 6POS .156 R/A PCB" plus "CONN RECEPT 3POS .156 R/A PCB" acting as one 9-pin connector + (NC ? ? ? NC NC ? 12v 5v) (video, vsync, hsync and case/video-gnd are likely here) + (the video pinout of the cat is: (Video Vsync Hsync SyncGnd PwrGnd PwrGnd +5v(VCC) +12v(VDD) -12v(VEE)) which is not the same as the swyft. +J9: unpopulated DIL 40-pin straight connector for a ROM debug/expansion/RAM-shadow daughterboard + the pins after pin 12 connect to that of the ROM-LO 27256 pinout counting pins 1,28,2,27,3,26,etc + the ROM-HI rom has a different /HICE pin which is not connected to this connector + /LOCE is a15 + /HICE is !a15 + /ROM_OE comes from pin 14 of DECODE_E pal, and is shorted to /ROM_OE' by the cuttable jumper B1 which is not cut + /ROM_OE' goes to the two EPROMS + DECODE_18 is DECODE_E pal pin 18 + pin 1 (GND) is in the lower left and the pins count low-high then to the right + (gnd N/C E_CLK R/W /ROM_OE a17 vcc a14 a13 a8 a9 a11 /ROM_OE' a10 a15 d7 d6 d5 d4 d3 ) + (GND /IPL1 DECODE_18 /RESET gnd a16 vcc a12 a7 a6 a5 a4 a3 a2 a1 a0 d0 d1 d2 gnd) +Jx: 4 pin on top side, 6 pin on bottom side edge ?debug? connector (doesn't have a Jx number) + (trace me!) +B1: a cuttable trace on the pcb. Not cut, affects one of the pins on the unpopulated J9 connector only. +E1: jumper, unknown purpose, not set +E2: jumper, unknown purpose, not set +D13: LED +R6522P (upper): parallel port via +R6522P (lower): keyboard via +UM95089: DTMF Tone generator chip (if you read the datasheet this is technically ROM based!) +Y1: 15.8976Mhz, main clock? +Y2: 3.579545Mhz, used by the DTMF generator chip UM95089 (connects to pins 7 and 8 of it) +TMS4256-15NL - 262144 x 1 DRAM +PB1 - piezo speaker + +*Pals: +"TIMING B" - AMPAL16R4APC (marked on silkscreen "TIMING PAL") +"DECODE E" - AMPAL16L8PC (marked on silkscreen "DECODE PAL") +"VIDEO 2B" - AMPAL16R4PC (marked on silkscreen "VIDEO PAL") +"DISK 3.5C" - AMPAL16R4PC (marked on silkscreen "DISK PAL") + +*Deviations from silkscreen: +4N37 (marked on silkscreen "4N35") +74F153 (marked on silkscreen "74ALS153") +74HCT259 is socketed, possibly intended that the rom expansion daughterboard will have a ribbon cable fit in its socket? + + +ToDo: +* Swyft +- Figure out the keyboard (interrupts are involved? or maybe an NMI on a + timer/vblank? It is possible this uses a similar 'keyboard read int' + to what the cat does) +- get the keyboard scanning actually working; the VIAs are going nuts right now. +- Beeper (on one of the vias?) +- vblank/hblank stuff +- Get the 6850 ACIA working for communications +- Floppy (probably similar to the Cat) +- Centronics port (attached to one of the VIAs) +- Joystick port (also likely on a via) +- Keypad? (also likely on a via done as a grid scan?) +- Forth button (on the port on the back; keep in mind shift-usefront-space ALWAYS enables forth on a swyft) +- Multple undumped firmware revisions exist (330 and 331 are dumped) + +// 74ls107 @ u18 pin 1 is 68008 /BERR pin + +// mc6850 @ u33 pin 2 (RX_DATA) is +// mc6850 @ u33 pin 3 (RX_CLK) is 6522 @ u35 pin 17 (PB7) +// mc6850 @ u33 pin 4 (TX_CLK) is 6522 @ u35 pin 17 (PB7) +// mc6850 @ u33 pin 5 (/RTS) is +// mc6850 @ u33 pin 6 (TX_DATA) is +// mc6850 @ u33 pin 7 (/IRQ) is 68008 /IPL1 pin 41 +// mc6850 @ u33 pin 8 (CS0) is 68008 A12 pin 10 +// mc6850 @ u33 pin 9 (CS2) is DECODE E pin 18 +// mc6850 @ u33 pin 10 (CS1) is 68008 /BERR pin 40 +// mc6850 @ u33 pin 11 (RS) is 68008 A0 pin 46 +// mc6850 @ u33 pin 13 (R/W) is 68008 R/W pin 30 +// mc6850 @ u33 pin 14 (E) is 68008 E pin 38 +// mc6850 @ u33 pin 15-22 (D7-D0) are 68008 D7 to D0 pins 20-27 +// mc6850 @ u33 pin 23 (/DCD) is 74hc02 @ u35 pin 1 +// mc6850 @ u33 pin 24 (/CTS) is N/C? + +// 6522 @ u34: +// pin 2 (PA0) : +// pin 3 (PA1) : +// pin 4 (PA2) : +// pin 5 (PA3) : +// pin 6 (PA4) : +// pin 7 (PA5) : +// pin 8 (PA6) : +// pin 9 (PA7) : +// pin 10 (PB0) : +// pin 11 (PB1) : +// pin 12 (PB2) : +// pin 13 (PB3) : +// pin 14 (PB4) : +// pin 15 (PB5) : +// pin 16 (PB6) : +// pin 17 (PB7) : +// pin 18 (CB1) : ?from/to? Floppy connector j3 pin 8 +// pin 19 (CB2) : ?from/to? 6522 @ u35 pin 16 (PB6) +// pin 21 (/IRQ) : out to 68008 /IPL1 pin 41 +// pin 22 (R/W) : in from 68008 R/W pin 30 +// pin 23 (/CS2) : in from DECODE E pin 18 +// pin 24 (CS1) : in from 68008 A13 pin 11 +// pin 25 (Phi2) : in from 68008 E pin 38 +// pins 26-33 : in/out from/to 68008 D7 to D0 pins 20-27 +// pin 34 (/RES) : in from 68008 /RESET pin 37 AND 68008 /HALT pin 36 +// pins 35-38 (RS3-RS0) are 68008 A9-A6 pins 7-4 +// pin 39 (CA2) is through inductor L11 and resistor r128 to peripheral connector pin 35 <end minus 26> +// pin 40 (CA1) is through inductor L30 and resistor r138 to peripheral connector pin 53 <end minus 8> + +// 6522 @ u35 +// pin 2 (PA0) : +// pin 3 (PA1) : +// pin 4 (PA2) : +// pin 5 (PA3) : +// pin 6 (PA4) : +// pin 7 (PA5) : +// pin 8 (PA6) : +// pin 9 (PA7) : +// pin 10 (PB0) : +// pin 11 (PB1) : in from 74hc02 @ u36 pin 4 +// pin 12 (PB2) : +// pin 13 (PB3) : +// pin 14 (PB4) : +// pin 15 (PB5) : +// pin 16 (PB6) : 6522 @ u34 pin 19 (CB2) +// pin 17 (PB7) : mc6850 @ u33 pins 3 and 4 (RX_CLK, TX_CLK) +// pin 18 (CB1) : ds1489an @ u45 pin 11 +// pin 19 (CB2) : mn4053b @ u40 pin 11 and mc14412 @ u41 pin 10 +// pin 21 (/IRQ) : out to 68008 /IPL1 pin 41 +// pin 22 (R/W) : in from 68008 R/W pin 30 +// pin 23 (/CS2) : in from DECODE E pin 18 +// pin 24 (CS1) : in from 68008 A14 pin 12 +// pin 25 (Phi2) : in from 68008 E pin 38 +// pins 26-33 : in/out from/to 68008 D7 to D0 pins 20-27 +// pin 34 (/RES) : in from 68008 /RESET pin 37 AND 68008 /HALT pin 36 +// pins 35-38 (RS3-RS0) : in from 68008 A9-A6 pins 7-4 +// pin 39 (CA2) : out to 74HCT34 pin 11 (CLK) (keyboard column latch) +// pin 40 (CA1) : out? to? ds1489an @ u45 pin 8 + +// 74hc02 @ u36: +// pin 1 (Y1) : out to mc6850 @ u33 pin 23 /DCD +// pin 2 (A1) : in from (2 places: resistor R58 to ua339 @ u38 pin 4 (In1-)) <where does this actually come from? modem offhook?> +// pin 3 (B1) : in from mn4053b @ u40 pin 10 <probably from rs232> +// pin 4 (Y2) : out to 6522 @u35 pin 11 +// pin 5 (A2) : in from 4N37 @ u48 pin 5 (output side emitter pin) (tied via R189 to gnd) <ring indicator?> +// pin 6 (B2) : in from 4N37 @ u48 pin 5 (output side emitter pin) (tied via R189 to gnd) <ring indicator?> +// pin 8 (B3) : +// pin 9 (A3) : +// pin 10 (Y3) : +// pin 11 (B4) : in from 68008 A15 +// pin 12 (A4) : in from 68008 A15 +// pin 13 (Y4) : out to EPROM @ U31 /CE + +****************************************************************************/ + +// Defines + +#undef DEBUG_GA2OPR_W +#undef DEBUG_VIDEO_CONTROL_W + +#undef DEBUG_FLOPPY_CONTROL_W +#undef DEBUG_FLOPPY_CONTROL_R +#undef DEBUG_FLOPPY_DATA_W +#undef DEBUG_FLOPPY_DATA_R +#undef DEBUG_FLOPPY_STATUS_R + +#undef DEBUG_PRINTER_DATA_W +#undef DEBUG_PRINTER_CONTROL_W + +#undef DEBUG_MODEM_R +#undef DEBUG_MODEM_W + +#undef DEBUG_DUART_OUTPUT_LINES +// data sent to rs232 port +#undef DEBUG_DUART_TXA +// data sent to modem chip +#undef DEBUG_DUART_TXB +#undef DEBUG_DUART_IRQ_HANDLER +#undef DEBUG_PRN_FF + +#undef DEBUG_TEST_W + +#define DEBUG_SWYFT_VIA0 1 +#define DEBUG_SWYFT_VIA1 1 + + +// Includes +#include "emu.h" +#include "cpu/m68000/m68000.h" +#include "machine/clock.h" +#include "machine/6850acia.h" +#include "machine/6522via.h" +#include "sound/speaker.h" +#include "bus/centronics/ctronics.h" + +class swyft_state : public driver_device +{ +public: + swyft_state(const machine_config &mconfig, device_type type, const char *tag) + : driver_device(mconfig, type, tag), + m_maincpu(*this, "maincpu"), + m_ctx(*this, "ctx"), + m_ctx_data_out(*this, "ctx_data_out"), + m_acia6850(*this, "acia6850"), + m_via0(*this, "via6522_0"), + m_via1(*this, "via6522_1"), + m_speaker(*this, "speaker"), + m_p_swyft_videoram(*this, "p_swyft_vram") + /*m_y0(*this, "Y0"), + m_y1(*this, "Y1"), + m_y2(*this, "Y2"), + m_y3(*this, "Y3"), + m_y4(*this, "Y4"), + m_y5(*this, "Y5"), + m_y6(*this, "Y6"), + m_y7(*this, "Y7")*/ + { } + + required_device<cpu_device> m_maincpu; + optional_device<centronics_device> m_ctx; + optional_device<output_latch_device> m_ctx_data_out; + required_device<acia6850_device> m_acia6850; // only swyft uses this + required_device<via6522_device> m_via0; // only swyft uses this + required_device<via6522_device> m_via1; // only swyft uses this + optional_device<speaker_sound_device> m_speaker; + required_shared_ptr<UINT8> m_p_swyft_videoram; + /*optional_ioport m_y0; + optional_ioport m_y1; + optional_ioport m_y2; + optional_ioport m_y3; + optional_ioport m_y4; + optional_ioport m_y5; + optional_ioport m_y6; + optional_ioport m_y7;*/ + + DECLARE_MACHINE_START(swyft); + DECLARE_MACHINE_RESET(swyft); + DECLARE_VIDEO_START(swyft); + + UINT32 screen_update_swyft(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + + DECLARE_READ8_MEMBER(swyft_d0000); + + DECLARE_READ8_MEMBER(swyft_via0_r); + DECLARE_WRITE8_MEMBER(swyft_via0_w); + DECLARE_READ8_MEMBER(via0_pa_r); + DECLARE_WRITE8_MEMBER(via0_pa_w); + DECLARE_WRITE_LINE_MEMBER(via0_ca2_w); + DECLARE_READ8_MEMBER(via0_pb_r); + DECLARE_WRITE8_MEMBER(via0_pb_w); + DECLARE_WRITE_LINE_MEMBER(via0_cb1_w); + DECLARE_WRITE_LINE_MEMBER(via0_cb2_w); + DECLARE_WRITE_LINE_MEMBER(via0_int_w); + + DECLARE_READ8_MEMBER(swyft_via1_r); + DECLARE_WRITE8_MEMBER(swyft_via1_w); + DECLARE_READ8_MEMBER(via1_pa_r); + DECLARE_WRITE8_MEMBER(via1_pa_w); + DECLARE_WRITE_LINE_MEMBER(via1_ca2_w); + DECLARE_READ8_MEMBER(via1_pb_r); + DECLARE_WRITE8_MEMBER(via1_pb_w); + DECLARE_WRITE_LINE_MEMBER(via1_cb1_w); + DECLARE_WRITE_LINE_MEMBER(via1_cb2_w); + DECLARE_WRITE_LINE_MEMBER(via1_int_w); + + DECLARE_WRITE_LINE_MEMBER(write_acia_clock); + + /* gate array 2 has a 16-bit counter inside which counts at 10mhz and + rolls over at FFFF->0000; on roll-over (or likely at FFFF terminal count) + it triggers the KTOBF output. It does this every 6.5535ms, which causes + a 74LS74 d-latch at IC100 to invert the state of the DUART IP2 line; + this causes the DUART to fire an interrupt, which makes the 68000 read + the keyboard. + The watchdog counter and the 6ms counter are both incremented + every time the KTOBF pulses. + */ + UINT8 m_keyboard_line; + UINT8 m_floppy_control; + +//protected: + //virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); +}; + + +static INPUT_PORTS_START( swyft ) +// insert dwight and sandy's swyft keyboard map here once we figure out the byte line order + PORT_START("Y0") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_N) PORT_CHAR('n') PORT_CHAR('N') + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_M) PORT_CHAR('m') PORT_CHAR('M') + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_K) PORT_CHAR('k') PORT_CHAR('K') + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_J) PORT_CHAR('j') PORT_CHAR('J') + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_Y) PORT_CHAR('y') PORT_CHAR('Y') + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_T) PORT_CHAR('t') PORT_CHAR('T') + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_6) PORT_CHAR('6') PORT_CHAR('\xa2') + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_5) PORT_CHAR('5') PORT_CHAR('%') + + PORT_START("Y1") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_B) PORT_CHAR('n') PORT_CHAR('B') + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CHAR('<') + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_L) PORT_CHAR('l') PORT_CHAR('L') + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_H) PORT_CHAR('h') PORT_CHAR('H') + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_U) PORT_CHAR('u') PORT_CHAR('U') + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_R) PORT_CHAR('r') PORT_CHAR('R') + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_7) PORT_CHAR('7') PORT_CHAR('&') + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_4) PORT_CHAR('4') PORT_CHAR('$') + + PORT_START("Y2") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_V) PORT_CHAR('v') PORT_CHAR('V') + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') PORT_CHAR('>') + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_COLON) PORT_CHAR(';') PORT_CHAR(':') + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_G) PORT_CHAR('g') PORT_CHAR('G') + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_I) PORT_CHAR('i') PORT_CHAR('I') + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED) // totally unused + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_8) PORT_CHAR('8') PORT_CHAR('*') + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_3) PORT_CHAR('3') PORT_CHAR('#') + + PORT_START("Y3") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_C) PORT_CHAR('c') PORT_CHAR('C') + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Left USE FRONT") PORT_CODE(KEYCODE_LCONTROL) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_QUOTE) PORT_CHAR('\'') PORT_CHAR('"') + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F) PORT_CHAR('f') PORT_CHAR('F') + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_O) PORT_CHAR('o') PORT_CHAR('O') + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_E) PORT_CHAR('e') PORT_CHAR('E') + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_9) PORT_CHAR('9') PORT_CHAR('(') + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED) // totally unused + + PORT_START("Y4") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_X) PORT_CHAR('x') PORT_CHAR('X') + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Right USE FRONT") PORT_CODE(KEYCODE_RCONTROL) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Right Shift") PORT_CODE(KEYCODE_F2) // intl only: latin diaresis and latin !; norway, danish and finnish * and '; others + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_D) PORT_CHAR('d') PORT_CHAR('D') + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_P) PORT_CHAR('p') PORT_CHAR('P') + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_W) PORT_CHAR('w') PORT_CHAR('W') + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_0) PORT_CHAR('0') PORT_CHAR(')') + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_2) PORT_CHAR('2') PORT_CHAR('@') + + PORT_START("Y5") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_Z) PORT_CHAR('z') PORT_CHAR('Z') + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ') + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Return") PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_S) PORT_CHAR('s') PORT_CHAR('S') + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_OPENBRACE) PORT_CHAR('\xbd') PORT_CHAR('\xbc') //PORT_CHAR('}') PORT_CHAR('{') + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_Q) PORT_CHAR('q') PORT_CHAR('Q') + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_MINUS) PORT_CHAR('-') PORT_CHAR('_') + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_1) PORT_CHAR('1') PORT_CHAR('!') + + PORT_START("Y6") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Left Shift") PORT_CODE(KEYCODE_F1) // intl only: latin inv ? and inv !; norway and danish ! and |; finnish <>; others + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Left LEAP") PORT_CODE(KEYCODE_LALT) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_SLASH) PORT_CHAR('/') PORT_CHAR('?') + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_A) PORT_CHAR('a') PORT_CHAR('A') + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR(']') PORT_CHAR('[') + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_TAB) PORT_CHAR('\t') + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_EQUALS) PORT_CHAR('=') PORT_CHAR('+') + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED) // totally unused + + PORT_START("Y7") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Shift") PORT_CODE(KEYCODE_RSHIFT) PORT_CODE(KEYCODE_LSHIFT) PORT_CHAR(UCHAR_SHIFT_1) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Right Leap") PORT_CODE(KEYCODE_RALT) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Page") PORT_CODE(KEYCODE_PGUP) PORT_CODE(KEYCODE_PGDN) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Shift Lock") PORT_CODE(KEYCODE_CAPSLOCK) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Erase") PORT_CODE(KEYCODE_BACKSPACE) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED) // totally unused + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("UNDO") PORT_CODE(KEYCODE_BACKSLASH) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_TILDE) PORT_CHAR('\xb1') PORT_CHAR('\xb0') // PORT_CHAR('\\') PORT_CHAR('~') +INPUT_PORTS_END + + +/* Swyft rom and ram notes: +rom: +**Vectors: +0x0000-0x0003: SP boot vector +0x0004-0x0007: PC boot vector +**unknown: +0x0009-0x00BF: ? table +0x00C0-0x01DF: ? table +0x01E0-0x02DF: ? table (may be part of next table) +0x02E0-0x03DF: ? table +0x03E0-0x0B3F: int16-packed jump table (expanded to int32s at ram at 0x46000-0x46EC0 on boot) +0x0B40-0x0E83: ? function index tables? +0x0E84-0x1544: binary code (purpose?) +0x1545-0x24CF: ? +**Fonts: +0x24D0-0x254F: ? (likely font 1 width lookup table) +0x2550-0x2BCF: Font 1 data +0x2BD0-0x2C4F: ? (likely font 2 width lookup table) +0x2C50-0x32CF: Font 2 data +**unknown?: +0x32D0-0x360F: String data (and control codes?) +0x3610-0x364F: ? fill (0x03 0xe8) +0x3650-0x369F: ? fill (0x03 0x20) +0x36A0-0x384d: ? forth code? +0x384e-0x385d: Lookup table for phone keypad +0x385e-...: ? +...-0xC951: ? +0xC952: boot vector +0xC952-0xCAAE: binary code (purpose?) + 0xCD26-0xCD3B: ?init forth bytecode? +0xCD3C-0xCEBA: 0xFF fill (unused?) +0xCEEB-0xFFFE: Forth dictionaries for compiling, with <word> then <3 bytes> afterward? (or before it? most likely afterward) + +ram: (system dram ranges from 0x40000-0x7FFFF) +0x40000-0x425CF - the screen display ram +(?0x425D0-0x44BA0 - ?unknown (maybe screen ram page 2?)) +0x44DC6 - SP vector +0x46000-0x46EC0 - jump tables to instructions for ? (each forth word?) + + +on boot: +copy/expand packed rom short words 0x3E0-0xB3F to long words at 0x46000-0x46EC0 +copy 0x24f longwords of zero beyond that up to 0x47800 +CD26->A5 <?pointer to init stream function?> +44DC6->A7 <reset SP... why it does this twice, once by the vector and once here, i'm gonna guess has to do with running the code in a debugger or on a development daughterboard like the cat had, where the 68008 wouldn't get explicitly reset> +44F2A->A6 <?pointer to work ram space?> +EA2->A4 <?function> +E94->A3 <?function> +EAE->A2 <?function> +41800->D7 <?forth? opcode index base; the '1800' portion gets the opcode type added to it then is multiplied by 4 to produce the jump table offset within the 0x46000-0x46EC0 range> +46e3c->D4 <?pointer to more work ram space?> +CD22->D5 <?pointer to another function?> +write 0xFFFF to d0004.l +jump to A4(EA2) + +read first stream byte (which is 0x03) from address pointed to by A5 (which is CD26), inc A5, OR the opcode (0x03) to D7 + (Note: if the forth opcodes are in order in the dictionary, then 0x03 is "!char" which is used to read a char from an arbitrary address) +copy D7 to A0 +Add A0 low word to itself +Add A0 low word to itself again +move the long word from address pointed to by A0 (i.e. the specific opcode's area at the 46xxx part of ram) to A1 +Jump to A1(11A4) + +11A4: move 41b00 to D0 (select an opcode "page" 1bxx) +jump to 118E + +118E: read next stream byte (in this case, 0x8E) from address pointed to by A5 (which is CD27), inc A5, OR the opcode (0x8e) to D7 +add to 41b00 in d0, for 41b8E +Add A0 low word to itself +Add A0 low word to itself again +move the long word from address pointed to by A0 (i.e. the specific opcode's area at the 46xxx part of ram) to A1 +Jump to A1(CD06) + +CD06: jump to A3 (E94) + +E94: subtract D5 from A5 (cd28 - cd22 = 0x0006) +write 6 to address @A5(44f28) and decrement A5 +write D4(46e3c) to address @a6(44f26) and decrement a5 +lea ($2, A1), A5 - i.e. increment A1 by 2, and write that to A5, so write CD06+2=CD08 to A5 +A1->D5 +A0->D4 +read next stream byte (in this case, 0x03) from address pointed to by A5 (which is CD08), inc A5, OR the opcode (0x03) to D7 + +*/ + +/* Swyft Memory map, based on watching the infoapp roms do their thing: +68k address map: +(a23,a22,a21,a20 lines don't exist on the 68008 so are considered unconnected) +a23 a22 a21 a20 a19 a18 a17 a16 a15 a14 a13 a12 a11 a10 a9 a8 a7 a6 a5 a4 a3 a2 a1 a0 +x x x x 0 0 ? ? 0 * * * * * * * * * * * * * * * R ROM-LO (/LOCE is 0, /HICE is 1) +x x x x 0 0 ? ? 1 * * * * * * * * * * * * * * * R ROM-HI (/LOCE is 1, /HICE is 0) +x x x x 0 1 * * * * * * * * * * * * * * * * * a RW RAM +x x x x 1 1 ?0? ?1? ? ? ? ? ? ? ? ? ? ? ? ? * * * * R ? status of something? floppy? +x x x x 1 1 ?1? ?0? ? 0 0 1 x x x x x x x x x x x * RW 6850 acia @U33, gets 0x55 steadystate and 0x57 written to it to reset it +x x x x 1 1 ?1? ?0? ? 0 1 0 x x * * * * x x x x x x RW Parallel VIA 0 @ U34 +x x x x 1 1 ?1? ?0? ? 1 0 0 x x * * * * x x x x x x RW Keyboard VIA 1 @ U35 + ^ ^ ^ ^ ^ + +*/ + +static ADDRESS_MAP_START(swyft_mem, AS_PROGRAM, 8, swyft_state) + ADDRESS_MAP_UNMAP_HIGH + AM_RANGE(0x000000, 0x00ffff) AM_ROM AM_MIRROR(0xF00000) // 64 KB ROM + AM_RANGE(0x040000, 0x07ffff) AM_RAM AM_MIRROR(0xF00000) AM_SHARE("p_swyft_vram") // 256 KB RAM + AM_RANGE(0x0d0000, 0x0d000f) AM_READ(swyft_d0000) AM_MIRROR(0xF00000) // status of something? reads from d0000, d0004, d0008, d000a, d000e + AM_RANGE(0x0e1000, 0x0e1000) AM_DEVWRITE("acia6850", acia6850_device, control_w) AM_MIRROR(0xF00000) // 6850 ACIA lives here + AM_RANGE(0x0e2000, 0x0e2fff) AM_READWRITE(swyft_via0_r, swyft_via0_w) AM_MIRROR(0xF00000)// io area with selector on a9 a8 a7 a6? + AM_RANGE(0x0e4000, 0x0e4fff) AM_READWRITE(swyft_via1_r, swyft_via1_w) AM_MIRROR(0xF00000) +ADDRESS_MAP_END + +MACHINE_START_MEMBER(swyft_state,swyft) +{ + m_via0->write_ca1(1); + m_via0->write_ca2(1); + m_via0->write_cb1(1); + m_via0->write_cb2(1); + + m_via1->write_ca1(1); + m_via1->write_ca2(1); + m_via1->write_cb1(1); + m_via1->write_cb2(1); +} + +MACHINE_RESET_MEMBER(swyft_state,swyft) +{ +} + +VIDEO_START_MEMBER(swyft_state,swyft) +{ +} + +UINT32 swyft_state::screen_update_swyft(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) +{ + UINT16 code; + int y, x, b; + + int addr = 0; + for (y = 0; y < 242; y++) + { + int horpos = 0; + for (x = 0; x < 40; x++) + { + code = m_p_swyft_videoram[addr++]; + for (b = 7; b >= 0; b--) + { + bitmap.pix16(y, horpos++) = (code >> b) & 0x01; + } + } + } + return 0; +} + +READ8_MEMBER( swyft_state::swyft_d0000 ) +{ + // wtf is this supposed to be? + UINT8 byte = 0xFF; // ? + logerror("mystery device: read from 0x%5X, returning %02X\n", offset+0xD0000, byte); + return byte; +} + + +// if bit is 1 enable: (obviously don't set more than one bit or you get bus contention!) +// acia +// via0 +// via1 +// x x x x 1 1 ?1? ?0? ? ^ ^ ^ ? ? * * * * ?*? ? ? ? ? ? +// ^ ^ ^ ^ <- these four bits address the VIA registers? is this correct? +static const char *const swyft_via_regnames[] = { "0: ORB/IRB", "1: ORA/IRA", "2: DDRB", "3: DDRA", "4: T1C-L", "5: T1C-H", "6: T1L-L", "7: T1L-H", "8: T2C-L", "9: T2C-H", "A: SR", "B: ACR", "C: PCR", "D: IFR", "E: IER", "F: ORA/IRA*" }; + +READ8_MEMBER( swyft_state::swyft_via0_r ) +{ + if (offset&0x000C3F) fprintf(stderr,"VIA0: read from invalid offset in 68k space: %06X!\n", offset); + UINT8 data = m_via0->read(space, (offset>>6)&0xF); +#ifdef DEBUG_SWYFT_VIA0 + logerror("VIA0 register %s read by cpu: returning %02x\n", swyft_via_regnames[(offset>>5)&0xF], data); +#endif + return data; +} + +WRITE8_MEMBER( swyft_state::swyft_via0_w ) +{ +#ifdef DEBUG_SWYFT_VIA0 + logerror("VIA0 register %s written by cpu with data %02x\n", swyft_via_regnames[(offset>>5)&0xF], data); +#endif + if (offset&0x000C3F) fprintf(stderr,"VIA0: write to invalid offset in 68k space: %06X, data: %02X!\n", offset, data); + m_via1->write(space, (offset>>6)&0xF, data); +} + +READ8_MEMBER( swyft_state::swyft_via1_r ) +{ + if (offset&0x000C3F) fprintf(stderr," VIA1: read from invalid offset in 68k space: %06X!\n", offset); + UINT8 data = m_via1->read(space, (offset>>6)&0xF); +#ifdef DEBUG_SWYFT_VIA1 + logerror(" VIA1 register %s read by cpu: returning %02x\n", swyft_via_regnames[(offset>>5)&0xF], data); +#endif + return data; +} + +WRITE8_MEMBER( swyft_state::swyft_via1_w ) +{ +#ifdef DEBUG_SWYFT_VIA1 + logerror(" VIA1 register %s written by cpu with data %02x\n", swyft_via_regnames[(offset>>5)&0xF], data); +#endif + if (offset&0x000C3F) fprintf(stderr," VIA1: write to invalid offset in 68k space: %06X, data: %02X!\n", offset, data); + m_via0->write(space, (offset>>6)&0xF, data); +} + +// first via +READ8_MEMBER( swyft_state::via0_pa_r ) +{ + logerror("VIA0: Port A read!\n"); + return 0xFF; +} + +WRITE8_MEMBER( swyft_state::via0_pa_w ) +{ + logerror("VIA0: Port A written with data of 0x%02x!\n", data); +} + +WRITE_LINE_MEMBER ( swyft_state::via0_ca2_w ) +{ + logerror("VIA0: CA2 written with %d!\n", state); +} + +READ8_MEMBER( swyft_state::via0_pb_r ) +{ + logerror("VIA0: Port B read!\n"); + return 0xFF; +} + +WRITE8_MEMBER( swyft_state::via0_pb_w ) +{ + logerror("VIA0: Port B written with data of 0x%02x!\n", data); +} + +WRITE_LINE_MEMBER ( swyft_state::via0_cb1_w ) +{ + logerror("VIA0: CB1 written with %d!\n", state); +} + +WRITE_LINE_MEMBER ( swyft_state::via0_cb2_w ) +{ + logerror("VIA0: CB2 written with %d!\n", state); +} + +WRITE_LINE_MEMBER ( swyft_state::via0_int_w ) +{ + logerror("VIA0: INT output set to %d!\n", state); +} + +// second via +READ8_MEMBER( swyft_state::via1_pa_r ) +{ + logerror(" VIA1: Port A read!\n"); + return 0xFF; +} + +WRITE8_MEMBER( swyft_state::via1_pa_w ) +{ + logerror(" VIA1: Port A written with data of 0x%02x!\n", data); +} + +WRITE_LINE_MEMBER ( swyft_state::via1_ca2_w ) +{ + logerror(" VIA1: CA2 written with %d!\n", state); +} + +READ8_MEMBER( swyft_state::via1_pb_r ) +{ + logerror(" VIA1: Port B read!\n"); + return 0xFF; +} + +WRITE8_MEMBER( swyft_state::via1_pb_w ) +{ + logerror(" VIA1: Port B written with data of 0x%02x!\n", data); +} + +WRITE_LINE_MEMBER ( swyft_state::via1_cb1_w ) +{ + logerror(" VIA1: CB1 written with %d!\n", state); +} + +WRITE_LINE_MEMBER ( swyft_state::via1_cb2_w ) +{ + logerror(" VIA1: CB2 written with %d!\n", state); +} + +WRITE_LINE_MEMBER ( swyft_state::via1_int_w ) +{ + logerror(" VIA1: INT output set to %d!\n", state); +} + +WRITE_LINE_MEMBER( swyft_state::write_acia_clock ) +{ + m_acia6850->write_txc(state); + m_acia6850->write_rxc(state); +} + +static MACHINE_CONFIG_START( swyft, swyft_state ) + + /* basic machine hardware */ + MCFG_CPU_ADD("maincpu",M68008, XTAL_15_8976MHz/2) //MC68008P8, Y1=15.8976Mhz, clock GUESSED at Y1 / 2 + MCFG_CPU_PROGRAM_MAP(swyft_mem) + + MCFG_MACHINE_START_OVERRIDE(swyft_state,swyft) + MCFG_MACHINE_RESET_OVERRIDE(swyft_state,swyft) + + /* video hardware */ + MCFG_SCREEN_ADD("screen", RASTER) + MCFG_SCREEN_REFRESH_RATE(50) + MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */ + MCFG_SCREEN_SIZE(320, 242) + MCFG_SCREEN_VISIBLE_AREA(0, 320-1, 0, 242-1) + MCFG_SCREEN_UPDATE_DRIVER(swyft_state, screen_update_swyft) + MCFG_SCREEN_PALETTE("palette") + + MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + + MCFG_VIDEO_START_OVERRIDE(swyft_state,swyft) + + MCFG_DEVICE_ADD("acia6850", ACIA6850, 0) + // acia rx and tx clocks come from one of the VIA pins and are tied together, fix this below? acia e clock comes from 68008 + MCFG_DEVICE_ADD("acia_clock", CLOCK, (XTAL_15_8976MHz/2)/5) // out e clock from 68008, ~ 10in clocks per out clock + MCFG_CLOCK_SIGNAL_HANDLER(WRITELINE(swyft_state, write_acia_clock)) + + MCFG_DEVICE_ADD("via6522_0", VIA6522, (XTAL_15_8976MHz/2)/5) // out e clock from 68008 + MCFG_VIA6522_READPA_HANDLER(READ8(swyft_state, via0_pa_r)) + MCFG_VIA6522_READPB_HANDLER(READ8(swyft_state, via0_pb_r)) + MCFG_VIA6522_WRITEPA_HANDLER(WRITE8(swyft_state, via0_pa_w)) + MCFG_VIA6522_WRITEPB_HANDLER(WRITE8(swyft_state, via0_pb_w)) + MCFG_VIA6522_CB1_HANDLER(WRITELINE(swyft_state, via0_cb1_w)) + MCFG_VIA6522_CA2_HANDLER(WRITELINE(swyft_state, via0_ca2_w)) + MCFG_VIA6522_CB2_HANDLER(WRITELINE(swyft_state, via0_cb2_w)) + MCFG_VIA6522_IRQ_HANDLER(WRITELINE(swyft_state, via0_int_w)) + + MCFG_DEVICE_ADD("via6522_1", VIA6522, (XTAL_15_8976MHz/2)/5) // out e clock from 68008 + MCFG_VIA6522_READPA_HANDLER(READ8(swyft_state, via1_pa_r)) + MCFG_VIA6522_READPB_HANDLER(READ8(swyft_state, via1_pb_r)) + MCFG_VIA6522_WRITEPA_HANDLER(WRITE8(swyft_state, via1_pa_w)) + MCFG_VIA6522_WRITEPB_HANDLER(WRITE8(swyft_state, via1_pb_w)) + MCFG_VIA6522_CB1_HANDLER(WRITELINE(swyft_state, via1_cb1_w)) + MCFG_VIA6522_CA2_HANDLER(WRITELINE(swyft_state, via1_ca2_w)) + MCFG_VIA6522_CB2_HANDLER(WRITELINE(swyft_state, via1_cb2_w)) + MCFG_VIA6522_IRQ_HANDLER(WRITELINE(swyft_state, via1_int_w)) +MACHINE_CONFIG_END + +/* ROM definition */ +ROM_START( swyft ) + ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF ) + ROM_SYSTEM_BIOS( 0, "v331", "IAI Swyft Version 331 Firmware") + ROMX_LOAD( "331-lo.u30", 0x0000, 0x8000, CRC(d6cc2e2f) SHA1(39ff26c18b1cf589fc48793263f280ef3780cc61), ROM_BIOS(1)) + ROMX_LOAD( "331-hi.u31", 0x8000, 0x8000, CRC(4677630a) SHA1(8845d702fa8b8e1a08352f4c59d3076cc2e1307e), ROM_BIOS(1)) + /* this version of the swyft code identifies itself at 0x3FCB as version 330 */ + ROM_SYSTEM_BIOS( 1, "v330", "IAI Swyft Version 330 Firmware") + ROMX_LOAD( "infoapp.lo.u30", 0x0000, 0x8000, CRC(52c1bd66) SHA1(b3266d72970f9d64d94d405965b694f5dcb23bca), ROM_BIOS(2)) + ROMX_LOAD( "infoapp.hi.u31", 0x8000, 0x8000, CRC(83505015) SHA1(693c914819dd171114a8c408f399b56b470f6be0), ROM_BIOS(2)) + ROM_REGION( 0x4000, "pals", ROMREGION_ERASEFF ) + /* Swyft PALs: + * The Swyft has four PALs, whose rough function can be derived from their names: + * TIMING - state machine for DRAM refresh/access; handles ras/cas and choosing whether the video out shifter or the 68k is accessing ram. also divides clock + * DECODE - address decoder for the 68008 + * VIDEO - state machine for the video shifter (and vblank/hblank?) + * DISK 3.5 - state machine for the floppy drive interface + */ + /* U9: Timing AMPAL16R4 + * + * pins: + * 111111111000000000 + * 987654321987654321 + * ??QQQQ??EIIIIIIIIC + * |||||||||||||||||\-< /CK input - 15.8976mhz crystal and transistor oscillator + * ||||||||||||||||\--< ? + * |||||||||||||||\---< ? + * ||||||||||||||\----< ? + * |||||||||||||\-----< ?<also input to decode pal pin 1, video pal pin 1, source is ?> + * ||||||||||||\------< ? + * |||||||||||\-------< ? + * ||||||||||\--------< ? + * |||||||||\---------< ? + * ||||||||\----------< /OE input - shorted to GND + * |||||||\-----------? ? + * ||||||\------------? ? + * |||||\------------Q> /ROM_OE (to both eproms through jumper b1 and optionally j9 connector) + * ||||\-------------Q? ? + * |||\--------------Q? ? + * ||\---------------Q> output to decode pal pin 2 + * |\----------------->? output? to ram multiplexer 'A' pins + * \------------------< ? + */ + ROM_LOAD( "timing_b.ampal16r4a.u9.jed", 0x0000, 0xb08, CRC(643e6e83) SHA1(7db167883f9d6cf385ce496d08976dc16fc3e2c3)) + /* U20: Decode AMPAL16L8 + * + * pins: + * 111111111000000000 + * 987654321987654321 + * O??????OIIIIIIIIII + * |||||||||||||||||\-< TIMING PAL pin 5 + * ||||||||||||||||\--< TIMING PAL pin 17 + * |||||||||||||||\---< 68008 R/W (pin 30) + * ||||||||||||||\----< 68008 /DS (pin 29) + * |||||||||||||\-----< 68008 E (pin 38) + * ||||||||||||\------< 68008 A19 + * |||||||||||\-------< 68008 A18 + * ||||||||||\--------< 68008 A17 + * |||||||||\---------< 68008 A16 + * ||||||||\----------< ? + * |||||||\-----------> ? + * ||||||\------------? 68008 /VPA (pin 39) + * |||||\-------------> /ROM_OE (to both eproms through jumper b1 and optionally j9 connector) + * ||||\--------------? ? + * |||\---------------? ? + * ||\----------------? ? + * |\-----------------? goes to j9 connector pin 5 + * \------------------< ? + */ + ROM_LOAD( "decode_e.ampal16l8.u20.jed", 0x1000, 0xb08, CRC(0b1dbd76) SHA1(08c144ad7a7bbdd53eefd271b2f6813f8b3b1594)) + ROM_LOAD( "video_2b.ampal16r4.u25.jed", 0x2000, 0xb08, CRC(caf91148) SHA1(3f8ddcb512a1c05395c74ad9a6ba7b87027ce4ec)) + ROM_LOAD( "disk_3.5c.ampal16r4.u28.jed", 0x3000, 0xb08, CRC(fd994d02) SHA1(f910ab16587dd248d63017da1e5b37855e4c1a0c)) +ROM_END + +/* Driver */ + +/* YEAR NAME PARENT COMPAT MACHINE INPUT DEVICE INIT COMPANY FULLNAME FLAGS */ +COMP( 1985, swyft,0, 0, swyft, swyft, driver_device, 0, "Information Applicance Inc", "Swyft", MACHINE_NOT_WORKING | MACHINE_NO_SOUND) diff --git a/src/mame/drivers/system1.c b/src/mame/drivers/system1.c index e110517de1f..cc2e1d5fcdd 100644 --- a/src/mame/drivers/system1.c +++ b/src/mame/drivers/system1.c @@ -4150,6 +4150,35 @@ ROM_START( gardiab ) ROM_LOAD( "pr5317.4", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) ROM_END +ROM_START( gardiaj ) + ROM_REGION( 0x20000, "maincpu", 0 ) + ROM_LOAD( "epr-10250.ic90", 0x00000, 0x8000, CRC(c97943a7) SHA1(eb201987c7a78f7eb6838211c0af3394c0b2d95f) ) /* encrypted */ + ROM_LOAD( "epr-10251.ic91", 0x10000, 0x8000, CRC(b2ed05dc) SHA1(c520bf7024c85dc759c27eccb0a31998f4d72b5f) ) + ROM_LOAD( "epr-10252.ic92", 0x18000, 0x8000, CRC(0a490588) SHA1(18df754ebdf062096f2d631a722b168901610345) ) + + ROM_REGION( 0x10000, "soundcpu", 0 ) + ROM_LOAD( "epr-10243.ic126", 0x0000, 0x4000, CRC(87220660) SHA1(3f2bfc03e0f1053a4aa0ec5ebb0d573f2e20964c) ) + + ROM_REGION( 0x18000, "tiles", 0 ) + ROM_LOAD( "epr-10240.ic4", 0x00000, 0x8000, CRC(998ce090) SHA1(78929f471c5aa8b32d1693e8af2ef3e86efd3d7d) ) + ROM_LOAD( "epr-10241.ic5", 0x08000, 0x8000, CRC(81ab0b07) SHA1(7f776dccd66ad097a1a906823786a52d31a8c4e8) ) + ROM_LOAD( "epr-10242.ic6", 0x10000, 0x8000, CRC(2dc4c4c7) SHA1(0347170b941a5c567eed114833656e8abd16a8ab) ) + + ROM_REGION( 0x20000, "sprites", 0 ) + ROM_LOAD( "epr-10234.ic87", 0x00000, 0x8000, CRC(8a6aed33) SHA1(044836885ace8294124b1be9b3a4828f772bb9ee) ) + ROM_LOAD( "epr-10233.ic86", 0x08000, 0x8000, CRC(c52784d3) SHA1(b37d7f261be12616dbe11dfa375eaf6878e4a0f3) ) + ROM_LOAD( "epr-10236.ic89", 0x10000, 0x8000, CRC(b35ab227) SHA1(616f6097afddffa9af89fe84d8b6df59c567c1e6) ) + ROM_LOAD( "epr-10235.ic88", 0x18000, 0x8000, CRC(006a3151) SHA1(a575f9d5c026e6b18e990720ec7520b6b5ae94e3) ) + + ROM_REGION( 0x0300, "palette", 0 ) + ROM_LOAD( "pr-7345.ic20", 0x0000, 0x0100, CRC(8eee0f72) SHA1(b5694c120f604a5f7cc95618a71ab16a1a6151ed) ) /* palette red component */ + ROM_LOAD( "pr-7344.ic14", 0x0100, 0x0100, CRC(3e7babd7) SHA1(d4f8790db4dce75e27156a4c6de2dcef2baf6d76) ) /* palette green component */ + ROM_LOAD( "pr-7343.ic8", 0x0200, 0x0100, CRC(371c44a6) SHA1(ac37458d1feb6566b09a795b20c21953d4ab109d) ) /* palette blue component */ + + ROM_REGION( 0x0100, "proms", 0 ) + ROM_LOAD( "pr5317.ic28", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) +ROM_END + ROM_START( brain ) ROM_REGION( 0x20000, "maincpu", 0 ) @@ -5698,6 +5727,7 @@ GAME( 1985, chopliftbl, choplift, sys2row, choplift, system1_state, bank0c, GAME( 1985, shtngmst, 0, sys2m, shtngmst, system1_state, shtngmst, ROT0, "Sega", "Shooting Master (8751 315-5159)", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING ) GAME( 1985, shtngmste, shtngmst, sys2m, shtngmst, system1_state, shtngmst, ROT0, "Sega / EVG", "Shooting Master (EVG, 8751 315-5159a)", MACHINE_SUPPORTS_SAVE ) GAME( 1986, gardiab, gardia, sys2x, gardia, system1_state, gardiab, ROT270, "bootleg", "Gardia (317-0007?, bootleg)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) +GAME( 1986, gardiaj, gardia, sys2x, gardia, system1_state, gardia, ROT270, "Coreland / Sega", "Gardia (Japan, 317-0006)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) GAME( 1986, wboysys2, wboy, sys2x, wboysys2, system1_state, wboysys2, ROT0, "Escape (Sega license)", "Wonder Boy (system 2)", MACHINE_SUPPORTS_SAVE ) GAME( 1987, tokisens, 0, sys2, tokisens, system1_state, bank0c, ROT90, "Sega", "Toki no Senshi - Chrono Soldier", MACHINE_SUPPORTS_SAVE ) GAME( 1987, wbml, 0, sys2xb, wbml, system1_state, wbml, ROT0, "Sega / Westone", "Wonder Boy in Monster Land (Japan New Ver., MC-8123, 317-0043)", MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/taito_z.c b/src/mame/drivers/taito_z.c index bc2652c33c8..bb0ae1fb20b 100644 --- a/src/mame/drivers/taito_z.c +++ b/src/mame/drivers/taito_z.c @@ -1104,7 +1104,7 @@ CUSTOM_INPUT_MEMBER(taitoz_state::taitoz_pedal_r) { static const UINT8 retval[8] = { 0,1,3,2,6,7,5,4 }; const char *tag = (const char *)param; - return retval[ioport(tag)->read_safe(0) & 7]; + return retval[read_safe(ioport(tag), 0) & 7]; } @@ -1113,7 +1113,7 @@ READ8_MEMBER(taitoz_state::contcirc_input_bypass_r) /* Bypass TC0220IOC controller for analog input */ UINT8 port = m_tc0220ioc->port_r(space, 0); /* read port number */ - UINT16 steer = 0xff80 + ioport("STEER")->read_safe(0x80); + UINT16 steer = 0xff80 + read_safe(ioport("STEER"), 0x80); switch (port) { @@ -1134,7 +1134,7 @@ READ8_MEMBER(taitoz_state::chasehq_input_bypass_r) /* Bypass TC0220IOC controller for extra inputs */ UINT8 port = m_tc0220ioc->port_r(space, 0); /* read port number */ - UINT16 steer = 0xff80 + ioport("STEER")->read_safe(0x80); + UINT16 steer = 0xff80 + read_safe(ioport("STEER"), 0x80); switch (port) { @@ -1221,7 +1221,7 @@ WRITE16_MEMBER(taitoz_state::bshark_stick_w) READ16_MEMBER(taitoz_state::sci_steer_input_r) { - UINT16 steer = 0xff80 + ioport("STEER")->read_safe(0x80); + UINT16 steer = 0xff80 + read_safe(ioport("STEER"), 0x80); switch (offset) { @@ -1292,7 +1292,7 @@ WRITE16_MEMBER(taitoz_state::spacegun_gun_output_w) READ16_MEMBER(taitoz_state::dblaxle_steer_input_r) { - UINT16 steer = 0xff80 + ioport("STEER")->read_safe(0x80); + UINT16 steer = 0xff80 + read_safe(ioport("STEER"), 0x80); switch (offset) { diff --git a/src/mame/drivers/taitojc.c b/src/mame/drivers/taitojc.c index 55688916979..45a5b9c5037 100644 --- a/src/mame/drivers/taitojc.c +++ b/src/mame/drivers/taitojc.c @@ -754,7 +754,7 @@ WRITE8_MEMBER(taitojc_state::hc11_output_w) READ8_MEMBER(taitojc_state::hc11_analog_r) { - return m_analog_ports[offset]->read_safe(0); + return read_safe(m_analog_ports[offset], 0); } diff --git a/src/mame/drivers/ti99_4x.c b/src/mame/drivers/ti99_4x.c index a90dc92aaf2..f7ecab11478 100644 --- a/src/mame/drivers/ti99_4x.c +++ b/src/mame/drivers/ti99_4x.c @@ -468,7 +468,7 @@ READ8_MEMBER( ti99_4x_state::read_by_9901 ) // the line enough to make the TMS9901 sense the low level. // A reported, feasible fix was to cut the line and insert a diode // below the Alphalock key. - if ((ioport("ALPHABUG")!=0) && (m_model!=MODEL_4)) answer |= (ioport("ALPHA")->read() | ioport("ALPHA1")->read()); + if ((m_model!=MODEL_4) && (ioport("ALPHABUG")->read()!=0) ) answer |= (ioport("ALPHA")->read() | ioport("ALPHA1")->read()); } else { diff --git a/src/mame/drivers/timeplt.c b/src/mame/drivers/timeplt.c index 52df64370bd..e5fdf8e2e35 100644 --- a/src/mame/drivers/timeplt.c +++ b/src/mame/drivers/timeplt.c @@ -34,7 +34,8 @@ c300 interrupt enable c302 flip screen c304 trigger interrupt on audio CPU - c308 Protection ??? Stuffs in some values computed from ROM content + c308 video enable (?). Protection ??? Stuffs in some values computed + from ROM content c30a coin counter 1 c30c coin counter 2 @@ -61,14 +62,14 @@ * *************************************/ -INTERRUPT_GEN_MEMBER(timeplt_state::timeplt_interrupt) +INTERRUPT_GEN_MEMBER(timeplt_state::interrupt) { if (m_nmi_enable) device.execute().set_input_line(INPUT_LINE_NMI, ASSERT_LINE); } -WRITE8_MEMBER(timeplt_state::timeplt_nmi_enable_w) +WRITE8_MEMBER(timeplt_state::nmi_enable_w) { m_nmi_enable = data & 1; if (!m_nmi_enable) @@ -83,7 +84,7 @@ WRITE8_MEMBER(timeplt_state::timeplt_nmi_enable_w) * *************************************/ -WRITE8_MEMBER(timeplt_state::timeplt_coin_counter_w) +WRITE8_MEMBER(timeplt_state::coincounter_w) { coin_counter_w(machine(), offset >> 1, data); } @@ -121,71 +122,39 @@ CUSTOM_INPUT_MEMBER(timeplt_state::chkun_hopper_status_r) * *************************************/ -static ADDRESS_MAP_START( timeplt_main_map, AS_PROGRAM, 8, timeplt_state ) +static ADDRESS_MAP_START( common_main_map, AS_PROGRAM, 8, timeplt_state ) ADDRESS_MAP_UNMAP_HIGH AM_RANGE(0x0000, 0x5fff) AM_ROM - AM_RANGE(0xa000, 0xa3ff) AM_RAM_WRITE(timeplt_colorram_w) AM_SHARE("colorram") - AM_RANGE(0xa400, 0xa7ff) AM_RAM_WRITE(timeplt_videoram_w) AM_SHARE("videoram") + AM_RANGE(0xa000, 0xa3ff) AM_RAM_WRITE(colorram_w) AM_SHARE("colorram") + AM_RANGE(0xa400, 0xa7ff) AM_RAM_WRITE(videoram_w) AM_SHARE("videoram") AM_RANGE(0xa800, 0xafff) AM_RAM AM_RANGE(0xb000, 0xb0ff) AM_MIRROR(0x0b00) AM_RAM AM_SHARE("spriteram") AM_RANGE(0xb400, 0xb4ff) AM_MIRROR(0x0b00) AM_RAM AM_SHARE("spriteram2") - AM_RANGE(0xc000, 0xc000) AM_MIRROR(0x0cff) AM_WRITE(soundlatch_byte_w) - AM_RANGE(0xc200, 0xc200) AM_MIRROR(0x0cff) AM_WRITE(watchdog_reset_w) - AM_RANGE(0xc300, 0xc300) AM_MIRROR(0x0cf1) AM_WRITE(timeplt_nmi_enable_w) - AM_RANGE(0xc302, 0xc302) AM_MIRROR(0x0cf1) AM_WRITE(timeplt_flipscreen_w) - AM_RANGE(0xc304, 0xc304) AM_MIRROR(0x0cf1) AM_DEVWRITE("timeplt_audio", timeplt_audio_device, sh_irqtrigger_w) - AM_RANGE(0xc30a, 0xc30c) AM_MIRROR(0x0cf1) AM_WRITE(timeplt_coin_counter_w) - AM_RANGE(0xc000, 0xc000) AM_MIRROR(0x0cff) AM_READ(timeplt_scanline_r) - AM_RANGE(0xc200, 0xc200) AM_MIRROR(0x0cff) AM_READ_PORT("DSW1") + AM_RANGE(0xc000, 0xc000) AM_MIRROR(0x0cff) AM_READ(scanline_r) AM_WRITE(soundlatch_byte_w) + AM_RANGE(0xc200, 0xc200) AM_MIRROR(0x0cff) AM_READ_PORT("DSW1") AM_WRITE(watchdog_reset_w) AM_RANGE(0xc300, 0xc300) AM_MIRROR(0x0c9f) AM_READ_PORT("IN0") + AM_RANGE(0xc302, 0xc302) AM_MIRROR(0x0cf1) AM_WRITE(flipscreen_w) + AM_RANGE(0xc304, 0xc304) AM_MIRROR(0x0cf1) AM_DEVWRITE("timeplt_audio", timeplt_audio_device, sh_irqtrigger_w) + AM_RANGE(0xc30a, 0xc30c) AM_MIRROR(0x0cf1) AM_WRITE(coincounter_w) AM_RANGE(0xc320, 0xc320) AM_MIRROR(0x0c9f) AM_READ_PORT("IN1") AM_RANGE(0xc340, 0xc340) AM_MIRROR(0x0c9f) AM_READ_PORT("IN2") AM_RANGE(0xc360, 0xc360) AM_MIRROR(0x0c9f) AM_READ_PORT("DSW0") ADDRESS_MAP_END +static ADDRESS_MAP_START( timeplt_main_map, AS_PROGRAM, 8, timeplt_state ) + AM_IMPORT_FROM(common_main_map) + AM_RANGE(0xc300, 0xc300) AM_MIRROR(0x0cf1) AM_WRITE(nmi_enable_w) + AM_RANGE(0xc308, 0xc308) AM_MIRROR(0x0cf1) AM_WRITE(video_enable_w) +ADDRESS_MAP_END + static ADDRESS_MAP_START( psurge_main_map, AS_PROGRAM, 8, timeplt_state ) - ADDRESS_MAP_UNMAP_HIGH - AM_RANGE(0x0000, 0x5fff) AM_ROM + AM_IMPORT_FROM(common_main_map) AM_RANGE(0x6004, 0x6004) AM_READ(psurge_protection_r) - AM_RANGE(0xa000, 0xa3ff) AM_RAM_WRITE(timeplt_colorram_w) AM_SHARE("colorram") - AM_RANGE(0xa400, 0xa7ff) AM_RAM_WRITE(timeplt_videoram_w) AM_SHARE("videoram") - AM_RANGE(0xa800, 0xafff) AM_RAM - AM_RANGE(0xb000, 0xb0ff) AM_MIRROR(0x0b00) AM_RAM AM_SHARE("spriteram") - AM_RANGE(0xb400, 0xb4ff) AM_MIRROR(0x0b00) AM_RAM AM_SHARE("spriteram2") - AM_RANGE(0xc000, 0xc000) AM_MIRROR(0x0cff) AM_WRITE(soundlatch_byte_w) - AM_RANGE(0xc200, 0xc200) AM_MIRROR(0x0cff) AM_WRITE(watchdog_reset_w) - AM_RANGE(0xc302, 0xc302) AM_MIRROR(0x0cf1) AM_WRITE(timeplt_flipscreen_w) - AM_RANGE(0xc304, 0xc304) AM_MIRROR(0x0cf1) AM_DEVWRITE("timeplt_audio", timeplt_audio_device, sh_irqtrigger_w) - AM_RANGE(0xc30a, 0xc30c) AM_MIRROR(0x0cf1) AM_WRITE(timeplt_coin_counter_w) - AM_RANGE(0xc000, 0xc000) AM_MIRROR(0x0cff) AM_READ(timeplt_scanline_r) - AM_RANGE(0xc200, 0xc200) AM_MIRROR(0x0cff) AM_READ_PORT("DSW1") - AM_RANGE(0xc300, 0xc300) AM_MIRROR(0x0c9f) AM_READ_PORT("IN0") - AM_RANGE(0xc320, 0xc320) AM_MIRROR(0x0c9f) AM_READ_PORT("IN1") - AM_RANGE(0xc340, 0xc340) AM_MIRROR(0x0c9f) AM_READ_PORT("IN2") - AM_RANGE(0xc360, 0xc360) AM_MIRROR(0x0c9f) AM_READ_PORT("DSW0") ADDRESS_MAP_END static ADDRESS_MAP_START( chkun_main_map, AS_PROGRAM, 8, timeplt_state ) - ADDRESS_MAP_UNMAP_HIGH - AM_RANGE(0x0000, 0x5fff) AM_ROM + AM_IMPORT_FROM(timeplt_main_map) AM_RANGE(0x6000, 0x67ff) AM_RAM - AM_RANGE(0xa000, 0xa3ff) AM_RAM_WRITE(timeplt_colorram_w) AM_SHARE("colorram") - AM_RANGE(0xa400, 0xa7ff) AM_RAM_WRITE(timeplt_videoram_w) AM_SHARE("videoram") - AM_RANGE(0xa800, 0xafff) AM_RAM - AM_RANGE(0xb000, 0xb0ff) AM_MIRROR(0x0b00) AM_RAM AM_SHARE("spriteram") - AM_RANGE(0xb400, 0xb4ff) AM_MIRROR(0x0b00) AM_RAM AM_SHARE("spriteram2") - AM_RANGE(0xc000, 0xc000) AM_MIRROR(0x0cff) AM_WRITE(soundlatch_byte_w) - AM_RANGE(0xc200, 0xc200) AM_MIRROR(0x0cff) AM_WRITE(watchdog_reset_w) - AM_RANGE(0xc300, 0xc300) AM_MIRROR(0x0cf1) AM_WRITE(timeplt_nmi_enable_w) - AM_RANGE(0xc302, 0xc302) AM_MIRROR(0x0cf1) AM_WRITE(timeplt_flipscreen_w) - AM_RANGE(0xc304, 0xc304) AM_MIRROR(0x0cf1) AM_DEVWRITE("timeplt_audio", timeplt_audio_device, sh_irqtrigger_w) - AM_RANGE(0xc30a, 0xc30c) AM_MIRROR(0x0cf1) AM_WRITE(timeplt_coin_counter_w) - AM_RANGE(0xc000, 0xc000) AM_MIRROR(0x0cff) AM_READ(timeplt_scanline_r) - AM_RANGE(0xc200, 0xc200) AM_MIRROR(0x0cff) AM_READ_PORT("DSW1") - AM_RANGE(0xc300, 0xc300) AM_MIRROR(0x0c9f) AM_READ_PORT("IN0") - AM_RANGE(0xc320, 0xc320) AM_MIRROR(0x0c9f) AM_READ_PORT("IN1") - AM_RANGE(0xc340, 0xc340) AM_MIRROR(0x0c9f) AM_READ_PORT("IN2") - AM_RANGE(0xc360, 0xc360) AM_MIRROR(0x0c9f) AM_READ_PORT("DSW0") ADDRESS_MAP_END @@ -457,7 +426,7 @@ static MACHINE_CONFIG_START( timeplt, timeplt_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, MASTER_CLOCK/3/2) /* not confirmed, but common for Konami games of the era */ MCFG_CPU_PROGRAM_MAP(timeplt_main_map) - MCFG_CPU_VBLANK_INT_DRIVER("screen", timeplt_state, timeplt_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", timeplt_state, interrupt) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -465,7 +434,7 @@ static MACHINE_CONFIG_START( timeplt, timeplt_state ) MCFG_SCREEN_REFRESH_RATE(60) MCFG_SCREEN_SIZE(32*8, 32*8) MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1) - MCFG_SCREEN_UPDATE_DRIVER(timeplt_state, screen_update_timeplt) + MCFG_SCREEN_UPDATE_DRIVER(timeplt_state, screen_update) MCFG_SCREEN_PALETTE("palette") MCFG_GFXDECODE_ADD("gfxdecode", "palette", timeplt) @@ -483,6 +452,8 @@ static MACHINE_CONFIG_DERIVED( psurge, timeplt ) MCFG_CPU_MODIFY("maincpu") MCFG_CPU_PROGRAM_MAP(psurge_main_map) MCFG_CPU_VBLANK_INT_DRIVER("screen", timeplt_state, nmi_line_pulse) + + MCFG_VIDEO_START_OVERRIDE(timeplt_state,psurge) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( bikkuric, timeplt ) diff --git a/src/mame/drivers/topspeed.c b/src/mame/drivers/topspeed.c index 496ee6a2bb1..524dfd5b96c 100644 --- a/src/mame/drivers/topspeed.c +++ b/src/mame/drivers/topspeed.c @@ -188,7 +188,7 @@ READ8_MEMBER(topspeed_state::input_bypass_r) { // Read port number UINT8 port = m_tc0220ioc->port_r(space, 0); - UINT16 steer = 0xff80 + ioport("STEER")->read_safe(0); + UINT16 steer = 0xff80 + read_safe(ioport("STEER"), 0); switch (port) { @@ -207,7 +207,7 @@ CUSTOM_INPUT_MEMBER(topspeed_state::pedal_r) { static const UINT8 retval[8] = { 0,1,3,2,6,7,5,4 }; const char *tag = (const char *)param; - return retval[ioport(tag)->read_safe(0) & 7]; + return retval[read_safe(ioport(tag), 0) & 7]; } READ16_MEMBER(topspeed_state::motor_r) diff --git a/src/mame/drivers/triforce.c b/src/mame/drivers/triforce.c index 4000e53268e..ed68898359f 100644 --- a/src/mame/drivers/triforce.c +++ b/src/mame/drivers/triforce.c @@ -75,8 +75,7 @@ Games on this system include.... |*| 2004 | The Key Of Avalon 2: Eutaxy Commandment (client) (Rev B) | Sega / Hitmaker | GDROM | GDT-0017B | | | | | 2004 | F-Zero AX - Monster Ride Cycraft Edition | Sega / Amusement Vision / Nintendo | GDROM | | | | | | 2005 | Donkey Kong Jungle Fever | Namco / Nintendo | Cart | | | | -|*| 2005 | Mario Kart Arcade GP (MKA1 Ver.A1) | Namco / Nintendo | Cart | 837-14343-4T1 | 317-5109-COM | 253-5509-5109 | -|*| 2005 | Mario Kart Arcade GP (MKA2 Ver.B) | Namco / Nintendo | Cart | 837-14343-R4S0 | 317-5109-COM | 253-5509-5109 | +|*| 2005 | Mario Kart Arcade GP (Japan, MKA1 Ver.A1) | Namco / Nintendo | Cart | 837-14343-4T1 | 317-5109-COM | 253-5509-5109 | | | 2005 | The Key Of Avalon 2.5: War of the Key (server) | Sega / Hitmaker | GDROM | GDT-0019B | | | | | 2005 | The Key Of Avalon 2.5: War of the Key (client) | Sega / Hitmaker | GDROM | | | | | | 2006 | Virtua Striker 4 Ver.2006 (Japan) | Sega | GDROM | GDT-0020 | | | @@ -88,7 +87,8 @@ Games on this system include.... | | 2006 | Triforce Firmware Update for Compact Flash Box | Sega | GDROM | GDT-0022 | 317-0567-COM | | |*| 2006 | Triforce Firmware Update for Compact Flash Box (Rev A) | Sega | GDROM | GDT-0022A | 317-0567-COM | | | | 2006 | Donkey Kong : Banana Kingdom | Namco / Nintendo | Cart? | | | | -|*| 2007 | Mario Kart Arcade GP 2 (MK21 Ver.A) | Namco / Nintendo | Cart | | | | +|*| 2007 | Mario Kart Arcade GP 2 (Japan, MK21 Ver.A) | Namco / Nintendo | Cart | 837-14343-R4S0 | 317-5128-??? | 253-5509-5128 | +|*| 2007 | Mario Kart Arcade GP 2 (Japan, MK21 Ver.A, alt dump) | Namco / Nintendo | Cart | 837-14343-R4S0 | 317-5128-??? | 253-5509-5128 | +-+------+-----------------------------------------------------------------+-------------------------------------+-------|----------------+--------------+---------------| * denotes these games are archived. @@ -1087,6 +1087,6 @@ ROM_END /* 0022A */ GAME( 2006, tcfboxa, triforce, triforcegd, triforce, driver_device, 0, ROT0, "Sega", "Triforce Firmware Update For Compact Flash Box (Rev A) (GDT-0022A)", MACHINE_IS_SKELETON ) // 837-xxxxx (Sega cart games) -/* 14343-4T1 */ GAME( 2005, mkartagp, triforce, triforce_base, triforce, driver_device, 0, ROT0, "Namco / Nintendo", "Mario Kart Arcade GP (MKA2 Ver.B)", MACHINE_IS_SKELETON ) -/* 14343-R4S0 */ GAME( 2007, mkartag2, triforce, triforce_base, triforce, driver_device, 0, ROT0, "Namco / Nintendo", "Mario Kart Arcade GP 2 (MK21 Ver.A)", MACHINE_IS_SKELETON ) -/* 14343-R4S0 */ GAME( 2007, mkartag2a,mkartag2, triforce_base, triforce, driver_device, 0, ROT0, "Namco / Nintendo", "Mario Kart Arcade GP 2 (MK21 Ver.A, alt dump)", MACHINE_IS_SKELETON ) +/* 14343-4T1 */ GAME( 2005, mkartagp, triforce, triforce_base, triforce, driver_device, 0, ROT0, "Namco / Nintendo", "Mario Kart Arcade GP (Japan, MKA1 Ver.A1)", MACHINE_IS_SKELETON ) +/* 14343-R4S0 */ GAME( 2007, mkartag2, triforce, triforce_base, triforce, driver_device, 0, ROT0, "Namco / Nintendo", "Mario Kart Arcade GP 2 (Japan, MK21 Ver.A)", MACHINE_IS_SKELETON ) +/* 14343-R4S0 */ GAME( 2007, mkartag2a,mkartag2, triforce_base, triforce, driver_device, 0, ROT0, "Namco / Nintendo", "Mario Kart Arcade GP 2 (Japan, MK21 Ver.A, alt dump)", MACHINE_IS_SKELETON ) diff --git a/src/mame/drivers/unichamp.c b/src/mame/drivers/unichamp.c new file mode 100644 index 00000000000..4507bcc4677 --- /dev/null +++ b/src/mame/drivers/unichamp.c @@ -0,0 +1,277 @@ +// license:BSD-3-Clause +// copyright-holders:David Viens +/************************************************************************ + * Unisonic Champion 2711 (late 1977 based on part dates) + * + * Driver from plgDavid (David Viens) + * + * Thanks to Sylvain De Chantal (Sly D.C.) for the 2 test units, + * carts and FAQ: http://www.ccjvq.com/slydc/index/faq/2711 + * + * Thanks to Paul Robson for the GIC font rom. + * (http://worstconsole.blogspot.ca/2012/12/the-worstconsoleever.html) + * Note a spare dead GIC has been given to Lord Nightmare and should be sent for decap! + * + * The Unisonc Champion is the only known GI "Gimini Mid-Range 8950 Programmable Game Set" + * to ever reach the market, and only in limited quantities (aprox 500 units ever built) + * + * Architecture: + * Master IC : AY-3-8800-1 Graphics Interface (A.K.A. GIC, 40 pin) + * Slave IC : CP1610 CPU (40 pin, same as in the Intellivision) + * EXEC ROM : 9501-01009 (40 pin) at 0x0800 (factory mapped) + * + * The GIC generates the CPU Clock, the video signals and the audio. + * The CPU does NOT access the GIC directly. + * One way CPU->GIC 'communication' takes place through 256 bytes of shared RAM + * (using two 4x256 TMS4043NL-2 (2112-1) Static Rams at U3 and U4) + * + * In this design the GIC only allows the CPU to use the BUS (and shared RAM) + * a fraction of the frame time. (4.33ms for each 16.69ms, or 26% of the time) + * (the real ratio of clocks is 7752/29868 ) + * + * Boot: When the GIC let go of !RESET_OUT the EXEC Rom pushes 0x800 onto + * the bus for the CPU to fetch and place in R7 to start execution. + * This first CPU slice only last 3ms, then the GIC sets the CPU's BUSRQ low, + * stalling it for 12.36ms, then sets it high for 4.33ms etc... + * 59.95 times a second - NTSC + ************************************************************************/ + +#include "emu.h" +#include "cpu/cp1610/cp1610.h" +#include "video/gic.h" + +#include "bus/generic/slot.h" +#include "bus/generic/carts.h" + +class unichamp_state : public driver_device +{ +public: + unichamp_state(const machine_config &mconfig, device_type type, const char *tag) + : driver_device(mconfig, type, tag), + m_maincpu(*this, "maincpu"), + m_gic(*this, "gic"), + m_cart(*this, "cartslot"), + m_ctrls(*this, "CTRLS"){} + + required_device<cpu_device> m_maincpu; + required_device<gic_device> m_gic; + required_device<generic_slot_device> m_cart; + + UINT8 m_ram[256]; + DECLARE_DRIVER_INIT(unichamp); + virtual void machine_start(); + virtual void machine_reset(); + DECLARE_PALETTE_INIT(unichamp); + + DECLARE_READ8_MEMBER(bext_r); + + DECLARE_READ16_MEMBER(unichamp_gicram_r); + DECLARE_WRITE16_MEMBER(unichamp_gicram_w); + + DECLARE_READ16_MEMBER(unichamp_trapl_r); + DECLARE_WRITE16_MEMBER(unichamp_trapl_w); + + UINT32 screen_update_unichamp(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + +protected: + required_ioport m_ctrls; + virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); +}; + +PALETTE_INIT_MEMBER(unichamp_state, unichamp) +{ + /* + palette.set_pen_color(GIC_BLACK, rgb_t(0x00, 0x00, 0x00)); + palette.set_pen_color(GIC_RED, rgb_t(0xAE, 0x49, 0x41));//(from box shot) + palette.set_pen_color(GIC_GREEN, rgb_t(0x62, 0x95, 0x88));//(from box shot) + palette.set_pen_color(GIC_WHITE, rgb_t(0xFF, 0xFF, 0xFF)); + */ + + //using from intv.c instead as suggested by RB + palette.set_pen_color(GIC_BLACK, rgb_t(0x00, 0x00, 0x00)); + palette.set_pen_color(GIC_RED, rgb_t(0xFF, 0x3D, 0x10)); + //palette.set_pen_color(GIC_GREEN, rgb_t(0x38, 0x6B, 0x3F)); //intv's DARK GREEN + palette.set_pen_color(GIC_GREEN, rgb_t(0x00, 0xA7, 0x56)); //intv's GREEN + palette.set_pen_color(GIC_WHITE, rgb_t(0xFF, 0xFC, 0xFF)); +} + + +static ADDRESS_MAP_START( unichamp_mem, AS_PROGRAM, 16, unichamp_state ) + ADDRESS_MAP_GLOBAL_MASK(0x1FFF) //B13/B14/B15 are grounded! + AM_RANGE(0x0000, 0x00FF) AM_READWRITE(unichamp_gicram_r, unichamp_gicram_w) + AM_RANGE(0x0100, 0x07FF) AM_READWRITE(unichamp_trapl_r, unichamp_trapl_w) + AM_RANGE(0x0800, 0x17FF) AM_ROM AM_REGION("maincpu", 0x0800 << 1) // Carts and EXE ROM, 10-bits wide +ADDRESS_MAP_END + + +static INPUT_PORTS_START( unichamp ) + PORT_START( "CTRLS" ) + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Y) PORT_CHAR('Y')// P1 YES (EBCA0) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_N) PORT_CHAR('N')// P1 NO (EBCA1) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_A) PORT_CHAR('A')// P2 YES (EBCA2) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_S) PORT_CHAR('S')// P2 NO (EBCA3) + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_UNUSED + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_UNUSED + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_UNUSED + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_UNUSED +INPUT_PORTS_END + + +void unichamp_state::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) +{ + //TODO should we add an explicit Reset button in there just like the controller? +} + + +READ8_MEMBER(unichamp_state::bext_r) +{ + //The BEXT instruction pushes a user-defined nibble out on the four EBCA pins (EBCA0 to EBCA3) + //and reads the ECBI input pin for HIGH or LOW signal to know whether or not to branch + + //The unisonic control system couldnt be simpler in desing. + //Each of the two player controllers has three buttons: + //one tying !RESET(GIC pin 21) to ground when closed - resetting the WHOLE system. + //a YES button (connecting EBCA0 to EBCI for Player1 and EBC2 to EBCI for Player2) + //a NO button (connecting EBCA1 to EBCI for Player1 and EBC3 to EBCI for Player2) + + //The CPU outputs a MASK of whatever it needs and checks the result. + //EG: Any player can choose if one or two players are going to play the game for instance + + UINT8 port = ioport("CTRLS")->read() & 0x0F; ////only lower nibble + + //We need to return logical high or low on the EBCI pin + return (port & offset)>0?1:0; +} + + +DRIVER_INIT_MEMBER(unichamp_state,unichamp) +{ + m_gic->set_shared_memory(m_ram); +} + +void unichamp_state::machine_start() +{ + m_gic->set_shared_memory(m_ram); + + if (m_cart->exists()){ + //flip endians in more "this surely exists in MAME" way? + //NOTE The unichamp roms have the same endianness as intv on disk and in memory + UINT8*ptr = m_cart->get_rom_base(); + size_t size = m_cart->get_rom_size(); + for(size_t i=0;i<size;i+=2){ + UINT8 TEMP = ptr[i]; + ptr[i] = ptr[i+1]; + ptr[i+1] = TEMP; + } + + m_maincpu->space(AS_PROGRAM).install_read_handler(0x1000, 0x1800, + read16_delegate(FUNC(generic_slot_device::read16_rom),(generic_slot_device*)m_cart)); + } +} + +/* Set Reset and INTR/INTRM Vector */ +void unichamp_state::machine_reset() +{ + /* + the intv driver did not explain this but from the CP1600 manual: + When MSYNC* goes inactive (high), the bus control signals issue lAB, + and the CPU inputs from the bus into the PC the starting address of the main program. + Note that the initialization address can be defined by the user at any desired bus address or + can be the default address resulting from the logical state of the non-driven bus + */ + + //The Unisonic EXEC ROM chip (9501-01009) is self mapped at 0x0800 + //The cart ROMS are self mapped to 0x1000 + //upon boot the EXEC ROM puts 0x0800 on the bus for the CPU to use as first INT vector + + m_maincpu->set_input_line_vector(CP1610_RESET, 0x0800); + m_maincpu->set_input_line_vector(CP1610_INT_INTRM, 0x0804);//not used anyway + m_maincpu->set_input_line_vector(CP1610_INT_INTR, 0x0804);//not used anyway + + /* Set initial PC */ + m_maincpu->set_state_int(CP1610_R7, 0x0800); +} + + +UINT32 unichamp_state::screen_update_unichamp(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) +{ + return m_gic->screen_update(screen, bitmap, cliprect); +} + +READ16_MEMBER( unichamp_state::unichamp_gicram_r ) +{ + return (int)m_ram[offset]; +} + +WRITE16_MEMBER( unichamp_state::unichamp_gicram_w ) +{ + m_ram[offset] = data&0xff; +} + +READ16_MEMBER( unichamp_state::unichamp_trapl_r ) +{ + logerror("trapl_r(%x)\n",offset); + return (int)0; +} + +WRITE16_MEMBER( unichamp_state::unichamp_trapl_w ) +{ + logerror("trapl_w(%x) = %x\n",offset,data); +} + +static MACHINE_CONFIG_START( unichamp, unichamp_state ) + /* basic machine hardware */ + + //The CPU is really clocked this way: + //MCFG_CPU_ADD("maincpu", CP1610, XTAL_3_579545MHz/4) + //But since it is only running 7752/29868 th's of the time... + //TODO find a more accurate method? (the emulation will me the same though) + MCFG_CPU_ADD("maincpu", CP1610, (int)((7752.0/29868.0)*XTAL_3_579545MHz/4)) + + MCFG_CPU_PROGRAM_MAP(unichamp_mem) + MCFG_QUANTUM_TIME(attotime::from_hz(60)) + MCFG_CP1610_BEXT_CALLBACK(READ8(unichamp_state, bext_r)) + + /* video hardware */ + MCFG_SCREEN_ADD("screen", RASTER) + MCFG_SCREEN_RAW_PARAMS( XTAL_3_579545MHz, + gic_device::LINE_CLOCKS, + gic_device::START_ACTIVE_SCAN, + gic_device::END_ACTIVE_SCAN, + gic_device::LINES, + gic_device::START_Y, + gic_device::START_Y + gic_device::SCREEN_HEIGHT ) + + MCFG_SCREEN_UPDATE_DRIVER(unichamp_state, screen_update_unichamp) + MCFG_SCREEN_PALETTE("palette") + + MCFG_PALETTE_ADD("palette", 4) + MCFG_PALETTE_INIT_OWNER(unichamp_state, unichamp) + + /* sound hardware */ + MCFG_SPEAKER_STANDARD_MONO("mono") + MCFG_GIC_ADD( "gic", XTAL_3_579545MHz, "screen" ) + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.40) + + /* cartridge */ + MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_linear_slot, "unichamp_cart") + MCFG_GENERIC_EXTENSIONS("bin,rom") + MCFG_SOFTWARE_LIST_ADD("cart_list", "unichamp") + +MACHINE_CONFIG_END + + +ROM_START(unichamp) + ROM_REGION(0x10000<<1,"maincpu", ROMREGION_ERASEFF) + + ROM_LOAD16_WORD( "9501-01009.u2", 0x0800<<1, 0x1000, CRC(49a0bd8f) SHA1(f4d126d3462ad351da4b75d76c75942d5a6f27ef)) + + //these below are for local tests. you can use them in softlist or -cart + //ROM_LOAD16_WORD( "pac-02.bin", 0x1000<<1, 0x1000, CRC(fe3213be) SHA1(5b9c407fe86865f3454d4be824a7f2bf53478f73)) + //ROM_LOAD16_WORD( "pac-03.bin", 0x1000<<1, 0x1000, CRC(f81f04bd) SHA1(82e2a0fda1787d5835c457ee5745b0db0cebe079)) + //ROM_LOAD16_WORD( "pac-04.bin", 0x1000<<1, 0x1000, CRC(cac09841) SHA1(bc9db83f26ed0810938156db6b104b4576754225)) + //ROM_LOAD16_WORD( "pac-05.bin", 0x1000<<1, 0x1000, CRC(d54a6090) SHA1(e85593096f43dcf14b08fd2c9fda277008a8df8b)) +ROM_END + + +CONS( 1977, unichamp, 0, 0, unichamp, unichamp, unichamp_state, unichamp, "Unisonic", "Champion 2711", 0/*MACHINE_IMPERFECT_GRAPHICS*/) diff --git a/src/mame/drivers/uzebox.c b/src/mame/drivers/uzebox.c index 383e674be50..b18ad6fb8a6 100644 --- a/src/mame/drivers/uzebox.c +++ b/src/mame/drivers/uzebox.c @@ -172,7 +172,7 @@ WRITE8_MEMBER(uzebox_state::port_d_w) // ---- --xx UART MIDI if ((m_port_d ^ data) & 0x80) { - m_speaker->level_w(data & 0x80); + m_speaker->level_w((data & 0x80) ? 1 : 0); } m_port_d = data; } diff --git a/src/mame/drivers/vicdual.c b/src/mame/drivers/vicdual.c index f327a895cb2..7c11760bf3d 100644 --- a/src/mame/drivers/vicdual.c +++ b/src/mame/drivers/vicdual.c @@ -207,14 +207,16 @@ int vicdual_state::is_cabinet_color() WRITE8_MEMBER(vicdual_state::videoram_w) { - m_screen->update_now(); +// m_screen->update_now(); + m_screen->update_partial(m_screen->vpos()); m_videoram[offset] = data; } WRITE8_MEMBER(vicdual_state::characterram_w) { - m_screen->update_now(); +// m_screen->update_now(); + m_screen->update_partial(m_screen->vpos()); m_characterram[offset] = data; } @@ -3605,7 +3607,7 @@ ROM_END GAMEL(1977, depthch, 0, depthch, depthch, driver_device, 0, ROT0, "Gremlin", "Depthcharge", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE, layout_depthch ) GAMEL(1977, depthcho, depthch, depthch, depthch, driver_device, 0, ROT0, "Gremlin", "Depthcharge (older)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE, layout_depthch ) -GAMEL(1977, subhunt, depthch, depthch, depthch, driver_device, 0, ROT0, "Gremlin (Taito license)", "Sub Hunter", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE, layout_depthch ) +GAMEL(1977, subhunt, depthch, depthch, depthch, driver_device, 0, ROT0, "Gremlin (Taito license)", "Sub Hunter (Gremlin / Taito)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE, layout_depthch ) GAME( 1977, safari, 0, safari, safari, driver_device, 0, ROT0, "Gremlin", "Safari (set 1)", MACHINE_NO_SOUND | MACHINE_SUPPORTS_SAVE ) GAME( 1977, safaria, safari, safari, safari, driver_device, 0, ROT0, "Gremlin", "Safari (set 2, bootleg?)", MACHINE_NO_SOUND | MACHINE_SUPPORTS_SAVE ) // on a bootleg board, but seems a different code revision too GAME( 1978, frogs, 0, frogs, frogs, driver_device, 0, ROT0, "Gremlin", "Frogs", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/vixen.c b/src/mame/drivers/vixen.c index c4db7010fd4..1136ceb45c9 100644 --- a/src/mame/drivers/vixen.c +++ b/src/mame/drivers/vixen.c @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Curt Coder +// copyright-holders:Curt Coder, Robbbert /* Osborne 4 Vixen @@ -47,9 +47,6 @@ Notes: TODO: - - video line buffer - - floppy - - keyboard - RS232 RI interrupt - PCB layouts @@ -76,17 +73,17 @@ void vixen_state::update_interrupt() } -//------------------------------------------------- -// ctl_w - command write -//------------------------------------------------- - -WRITE8_MEMBER( vixen_state::ctl_w ) +READ8_MEMBER( vixen_state::opram_r ) { - logerror("CTL %u\n", data); - - membank("bank3")->set_entry(BIT(data, 0)); + membank("bank3")->set_entry(0); // read videoram + return m_program->read_byte(offset); } +READ8_MEMBER( vixen_state::oprom_r ) +{ + membank("bank3")->set_entry(1); // read rom + return m_rom[offset]; +} //------------------------------------------------- // status_r - status read @@ -256,12 +253,20 @@ READ8_MEMBER( vixen_state::port3_r ) // ADDRESS_MAP( vixen_mem ) //------------------------------------------------- +// when M1 is inactive: read and write of data static ADDRESS_MAP_START( vixen_mem, AS_PROGRAM, 8, vixen_state ) ADDRESS_MAP_UNMAP_HIGH - AM_RANGE(0x0000, 0xefff) AM_READ_BANK("bank1") AM_WRITE_BANK("bank2") + AM_RANGE(0x0000, 0xefff) AM_RAM AM_RANGE(0xf000, 0xffff) AM_READ_BANK("bank3") AM_WRITE_BANK("bank4") AM_SHARE("video_ram") ADDRESS_MAP_END +// when M1 is active: read opcodes +static ADDRESS_MAP_START( bios_mem, AS_DECRYPTED_OPCODES, 8, vixen_state ) + ADDRESS_MAP_UNMAP_HIGH + AM_RANGE(0x0000, 0xefff) AM_READ(opram_r) + AM_RANGE(0xf000, 0xffff) AM_READ(oprom_r) +ADDRESS_MAP_END + //------------------------------------------------- // ADDRESS_MAP( vixen_io ) @@ -296,84 +301,84 @@ ADDRESS_MAP_END INPUT_PORTS_START( vixen ) PORT_START("KEY.0") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("ESC") PORT_CODE(KEYCODE_ESC) PORT_CHAR(0x1B) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_TAB) PORT_CHAR(0x09) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("CTRL") PORT_CODE(KEYCODE_LCONTROL) PORT_CODE(KEYCODE_RCONTROL) PORT_CHAR(UCHAR_SHIFT_2) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("LOCK") PORT_CODE(KEYCODE_CAPSLOCK) PORT_TOGGLE + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("SHIFT") PORT_CODE(KEYCODE_LSHIFT) PORT_CODE(KEYCODE_RSHIFT) PORT_CHAR(UCHAR_SHIFT_1) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_ENTER) PORT_CHAR(0x0D) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_QUOTE) PORT_CHAR(0x27) PORT_CHAR(0x22) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_OPENBRACE) PORT_CHAR('[') PORT_CHAR(']') PORT_START("KEY.1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_1) PORT_CHAR('1') PORT_CHAR('!') + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_2) PORT_CHAR('2') PORT_CHAR('@') + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_3) PORT_CHAR('3') PORT_CHAR('#') + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_4) PORT_CHAR('4') PORT_CHAR('$') + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_5) PORT_CHAR('5') PORT_CHAR('%') + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_6) PORT_CHAR('6') PORT_CHAR('^') + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_7) PORT_CHAR('7') PORT_CHAR('&') + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_8) PORT_CHAR('8') PORT_CHAR('*') PORT_START("KEY.2") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Q") PORT_CODE(KEYCODE_Q) PORT_CHAR('Q') PORT_CHAR('q') PORT_CHAR(0x11) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("W") PORT_CODE(KEYCODE_W) PORT_CHAR('W') PORT_CHAR('w') PORT_CHAR(0x17) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("E") PORT_CODE(KEYCODE_E) PORT_CHAR('E') PORT_CHAR('e') PORT_CHAR(0x05) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("R") PORT_CODE(KEYCODE_R) PORT_CHAR('R') PORT_CHAR('r') PORT_CHAR(0x12) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("T") PORT_CODE(KEYCODE_T) PORT_CHAR('T') PORT_CHAR('t') PORT_CHAR(0x14) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Y") PORT_CODE(KEYCODE_Y) PORT_CHAR('Y') PORT_CHAR('y') PORT_CHAR(0x19) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("U") PORT_CODE(KEYCODE_U) PORT_CHAR('U') PORT_CHAR('u') PORT_CHAR(0x15) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("I") PORT_CODE(KEYCODE_I) PORT_CHAR('I') PORT_CHAR('i') PORT_CHAR(0x09) PORT_START("KEY.3") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("A") PORT_CODE(KEYCODE_A) PORT_CHAR('A') PORT_CHAR('a') PORT_CHAR(0x01) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("S") PORT_CODE(KEYCODE_S) PORT_CHAR('S') PORT_CHAR('s') PORT_CHAR(0x13) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("D") PORT_CODE(KEYCODE_D) PORT_CHAR('D') PORT_CHAR('d') PORT_CHAR(0x04) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("F") PORT_CODE(KEYCODE_F) PORT_CHAR('F') PORT_CHAR('f') PORT_CHAR(0x06) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("G") PORT_CODE(KEYCODE_G) PORT_CHAR('G') PORT_CHAR('g') PORT_CHAR(0x07) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("H") PORT_CODE(KEYCODE_H) PORT_CHAR('H') PORT_CHAR('h') PORT_CHAR(0x08) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("J") PORT_CODE(KEYCODE_J) PORT_CHAR('J') PORT_CHAR('j') PORT_CHAR(0x0a) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("K") PORT_CODE(KEYCODE_K) PORT_CHAR('K') PORT_CHAR('k') PORT_CHAR(0x0b) PORT_START("KEY.4") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Z") PORT_CODE(KEYCODE_Z) PORT_CHAR('Z') PORT_CHAR('z') PORT_CHAR(0x1a) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("X") PORT_CODE(KEYCODE_X) PORT_CHAR('X') PORT_CHAR('x') PORT_CHAR(0x18) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("C") PORT_CODE(KEYCODE_C) PORT_CHAR('C') PORT_CHAR('c') PORT_CHAR(0x03) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("V") PORT_CODE(KEYCODE_V) PORT_CHAR('V') PORT_CHAR('v') PORT_CHAR(0x16) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("B") PORT_CODE(KEYCODE_B) PORT_CHAR('B') PORT_CHAR('b') PORT_CHAR(0x02) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("N") PORT_CODE(KEYCODE_N) PORT_CHAR('N') PORT_CHAR('n') PORT_CHAR(0x0e) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("M") PORT_CODE(KEYCODE_M) PORT_CHAR('M') PORT_CHAR('m') PORT_CHAR(0x0d) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CHAR('<') PORT_START("KEY.5") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("UP") PORT_CODE(KEYCODE_UP) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_LEFT) PORT_CODE(KEYCODE_BACKSPACE) PORT_CHAR(8) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_0) PORT_CHAR('0') PORT_CHAR(')') + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ') + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') PORT_CHAR('>') + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("P") PORT_CODE(KEYCODE_P) PORT_CHAR('P') PORT_CHAR('p') PORT_CHAR(0x10) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("O") PORT_CODE(KEYCODE_O) PORT_CHAR('O') PORT_CHAR('o') PORT_CHAR(0x0f) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_9) PORT_CHAR('9') PORT_CHAR('(') PORT_START("KEY.6") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("RIGHT") PORT_CODE(KEYCODE_RIGHT) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("DOWN") PORT_CODE(KEYCODE_DOWN) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("- _") PORT_CODE(KEYCODE_MINUS) PORT_CHAR('-') PORT_CHAR('_') PORT_CHAR(0x1F) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_SLASH) PORT_CHAR('/') PORT_CHAR('?') PORT_CHAR(0x7E) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_COLON) PORT_CHAR(';') PORT_CHAR(':') + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("\\ |") PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR('\\') PORT_CHAR('|') PORT_CHAR(0x1C) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_L) PORT_CHAR('L') PORT_CHAR('l') + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_EQUALS) PORT_CHAR('=') PORT_CHAR('+') PORT_CHAR(0x60) PORT_START("KEY.7") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("DEL") PORT_CODE(KEYCODE_DEL) PORT_CHAR(127) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR('{') PORT_CHAR('}') + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("FUNC") PORT_CODE(KEYCODE_END) INPUT_PORTS_END @@ -412,16 +417,17 @@ void vixen_state::video_start() UINT32 vixen_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) { const pen_t *pen = m_palette->pens(); + UINT8 x, y, chr, gfx, inv, ra; - for (int txadr = 0; txadr < 26; txadr++) + for (y = 0; y < 26; y++) { - for (int scan = 0; scan < 10; scan++) + for (ra = 0; ra < 10; ra++) { - for (int chadr = 0; chadr < 128; chadr++) + for (x = 0; x < 128; x++) { - UINT16 sync_addr = (txadr << 7) | chadr; - UINT8 sync_data = m_sync_rom[sync_addr]; - int blank = BIT(sync_data, 4); + UINT16 sync_addr = ((y+1) << 7) + x + 1; // it's out by a row and a column + UINT8 sync_data = m_sync_rom[sync_addr & 0xfff]; + bool blank = BIT(sync_data, 4); /* int clrchadr = BIT(sync_data, 7); int hsync = BIT(sync_data, 6); @@ -433,30 +439,26 @@ UINT32 vixen_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, c sync_addr,sync_data,txadr,scan,chadr,comp_sync,vsync,blank,clrtxadr,hsync,clrchadr); */ - int reverse = 0; - - UINT16 video_addr = (txadr << 7) | chadr; - UINT8 video_data = m_video_ram[video_addr]; - UINT16 char_addr = 0; + chr = m_video_ram[(y<<7) + x]; if (m_256) { - char_addr = (BIT(video_data, 7) << 11) | (scan << 7) | (video_data & 0x7f); - reverse = m_alt; + gfx = m_char_rom[(BIT(chr, 7) << 11) | (ra << 7) | (chr & 0x7f)]; + inv = m_alt ? 0xff : 0; } else { - char_addr = (scan << 7) | (video_data & 0x7f); - reverse = BIT(video_data, 7); + gfx = m_char_rom[(ra << 7) | (chr & 0x7f)]; + inv = BIT(chr, 7) ? 0xff : 0; } - UINT8 char_data = m_char_rom[char_addr]; + gfx = (blank) ? 0 : (gfx ^ inv); - for (int x = 0; x < 8; x++) + for (int b = 0; b < 8; b++) { - int color = (BIT(char_data, 7 - x) ^ reverse) & !blank; + int color = BIT(gfx, 7 - b); - bitmap.pix32((txadr * 10) + scan, (chadr * 8) + x) = pen[color]; + bitmap.pix32((y * 10) + ra, (x * 8) + b) = pen[color]; } } } @@ -517,7 +519,7 @@ WRITE8_MEMBER( vixen_state::i8155_pc_w ) 2 DDEN/ 3 ALT CHARSET/ 4 256 CHARS - 5 BEEP ENB + 5 BEEP ENABLE 6 7 @@ -537,11 +539,11 @@ WRITE8_MEMBER( vixen_state::i8155_pc_w ) m_fdc->dden_w(BIT(data, 2)); // charset - m_alt = BIT(data, 3); - m_256 = BIT(data, 4); + m_alt = !BIT(data, 3); + m_256 = !BIT(data, 4); // beep enable - m_discrete->write(space, NODE_01, BIT(data, 5)); + m_discrete->write(space, NODE_01, !BIT(data, 5)); } //------------------------------------------------- @@ -690,13 +692,6 @@ IRQ_CALLBACK_MEMBER(vixen_state::vixen_int_ack) void vixen_state::machine_start() { // configure memory banking - UINT8 *ram = m_ram->pointer(); - - membank("bank1")->configure_entry(0, ram); - membank("bank1")->configure_entry(1, m_rom); - - membank("bank2")->configure_entry(0, ram); - membank("bank2")->configure_entry(1, m_video_ram); membank("bank3")->configure_entry(0, m_video_ram); membank("bank3")->configure_entry(1, m_rom); @@ -704,7 +699,6 @@ void vixen_state::machine_start() membank("bank4")->configure_entry(0, m_video_ram); // register for state saving - save_item(NAME(m_reset)); save_item(NAME(m_col)); save_item(NAME(m_cmd_d0)); save_item(NAME(m_cmd_d1)); @@ -714,17 +708,8 @@ void vixen_state::machine_start() void vixen_state::machine_reset() { - address_space &program = m_maincpu->space(AS_PROGRAM); - - program.install_read_bank(0x0000, 0xefff, 0xfff, 0, "bank1"); - program.install_write_bank(0x0000, 0xefff, 0xfff, 0, "bank2"); - - membank("bank1")->set_entry(1); - membank("bank2")->set_entry(1); membank("bank3")->set_entry(1); - m_reset = 1; - m_vsync = 0; m_cmd_d0 = 0; m_cmd_d1 = 0; @@ -733,6 +718,7 @@ void vixen_state::machine_reset() m_fdc->reset(); m_io_i8155->reset(); m_usart->reset(); + m_maincpu->set_state_int(Z80_PC, 0xf000); } @@ -749,6 +735,7 @@ static MACHINE_CONFIG_START( vixen, vixen_state ) // basic machine hardware MCFG_CPU_ADD(Z8400A_TAG, Z80, XTAL_23_9616MHz/6) MCFG_CPU_PROGRAM_MAP(vixen_mem) + MCFG_CPU_DECRYPTED_OPCODES_MAP(bios_mem) MCFG_CPU_IO_MAP(vixen_io) MCFG_CPU_IRQ_ACKNOWLEDGE_DRIVER(vixen_state,vixen_int_ack) @@ -793,7 +780,9 @@ static MACHINE_CONFIG_START( vixen, vixen_state ) MCFG_FD1797_ADD(FDC1797_TAG, XTAL_23_9616MHz/24) MCFG_WD_FDC_INTRQ_CALLBACK(WRITELINE(vixen_state, fdc_intrq_w)) MCFG_FLOPPY_DRIVE_ADD(FDC1797_TAG":0", vixen_floppies, "525dd", floppy_image_device::default_floppy_formats) + MCFG_FLOPPY_DRIVE_SOUND(true) MCFG_FLOPPY_DRIVE_ADD(FDC1797_TAG":1", vixen_floppies, "525dd", floppy_image_device::default_floppy_formats) + MCFG_FLOPPY_DRIVE_SOUND(true) MCFG_IEEE488_BUS_ADD() MCFG_IEEE488_SRQ_CALLBACK(WRITELINE(vixen_state, srq_w)) MCFG_IEEE488_ATN_CALLBACK(WRITELINE(vixen_state, atn_w)) @@ -837,34 +826,10 @@ ROM_END // DRIVER_INIT( vixen ) //------------------------------------------------- -DIRECT_UPDATE_MEMBER(vixen_state::vixen_direct_update_handler) -{ - if (address >= 0xf000) - { - if (m_reset) - { - address_space &program = m_maincpu->space(AS_PROGRAM); - - program.install_read_bank(0x0000, 0xefff, "bank1"); - program.install_write_bank(0x0000, 0xefff, "bank2"); - - membank("bank1")->set_entry(0); - membank("bank2")->set_entry(0); - - m_reset = 0; - } - - direct.explicit_configure(0xf000, 0xffff, 0xfff, m_rom); - - return ~0; - } - - return address; -} DRIVER_INIT_MEMBER(vixen_state,vixen) { - m_maincpu->space(AS_PROGRAM).set_direct_update_handler(direct_update_delegate(FUNC(vixen_state::vixen_direct_update_handler), this)); + m_program = &m_maincpu->space(AS_PROGRAM); } @@ -873,5 +838,5 @@ DRIVER_INIT_MEMBER(vixen_state,vixen) // SYSTEM DRIVERS //************************************************************************** -// YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS -COMP( 1984, vixen, 0, 0, vixen, vixen, vixen_state, vixen, "Osborne", "Vixen", MACHINE_NOT_WORKING ) +// YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS +COMP( 1984, vixen, 0, 0, vixen, vixen, vixen_state, vixen, "Osborne", "Vixen", 0 ) diff --git a/src/mame/drivers/vpoker.c b/src/mame/drivers/vpoker.c index 2f7d6b5f7f0..5190ddabbfb 100644 --- a/src/mame/drivers/vpoker.c +++ b/src/mame/drivers/vpoker.c @@ -8,6 +8,22 @@ Notes: - Looks like the 2nd generation of Noraut Poker / Draw Poker Hi-Lo HW. + - I found two companies that sold the same game with different name... + + 1) "Challenger Draw Poker", from Bend Electronics Co. Inc. + 2) "VHI Draw Poker", from Video Horizons, Inc. + + Both companies shared the same address and phone number: + 63353 Nels Anderson Road. Bend, Oregon 97701. + Tel: 503-389-7626. + + Bend Electronics Co. Inc. claims that they are worldwide distributors for Videotronics, Inc. + + There are some legal issues between all these companies... + https://scholar.google.com/scholar_case?case=7993095852400122011 + http://www.plainsite.org/dockets/201rtodjb/nevada-district-court/videotronics-inc-v-bend-electronics/ + + TODO: - Understand how the 6840PTM hooks up, needed to let it work properly; - I/Os; @@ -52,7 +68,6 @@ MC6840P mm74c920J/mmc6551j-9 x2 - ************************************************************************************************************** - Added 5-Aces Poker (Roberto Fresca) @@ -686,6 +701,6 @@ ROM_START( 5acespkr ) ROM_END -/* YEAR NAME PARENT MACHINE INPUT STATE INIT ROT COMPANY FULLNAME FLAGS... */ -GAME( 198?, vpoker, 0, vpoker, vpoker, driver_device, 0, ROT0, "Videotronics", "Videotronics Poker", MACHINE_NOT_WORKING | MACHINE_NO_SOUND ) -GAME( 198?, 5acespkr, 0, vpoker, 5acespkr, driver_device, 0, ROT0, "<unknown>", "5-Aces Poker", MACHINE_NOT_WORKING | MACHINE_NO_SOUND ) +/* YEAR NAME PARENT MACHINE INPUT STATE INIT ROT COMPANY FULLNAME FLAGS... */ +GAME( 198?, vpoker, 0, vpoker, vpoker, driver_device, 0, ROT0, "Videotronics, Inc.", "Videotronics Draw Poker", MACHINE_NOT_WORKING | MACHINE_NO_SOUND ) +GAME( 198?, 5acespkr, 0, vpoker, 5acespkr, driver_device, 0, ROT0, "<unknown>", "5-Aces Poker", MACHINE_NOT_WORKING | MACHINE_NO_SOUND ) diff --git a/src/mame/drivers/wacky_gator.c b/src/mame/drivers/wacky_gator.c index da8376248e4..aa2d51203e9 100644 --- a/src/mame/drivers/wacky_gator.c +++ b/src/mame/drivers/wacky_gator.c @@ -1,158 +1,284 @@ // license:GPL2+ -// copyright-holders:FelipeSanches +// copyright-holders:FelipeSanches, Sandro Ronco // // Wacky Gator // -// Driver by Felipe Correa da Silva Sanches <juca@members.fsf.org> +// Driver by Sandro Ronco and +// Felipe Correa da Silva Sanches <juca@members.fsf.org> // /* Most of this driver is based on guessing since I do not have access to the actual pcb for this game. Once we get a pcb, please review the correctness of the code in this driver before deleting this comment. - There's a bunch of memory accesses that are not yet properly understood. - Supposedly these are reponsible for things like: - - * controlling playback of samples of the OKI sound chip - * reading the status of the rear & front limit switches for each of the - 5 alligators - * reading the hit sensors for the 5 alligators - * reading coin insertion and start button - * flashing lamps in the backglass (apparently there's a total of - 20 lamps around the backframe) - * flashing the status lamps to indicate how good was the game of a player - (there are 5 different levels that can be shown inthe end of the game) - * controlling the 7-seg displays with: - - number of times the player successfully hit an alligator - - number of times the player was caught by an alligator - - final score - - highest score + TODO: + - IRQ and NMI sources are unknown + - proper PMM8713 and steppers emulation */ #include "emu.h" #include "cpu/m6809/m6809.h" +#include "machine/i8255.h" +#include "machine/pit8253.h" +#include "machine/ticket.h" +#include "sound/2413intf.h" #include "sound/msm5205.h" +#include "wackygtr.lh" + + class wackygtr_state : public driver_device { public: wackygtr_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), - m_msm(*this, "msm"), - m_maincpu(*this, "maincpu") + m_maincpu(*this, "maincpu"), + m_msm(*this, "msm"), + m_pit8253_0(*this, "pit8253_0"), + m_pit8253_1(*this, "pit8253_1"), + m_ticket(*this, "ticket"), + m_samples(*this, "oki") { } - UINT8* m_samples; - int m_adpcm_data; - int m_adpcm_pos; - int m_adpcm_length; - - required_device<msm5205_device> m_msm; required_device<cpu_device> m_maincpu; + required_device<msm5205_device> m_msm; + required_device<pit8253_device> m_pit8253_0; + required_device<pit8253_device> m_pit8253_1; + required_device<ticket_dispenser_device> m_ticket; + required_memory_region m_samples; + DECLARE_DRIVER_INIT(wackygtr); + void machine_reset(); - INTERRUPT_GEN_MEMBER(wackygtr_interrupt); DECLARE_WRITE_LINE_MEMBER(adpcm_int); - DECLARE_READ8_MEMBER(_0x6000_r); - DECLARE_READ8_MEMBER(_0x6001_r); - DECLARE_READ8_MEMBER(_0x6002_r); - DECLARE_READ8_MEMBER(_0x71d0_r); - DECLARE_READ8_MEMBER(_0x71d5_r); - DECLARE_WRITE8_MEMBER(sample_pos_w); - DECLARE_WRITE8_MEMBER(sample_length_w); + DECLARE_WRITE8_MEMBER(sample_ctrl_w); + DECLARE_WRITE8_MEMBER(alligators_ctrl1_w); + DECLARE_WRITE8_MEMBER(alligators_ctrl2_w); + DECLARE_CUSTOM_INPUT_MEMBER(alligators_rear_sensors_r); + DECLARE_CUSTOM_INPUT_MEMBER(alligators_front_sensors_r); + + void set_lamps(int p, UINT8 value); + DECLARE_WRITE8_MEMBER(status_lamps_w); + DECLARE_WRITE8_MEMBER(timing_lamps_0_w) { set_lamps(8 , data); } + DECLARE_WRITE8_MEMBER(timing_lamps_1_w) { set_lamps(16, data); } + DECLARE_WRITE8_MEMBER(timing_lamps_2_w) { set_lamps(24, data); } + + void set_digits(int p, UINT8 value); + DECLARE_WRITE8_MEMBER(disp0_w) { set_digits(0, data); } + DECLARE_WRITE8_MEMBER(disp1_w) { set_digits(2, data); } + DECLARE_WRITE8_MEMBER(disp2_w) { set_digits(4, data); } + DECLARE_WRITE8_MEMBER(disp3_w) { set_digits(6, data); } + + void pmm8713_ck(int i, int state); + DECLARE_WRITE_LINE_MEMBER(alligator0_ck) { pmm8713_ck(0, state); } + DECLARE_WRITE_LINE_MEMBER(alligator1_ck) { pmm8713_ck(1, state); } + DECLARE_WRITE_LINE_MEMBER(alligator2_ck) { pmm8713_ck(2, state); } + DECLARE_WRITE_LINE_MEMBER(alligator3_ck) { pmm8713_ck(3, state); } + DECLARE_WRITE_LINE_MEMBER(alligator4_ck) { pmm8713_ck(4, state); } + + DECLARE_WRITE8_MEMBER(irq_ack_w) { m_maincpu->set_input_line(M6809_IRQ_LINE, CLEAR_LINE); } + DECLARE_WRITE8_MEMBER(firq_ack_w) { m_maincpu->set_input_line(M6809_FIRQ_LINE, CLEAR_LINE); } + + TIMER_DEVICE_CALLBACK_MEMBER(nmi_timer) { m_maincpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE); } + +private: + int m_adpcm_sel; + UINT16 m_adpcm_pos; + UINT8 m_adpcm_ctrl; + + UINT8 m_alligators_ctrl; + int m_motors_pos[5]; }; DRIVER_INIT_MEMBER(wackygtr_state, wackygtr) { - m_adpcm_data = -1; - m_adpcm_pos = 0; - m_adpcm_length = 0; - m_samples = memregion("oki")->base(); } -/* - * The read handlers below are only boiler-plate for actual peripheral emulation - * and may be completely wrong, so should not yet be understood as hardware documentation. - */ -READ8_MEMBER(wackygtr_state::_0x6000_r){ - return 0x00; +WRITE8_MEMBER(wackygtr_state::status_lamps_w) +{ + /* + ---x xxxx status lamps + --x- ---- game over lamp + -x-- ---- coin counter + x--- ---- ticket dispenser + */ + + set_lamps(0, data & 0x3f); + + coin_counter_w(machine(), 0, BIT(data, 6)); + m_ticket->write(space, 0, data & 0x80); +} + +WRITE8_MEMBER(wackygtr_state::sample_ctrl_w) +{ + /* + --xx xxxx sample index + -x-- ---- ??? + x--- ---- 5205 reset + */ + + m_adpcm_ctrl = data; + m_adpcm_pos = (data & 0x3f) * 0x400; + m_adpcm_sel = 0; + m_msm->reset_w(BIT(data, 7)); +} + +WRITE8_MEMBER(wackygtr_state::alligators_ctrl1_w) +{ + m_pit8253_0->write_gate0(BIT(data, 0)); + m_pit8253_0->write_gate1(BIT(data, 1)); + m_pit8253_0->write_gate2(BIT(data, 2)); + m_pit8253_1->write_gate1(BIT(data, 3)); + m_pit8253_1->write_gate2(BIT(data, 4)); + + coin_lockout_w(machine(), 0, data & 0x40 ? 0 : 1); +} + +WRITE8_MEMBER(wackygtr_state::alligators_ctrl2_w) +{ + /* + ---- ---x PMM8713 0 U/D + ---- --x- PMM8713 1 U/D + ---- -x-- PMM8713 2 U/D + ---- x--- PMM8713 3 U/D + ---x ---- PMM8713 4 U/D + */ + + m_alligators_ctrl = data & 0x1f; } -READ8_MEMBER(wackygtr_state::_0x6001_r){ - return 0x00; +void wackygtr_state::pmm8713_ck(int i, int state) +{ + if (state) + { + m_motors_pos[i] += (BIT(m_alligators_ctrl, i) ? +1 : -1); + + int alligator_state = m_motors_pos[i] / 10; + if (alligator_state > 5) alligator_state = 5; + if (alligator_state < 0) alligator_state = 0; + output_set_indexed_value("alligator", i, alligator_state); + } } -READ8_MEMBER(wackygtr_state::_0x6002_r){ - return 0x00; +CUSTOM_INPUT_MEMBER(wackygtr_state::alligators_rear_sensors_r) +{ + return ((m_motors_pos[0] < 10) ? 0x01 : 0) | + ((m_motors_pos[1] < 10) ? 0x02 : 0) | + ((m_motors_pos[2] < 10) ? 0x04 : 0) | + ((m_motors_pos[3] < 10) ? 0x08 : 0) | + ((m_motors_pos[4] < 10) ? 0x10 : 0) | + (m_alligators_ctrl ^ 0x1f); } -READ8_MEMBER(wackygtr_state::_0x71d0_r){ - return 0; +CUSTOM_INPUT_MEMBER(wackygtr_state::alligators_front_sensors_r) +{ + return ((m_motors_pos[0] < 5 || m_motors_pos[0] > 55) ? 0x01 : 0) | + ((m_motors_pos[1] < 5 || m_motors_pos[1] > 55) ? 0x02 : 0) | + ((m_motors_pos[2] < 5 || m_motors_pos[2] > 55) ? 0x04 : 0) | + ((m_motors_pos[3] < 5 || m_motors_pos[3] > 55) ? 0x08 : 0) | + ((m_motors_pos[4] < 5 || m_motors_pos[4] > 55) ? 0x10 : 0); } -READ8_MEMBER(wackygtr_state::_0x71d5_r){ - return 0xFF; +void wackygtr_state::machine_reset() +{ + m_adpcm_pos = 0; + m_adpcm_sel = 0; + m_adpcm_ctrl = 0x80; } -/* The handling of sample playback is also guessed. - * Someone with access to the actual hardware could help - * better understand how this is actually hooked up on the original boards; - */ -WRITE8_MEMBER(wackygtr_state::sample_pos_w){ - m_adpcm_pos = (m_adpcm_pos & 0xFF) << 8 | (data & 0xFF); +void wackygtr_state::set_digits(int p, UINT8 value) +{ + static UINT8 bcd2hex[] = { 0x3f, 0x06, 0x5b, 0x4f, 0x66, 0x6d, 0x7d, 0x07, 0x7f, 0x67, 0, 0, 0, 0, 0, 0 }; // not accurate + output_set_digit_value(p + 0, bcd2hex[value & 0x0f]); + output_set_digit_value(p + 1, bcd2hex[(value >> 4) & 0x0f]); } -WRITE8_MEMBER(wackygtr_state::sample_length_w){ - m_adpcm_length = (m_adpcm_length & 0xFF) << 8 | (data & 0xFF); +void wackygtr_state::set_lamps(int p, UINT8 value) +{ + for(int i=0; i<8; i++) + output_set_lamp_value(p + i, BIT(value, i)); } static INPUT_PORTS_START( wackygtr ) - PORT_START("INP0") - PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_START("IN0") + PORT_BIT(0x1f, IP_ACTIVE_LOW, IPT_SPECIAL) PORT_CUSTOM_MEMBER(DEVICE_SELF, wackygtr_state, alligators_rear_sensors_r, NULL) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_SERVICE) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_SERVICE1) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_COIN1) + + PORT_START("IN1") + PORT_BIT(0x1f, IP_ACTIVE_LOW, IPT_SPECIAL) PORT_CUSTOM_MEMBER(DEVICE_SELF, wackygtr_state, alligators_front_sensors_r, NULL) + PORT_DIPNAME( 0xe0, 0x00, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW:1,2,3") + PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) + PORT_DIPSETTING( 0x20, DEF_STR( 1C_1C ) ) + PORT_DIPSETTING( 0x40, DEF_STR( 1C_1C ) ) + PORT_DIPSETTING( 0x60, DEF_STR( 2C_1C ) ) + PORT_DIPSETTING( 0x80, DEF_STR( 1C_1C ) ) + PORT_DIPSETTING( 0xa0, DEF_STR( 2C_1C ) ) + PORT_DIPSETTING( 0xc0, DEF_STR( 1C_1C ) ) + PORT_DIPSETTING( 0xe0, DEF_STR( 2C_1C ) ) + + PORT_START("IN2") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_POKER_HOLD1) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_POKER_HOLD2) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_POKER_HOLD3) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_POKER_HOLD4) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_POKER_HOLD5) + PORT_DIPNAME( 0x20, 0x20, DEF_STR( Test ) ) PORT_DIPLOCATION("SW:4") // For factory Test use ONLY! Do not change + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) + PORT_DIPNAME( 0x40, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW:5") + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) + PORT_DIPNAME( 0x80, 0x80, DEF_STR( Test ) ) PORT_DIPLOCATION("SW:6") // For factory Test use ONLY! Do not change + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) INPUT_PORTS_END WRITE_LINE_MEMBER(wackygtr_state::adpcm_int) { -/* This looks almost correct, but I am not yet completely sure. */ - if (m_adpcm_length > 0) + if (!(m_adpcm_ctrl & 0x80)) { - m_adpcm_length--; - if (m_adpcm_data == -1) - { - /* transferring 1st nibble */ - m_adpcm_data = m_samples[m_adpcm_pos]; - m_adpcm_pos = (m_adpcm_pos + 1) & 0xffff; - m_msm->data_w((m_adpcm_data >> 4) & 0xf); - } - else - { - /* transferring 2nd nibble */ - m_msm->data_w(m_adpcm_data & 0x0f); - m_adpcm_data = -1; - } + UINT8 data = m_samples->base()[m_adpcm_pos & 0xffff]; + m_msm->data_w((m_adpcm_sel ? data : (data >> 4)) & 0x0f); + m_adpcm_pos += m_adpcm_sel; + m_adpcm_sel ^= 1; } } static ADDRESS_MAP_START( program_map, AS_PROGRAM, 8, wackygtr_state ) - AM_RANGE(0x3000, 0x3000) AM_WRITE(sample_length_w) - AM_RANGE(0x3001, 0x3001) AM_WRITE(sample_pos_w) - AM_RANGE(0x6000, 0x6000) AM_READ(_0x6000_r) /* guessed hw peripheral address */ - AM_RANGE(0x6001, 0x6001) AM_READ(_0x6001_r) /* guessed hw peripheral address */ - AM_RANGE(0x6002, 0x6002) AM_READ(_0x6002_r) /* guessed hw peripheral address */ - AM_RANGE(0x71d0, 0x71d0) AM_READ(_0x71d0_r) /* guessed hw peripheral address */ - AM_RANGE(0x71d5, 0x71d5) AM_READ(_0x71d5_r) /* guessed hw peripheral address */ + AM_RANGE(0x0200, 0x0200) AM_READNOP AM_WRITE(irq_ack_w) + AM_RANGE(0x0400, 0x0400) AM_READNOP AM_WRITE(firq_ack_w) + AM_RANGE(0x0600, 0x0600) AM_WRITE(disp0_w) + AM_RANGE(0x0800, 0x0800) AM_WRITE(disp1_w) + AM_RANGE(0x0a00, 0x0a00) AM_WRITE(disp2_w) + AM_RANGE(0x0c00, 0x0c00) AM_WRITE(disp3_w) + AM_RANGE(0x0e00, 0x0e00) AM_WRITE(sample_ctrl_w) + + AM_RANGE(0x1000, 0x1001) AM_DEVWRITE("ymsnd", ym2413_device, write) + + AM_RANGE(0x2000, 0x2003) AM_DEVREADWRITE("pit8253_0", pit8253_device, read, write) + AM_RANGE(0x3000, 0x3003) AM_DEVREADWRITE("pit8253_1", pit8253_device, read, write) + + AM_RANGE(0x4000, 0x4003) AM_DEVREADWRITE("i8255_0", i8255_device, read, write) + AM_RANGE(0x5000, 0x5003) AM_DEVREADWRITE("i8255_1", i8255_device, read, write) + AM_RANGE(0x6000, 0x6003) AM_DEVREADWRITE("i8255_2", i8255_device, read, write) + AM_RANGE(0x7000, 0x7fff) AM_RAM AM_RANGE(0x8000, 0xffff) AM_ROM ADDRESS_MAP_END static MACHINE_CONFIG_START( wackygtr, wackygtr_state ) - MCFG_CPU_ADD("maincpu", M6809E, XTAL_8MHz) + MCFG_CPU_ADD("maincpu", M6809E, XTAL_3_579545MHz) // HD68B09P MCFG_CPU_PROGRAM_MAP(program_map) + MCFG_CPU_PERIODIC_INT_DRIVER(wackygtr_state, irq0_line_assert, 50) // FIXME + + MCFG_TIMER_DRIVER_ADD_PERIODIC("nmi_timer", wackygtr_state, nmi_timer, attotime::from_hz(100)) // FIXME /* Video */ -// MCFG_DEFAULT_LAYOUT(layout_wackygtr) + MCFG_DEFAULT_LAYOUT(layout_wackygtr) /* Sound */ MCFG_SPEAKER_STANDARD_MONO("mono") @@ -161,9 +287,41 @@ static MACHINE_CONFIG_START( wackygtr, wackygtr_state ) MCFG_MSM5205_PRESCALER_SELECTOR(MSM5205_S48_4B) /* 8 KHz, 4 Bits */ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) - /* I have a hunch that this board may also - * contain a YM2151 sound chip for background music... - */ + MCFG_SOUND_ADD("ymsnd", YM2413, XTAL_3_579545MHz ) + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) + + MCFG_DEVICE_ADD("i8255_0", I8255, 0) + MCFG_I8255_OUT_PORTA_CB(WRITE8(wackygtr_state, status_lamps_w)) + MCFG_I8255_OUT_PORTB_CB(WRITE8(wackygtr_state, alligators_ctrl1_w)) + MCFG_I8255_OUT_PORTC_CB(WRITE8(wackygtr_state, alligators_ctrl2_w)) + + MCFG_DEVICE_ADD("i8255_1", I8255, 0) + MCFG_I8255_OUT_PORTA_CB(WRITE8(wackygtr_state, timing_lamps_0_w)) + MCFG_I8255_OUT_PORTB_CB(WRITE8(wackygtr_state, timing_lamps_1_w)) + MCFG_I8255_OUT_PORTC_CB(WRITE8(wackygtr_state, timing_lamps_2_w)) + + MCFG_DEVICE_ADD("i8255_2", I8255, 0) + MCFG_I8255_IN_PORTA_CB(IOPORT("IN0")) + MCFG_I8255_IN_PORTB_CB(IOPORT("IN1")) + MCFG_I8255_IN_PORTC_CB(IOPORT("IN2")) + + MCFG_DEVICE_ADD("pit8253_0", PIT8253, 0) + MCFG_PIT8253_CLK0(XTAL_3_579545MHz/16) // this is a guess + MCFG_PIT8253_OUT0_HANDLER(WRITELINE(wackygtr_state, alligator0_ck)) + MCFG_PIT8253_CLK1(XTAL_3_579545MHz/16) // this is a guess + MCFG_PIT8253_OUT1_HANDLER(WRITELINE(wackygtr_state, alligator1_ck)) + MCFG_PIT8253_CLK2(XTAL_3_579545MHz/16) // this is a guess + MCFG_PIT8253_OUT2_HANDLER(WRITELINE(wackygtr_state, alligator2_ck)) + + MCFG_DEVICE_ADD("pit8253_1", PIT8253, 0) + MCFG_PIT8253_CLK0(XTAL_3_579545MHz/16) // this is a guess + MCFG_PIT8253_OUT0_HANDLER(INPUTLINE("maincpu", M6809_FIRQ_LINE)) + MCFG_PIT8253_CLK1(XTAL_3_579545MHz/16) // this is a guess + MCFG_PIT8253_OUT1_HANDLER(WRITELINE(wackygtr_state, alligator3_ck)) + MCFG_PIT8253_CLK2(XTAL_3_579545MHz/16) // this is a guess + MCFG_PIT8253_OUT2_HANDLER(WRITELINE(wackygtr_state, alligator4_ck)) + + MCFG_TICKET_DISPENSER_ADD("ticket", attotime::from_msec(200), TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_HIGH) MACHINE_CONFIG_END diff --git a/src/mame/drivers/wecleman.c b/src/mame/drivers/wecleman.c index 24a289bc04b..5f46efda43c 100644 --- a/src/mame/drivers/wecleman.c +++ b/src/mame/drivers/wecleman.c @@ -1689,7 +1689,7 @@ DRIVER_INIT_MEMBER(wecleman_state,hotchase) GAMEL( 1986, wecleman, 0, wecleman, wecleman, wecleman_state, wecleman, ROT0, "Konami", "WEC Le Mans 24 (v2.00, set 1)", 0, layout_wecleman ) GAMEL( 1986, weclemana, wecleman, wecleman, wecleman, wecleman_state, wecleman, ROT0, "Konami", "WEC Le Mans 24 (v2.00, set 2)", 0, layout_wecleman ) // 1988 release (maybe date hacked?) -GAMEL( 1986, weclemanb, wecleman, wecleman, wecleman, wecleman_state, wecleman, ROT0, "Konami", "WEC Le Mans 24 (v1.26)", 0, layout_wecleman ) +GAMEL( 1986, weclemanb, wecleman, wecleman, wecleman, wecleman_state, wecleman, ROT0, "Konami", "WEC Le Mans 24 (v1.26)", 0, layout_wecleman ) GAMEL( 1988, hotchase, 0, hotchase, hotchase, wecleman_state, hotchase, ROT0, "Konami", "Hot Chase (set 1)", 0, layout_wecleman ) GAMEL( 1988, hotchasea, hotchase, hotchase, hotchase, wecleman_state, hotchase, ROT0, "Konami", "Hot Chase (set 2)", 0, layout_wecleman ) diff --git a/src/mame/drivers/zaurus.c b/src/mame/drivers/zaurus.c index 0fe4724067f..64fc3e79178 100644 --- a/src/mame/drivers/zaurus.c +++ b/src/mame/drivers/zaurus.c @@ -1452,7 +1452,7 @@ protected: #define VERBOSE_LEVEL ( 5 ) -INLINE void ATTR_PRINTF(3,4) verboselog( running_machine& machine, int n_level, const char* s_fmt, ... ) +INLINE void ATTR_PRINTF(3,4) verboselog( device_t& device, int n_level, const char* s_fmt, ... ) { if( VERBOSE_LEVEL >= n_level ) { @@ -1461,8 +1461,8 @@ INLINE void ATTR_PRINTF(3,4) verboselog( running_machine& machine, int n_level, va_start( v, s_fmt ); vsprintf( buf, s_fmt, v ); va_end( v ); - logerror( "%s: %s", machine.describe_context(), buf ); - //printf( "%s: %s", machine.describe_context(), buf ); + device.logerror( "%s: %s", device.machine().describe_context(), buf ); + //printf( "%s: %s", device.machine().describe_context(), buf ); } } @@ -1515,33 +1515,33 @@ READ32_MEMBER(zaurus_state::pxa255_ostimer_r) switch(PXA255_OSTMR_BASE_ADDR | (offset << 2)) { case PXA255_OSMR0: - if (0) verboselog( machine(), 3, "pxa255_ostimer_r: OS Timer Match Register 0: %08x & %08x\n", ostimer_regs->osmr[0], mem_mask ); + if (0) verboselog(*this, 3, "pxa255_ostimer_r: OS Timer Match Register 0: %08x & %08x\n", ostimer_regs->osmr[0], mem_mask ); return ostimer_regs->osmr[0]; case PXA255_OSMR1: - if (0) verboselog( machine(), 3, "pxa255_ostimer_r: OS Timer Match Register 1: %08x & %08x\n", ostimer_regs->osmr[1], mem_mask ); + if (0) verboselog(*this, 3, "pxa255_ostimer_r: OS Timer Match Register 1: %08x & %08x\n", ostimer_regs->osmr[1], mem_mask ); return ostimer_regs->osmr[1]; case PXA255_OSMR2: - if (0) verboselog( machine(), 3, "pxa255_ostimer_r: OS Timer Match Register 2: %08x & %08x\n", ostimer_regs->osmr[2], mem_mask ); + if (0) verboselog(*this, 3, "pxa255_ostimer_r: OS Timer Match Register 2: %08x & %08x\n", ostimer_regs->osmr[2], mem_mask ); return ostimer_regs->osmr[2]; case PXA255_OSMR3: - if (0) verboselog( machine(), 3, "pxa255_ostimer_r: OS Timer Match Register 3: %08x & %08x\n", ostimer_regs->osmr[3], mem_mask ); + if (0) verboselog(*this, 3, "pxa255_ostimer_r: OS Timer Match Register 3: %08x & %08x\n", ostimer_regs->osmr[3], mem_mask ); return ostimer_regs->osmr[3]; case PXA255_OSCR: - if (0) verboselog( machine(), 4, "pxa255_ostimer_r: OS Timer Count Register: %08x & %08x\n", ostimer_regs->oscr, mem_mask ); + if (0) verboselog(*this, 4, "pxa255_ostimer_r: OS Timer Count Register: %08x & %08x\n", ostimer_regs->oscr, mem_mask ); // free-running 3.something MHz counter. this is a complete hack. ostimer_regs->oscr += 0x300; return ostimer_regs->oscr; case PXA255_OSSR: - if (0) verboselog( machine(), 3, "pxa255_ostimer_r: OS Timer Status Register: %08x & %08x\n", ostimer_regs->ossr, mem_mask ); + if (0) verboselog(*this, 3, "pxa255_ostimer_r: OS Timer Status Register: %08x & %08x\n", ostimer_regs->ossr, mem_mask ); return ostimer_regs->ossr; case PXA255_OWER: - if (0) verboselog( machine(), 3, "pxa255_ostimer_r: OS Timer Watchdog Match Enable Register: %08x & %08x\n", ostimer_regs->ower, mem_mask ); + if (0) verboselog(*this, 3, "pxa255_ostimer_r: OS Timer Watchdog Match Enable Register: %08x & %08x\n", ostimer_regs->ower, mem_mask ); return ostimer_regs->ower; case PXA255_OIER: - if (0) verboselog( machine(), 3, "pxa255_ostimer_r: OS Timer Interrupt Enable Register: %08x & %08x\n", ostimer_regs->oier, mem_mask ); + if (0) verboselog(*this, 3, "pxa255_ostimer_r: OS Timer Interrupt Enable Register: %08x & %08x\n", ostimer_regs->oier, mem_mask ); return ostimer_regs->oier; default: - if (0) verboselog( machine(), 0, "pxa255_ostimer_r: Unknown address: %08x\n", PXA255_OSTMR_BASE_ADDR | (offset << 2)); + if (0) verboselog(*this, 0, "pxa255_ostimer_r: Unknown address: %08x\n", PXA255_OSTMR_BASE_ADDR | (offset << 2)); break; } return 0; @@ -1554,7 +1554,7 @@ WRITE32_MEMBER(zaurus_state::pxa255_ostimer_w) switch(PXA255_OSTMR_BASE_ADDR | (offset << 2)) { case PXA255_OSMR0: - if (0) verboselog( machine(), 3, "pxa255_ostimer_w: OS Timer Match Register 0: %08x & %08x\n", data, mem_mask ); + if (0) verboselog(*this, 3, "pxa255_ostimer_w: OS Timer Match Register 0: %08x & %08x\n", data, mem_mask ); ostimer_regs->osmr[0] = data; if(ostimer_regs->oier & PXA255_OIER_E0) { @@ -1565,7 +1565,7 @@ WRITE32_MEMBER(zaurus_state::pxa255_ostimer_w) } break; case PXA255_OSMR1: - if (0) verboselog( machine(), 3, "pxa255_ostimer_w: OS Timer Match Register 1: %08x & %08x\n", data, mem_mask ); + if (0) verboselog(*this, 3, "pxa255_ostimer_w: OS Timer Match Register 1: %08x & %08x\n", data, mem_mask ); ostimer_regs->osmr[1] = data; if(ostimer_regs->oier & PXA255_OIER_E1) { @@ -1575,7 +1575,7 @@ WRITE32_MEMBER(zaurus_state::pxa255_ostimer_w) } break; case PXA255_OSMR2: - if (0) verboselog( machine(), 3, "pxa255_ostimer_w: OS Timer Match Register 2: %08x & %08x\n", data, mem_mask ); + if (0) verboselog(*this, 3, "pxa255_ostimer_w: OS Timer Match Register 2: %08x & %08x\n", data, mem_mask ); ostimer_regs->osmr[2] = data; if(ostimer_regs->oier & PXA255_OIER_E2) { @@ -1585,7 +1585,7 @@ WRITE32_MEMBER(zaurus_state::pxa255_ostimer_w) } break; case PXA255_OSMR3: - if (0) verboselog( machine(), 3, "pxa255_ostimer_w: OS Timer Match Register 3: %08x & %08x\n", data, mem_mask ); + if (0) verboselog(*this, 3, "pxa255_ostimer_w: OS Timer Match Register 3: %08x & %08x\n", data, mem_mask ); ostimer_regs->osmr[3] = data; if(ostimer_regs->oier & PXA255_OIER_E3) { @@ -1595,22 +1595,22 @@ WRITE32_MEMBER(zaurus_state::pxa255_ostimer_w) } break; case PXA255_OSCR: - if (0) verboselog( machine(), 3, "pxa255_ostimer_w: OS Timer Count Register: %08x & %08x\n", data, mem_mask ); + if (0) verboselog(*this, 3, "pxa255_ostimer_w: OS Timer Count Register: %08x & %08x\n", data, mem_mask ); ostimer_regs->oscr = data; break; case PXA255_OSSR: - if (0) verboselog( machine(), 3, "pxa255_ostimer_w: OS Timer Status Register: %08x & %08x\n", data, mem_mask ); + if (0) verboselog(*this, 3, "pxa255_ostimer_w: OS Timer Status Register: %08x & %08x\n", data, mem_mask ); ostimer_regs->ossr &= ~data; pxa255_ostimer_irq_check(); break; case PXA255_OWER: - if (0) verboselog( machine(), 3, "pxa255_ostimer_w: OS Timer Watchdog Enable Register: %08x & %08x\n", data, mem_mask ); + if (0) verboselog(*this, 3, "pxa255_ostimer_w: OS Timer Watchdog Enable Register: %08x & %08x\n", data, mem_mask ); ostimer_regs->ower = data & 0x00000001; break; case PXA255_OIER: { int index = 0; - if (0) verboselog( machine(), 3, "pxa255_ostimer_w: OS Timer Interrupt Enable Register: %08x & %08x\n", data, mem_mask ); + if (0) verboselog(*this, 3, "pxa255_ostimer_w: OS Timer Interrupt Enable Register: %08x & %08x\n", data, mem_mask ); ostimer_regs->oier = data & 0x0000000f; for(index = 0; index < 4; index++) { @@ -1625,7 +1625,7 @@ WRITE32_MEMBER(zaurus_state::pxa255_ostimer_w) break; } default: - verboselog( machine(), 0, "pxa255_ostimer_w: Unknown address: %08x = %08x & %08x\n", PXA255_OSTMR_BASE_ADDR | (offset << 2), data, mem_mask); + verboselog(*this, 0, "pxa255_ostimer_w: Unknown address: %08x = %08x & %08x\n", PXA255_OSTMR_BASE_ADDR | (offset << 2), data, mem_mask); break; } } @@ -1637,25 +1637,25 @@ READ32_MEMBER(zaurus_state::pxa255_intc_r) switch(PXA255_INTC_BASE_ADDR | (offset << 2)) { case PXA255_ICIP: - if (0) verboselog( machine(), 3, "pxa255_intc_r: Interrupt Controller IRQ Pending Register: %08x & %08x\n", intc_regs->icip, mem_mask ); + if (0) verboselog(*this, 3, "pxa255_intc_r: Interrupt Controller IRQ Pending Register: %08x & %08x\n", intc_regs->icip, mem_mask ); return intc_regs->icip; case PXA255_ICMR: - if (0) verboselog( machine(), 3, "pxa255_intc_r: Interrupt Controller Mask Register: %08x & %08x\n", intc_regs->icmr, mem_mask ); + if (0) verboselog(*this, 3, "pxa255_intc_r: Interrupt Controller Mask Register: %08x & %08x\n", intc_regs->icmr, mem_mask ); return intc_regs->icmr; case PXA255_ICLR: - if (0) verboselog( machine(), 3, "pxa255_intc_r: Interrupt Controller Level Register: %08x & %08x\n", intc_regs->iclr, mem_mask ); + if (0) verboselog(*this, 3, "pxa255_intc_r: Interrupt Controller Level Register: %08x & %08x\n", intc_regs->iclr, mem_mask ); return intc_regs->iclr; case PXA255_ICFP: - if (0) verboselog( machine(), 3, "pxa255_intc_r: Interrupt Controller FIQ Pending Register: %08x & %08x\n", intc_regs->icfp, mem_mask ); + if (0) verboselog(*this, 3, "pxa255_intc_r: Interrupt Controller FIQ Pending Register: %08x & %08x\n", intc_regs->icfp, mem_mask ); return intc_regs->icfp; case PXA255_ICPR: - if (0) verboselog( machine(), 3, "pxa255_intc_r: Interrupt Controller Pending Register: %08x & %08x\n", intc_regs->icpr, mem_mask ); + if (0) verboselog(*this, 3, "pxa255_intc_r: Interrupt Controller Pending Register: %08x & %08x\n", intc_regs->icpr, mem_mask ); return intc_regs->icpr; case PXA255_ICCR: - if (0) verboselog( machine(), 3, "pxa255_intc_r: Interrupt Controller Control Register: %08x & %08x\n", intc_regs->iccr, mem_mask ); + if (0) verboselog(*this, 3, "pxa255_intc_r: Interrupt Controller Control Register: %08x & %08x\n", intc_regs->iccr, mem_mask ); return intc_regs->iccr; default: - verboselog( machine(), 0, "pxa255_intc_r: Unknown address: %08x\n", PXA255_INTC_BASE_ADDR | (offset << 2)); + verboselog(*this, 0, "pxa255_intc_r: Unknown address: %08x\n", PXA255_INTC_BASE_ADDR | (offset << 2)); break; } return 0; @@ -1668,28 +1668,28 @@ WRITE32_MEMBER(zaurus_state::pxa255_intc_w) switch(PXA255_INTC_BASE_ADDR | (offset << 2)) { case PXA255_ICIP: - verboselog( machine(), 3, "pxa255_intc_w: (Invalid Write) Interrupt Controller IRQ Pending Register: %08x & %08x\n", data, mem_mask ); + verboselog(*this, 3, "pxa255_intc_w: (Invalid Write) Interrupt Controller IRQ Pending Register: %08x & %08x\n", data, mem_mask ); break; case PXA255_ICMR: - if (0) verboselog( machine(), 3, "pxa255_intc_w: Interrupt Controller Mask Register: %08x & %08x\n", data, mem_mask ); + if (0) verboselog(*this, 3, "pxa255_intc_w: Interrupt Controller Mask Register: %08x & %08x\n", data, mem_mask ); intc_regs->icmr = data & 0xfffe7f00; break; case PXA255_ICLR: - if (0) verboselog( machine(), 3, "pxa255_intc_w: Interrupt Controller Level Register: %08x & %08x\n", data, mem_mask ); + if (0) verboselog(*this, 3, "pxa255_intc_w: Interrupt Controller Level Register: %08x & %08x\n", data, mem_mask ); intc_regs->iclr = data & 0xfffe7f00; break; case PXA255_ICFP: - if (0) verboselog( machine(), 3, "pxa255_intc_w: (Invalid Write) Interrupt Controller FIQ Pending Register: %08x & %08x\n", data, mem_mask ); + if (0) verboselog(*this, 3, "pxa255_intc_w: (Invalid Write) Interrupt Controller FIQ Pending Register: %08x & %08x\n", data, mem_mask ); break; case PXA255_ICPR: - if (0) verboselog( machine(), 3, "pxa255_intc_w: (Invalid Write) Interrupt Controller Pending Register: %08x & %08x\n", data, mem_mask ); + if (0) verboselog(*this, 3, "pxa255_intc_w: (Invalid Write) Interrupt Controller Pending Register: %08x & %08x\n", data, mem_mask ); break; case PXA255_ICCR: - if (0) verboselog( machine(), 3, "pxa255_intc_w: Interrupt Controller Control Register: %08x & %08x\n", data, mem_mask ); + if (0) verboselog(*this, 3, "pxa255_intc_w: Interrupt Controller Control Register: %08x & %08x\n", data, mem_mask ); intc_regs->iccr = data & 0x00000001; break; default: - verboselog( machine(), 0, "pxa255_intc_w: Unknown address: %08x = %08x & %08x\n", PXA255_INTC_BASE_ADDR | (offset << 2), data, mem_mask); + verboselog(*this, 0, "pxa255_intc_w: Unknown address: %08x = %08x & %08x\n", PXA255_INTC_BASE_ADDR | (offset << 2), data, mem_mask); break; } } diff --git a/src/mame/drivers/zx.c b/src/mame/drivers/zx.c index 467d515aacb..f75e2558f33 100644 --- a/src/mame/drivers/zx.c +++ b/src/mame/drivers/zx.c @@ -1,5 +1,5 @@ // license:GPL-2.0+ -// copyright-holders:Juergen Buchmueller, Krzysztof Strzecha, Robbbert +// copyright-holders: Olivier Galibert, Juergen Buchmueller, Krzysztof Strzecha, Robbbert /*************************************************************************** zx.c @@ -9,7 +9,7 @@ Fixes and additions by Krzysztof Strzecha: 07.06.2004 Tape loading added. Some cleanups of debug code. Fixed stupid bug in timings (vblank duration). - MACHINE_NOT_WORKING flag removed. + GAME_NOT_WORKING flag removed. 29.05.2004 CPU clock, number of scanlines, vblank duration corrected. Some cleanups. Two non-working TESTDRIVERS added. 14.05.2004 Finally fixed and readded. @@ -31,8 +31,8 @@ - Modernised. To do / problems: + - Halt-on-nmi emulation needs a cycle-exact z80 - Some memory areas are not mirrored as they should. - - Video hardware is not fully emulated, so it does not support pseudo hi-res and hi-res modes. - The screen in pc8300/pow3000/lambda jumps when you type something. - lambda/pow3000 32k memory pack is unemulated, because where is the upper 16k mirror going to be? - h4th and tree4th need their address maps worked out (eg, the stack is set to FB80) @@ -47,8 +47,18 @@ /* Memory Maps */ static ADDRESS_MAP_START( zx80_map, AS_PROGRAM, 8, zx_state ) + AM_RANGE(0x0000, 0x0fff) AM_ROM AM_MIRROR(0x3000) + AM_RANGE(0x4000, 0xffff) AM_RAM +ADDRESS_MAP_END + +static ADDRESS_MAP_START( zx81_map, AS_PROGRAM, 8, zx_state ) AM_RANGE(0x0000, 0x1fff) AM_ROM AM_MIRROR(0x2000) - AM_RANGE(0xc000, 0xffff) AM_RAM_READ(zx_ram_r) + AM_RANGE(0x4000, 0xffff) AM_RAM +ADDRESS_MAP_END + +static ADDRESS_MAP_START( ula_map, AS_DECRYPTED_OPCODES, 8, zx_state ) + AM_RANGE(0x0000, 0x7fff) AM_READ(ula_low_r) + AM_RANGE(0x8000, 0xffff) AM_READ(ula_high_r) ADDRESS_MAP_END static ADDRESS_MAP_START( zx80_io_map, AS_IO, 8, zx_state ) @@ -291,38 +301,6 @@ static INPUT_PORTS_START( pow3000 ) INPUT_PORTS_END -/* F4 character display */ - -static const gfx_layout zx_gfx_layout = -{ - 8, 8, /* 8x8 pixels */ - 64, /* 64 codes */ - 1, /* 1 bit per pixel */ - {0}, /* no bitplanes */ - /* x offsets */ - {0, 1, 2, 3, 4, 5, 6, 7}, - /* y offsets */ - {0 * 8, 1 * 8, 2 * 8, 3 * 8, 4 * 8, 5 * 8, 6 * 8, 7 * 8}, - 8 * 8 /* eight bytes per code */ -}; - - -/* Graphics Decode Information */ - -static GFXDECODE_START( zx80 ) - GFXDECODE_ENTRY( "maincpu", 0x0e00, zx_gfx_layout, 0, 2 ) -GFXDECODE_END - -static GFXDECODE_START( zx81 ) - GFXDECODE_ENTRY( "maincpu", 0x1e00, zx_gfx_layout, 0, 2 ) -GFXDECODE_END - -static GFXDECODE_START( pc8300 ) - GFXDECODE_ENTRY( "gfx1", 0, zx_gfx_layout, 0, 2 ) -GFXDECODE_END - - - /* Palette Initialization */ @@ -330,61 +308,34 @@ PALETTE_INIT_MEMBER(zx_state, zx) { palette.set_pen_color(0,rgb_t::white); /* white */ palette.set_pen_color(1,rgb_t::black); /* black */ - palette.set_pen_color(2,rgb_t::black); /* black */ - palette.set_pen_color(3,rgb_t::white); /* white */ } PALETTE_INIT_MEMBER(zx_state,ts1000) { palette.set_pen_color(0,rgb_t(64, 244, 244)); /* cyan */ palette.set_pen_color(1,rgb_t::black); /* black */ - palette.set_pen_color(2,rgb_t::black); /* black */ - palette.set_pen_color(3,rgb_t(64, 244, 244)); /* cyan */ } - -#define ZX81_CPU_CLOCK 3250000 -#define ZX81_CYCLES_PER_SCANLINE 207 -#define ZX81_PIXELS_PER_SCANLINE 256 -#define ZX81_CYCLES_PER_VBLANK 1235 -#define ZX81_VBLANK_DURATION (1.0*ZX81_CYCLES_PER_VBLANK/ZX81_CPU_CLOCK*1000*1000) - -#define ZX81_PAL_SCANLINES 304 -#define ZX81_PAL_FRAMES_PER_SECOND (1.0*ZX81_CPU_CLOCK/(ZX81_PAL_SCANLINES*ZX81_CYCLES_PER_SCANLINE+ZX81_CYCLES_PER_VBLANK)) - -#define ZX81_NTSC_SCANLINES 256 -#define ZX81_NTSC_FRAMES_PER_SECOND (1.0*ZX81_CPU_CLOCK/(ZX81_NTSC_SCANLINES*ZX81_CYCLES_PER_SCANLINE+ZX81_CYCLES_PER_VBLANK)) - -/* Machine Drivers */ - static MACHINE_CONFIG_START( zx80, zx_state ) /* basic machine hardware */ - MCFG_CPU_ADD("maincpu", Z80, ZX81_CPU_CLOCK) + MCFG_CPU_ADD("maincpu", Z80, XTAL_6_5MHz/2) MCFG_CPU_PROGRAM_MAP(zx80_map) MCFG_CPU_IO_MAP(zx80_io_map) - MCFG_SCREEN_ADD("screen", RASTER) - MCFG_SCREEN_REFRESH_RATE(ZX81_PAL_FRAMES_PER_SECOND) - MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(ZX81_VBLANK_DURATION)) + MCFG_CPU_DECRYPTED_OPCODES_MAP(ula_map) + MCFG_Z80_SET_REFRESH_CALLBACK(WRITE16(zx_state, refresh_w)) + MCFG_SCREEN_ADD("screen", RASTER) + MCFG_SCREEN_REFRESH_RATE(XTAL_6_5MHz/2/64159.0) // 54223 for NTSC /* video hardware */ MCFG_SCREEN_UPDATE_DRIVER(zx_state, screen_update) - MCFG_SCREEN_SIZE(ZX81_PIXELS_PER_SCANLINE, ZX81_PAL_SCANLINES) - MCFG_SCREEN_VISIBLE_AREA(0, ZX81_PIXELS_PER_SCANLINE-1, 0, ZX81_PAL_SCANLINES-1) - MCFG_SCREEN_VBLANK_DRIVER(zx_state, screen_eof_zx) + MCFG_SCREEN_SIZE(384, 311) + MCFG_SCREEN_VISIBLE_AREA(0, 383, 0, 310) MCFG_SCREEN_PALETTE("palette") - MCFG_GFXDECODE_ADD("gfxdecode", "palette", zx80) - MCFG_PALETTE_ADD("palette", 4) + MCFG_PALETTE_ADD("palette", 2) MCFG_PALETTE_INIT_OWNER(zx_state,zx) - /* sound hardware */ - MCFG_SPEAKER_STANDARD_MONO("mono") - MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0) /* Used by pc8300/lambda/pow3000 */ - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75) - MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette") - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) - MCFG_CASSETTE_ADD( "cassette" ) MCFG_CASSETTE_FORMATS(zx80_o_format) MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED) @@ -392,60 +343,52 @@ static MACHINE_CONFIG_START( zx80, zx_state ) /* internal ram */ MCFG_RAM_ADD(RAM_TAG) MCFG_RAM_DEFAULT_SIZE("1K") - MCFG_RAM_EXTRA_OPTIONS("16K") + MCFG_RAM_EXTRA_OPTIONS("16K,32K,48K") MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( zx81, zx80 ) - MCFG_CPU_MODIFY("maincpu") + MCFG_CPU_PROGRAM_MAP(zx81_map) MCFG_CPU_IO_MAP(zx81_io_map) - MCFG_GFXDECODE_MODIFY("gfxdecode", zx81) - MCFG_CASSETTE_MODIFY( "cassette" ) MCFG_CASSETTE_FORMATS(zx81_p_format) MACHINE_CONFIG_END +static MACHINE_CONFIG_DERIVED( zx81_spk, zx81 ) + /* sound hardware */ + /* Used by pc8300/lambda/pow3000 */ + MCFG_SPEAKER_STANDARD_MONO("mono") + MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0) + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75) + MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette") + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) +MACHINE_CONFIG_END + static MACHINE_CONFIG_DERIVED( ts1000, zx81 ) MCFG_PALETTE_MODIFY("palette") - MCFG_PALETTE_INIT_OWNER(zx_state,ts1000) + MCFG_PALETTE_INIT_OWNER(zx_state, ts1000) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( ts1500, ts1000 ) - /* internal ram */ MCFG_RAM_MODIFY(RAM_TAG) MCFG_RAM_DEFAULT_SIZE("16K") MACHINE_CONFIG_END -static MACHINE_CONFIG_DERIVED( pc8300, zx81 ) - +static MACHINE_CONFIG_DERIVED( pc8300, zx81_spk ) MCFG_CPU_MODIFY("maincpu") MCFG_CPU_IO_MAP(pc8300_io_map) - MCFG_MACHINE_RESET_OVERRIDE(zx_state,pc8300) - - MCFG_SCREEN_MODIFY("screen") - MCFG_SCREEN_REFRESH_RATE(ZX81_NTSC_FRAMES_PER_SECOND) - MCFG_SCREEN_SIZE(ZX81_PIXELS_PER_SCANLINE, ZX81_NTSC_SCANLINES) - MCFG_SCREEN_VISIBLE_AREA(0, ZX81_PIXELS_PER_SCANLINE-1, 0, ZX81_NTSC_SCANLINES-1) - - MCFG_GFXDECODE_MODIFY("gfxdecode", pc8300) - /* internal ram */ MCFG_RAM_MODIFY(RAM_TAG) MCFG_RAM_DEFAULT_SIZE("16K") MACHINE_CONFIG_END -static MACHINE_CONFIG_DERIVED( pow3000, zx81 ) - +static MACHINE_CONFIG_DERIVED( pow3000, zx81_spk ) MCFG_CPU_MODIFY("maincpu") MCFG_CPU_IO_MAP(pow3000_io_map) - MCFG_MACHINE_RESET_OVERRIDE(zx_state,pow3000) - - MCFG_GFXDECODE_MODIFY("gfxdecode", pc8300) - /* internal ram */ MCFG_RAM_MODIFY(RAM_TAG) MCFG_RAM_DEFAULT_SIZE("2K") @@ -456,7 +399,7 @@ MACHINE_CONFIG_END /* ROMs */ ROM_START(zx80) - ROM_REGION( 0x10000, "maincpu",0 ) + ROM_REGION( 0x1000, "maincpu",0 ) ROM_SYSTEM_BIOS(0, "default", "BASIC") ROMX_LOAD( "zx80.rom", 0x0000, 0x1000, CRC(4c7fc597) SHA1(b6769a3197c77009e0933e038c15b43cf4c98c7a), ROM_BIOS(1) ) ROM_SYSTEM_BIOS(1, "aszmic", "ASZMIC") @@ -464,7 +407,7 @@ ROM_START(zx80) ROM_END ROM_START(zx81) - ROM_REGION( 0x10000, "maincpu",0 ) + ROM_REGION( 0x2000, "maincpu",0 ) ROM_SYSTEM_BIOS(0, "3rd", "3rd rev.") ROMX_LOAD( "zx81b.rom", 0x0000, 0x2000, CRC(522c37b8) SHA1(c6d8e06cb936989f6e1cc7a56d1f092da854a515), ROM_BIOS(1) ) ROM_SYSTEM_BIOS(1, "1st", "1st rev.") @@ -478,22 +421,22 @@ ROM_START(zx81) ROM_END ROM_START(ts1000) - ROM_REGION( 0x10000, "maincpu",0 ) + ROM_REGION( 0x2000, "maincpu",0 ) ROM_LOAD( "zx81a.rom", 0x0000, 0x2000, CRC(4b1dd6eb) SHA1(7b143ee964e9ada89d1f9e88f0bd48d919184cfc) ) ROM_END ROM_START(ts1500) - ROM_REGION( 0x10000, "maincpu",0 ) + ROM_REGION( 0x2000, "maincpu",0 ) ROM_LOAD( "d2364c_649.u2", 0x0000, 0x2000, CRC(7dd19c48) SHA1(3eb437359221b4406d236085ec66fa02278e7495) ) ROM_END ROM_START(ringo470) - ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF ) + ROM_REGION( 0x2000, "maincpu", ROMREGION_ERASEFF ) ROM_LOAD( "ringo470.rom", 0x0000, 0x2000, CRC(b9c5abec) SHA1(191c4994adfffe4f83b98dc3959dde2724b1dbac) ) ROM_END ROM_START(pc8300) - ROM_REGION( 0x10000, "maincpu",0 ) + ROM_REGION( 0x2000, "maincpu",0 ) ROM_LOAD( "8300_org.rom", 0x0000, 0x2000, CRC(a350f2b1) SHA1(6a9be484556cc27a9cd9d71085d2027c6243333f) ) ROM_REGION( 0x200, "gfx1", 0 ) @@ -501,7 +444,7 @@ ROM_START(pc8300) ROM_END ROM_START(pow3000) - ROM_REGION( 0x10000, "maincpu",0 ) + ROM_REGION( 0x2000, "maincpu",0 ) ROM_LOAD( "pow3000.rom", 0x0000, 0x2000, CRC(8a49b2c3) SHA1(9b22daf2f3a991aa6a358ef95b091654c3ca1bdf) ) ROM_REGION( 0x200, "gfx1", 0 ) @@ -509,7 +452,7 @@ ROM_START(pow3000) ROM_END ROM_START(lambda) - ROM_REGION( 0x10000, "maincpu",0 ) + ROM_REGION( 0x2000, "maincpu",0 ) ROM_LOAD( "lambda.rom", 0x0000, 0x2000, CRC(8a49b2c3) SHA1(9b22daf2f3a991aa6a358ef95b091654c3ca1bdf) ) ROM_REGION( 0x200, "gfx1", 0 ) @@ -517,28 +460,26 @@ ROM_START(lambda) ROM_END ROM_START( tk85 ) - ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_REGION( 0x2800, "maincpu", 0 ) ROM_LOAD( "tk85.rom", 0x0000, 0x2800, CRC(8972d756) SHA1(7b961a1733fc047eb682150a32e17bca10a018d2) ) ROM_END /* This homebrew has 192k of RAM and 32k of ROM via bankswitching. One of the primary bankswitching lines is /M1, which is not emulated by MAME's z80. */ ROM_START( zx97 ) - ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_LOAD( "zx97.rom", 0x0000, 0x2000, CRC(5cf49744) SHA1(b2a486efdc7b2bc3dc8e5a441ea5532bfa3207bd) ) - ROM_IGNORE( 0x6000 ) /* Unemulated bankswitched part */ + ROM_REGION( 0x8000, "maincpu", 0 ) + ROM_LOAD( "zx97.rom", 0x0000, 0x8000, CRC(5cf49744) SHA1(b2a486efdc7b2bc3dc8e5a441ea5532bfa3207bd) ) ROM_END /* Game Drivers */ -/* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */ -COMP( 1980, zx80, 0, 0, zx80, zx80, zx_state, zx, "Sinclair Research Ltd", "ZX-80", 0 ) -COMP( 1981, zx81, 0, 0, zx81, zx81, zx_state, zx, "Sinclair Research Ltd", "ZX-81", 0 ) -COMP( 1982, ts1000, zx81, 0, ts1000, zx81, zx_state, zx, "Timex Sinclair", "Timex Sinclair 1000", 0 ) -COMP( 1983, ts1500, zx81, 0, ts1500, zx81, zx_state, zx, "Timex Sinclair", "Timex Sinclair 1500", 0 ) -COMP( 1983, tk85, zx81, 0, ts1000, zx81, zx_state, zx, "Microdigital", "TK85", 0 ) -COMP( 1983, ringo470, zx81, 0, ts1000, zx81, zx_state, zx, "Ritas do Brasil Ltda", "Ringo 470", 0 ) -COMP( 1984, pc8300, zx81, 0, pc8300, pc8300, zx_state, zx, "Your Computer", "PC8300", 0 ) +COMP( 1980, zx80, 0, 0, zx80, zx80, zx_state, zx, "Sinclair Research Ltd", "ZX-80", MACHINE_NO_SOUND ) +COMP( 1981, zx81, 0, 0, zx81, zx81, zx_state, zx, "Sinclair Research Ltd", "ZX-81", MACHINE_NO_SOUND ) +COMP( 1982, ts1000, zx81, 0, ts1000, zx81, zx_state, zx, "Timex Sinclair", "Timex Sinclair 1000", MACHINE_NO_SOUND ) +COMP( 1983, ts1500, zx81, 0, ts1500, zx81, zx_state, zx, "Timex Sinclair", "Timex Sinclair 1500", MACHINE_NO_SOUND ) +COMP( 1983, tk85, zx81, 0, ts1000, zx81, zx_state, zx, "Microdigital", "TK85", MACHINE_NO_SOUND ) +COMP( 1983, ringo470, zx81, 0, ts1000, zx81, zx_state, zx, "Ritas do Brasil Ltda", "Ringo 470", MACHINE_NO_SOUND ) +COMP( 1984, pc8300, zx81, 0, pc8300, pc8300, zx_state, zx, "Your Computer", "PC8300", 0 ) COMP( 1983, pow3000, zx81, 0, pow3000, pow3000, zx_state, zx, "Creon Enterprises", "Power 3000", 0 ) COMP( 1982, lambda, zx81, 0, pow3000, pow3000, zx_state, zx, "Lambda Electronics Ltd", "Lambda 8300", 0 ) -COMP( 1997, zx97, zx81, 0, zx81, zx81, zx_state, zx, "Wilf Rigter", "ZX97", MACHINE_NOT_WORKING | MACHINE_UNOFFICIAL ) +COMP( 1997, zx97, zx81, 0, zx81, zx81, zx_state, zx, "Wilf Rigter", "ZX97", MACHINE_NOT_WORKING | MACHINE_NO_SOUND | MACHINE_UNOFFICIAL ) diff --git a/src/mame/includes/abc80x.h b/src/mame/includes/abc80x.h index 86a54269778..8e466ed8052 100644 --- a/src/mame/includes/abc80x.h +++ b/src/mame/includes/abc80x.h @@ -44,7 +44,7 @@ #define ABC806_ATTR_RAM_SIZE 0x800 #define ABC806_VIDEO_RAM_SIZE 0x20000 -#define ABC800_CHAR_WIDTH 6 +#define ABC800_CHAR_WIDTH 12 #define ABC800_CCLK ABC800_X01/ABC800_CHAR_WIDTH #define SCREEN_TAG "screen" diff --git a/src/mame/includes/amstrad.h b/src/mame/includes/amstrad.h index 40c798ccbdb..30e74caa743 100644 --- a/src/mame/includes/amstrad.h +++ b/src/mame/includes/amstrad.h @@ -30,6 +30,7 @@ #include "bus/cpc/brunword4.h" #include "bus/cpc/hd20.h" #include "bus/cpc/magicsound.h" +#include "bus/cpc/doubler.h" #include "machine/ram.h" #include "imagedev/cassette.h" #include "bus/centronics/ctronics.h" diff --git a/src/mame/includes/apollo.h b/src/mame/includes/apollo.h index 41b0f04e6ff..79b884ba218 100644 --- a/src/mame/includes/apollo.h +++ b/src/mame/includes/apollo.h @@ -37,21 +37,25 @@ #define LOG(x) { logerror x; logerror ("\n"); apollo_check_log(); } #define LOG1(x) { if (VERBOSE > 0) LOG(x) } #define LOG2(x) { if (VERBOSE > 1) LOG(x) } -#define CLOG(x) { logerror ("%s - %s: ", apollo_cpu_context(machine().device(MAINCPU)), tag()); LOG(x) } +#define CLOG(x) { machine().logerror ("%s - %s: ", apollo_cpu_context(machine().device(MAINCPU)), tag()); machine().logerror x; machine().logerror ("\n"); apollo_check_log(); } #define CLOG1(x) { if (VERBOSE > 0) CLOG(x) } #define CLOG2(x) { if (VERBOSE > 1) CLOG(x) } -#define DLOG(x) { logerror ("%s - %s: ", apollo_cpu_context(device->machine().device(MAINCPU)), device->tag()); LOG(x) } +#define DLOG(x) { device->logerror ("%s - %s: ", apollo_cpu_context(device->machine().device(MAINCPU)), device->tag()); device->logerror x; device->logerror ("\n"); apollo_check_log(); } #define DLOG1(x) { if (VERBOSE > 0) DLOG(x) } #define DLOG2(x) { if (VERBOSE > 1) DLOG(x) } -#define MLOG(x) { logerror ("%s: ", apollo_cpu_context(machine().device(MAINCPU))); LOG(x) } +#define MLOG(x) { machine().logerror ("%s: ", apollo_cpu_context(machine().device(MAINCPU))); machine().logerror x; machine().logerror ("\n"); apollo_check_log(); } #define MLOG1(x) { if (VERBOSE > 0) MLOG(x) } #define MLOG2(x) { if (VERBOSE > 1) MLOG(x) } -#define SLOG(x) { logerror ("%s: ", apollo_cpu_context(&space.device())); LOG(x) } +#define SLOG(x) { machine().logerror ("%s: ", apollo_cpu_context(m_maincpu));machine().logerror x; machine().logerror ("\n"); apollo_check_log(); } #define SLOG1(x) { if (VERBOSE > 0) SLOG(x) } #define SLOG2(x) { if (VERBOSE > 1) SLOG(x) } #define MAINCPU "maincpu" +// Enabling this is >NOT< supported by MESSdev +// Do *not* report any issues on Mametesters if this is enabled! +// #define APOLLO_XXL + /*----------- machine/apollo_dbg.c -----------*/ int apollo_debug_instruction_hook(m68000_base_device *device, offs_t curpc); @@ -70,6 +74,9 @@ void apollo_check_log(); // return 1 if node is DN3000 or DSP3000, 0 otherwise int apollo_is_dn3000(void); +// return 1 if node is DN5500 or DSP5500, 0 otherwise +int apollo_is_dn5500(void); + // return 1 if node is DSP3000 or DSP3500, 0 otherwise int apollo_is_dsp3x00(void); @@ -82,7 +89,7 @@ UINT32 apollo_get_node_id(void); // should be called by the CPU core before executing each instruction int apollo_instruction_hook(m68000_base_device *device, offs_t curpc); -void apollo_set_cache_status_register(UINT8 mask, UINT8 data); +void apollo_set_cache_status_register(device_t *device,UINT8 mask, UINT8 data); /*----------- machine/apollo.c -----------*/ @@ -98,10 +105,12 @@ void apollo_set_cache_status_register(UINT8 mask, UINT8 data); #define APOLLO_SIO_TAG "sio" #define APOLLO_SIO2_TAG "sio2" #define APOLLO_ETH_TAG "3c505" +#define APOLLO_NI_TAG "node_id" #define APOLLO_ISA_TAG "isabus" // forward declaration class apollo_sio; +class apollo_ni; class apollo_state : public driver_device { @@ -118,6 +127,7 @@ public: m_sio(*this, APOLLO_SIO_TAG), m_sio2(*this, APOLLO_SIO2_TAG), m_rtc(*this, APOLLO_RTC_TAG), + m_node_id(*this, APOLLO_NI_TAG), m_isa(*this, APOLLO_ISA_TAG) { } @@ -132,6 +142,7 @@ public: required_device<apollo_sio> m_sio; optional_device<apollo_sio> m_sio2; required_device<mc146818_device> m_rtc; + required_device<apollo_ni> m_node_id; required_device<isa16_device> m_isa; DECLARE_WRITE16_MEMBER(apollo_csr_status_register_w); @@ -173,6 +184,10 @@ public: DECLARE_WRITE16_MEMBER(apollo_atbus_io_w); DECLARE_READ16_MEMBER(apollo_atbus_memory_r); DECLARE_WRITE16_MEMBER(apollo_atbus_memory_w); + DECLARE_READ16_MEMBER(apollo_atbus_unmap_io_r); + DECLARE_WRITE16_MEMBER(apollo_atbus_unmap_io_w); + DECLARE_READ8_MEMBER(apollo_atbus_unmap_r); + DECLARE_WRITE8_MEMBER(apollo_atbus_unmap_w); DECLARE_WRITE8_MEMBER(dn5500_memory_present_register_w); DECLARE_READ8_MEMBER(dn5500_memory_present_register_r); DECLARE_WRITE8_MEMBER(dn5500_11500_w); @@ -335,6 +350,55 @@ private: extern const device_type APOLLO_SIO; +/*----------- machine/apollo_ni.c -----------*/ + +#define MCFG_APOLLO_NI_ADD(_tag, _xtal) \ + MCFG_DEVICE_ADD(_tag, APOLLO_NI, _xtal) + +/*** Apollo Node ID device ***/ + +class apollo_ni: public device_t, public device_image_interface +{ +public: + // construction/destruction + apollo_ni(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + virtual ~apollo_ni(); + + virtual iodevice_t image_type() const { return IO_ROM; } + + virtual bool is_readable() const { return 1; } + virtual bool is_writeable() const { return 1; } + virtual bool is_creatable() const { return 1; } + virtual bool must_be_loaded() const { return 0; } + virtual bool is_reset_on_load() const { return 0; } + virtual const char *image_interface() const { return NULL; } + virtual const char *file_extensions() const { return "ani,bin"; } + virtual const option_guide *create_option_guide() const { return NULL; } + + DECLARE_WRITE16_MEMBER(write); + DECLARE_READ16_MEMBER(read); + + // image-level overrides + virtual bool call_load(); + virtual bool call_create(int format_type, option_resolution *format_options); + virtual void call_unload(); + + void set_node_id_from_disk(); + +protected: + // device-level overrides + virtual void device_config_complete() ; + virtual void device_start(); + virtual void device_reset(); + +private: + void set_node_id(UINT32 node_id); + UINT32 m_node_id; +}; + +// device type definition +extern const device_type APOLLO_NI; + /*----------- video/apollo.c -----------*/ #define APOLLO_SCREEN_TAG "apollo_screen" @@ -599,4 +663,62 @@ extern const device_type APOLLO_MONO19I; MACHINE_CONFIG_EXTERN( apollo_mono19i ); +#ifdef APOLLO_XXL + +/*----------- machine/apollo_stdio.c -----------*/ + +//************************************************************************** +// DEVICE CONFIGURATION MACROS +//************************************************************************** + +#define MCFG_APOLLO_STDIO_TX_CALLBACK(_cb) \ + devcb = &apollo_stdio_device::set_tx_cb(*device, DEVCB_##_cb); + +//************************************************************************** +// TYPE DEFINITIONS +//************************************************************************** + +// ======================> apollo_stdio_device + +class apollo_stdio_device: public device_t, public device_serial_interface +{ +public: + // construction/destruction + apollo_stdio_device(const machine_config &mconfig, const char *tag, + device_t *owner, UINT32 clock); + + template<class _Object> static devcb_base &set_tx_cb(device_t &device, _Object object) + { + return downcast<apollo_stdio_device &> (device).m_tx_w.set_callback(object); + } + + devcb_write_line m_tx_w; + +private: + // device-level overrides + virtual void device_start(); + virtual void device_reset(); + virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); + + // serial overrides + virtual void rcv_complete(); // Rx completed receiving byte + virtual void tra_complete(); // Tx completed sending byte + virtual void tra_callback(); // Tx send bit + + TIMER_CALLBACK_MEMBER( poll_timer ); + void xmit_char(UINT8 data); + + static const int XMIT_RING_SIZE = 64; + + UINT8 m_xmitring[XMIT_RING_SIZE]; + int m_xmit_read, m_xmit_write; + bool m_tx_busy; + + emu_timer* m_poll_timer; +}; + +// device type definition +extern const device_type APOLLO_STDIO; +#endif /* APOLLO_XXL */ + #endif /* APOLLO_H_ */ diff --git a/src/mame/includes/bbc.h b/src/mame/includes/bbc.h index 7559ce4b556..5ba80cb2472 100644 --- a/src/mame/includes/bbc.h +++ b/src/mame/includes/bbc.h @@ -83,9 +83,9 @@ public: m_palette(*this, "palette") { } - DECLARE_FLOPPY_FORMATS(floppy_formats_525sd); - DECLARE_FLOPPY_FORMATS(floppy_formats_525dd); - DECLARE_FLOPPY_FORMATS(floppy_formats_35dd); + DECLARE_FLOPPY_FORMATS(floppy_formats_bbc); + DECLARE_FLOPPY_FORMATS(floppy_formats_bbcm); + DECLARE_FLOPPY_FORMATS(floppy_formats_bbcmc); DECLARE_WRITE8_MEMBER(bbc_page_selecta_w); DECLARE_WRITE8_MEMBER(bbc_memorya1_w); @@ -154,8 +154,6 @@ public: DECLARE_READ8_MEMBER(bbcb_via_user_read_portb); DECLARE_WRITE8_MEMBER(bbcb_via_user_write_portb); DECLARE_WRITE_LINE_MEMBER(bbcb_via_user_irq_w); - DECLARE_WRITE_LINE_MEMBER(bbc_wd177x_intrq_w); - DECLARE_WRITE_LINE_MEMBER(bbc_wd177x_drq_w); DECLARE_WRITE_LINE_MEMBER(bbc_vsync); void update_acia_rxd(); void update_acia_dcd(); @@ -166,7 +164,8 @@ public: DECLARE_WRITE_LINE_MEMBER(write_dcd_serial); DECLARE_WRITE_LINE_MEMBER(write_cts_serial); DECLARE_INPUT_CHANGED_MEMBER( trigger_reset ); - DECLARE_WRITE_LINE_MEMBER(bbc_i8271_interrupt); + DECLARE_WRITE_LINE_MEMBER(fdc_intrq_w); + DECLARE_WRITE_LINE_MEMBER(fdc_drq_w); DECLARE_WRITE_LINE_MEMBER(motor_w); DECLARE_WRITE_LINE_MEMBER(side_w); @@ -176,11 +175,11 @@ public: void bbc_setup_banks(memory_bank *membank, int banks, UINT32 shift, UINT32 size); void bbcm_setup_banks(memory_bank *membank, int banks, UINT32 shift, UINT32 size); - int bbc_load_cart(device_image_interface &image, generic_slot_device *slot); - DECLARE_DEVICE_IMAGE_LOAD_MEMBER(exp1_load) { return bbc_load_cart(image, m_exp1); } - DECLARE_DEVICE_IMAGE_LOAD_MEMBER(exp2_load) { return bbc_load_cart(image, m_exp2); } - DECLARE_DEVICE_IMAGE_LOAD_MEMBER(exp3_load) { return bbc_load_cart(image, m_exp3); } - DECLARE_DEVICE_IMAGE_LOAD_MEMBER(exp4_load) { return bbc_load_cart(image, m_exp4); } + int bbc_load_rom(device_image_interface &image, generic_slot_device *slot); + DECLARE_DEVICE_IMAGE_LOAD_MEMBER(exp1_load) { return bbc_load_rom(image, m_exp1); } + DECLARE_DEVICE_IMAGE_LOAD_MEMBER(exp2_load) { return bbc_load_rom(image, m_exp2); } + DECLARE_DEVICE_IMAGE_LOAD_MEMBER(exp3_load) { return bbc_load_rom(image, m_exp3); } + DECLARE_DEVICE_IMAGE_LOAD_MEMBER(exp4_load) { return bbc_load_rom(image, m_exp4); } int bbcm_load_cart(device_image_interface &image, generic_slot_device *slot); DECLARE_DEVICE_IMAGE_LOAD_MEMBER(bbcm_exp1_load) { return bbcm_load_cart(image, m_exp1); } @@ -228,6 +227,7 @@ public: // HACK FOR MC6845 void check_interrupts(); + bool m_os01; // flag indicating whether OS 0.1 is being used int m_SWRAMtype; // this stores the DIP switch setting for the SWRAM type being used int m_Speech; // this stores the CONF setting for Speech enabled/disabled @@ -344,20 +344,12 @@ public: // HACK FOR MC6845 /************************************** - i8271 disc control - ***************************************/ - - int m_previous_i8271_int_state; // 8271 interrupt status - - /************************************** WD1770 disc control ***************************************/ int m_drive_control; - int m_wd177x_irq_state; - int m_wd177x_drq_state; - int m_previous_wd177x_int_state; - int m_177x_IntEnabled; + int m_fdc_irq; + int m_fdc_drq; /************************************** Video Code @@ -386,7 +378,6 @@ public: // HACK FOR MC6845 int m_BBC_HSync; int m_BBC_VSync; - int m_Teletext_Latch; int m_VideoULA_CR; int m_VideoULA_CR_counter; @@ -398,7 +389,6 @@ public: // HACK FOR MC6845 int m_videoULA_teletext_normal_select; int m_videoULA_flash_colour_select; - int m_pixels_per_byte; int m_emulation_pixels_per_real_pixel; int m_emulation_pixels_per_byte; @@ -406,33 +396,26 @@ public: // HACK FOR MC6845 int m_emulation_cursor_size; int m_cursor_state; - int m_videoULA_pallet0[16]; - int m_videoULA_pallet1[16]; - int *m_videoULA_pallet_lookup; - - void (*m_draw_function)(running_machine &machine); + int m_videoULA_palette0[16]; + int m_videoULA_palette1[16]; + int *m_videoULA_palette_lookup; - void bbcbp_setvideoshadow(int vdusel); + void bbc_setvideoshadow(int vdusel); void common_init(int memorySize); void set_pixel_lookup(); void set_cursor(bbc_state *state); void BBC_Clock_CR(bbc_state *state); - void BBC_draw_teletext(); - void BBC_ula_drawpixel(bbc_state *state, int col, int number_of_pixels); - void BBC_draw_hi_res(); void BBC_Set_HSync(int offset, int data); void BBC_Set_VSync(int offset, int data); void BBC_Set_CRE(int offset, int data); - void bbc_frameclock(); int vdudriverset(); int bbcm_vdudriverset(); int bbc_keyboard(address_space &space, int data); void bbcb_IC32_initialise(bbc_state *state); void MC146818_set(address_space &space); - void bbc_TMSint(int status); void MC6850_Receive_Clock(int new_clock); void BBC_Cassette_motor(unsigned char status); - void bbc_update_fdq_int(int state); + void bbc_update_nmi(); unsigned int calculate_video_address(int ma,int ra); required_device<palette_device> m_palette; }; diff --git a/src/mame/includes/champbas.h b/src/mame/includes/champbas.h index ac48cbf6b3d..2a1a3fdb237 100644 --- a/src/mame/includes/champbas.h +++ b/src/mame/includes/champbas.h @@ -1,85 +1,87 @@ // license:BSD-3-Clause -// copyright-holders:Ernesto Corvi, Jarek Parchanski, Nicola Salmoria +// copyright-holders:Ernesto Corvi, Jarek Parchanski, Nicola Salmoria, hap /************************************************************************* Talbot - Champion Base Ball - Exciting Soccer *************************************************************************/ - -#define CPUTAG_MCU "mcu" +#include "machine/alpha8201.h" #include "sound/dac.h" + class champbas_state : public driver_device { public: champbas_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), - m_bg_videoram(*this, "bg_videoram"), - m_spriteram(*this, "spriteram"), - m_spriteram_2(*this, "spriteram_2"), m_maincpu(*this, "maincpu"), m_audiocpu(*this, "audiocpu"), - m_mcu(*this, CPUTAG_MCU), - m_dac(*this, "dac"), + m_alpha_8201(*this, "alpha_8201"), m_dac1(*this, "dac1"), m_dac2(*this, "dac2"), m_gfxdecode(*this, "gfxdecode"), - m_palette(*this, "palette"){ } + m_palette(*this, "palette"), + m_mainram(*this, "mainram"), + m_vram(*this, "vram"), + m_spriteram(*this, "spriteram"), + m_spriteram2(*this, "spriteram2") + { } + + // devices, memory pointers + required_device<cpu_device> m_maincpu; + optional_device<cpu_device> m_audiocpu; + optional_device<alpha_8201_device> m_alpha_8201; + optional_device<dac_device> m_dac1; + optional_device<dac_device> m_dac2; + required_device<gfxdecode_device> m_gfxdecode; + required_device<palette_device> m_palette; - /* memory pointers */ - required_shared_ptr<UINT8> m_bg_videoram; + required_shared_ptr<UINT8> m_mainram; + required_shared_ptr<UINT8> m_vram; required_shared_ptr<UINT8> m_spriteram; - required_shared_ptr<UINT8> m_spriteram_2; + optional_shared_ptr<UINT8> m_spriteram2; - /* video-related */ - tilemap_t *m_bg_tilemap; - UINT8 m_gfx_bank; - UINT8 m_palette_bank; + // internal state + UINT8 m_irq_mask; + tilemap_t *m_bg_tilemap; + UINT8 m_gfx_bank; + UINT8 m_palette_bank; - /* misc */ - int m_watchdog_count; + // handlers + DECLARE_WRITE8_MEMBER(irq_enable_w); + DECLARE_WRITE8_MEMBER(mcu_switch_w); + DECLARE_WRITE8_MEMBER(mcu_start_w); + DECLARE_READ8_MEMBER(champbja_protection_r); - /* devices */ - required_device<cpu_device> m_maincpu; - optional_device<cpu_device> m_audiocpu; - optional_device<cpu_device> m_mcu; + DECLARE_CUSTOM_INPUT_MEMBER(watchdog_bit2); + + INTERRUPT_GEN_MEMBER(vblank_irq); + TIMER_DEVICE_CALLBACK_MEMBER(exctsccr_sound_irq); + + DECLARE_WRITE8_MEMBER(dac1_w); + DECLARE_WRITE8_MEMBER(dac2_w); + + DECLARE_WRITE8_MEMBER(tilemap_w); + DECLARE_WRITE8_MEMBER(gfxbank_w); + DECLARE_WRITE8_MEMBER(palette_bank_w); + DECLARE_WRITE8_MEMBER(flipscreen_w); - UINT8 m_irq_mask; - DECLARE_WRITE8_MEMBER(champbas_watchdog_reset_w); - DECLARE_WRITE8_MEMBER(irq_enable_w); - DECLARE_WRITE8_MEMBER(champbas_mcu_switch_w); - DECLARE_WRITE8_MEMBER(champbas_mcu_halt_w); - DECLARE_READ8_MEMBER(champbja_alt_protection_r); - DECLARE_WRITE8_MEMBER(champbas_bg_videoram_w); - DECLARE_WRITE8_MEMBER(champbas_gfxbank_w); - DECLARE_WRITE8_MEMBER(champbas_palette_bank_w); - DECLARE_WRITE8_MEMBER(champbas_flipscreen_w); - DECLARE_CUSTOM_INPUT_MEMBER(champbas_watchdog_bit2); - DECLARE_WRITE8_MEMBER(champbas_dac_w); - DECLARE_WRITE8_MEMBER(champbas_dac1_w); - DECLARE_WRITE8_MEMBER(champbas_dac2_w); DECLARE_DRIVER_INIT(exctsccr); DECLARE_DRIVER_INIT(champbas); - TILE_GET_INFO_MEMBER(champbas_get_bg_tile_info); - TILE_GET_INFO_MEMBER(exctsccr_get_bg_tile_info); - DECLARE_MACHINE_START(champbas); - DECLARE_MACHINE_RESET(champbas); - DECLARE_VIDEO_START(champbas); + DECLARE_PALETTE_INIT(champbas); - DECLARE_MACHINE_START(exctsccr); - DECLARE_VIDEO_START(exctsccr); DECLARE_PALETTE_INIT(exctsccr); + DECLARE_VIDEO_START(champbas); + DECLARE_VIDEO_START(exctsccr); + TILE_GET_INFO_MEMBER(champbas_get_bg_tile_info); + TILE_GET_INFO_MEMBER(exctsccr_get_bg_tile_info); + UINT32 screen_update_champbas(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_exctsccr(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void screen_eof_champbas(screen_device &screen, bool state); - INTERRUPT_GEN_MEMBER(vblank_irq); - TIMER_CALLBACK_MEMBER(exctsccr_fm_callback); - void champbas_draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect ); - void exctsccr_draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect ); - optional_device<dac_device> m_dac; - optional_device<dac_device> m_dac1; - optional_device<dac_device> m_dac2; - required_device<gfxdecode_device> m_gfxdecode; - required_device<palette_device> m_palette; + void champbas_draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect); + void exctsccr_draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect); + + virtual void machine_start(); + virtual void machine_reset(); }; diff --git a/src/mame/includes/equites.h b/src/mame/includes/equites.h index bad1c68fb88..c617fc26160 100644 --- a/src/mame/includes/equites.h +++ b/src/mame/includes/equites.h @@ -1,5 +1,6 @@ // license:BSD-3-Clause // copyright-holders:Acho A. Tang, Nicola Salmoria +#include "machine/alpha8201.h" #include "sound/samples.h" #include "sound/msm5232.h" #include "sound/dac.h" @@ -14,28 +15,29 @@ public: : driver_device(mconfig, type, tag), m_bg_videoram(*this, "bg_videoram"), m_spriteram(*this, "spriteram"), - m_workram(*this, "workram"), m_spriteram_2(*this, "spriteram_2"), - m_mcu_ram(*this, "mcu_ram"), + m_workram(*this, "workram"), + m_mcuram(*this, "mcuram"), m_maincpu(*this, "maincpu"), m_audiocpu(*this, "audiocpu"), m_samples(*this, "samples"), m_gfxdecode(*this, "gfxdecode"), m_palette(*this, "palette"), m_screen(*this, "screen"), - m_mcu(*this, "mcu"), + m_alpha_8201(*this, "alpha_8201"), + m_fakemcu(*this, "mcu"), m_msm(*this, "msm"), m_dac_1(*this, "dac1"), - m_dac_2(*this, "dac2") { } + m_dac_2(*this, "dac2") + { } /* memory pointers */ required_shared_ptr<UINT16> m_bg_videoram; - UINT8 * m_fg_videoram; // 8bits + UINT8 *m_fg_videoram; // 8bits required_shared_ptr<UINT16> m_spriteram; - optional_shared_ptr<UINT16> m_workram; optional_shared_ptr<UINT16> m_spriteram_2; - required_shared_ptr<UINT8> m_mcu_ram; // 8bits -// UINT16 * m_nvram; // currently this uses generic nvram handling + optional_shared_ptr<UINT16> m_workram; + optional_shared_ptr<UINT8> m_mcuram; /* video-related */ tilemap_t *m_fg_tilemap; @@ -72,7 +74,8 @@ public: required_device<gfxdecode_device> m_gfxdecode; required_device<palette_device> m_palette; required_device<screen_device> m_screen; - optional_device<cpu_device> m_mcu; + required_device<alpha_8201_device> m_alpha_8201; + optional_device<cpu_device> m_fakemcu; required_device<msm5232_device> m_msm; required_device<dac_device> m_dac_1; required_device<dac_device> m_dac_2; @@ -86,10 +89,10 @@ public: DECLARE_WRITE16_MEMBER(gekisou_unknown_0_w); DECLARE_WRITE16_MEMBER(gekisou_unknown_1_w); DECLARE_READ16_MEMBER(equites_spriteram_kludge_r); - DECLARE_READ16_MEMBER(mcu_r); - DECLARE_WRITE16_MEMBER(mcu_w); - DECLARE_WRITE16_MEMBER(mcu_halt_assert_w); - DECLARE_WRITE16_MEMBER(mcu_halt_clear_w); + DECLARE_READ8_MEMBER(mcu_ram_r); + DECLARE_WRITE8_MEMBER(mcu_ram_w); + DECLARE_WRITE16_MEMBER(mcu_start_w); + DECLARE_WRITE16_MEMBER(mcu_switch_w); DECLARE_READ16_MEMBER(equites_fg_videoram_r); DECLARE_WRITE16_MEMBER(equites_fg_videoram_w); DECLARE_WRITE16_MEMBER(equites_bg_videoram_w); diff --git a/src/mame/includes/hng64.h b/src/mame/includes/hng64.h index 10f025d8754..c034456299d 100644 --- a/src/mame/includes/hng64.h +++ b/src/mame/includes/hng64.h @@ -111,15 +111,15 @@ class hng64_state; class hng64_poly_renderer : public poly_manager<float, hng64_poly_data, 7, HNG64_MAX_POLYGONS> { public: - hng64_poly_renderer(hng64_state& state); - - void drawShaded(polygon *p); - void render_scanline(INT32 scanline, const extent_t& extent, const hng64_poly_data& renderData, int threadid); - - hng64_state& state() { return m_state; } - bitmap_rgb32& colorBuffer3d() { return m_colorBuffer3d; } - float* depthBuffer3d() { return m_depthBuffer3d; } - + hng64_poly_renderer(hng64_state& state); + + void drawShaded(polygon *p); + void render_scanline(INT32 scanline, const extent_t& extent, const hng64_poly_data& renderData, int threadid); + + hng64_state& state() { return m_state; } + bitmap_rgb32& colorBuffer3d() { return m_colorBuffer3d; } + float* depthBuffer3d() { return m_depthBuffer3d; } + private: hng64_state& m_state; @@ -318,14 +318,14 @@ public: TIMER_DEVICE_CALLBACK_MEMBER(hng64_irq); void do_dma(address_space &space); - void hng64_mark_all_tiles_dirty(int tilemap); + void hng64_mark_all_tiles_dirty(int tilemap); void hng64_mark_tile_dirty(int tilemap, int tile_index); - void hng64_drawtilemap(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect, int tm); + void hng64_drawtilemap(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect, int tm); - void hng64_tilemap_draw_roz_core(screen_device &screen, tilemap_t *tmap, const blit_parameters *blit, - UINT32 startx, UINT32 starty, int incxx, int incxy, int incyx, int incyy, int wraparound); + void hng64_tilemap_draw_roz_core(screen_device &screen, tilemap_t *tmap, const blit_parameters *blit, + UINT32 startx, UINT32 starty, int incxx, int incxy, int incyx, int incyy, int wraparound); - void hng64_tilemap_draw_roz(screen_device &screen, bitmap_rgb32 &dest, const rectangle &cliprect, tilemap_t *tmap, + void hng64_tilemap_draw_roz(screen_device &screen, bitmap_rgb32 &dest, const rectangle &cliprect, tilemap_t *tmap, UINT32 startx, UINT32 starty, int incxx, int incxy, int incyx, int incyy, int wraparound, UINT32 flags, UINT8 priority, hng64trans_t drawformat); @@ -333,23 +333,23 @@ public: UINT32 startx, UINT32 starty, int incxx, int incxy, int incyx, int incyy, int wraparound, UINT32 flags, UINT8 priority, UINT8 priority_mask, hng64trans_t drawformat); - + DECLARE_CUSTOM_INPUT_MEMBER(left_handle_r); DECLARE_CUSTOM_INPUT_MEMBER(right_handle_r); DECLARE_CUSTOM_INPUT_MEMBER(acc_down_r); DECLARE_CUSTOM_INPUT_MEMBER(brake_down_r); - hng64_poly_renderer* m_poly_renderer; - - TIMER_CALLBACK_MEMBER(hng64_3dfifo_processed); + hng64_poly_renderer* m_poly_renderer; - UINT8 *m_texturerom; + TIMER_CALLBACK_MEMBER(hng64_3dfifo_processed); + + UINT8 *m_texturerom; UINT16* m_vertsrom; int m_vertsrom_size; - std::vector<polygon> m_polys; // HNG64_MAX_POLYGONS - - void clear3d(); + std::vector<polygon> m_polys; // HNG64_MAX_POLYGONS + + void clear3d(); void hng64_command3d(const UINT16* packet); void draw_sprites(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); void transition_control(bitmap_rgb32 &bitmap, const rectangle &cliprect); @@ -359,13 +359,13 @@ public: void setCameraProjectionMatrix(const UINT16* packet); void recoverPolygonBlock(const UINT16* packet, int& numPolys); void printPacket(const UINT16* packet, int hex); - float uToF(UINT16 input); + float uToF(UINT16 input); void matmul4(float *product, const float *a, const float *b); void vecmatmul4(float *product, const float *a, const float *b); float vecDotProduct(const float *a, const float *b); void setIdentity(float *matrix); void normalize(float* x); - + void reset_sound(); void reset_net(); @@ -399,5 +399,5 @@ public: DECLARE_READ16_MEMBER(sound_comms_r); DECLARE_WRITE16_MEMBER(sound_comms_w); UINT16 main_latch[2]; - UINT16 sound_latch[2]; + UINT16 sound_latch[2]; }; diff --git a/src/mame/includes/imds2.h b/src/mame/includes/imds2.h index 298b808be82..a7360f5d832 100644 --- a/src/mame/includes/imds2.h +++ b/src/mame/includes/imds2.h @@ -80,7 +80,6 @@ class imds2_state : public driver_device required_device<pit8253_device> m_ioctimer; required_device<i8271_device> m_iocfdc; required_device<floppy_connector> m_flop0; - required_device<floppy_connector> m_flop1; required_device<i8041_device> m_iocpio; required_device<i8741_device> m_kbcpu; required_device<palette_device> m_palette; @@ -102,8 +101,6 @@ class imds2_state : public driver_device void imds2_update_beeper(void); void imds2_update_printer(void); - int floppy_load(floppy_image_device *dev); - void floppy_unload(floppy_image_device *dev); // IPC control port UINT8 m_ipc_control; diff --git a/src/mame/includes/m107.h b/src/mame/includes/m107.h index 3772567084c..1e38f870d85 100644 --- a/src/mame/includes/m107.h +++ b/src/mame/includes/m107.h @@ -26,7 +26,7 @@ public: m_palette(*this, "palette"), m_spriteram(*this, "spriteram"), m_vram_data(*this, "vram_data"), - m_upd71059c(*this, "upd71059c") + m_upd71059c(*this, "upd71059c") { } required_device<cpu_device> m_maincpu; diff --git a/src/mame/includes/m92.h b/src/mame/includes/m92.h index a4a3969565e..599c1545129 100644 --- a/src/mame/includes/m92.h +++ b/src/mame/includes/m92.h @@ -37,7 +37,7 @@ public: m_gfxdecode(*this, "gfxdecode"), m_screen(*this, "screen"), m_palette(*this, "palette"), - m_upd71059c(*this, "upd71059c") + m_upd71059c(*this, "upd71059c") { } required_device<buffered_spriteram16_device> m_spriteram; diff --git a/src/mame/includes/neogeo.h b/src/mame/includes/neogeo.h index 5c5b19c585c..7fe88a53a6e 100644 --- a/src/mame/includes/neogeo.h +++ b/src/mame/includes/neogeo.h @@ -392,48 +392,54 @@ ADDRESS_MAP_EXTERN(neogeo_main_map,16); ROM_LOAD16_WORD_SWAP_BIOS( 0, "sp-s2.sp1", 0x00000, 0x020000, CRC(9036d879) SHA1(4f5ed7105b7128794654ce82b51723e16e389543) ) /* Europe, 1 Slot, has also been found on 2 Slot and 4 Slot (the old hacks were designed for this one) */ \ ROM_SYSTEM_BIOS( 1, "euro-s1", "Europe MVS (Ver. 1)" ) \ ROM_LOAD16_WORD_SWAP_BIOS( 1, "sp-s.sp1", 0x00000, 0x020000, CRC(c7f2fa45) SHA1(09576ff20b4d6b365e78e6a5698ea450262697cd) ) /* Europe, 4 Slot */ \ + \ ROM_SYSTEM_BIOS( 2, "us", "US MVS (Ver. 2?)" ) \ ROM_LOAD16_WORD_SWAP_BIOS( 2, "sp-u2.sp1", 0x00000, 0x020000, CRC(e72943de) SHA1(5c6bba07d2ec8ac95776aa3511109f5e1e2e92eb) ) /* US, 2 Slot */ \ ROM_SYSTEM_BIOS( 3, "us-e", "US MVS (Ver. 1)" ) \ ROM_LOAD16_WORD_SWAP_BIOS( 3, "sp-e.sp1", 0x00000, 0x020000, CRC(2723a5b5) SHA1(5dbff7531cf04886cde3ef022fb5ca687573dcb8) ) /* US, 6 Slot (V5?) */ \ - ROM_SYSTEM_BIOS( 4, "asia", "Asia MVS (Ver. 3)" ) \ - ROM_LOAD16_WORD_SWAP_BIOS( 4, "asia-s3.rom", 0x00000, 0x020000, CRC(91b64be3) SHA1(720a3e20d26818632aedf2c2fd16c54f213543e1) ) /* Asia */ \ - ROM_SYSTEM_BIOS( 5, "japan", "Japan MVS (Ver. 3)" ) \ - ROM_LOAD16_WORD_SWAP_BIOS( 5, "vs-bios.rom", 0x00000, 0x020000, CRC(f0e8f27d) SHA1(ecf01eda815909f1facec62abf3594eaa8d11075) ) /* Japan, Ver 6 VS Bios */ \ - ROM_SYSTEM_BIOS( 6, "japan-s2", "Japan MVS (Ver. 2)" ) \ - ROM_LOAD16_WORD_SWAP_BIOS( 6, "sp-j2.sp1", 0x00000, 0x020000, CRC(acede59c) SHA1(b6f97acd282fd7e94d9426078a90f059b5e9dd91) ) /* Japan, Older */ \ - ROM_SYSTEM_BIOS( 7, "japan-s1", "Japan MVS (Ver. 1)" ) \ - ROM_LOAD16_WORD_SWAP_BIOS( 7, "sp1.jipan.1024", 0x00000, 0x020000, CRC(9fb0abe4) SHA1(18a987ce2229df79a8cf6a84f968f0e42ce4e59d) ) /* Japan, Older */ \ - ROM_SYSTEM_BIOS( 8, "mv1c", "NEO-MVH MV1C" ) \ - ROM_LOAD16_WORD_SWAP_BIOS( 8, "sp-45.sp1", 0x00000, 0x080000, CRC(03cc9f6a) SHA1(cdf1f49e3ff2bac528c21ed28449cf35b7957dc1) ) /* Latest Asia bios */ \ - ROM_SYSTEM_BIOS( 9, "japan-j3", "Japan MVS (J3)" ) \ - ROM_LOAD16_WORD_SWAP_BIOS( 9, "japan-j3.bin", 0x00000, 0x020000, CRC(dff6d41f) SHA1(e92910e20092577a4523a6b39d578a71d4de7085) ) /* Latest Japan bios; correct chip label unknown */ \ - ROM_SYSTEM_BIOS(10, "japan-hotel", "Custom Japanese Hotel" ) \ - ROM_LOAD16_WORD_SWAP_BIOS(10, "sp-1v1_3db8c.bin", 0x00000, 0x020000, CRC(162f0ebe) SHA1(fe1c6dd3dfcf97d960065b1bb46c1e11cb7bf271) ) /* 'rare MVS found in japanese hotels' shows v1.3 in test mode */ \ - ROM_SYSTEM_BIOS(11, "unibios31", "Universe Bios (Hack, Ver. 3.1)" ) \ - ROM_LOAD16_WORD_SWAP_BIOS(11, "uni-bios_3_1.rom", 0x00000, 0x020000, CRC(0c58093f) SHA1(29329a3448c2505e1ff45ffa75e61e9693165153) ) /* Universe Bios v3.1 (hack) */ \ - ROM_SYSTEM_BIOS(12, "unibios30", "Universe Bios (Hack, Ver. 3.0)" ) \ - ROM_LOAD16_WORD_SWAP_BIOS(12, "uni-bios_3_0.rom", 0x00000, 0x020000, CRC(a97c89a9) SHA1(97a5eff3b119062f10e31ad6f04fe4b90d366e7f) ) /* Universe Bios v3.0 (hack) */ \ - ROM_SYSTEM_BIOS(13, "unibios23", "Universe Bios (Hack, Ver. 2.3)" ) \ - ROM_LOAD16_WORD_SWAP_BIOS(13, "uni-bios_2_3.rom", 0x00000, 0x020000, CRC(27664eb5) SHA1(5b02900a3ccf3df168bdcfc98458136fd2b92ac0) ) /* Universe Bios v2.3 (hack) */ \ - ROM_SYSTEM_BIOS(14, "unibios23o", "Universe Bios (Hack, Ver. 2.3, older?)" ) \ - ROM_LOAD16_WORD_SWAP_BIOS(14, "uni-bios_2_3o.rom", 0x00000, 0x020000, CRC(601720ae) SHA1(1b8a72c720cdb5ee3f1d735bbcf447b09204b8d9) ) /* Universe Bios v2.3 (hack) alt version, withdrawn? */ \ - ROM_SYSTEM_BIOS(15, "unibios22", "Universe Bios (Hack, Ver. 2.2)" ) \ - ROM_LOAD16_WORD_SWAP_BIOS(15, "uni-bios_2_2.rom", 0x00000, 0x020000, CRC(2d50996a) SHA1(5241a4fb0c63b1a23fd1da8efa9c9a9bd3b4279c) ) /* Universe Bios v2.2 (hack) */ \ - ROM_SYSTEM_BIOS(16, "unibios21", "Universe Bios (Hack, Ver. 2.1)" ) \ - ROM_LOAD16_WORD_SWAP_BIOS(16, "uni-bios_2_1.rom", 0x00000, 0x020000, CRC(8dabf76b) SHA1(c23732c4491d966cf0373c65c83c7a4e88f0082c) ) /* Universe Bios v2.1 (hack) */ \ - ROM_SYSTEM_BIOS(17, "unibios20", "Universe Bios (Hack, Ver. 2.0)" ) \ - ROM_LOAD16_WORD_SWAP_BIOS(17, "uni-bios_2_0.rom", 0x00000, 0x020000, CRC(0c12c2ad) SHA1(37bcd4d30f3892078b46841d895a6eff16dc921e) ) /* Universe Bios v2.0 (hack) */ \ - ROM_SYSTEM_BIOS(18, "unibios13", "Universe Bios (Hack, Ver. 1.3)" ) \ - ROM_LOAD16_WORD_SWAP_BIOS(18, "uni-bios_1_3.rom", 0x00000, 0x020000, CRC(b24b44a0) SHA1(eca8851d30557b97c309a0d9f4a9d20e5b14af4e) ) /* Universe Bios v1.3 (hack) */ \ - ROM_SYSTEM_BIOS(19, "unibios12", "Universe Bios (Hack, Ver. 1.2)" ) \ - ROM_LOAD16_WORD_SWAP_BIOS(19, "uni-bios_1_2.rom", 0x00000, 0x020000, CRC(4fa698e9) SHA1(682e13ec1c42beaa2d04473967840c88fd52c75a) ) /* Universe Bios v1.2 (hack) */ \ - ROM_SYSTEM_BIOS(20, "unibios12o", "Universe Bios (Hack, Ver. 1.2, older)" ) \ - ROM_LOAD16_WORD_SWAP_BIOS(20, "uni-bios_1_2o.rom", 0x00000, 0x020000, CRC(e19d3ce9) SHA1(af88ef837f44a3af2d7144bb46a37c8512b67770) ) /* Universe Bios v1.2 (hack) alt version */ \ - ROM_SYSTEM_BIOS(21, "unibios11", "Universe Bios (Hack, Ver. 1.1)" ) \ - ROM_LOAD16_WORD_SWAP_BIOS(21, "uni-bios_1_1.rom", 0x00000, 0x020000, CRC(5dda0d84) SHA1(4153d533c02926a2577e49c32657214781ff29b7) ) /* Universe Bios v1.1 (hack) */ \ - ROM_SYSTEM_BIOS(22, "unibios10", "Universe Bios (Hack, Ver. 1.0)" ) \ - ROM_LOAD16_WORD_SWAP_BIOS(22, "uni-bios_1_0.rom", 0x00000, 0x020000, CRC(0ce453a0) SHA1(3b4c0cd26c176fc6b26c3a2f95143dd478f6abf9) ) /* Universe Bios v1.0 (hack) */ + ROM_SYSTEM_BIOS( 4, "us-v2", "US MVS (4 slot, Ver 2)" ) \ + ROM_LOAD16_WORD_SWAP_BIOS(4, "v2.bin", 0x00000, 0x020000, CRC(62f021f4) SHA1(62d372269e1b3161c64ae21123655a0a22ffd1bb) ) /* US, 4 slot */ \ + \ + ROM_SYSTEM_BIOS( 5, "asia", "Asia MVS (Ver. 3)" ) \ + ROM_LOAD16_WORD_SWAP_BIOS( 5, "asia-s3.rom", 0x00000, 0x020000, CRC(91b64be3) SHA1(720a3e20d26818632aedf2c2fd16c54f213543e1) ) /* Asia */ \ + \ + ROM_SYSTEM_BIOS( 6, "japan", "Japan MVS (Ver. 3)" ) \ + ROM_LOAD16_WORD_SWAP_BIOS( 6, "vs-bios.rom", 0x00000, 0x020000, CRC(f0e8f27d) SHA1(ecf01eda815909f1facec62abf3594eaa8d11075) ) /* Japan, Ver 6 VS Bios */ \ + ROM_SYSTEM_BIOS( 7, "japan-s2", "Japan MVS (Ver. 2)" ) \ + ROM_LOAD16_WORD_SWAP_BIOS( 7, "sp-j2.sp1", 0x00000, 0x020000, CRC(acede59c) SHA1(b6f97acd282fd7e94d9426078a90f059b5e9dd91) ) /* Japan, Older */ \ + ROM_SYSTEM_BIOS( 8, "japan-s1", "Japan MVS (Ver. 1)" ) \ + ROM_LOAD16_WORD_SWAP_BIOS( 8, "sp1.jipan.1024", 0x00000, 0x020000, CRC(9fb0abe4) SHA1(18a987ce2229df79a8cf6a84f968f0e42ce4e59d) ) /* Japan, Older */ \ + ROM_SYSTEM_BIOS( 9, "mv1c", "NEO-MVH MV1C" ) \ + ROM_LOAD16_WORD_SWAP_BIOS( 9, "sp-45.sp1", 0x00000, 0x080000, CRC(03cc9f6a) SHA1(cdf1f49e3ff2bac528c21ed28449cf35b7957dc1) ) /* Latest Asia bios */ \ + ROM_SYSTEM_BIOS( 10, "japan-j3", "Japan MVS (J3)" ) \ + ROM_LOAD16_WORD_SWAP_BIOS( 10, "japan-j3.bin", 0x00000, 0x020000, CRC(dff6d41f) SHA1(e92910e20092577a4523a6b39d578a71d4de7085) ) /* Latest Japan bios; correct chip label unknown */ \ + ROM_SYSTEM_BIOS(11, "japan-hotel", "Custom Japanese Hotel" ) \ + ROM_LOAD16_WORD_SWAP_BIOS(11, "sp-1v1_3db8c.bin", 0x00000, 0x020000, CRC(162f0ebe) SHA1(fe1c6dd3dfcf97d960065b1bb46c1e11cb7bf271) ) /* 'rare MVS found in japanese hotels' shows v1.3 in test mode */ \ + \ + ROM_SYSTEM_BIOS(12, "unibios31", "Universe Bios (Hack, Ver. 3.1)" ) \ + ROM_LOAD16_WORD_SWAP_BIOS(12, "uni-bios_3_1.rom", 0x00000, 0x020000, CRC(0c58093f) SHA1(29329a3448c2505e1ff45ffa75e61e9693165153) ) /* Universe Bios v3.1 (hack) */ \ + ROM_SYSTEM_BIOS(13, "unibios30", "Universe Bios (Hack, Ver. 3.0)" ) \ + ROM_LOAD16_WORD_SWAP_BIOS(13, "uni-bios_3_0.rom", 0x00000, 0x020000, CRC(a97c89a9) SHA1(97a5eff3b119062f10e31ad6f04fe4b90d366e7f) ) /* Universe Bios v3.0 (hack) */ \ + ROM_SYSTEM_BIOS(14, "unibios23", "Universe Bios (Hack, Ver. 2.3)" ) \ + ROM_LOAD16_WORD_SWAP_BIOS(14, "uni-bios_2_3.rom", 0x00000, 0x020000, CRC(27664eb5) SHA1(5b02900a3ccf3df168bdcfc98458136fd2b92ac0) ) /* Universe Bios v2.3 (hack) */ \ + ROM_SYSTEM_BIOS(15, "unibios23o", "Universe Bios (Hack, Ver. 2.3, older?)" ) \ + ROM_LOAD16_WORD_SWAP_BIOS(15, "uni-bios_2_3o.rom", 0x00000, 0x020000, CRC(601720ae) SHA1(1b8a72c720cdb5ee3f1d735bbcf447b09204b8d9) ) /* Universe Bios v2.3 (hack) alt version, withdrawn? */ \ + ROM_SYSTEM_BIOS(16, "unibios22", "Universe Bios (Hack, Ver. 2.2)" ) \ + ROM_LOAD16_WORD_SWAP_BIOS(16, "uni-bios_2_2.rom", 0x00000, 0x020000, CRC(2d50996a) SHA1(5241a4fb0c63b1a23fd1da8efa9c9a9bd3b4279c) ) /* Universe Bios v2.2 (hack) */ \ + ROM_SYSTEM_BIOS(17, "unibios21", "Universe Bios (Hack, Ver. 2.1)" ) \ + ROM_LOAD16_WORD_SWAP_BIOS(17, "uni-bios_2_1.rom", 0x00000, 0x020000, CRC(8dabf76b) SHA1(c23732c4491d966cf0373c65c83c7a4e88f0082c) ) /* Universe Bios v2.1 (hack) */ \ + ROM_SYSTEM_BIOS(18, "unibios20", "Universe Bios (Hack, Ver. 2.0)" ) \ + ROM_LOAD16_WORD_SWAP_BIOS(18, "uni-bios_2_0.rom", 0x00000, 0x020000, CRC(0c12c2ad) SHA1(37bcd4d30f3892078b46841d895a6eff16dc921e) ) /* Universe Bios v2.0 (hack) */ \ + ROM_SYSTEM_BIOS(19, "unibios13", "Universe Bios (Hack, Ver. 1.3)" ) \ + ROM_LOAD16_WORD_SWAP_BIOS(19, "uni-bios_1_3.rom", 0x00000, 0x020000, CRC(b24b44a0) SHA1(eca8851d30557b97c309a0d9f4a9d20e5b14af4e) ) /* Universe Bios v1.3 (hack) */ \ + ROM_SYSTEM_BIOS(20, "unibios12", "Universe Bios (Hack, Ver. 1.2)" ) \ + ROM_LOAD16_WORD_SWAP_BIOS(20, "uni-bios_1_2.rom", 0x00000, 0x020000, CRC(4fa698e9) SHA1(682e13ec1c42beaa2d04473967840c88fd52c75a) ) /* Universe Bios v1.2 (hack) */ \ + ROM_SYSTEM_BIOS(21, "unibios12o", "Universe Bios (Hack, Ver. 1.2, older)" ) \ + ROM_LOAD16_WORD_SWAP_BIOS(21, "uni-bios_1_2o.rom", 0x00000, 0x020000, CRC(e19d3ce9) SHA1(af88ef837f44a3af2d7144bb46a37c8512b67770) ) /* Universe Bios v1.2 (hack) alt version */ \ + ROM_SYSTEM_BIOS(22, "unibios11", "Universe Bios (Hack, Ver. 1.1)" ) \ + ROM_LOAD16_WORD_SWAP_BIOS(22, "uni-bios_1_1.rom", 0x00000, 0x020000, CRC(5dda0d84) SHA1(4153d533c02926a2577e49c32657214781ff29b7) ) /* Universe Bios v1.1 (hack) */ \ + ROM_SYSTEM_BIOS(23, "unibios10", "Universe Bios (Hack, Ver. 1.0)" ) \ + ROM_LOAD16_WORD_SWAP_BIOS(23, "uni-bios_1_0.rom", 0x00000, 0x020000, CRC(0ce453a0) SHA1(3b4c0cd26c176fc6b26c3a2f95143dd478f6abf9) ) /* Universe Bios v1.0 (hack) */ diff --git a/src/mame/includes/osborne1.h b/src/mame/includes/osborne1.h index 52d39a09461..be11edb2927 100644 --- a/src/mame/includes/osborne1.h +++ b/src/mame/includes/osborne1.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Wilbert Pol +// copyright-holders:Wilbert Pol,Vas Crabb /***************************************************************************** * * includes/osborne1.h @@ -11,11 +11,10 @@ #include "emu.h" #include "cpu/z80/z80.h" -#include "cpu/z80/z80daisy.h" -#include "sound/beep.h" +#include "sound/speaker.h" +#include "bus/ieee488/ieee488.h" #include "machine/6821pia.h" #include "machine/6850acia.h" -#include "bus/ieee488/ieee488.h" #include "machine/ram.h" #include "machine/wd_fdc.h" @@ -25,123 +24,140 @@ public: enum { TIMER_VIDEO, - TIMER_SETUP + TIMER_ACIA_RXC_TXC }; - osborne1_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), + osborne1_state(const machine_config &mconfig, device_type type, const char *tag) : + driver_device(mconfig, type, tag), m_maincpu(*this, "maincpu"), + m_gfxdecode(*this, "gfxdecode"), + m_speaker(*this, "speaker"), m_pia0(*this, "pia_0"), m_pia1(*this, "pia_1"), + m_acia(*this, "acia"), m_fdc(*this, "mb8877"), - m_beep(*this, "beeper"), m_ram(*this, RAM_TAG), m_ieee(*this, IEEE488_TAG), m_floppy0(*this, "mb8877:0:525ssdd"), m_floppy1(*this, "mb8877:1:525ssdd"), - m_row0(*this, "ROW0"), - m_row1(*this, "ROW1"), - m_row2(*this, "ROW2"), - m_row3(*this, "ROW3"), - m_row4(*this, "ROW4"), - m_row5(*this, "ROW5"), - m_row6(*this, "ROW6"), - m_row7(*this, "ROW7"), - m_bank1(*this, "bank1"), - m_bank2(*this, "bank2"), - m_bank3(*this, "bank3"), - m_bank4(*this, "bank4"), - m_region_maincpu(*this, "maincpu") { } - - virtual void video_start(); - - UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + m_keyb_row0(*this, "ROW0"), + m_keyb_row1(*this, "ROW1"), + m_keyb_row2(*this, "ROW2"), + m_keyb_row3(*this, "ROW3"), + m_keyb_row4(*this, "ROW4"), + m_keyb_row5(*this, "ROW5"), + m_keyb_row6(*this, "ROW6"), + m_keyb_row7(*this, "ROW7"), + m_btn_reset(*this, "RESET"), + m_cnf(*this, "CNF"), + m_region_maincpu(*this, "maincpu"), + m_bank_0xxx(*this, "bank_0xxx"), + m_bank_1xxx(*this, "bank_1xxx"), + m_bank_fxxx(*this, "bank_fxxx"), + m_video_timer(NULL), + m_p_chargen(NULL), + m_tilemap(NULL), + m_acia_rxc_txc_timer(NULL) + { } + + + DECLARE_WRITE8_MEMBER(bank_0xxx_w); + DECLARE_WRITE8_MEMBER(bank_1xxx_w); + DECLARE_READ8_MEMBER(bank_2xxx_3xxx_r); + DECLARE_WRITE8_MEMBER(bank_2xxx_3xxx_w); + DECLARE_WRITE8_MEMBER(videoram_w); + DECLARE_READ8_MEMBER(opcode_r); + DECLARE_WRITE8_MEMBER(bankswitch_w); + DECLARE_WRITE_LINE_MEMBER(irqack_w); - bitmap_ind16 m_bitmap; - - required_device<cpu_device> m_maincpu; - required_device<pia6821_device> m_pia0; - required_device<pia6821_device> m_pia1; - required_device<mb8877_t> m_fdc; - required_device<beep_device> m_beep; - required_device<ram_device> m_ram; - required_device<ieee488_device> m_ieee; - required_device<floppy_image_device> m_floppy0; - required_device<floppy_image_device> m_floppy1; - - DECLARE_WRITE8_MEMBER(osborne1_0000_w); - DECLARE_WRITE8_MEMBER(osborne1_1000_w); - DECLARE_READ8_MEMBER(osborne1_2000_r); - DECLARE_WRITE8_MEMBER(osborne1_2000_w); - DECLARE_WRITE8_MEMBER(osborne1_3000_w); - DECLARE_WRITE8_MEMBER(osborne1_videoram_w); - DECLARE_WRITE8_MEMBER(osborne1_bankswitch_w); - DECLARE_WRITE_LINE_MEMBER(ieee_pia_irq_a_func); DECLARE_READ8_MEMBER(ieee_pia_pb_r); DECLARE_WRITE8_MEMBER(ieee_pia_pb_w); - DECLARE_WRITE_LINE_MEMBER(video_pia_out_cb2_dummy); + DECLARE_WRITE_LINE_MEMBER(ieee_pia_irq_a_func); + DECLARE_WRITE8_MEMBER(video_pia_port_a_w); DECLARE_WRITE8_MEMBER(video_pia_port_b_w); + DECLARE_WRITE_LINE_MEMBER(video_pia_out_cb2_dummy); DECLARE_WRITE_LINE_MEMBER(video_pia_irq_a_func); - DECLARE_DIRECT_UPDATE_MEMBER(osborne1_opbase); - - bool m_bank2_enabled; - bool m_bank3_enabled; - UINT8 *m_bank4_ptr; - UINT8 *m_empty_4K; - /* IRQ states */ - bool m_pia_0_irq_state; - bool m_pia_1_irq_state; - /* video related */ - UINT8 m_new_start_x; - UINT8 m_new_start_y; - emu_timer *m_video_timer; - UINT8 *m_p_chargen; - /* bankswitch setting */ - UINT8 m_bankswitch; - bool m_in_irq_handler; - bool m_beep_state; + + DECLARE_WRITE_LINE_MEMBER(serial_acia_irq_func); + DECLARE_DRIVER_INIT(osborne1); virtual void machine_reset(); - TIMER_CALLBACK_MEMBER(osborne1_video_callback); - TIMER_CALLBACK_MEMBER(setup_osborne1); + virtual void video_start(); + UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); -protected: - required_ioport m_row0; - required_ioport m_row1; - required_ioport m_row2; - required_ioport m_row3; - required_ioport m_row4; - required_ioport m_row5; - required_ioport m_row6; - required_ioport m_row7; - required_memory_bank m_bank1; - required_memory_bank m_bank2; - required_memory_bank m_bank3; - required_memory_bank m_bank4; - required_memory_region m_region_maincpu; + required_device<cpu_device> m_maincpu; + required_device<gfxdecode_device> m_gfxdecode; + required_device<speaker_sound_device> m_speaker; + required_device<pia6821_device> m_pia0; + required_device<pia6821_device> m_pia1; + required_device<acia6850_device> m_acia; + required_device<mb8877_t> m_fdc; + required_device<ram_device> m_ram; + required_device<ieee488_device> m_ieee; + required_device<floppy_image_device> m_floppy0; + required_device<floppy_image_device> m_floppy1; +protected: virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); + TIMER_CALLBACK_MEMBER(video_callback); + + TILE_GET_INFO_MEMBER(get_tile_info); + + bool set_rom_mode(UINT8 value); + bool set_bit_9(UINT8 value); + void update_irq(); + void update_acia_rxc_txc(); + + // user inputs + required_ioport m_keyb_row0; + required_ioport m_keyb_row1; + required_ioport m_keyb_row2; + required_ioport m_keyb_row3; + required_ioport m_keyb_row4; + required_ioport m_keyb_row5; + required_ioport m_keyb_row6; + required_ioport m_keyb_row7; + required_ioport m_btn_reset; + + // fake inputs for hardware configuration and things that need rewiring + required_ioport m_cnf; + + // pieces of memory + required_memory_region m_region_maincpu; + required_memory_bank m_bank_0xxx; + required_memory_bank m_bank_1xxx; + required_memory_bank m_bank_fxxx; + + // configuration (reloaded on reset) + UINT8 m_screen_pac; + UINT8 m_acia_rxc_txc_div; + UINT8 m_acia_rxc_txc_p_low; + UINT8 m_acia_rxc_txc_p_high; + + // bank switch control bits + UINT8 m_ub4a_q; + UINT8 m_ub6a_q; + UINT8 m_rom_mode; + UINT8 m_bit_9; + + // onboard video state + UINT8 m_scroll_x; + UINT8 m_scroll_y; + UINT8 m_beep_state; + emu_timer *m_video_timer; + bitmap_ind16 m_bitmap; + UINT8 *m_p_chargen; + tilemap_t *m_tilemap; + + // SCREEN-PAC registers + UINT8 m_resolution; + UINT8 m_hc_left; + + // serial state + UINT8 m_acia_irq_state; + UINT8 m_acia_rxc_txc_state; + emu_timer *m_acia_rxc_txc_timer; }; - -// ======================> osborne1_daisy_device - -class osborne1_daisy_device : public device_t, - public device_z80daisy_interface -{ -public: - // construction/destruction - osborne1_daisy_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - -private: - virtual void device_start(); - // z80daisy_interface overrides - virtual int z80daisy_irq_state(); - virtual int z80daisy_irq_ack(); - virtual void z80daisy_irq_reti(); -}; - -extern const device_type OSBORNE1_DAISY; - #endif /* OSBORNE1_H_ */ diff --git a/src/mame/includes/timeplt.h b/src/mame/includes/timeplt.h index e51da532aa9..93b390a8cf8 100644 --- a/src/mame/includes/timeplt.h +++ b/src/mame/includes/timeplt.h @@ -15,17 +15,20 @@ public: : driver_device(mconfig, type, tag), m_maincpu(*this, "maincpu"), m_tc8830f(*this, "tc8830f"), + m_gfxdecode(*this, "gfxdecode"), + m_screen(*this, "screen"), + m_palette(*this, "palette"), m_colorram(*this, "colorram"), m_videoram(*this, "videoram"), m_spriteram(*this, "spriteram"), - m_spriteram2(*this, "spriteram2"), - m_gfxdecode(*this, "gfxdecode"), - m_screen(*this, "screen"), - m_palette(*this, "palette") + m_spriteram2(*this, "spriteram2") { } required_device<cpu_device> m_maincpu; optional_device<tc8830f_device> m_tc8830f; + required_device<gfxdecode_device> m_gfxdecode; + required_device<screen_device> m_screen; + required_device<palette_device> m_palette; /* memory pointers */ required_shared_ptr<UINT8> m_colorram; @@ -33,33 +36,43 @@ public: required_shared_ptr<UINT8> m_spriteram; required_shared_ptr<UINT8> m_spriteram2; - required_device<gfxdecode_device> m_gfxdecode; - required_device<screen_device> m_screen; - required_device<palette_device> m_palette; - /* video-related */ tilemap_t *m_bg_tilemap; /* misc */ UINT8 m_nmi_enable; + bool m_video_enable; + + /* common */ + DECLARE_WRITE8_MEMBER(coincounter_w); + DECLARE_WRITE8_MEMBER(videoram_w); + DECLARE_WRITE8_MEMBER(colorram_w); + DECLARE_WRITE8_MEMBER(flipscreen_w); + DECLARE_READ8_MEMBER(scanline_r); - DECLARE_WRITE8_MEMBER(timeplt_nmi_enable_w); - DECLARE_WRITE8_MEMBER(timeplt_coin_counter_w); + /* all but psurge */ + DECLARE_WRITE8_MEMBER(nmi_enable_w); + DECLARE_WRITE8_MEMBER(video_enable_w); + + /* psurge */ DECLARE_READ8_MEMBER(psurge_protection_r); - DECLARE_WRITE8_MEMBER(timeplt_videoram_w); - DECLARE_WRITE8_MEMBER(timeplt_colorram_w); - DECLARE_WRITE8_MEMBER(timeplt_flipscreen_w); - DECLARE_READ8_MEMBER(timeplt_scanline_r); + + /* chkun */ DECLARE_CUSTOM_INPUT_MEMBER(chkun_hopper_status_r); DECLARE_WRITE8_MEMBER(chkun_sound_w); + TILE_GET_INFO_MEMBER(get_tile_info); TILE_GET_INFO_MEMBER(get_chkun_tile_info); + virtual void machine_start(); virtual void machine_reset(); virtual void video_start(); DECLARE_PALETTE_INIT(timeplt); DECLARE_VIDEO_START(chkun); - UINT32 screen_update_timeplt(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - INTERRUPT_GEN_MEMBER(timeplt_interrupt); + DECLARE_VIDEO_START(psurge); + + UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect ); + + INTERRUPT_GEN_MEMBER(interrupt); }; diff --git a/src/mame/includes/vixen.h b/src/mame/includes/vixen.h index 73dc628b12d..b07e0d5b962 100644 --- a/src/mame/includes/vixen.h +++ b/src/mame/includes/vixen.h @@ -53,6 +53,29 @@ public: m_txrdy(0) { } + DECLARE_READ8_MEMBER( status_r ); + DECLARE_WRITE8_MEMBER( cmd_w ); + DECLARE_READ8_MEMBER( ieee488_r ); + DECLARE_READ8_MEMBER( port3_r ); + DECLARE_READ8_MEMBER( i8155_pa_r ); + DECLARE_WRITE8_MEMBER( i8155_pb_w ); + DECLARE_WRITE8_MEMBER( i8155_pc_w ); + DECLARE_WRITE8_MEMBER( io_i8155_pb_w ); + DECLARE_WRITE8_MEMBER( io_i8155_pc_w ); + DECLARE_WRITE_LINE_MEMBER( io_i8155_to_w ); + DECLARE_WRITE_LINE_MEMBER( srq_w ); + DECLARE_WRITE_LINE_MEMBER( atn_w ); + DECLARE_WRITE_LINE_MEMBER( rxrdy_w ); + DECLARE_WRITE_LINE_MEMBER( txrdy_w ); + DECLARE_WRITE_LINE_MEMBER( fdc_intrq_w ); + DECLARE_DRIVER_INIT(vixen); + TIMER_DEVICE_CALLBACK_MEMBER(vsync_tick); + IRQ_CALLBACK_MEMBER(vixen_int_ack); + DECLARE_READ8_MEMBER(opram_r); + DECLARE_READ8_MEMBER(oprom_r); + UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); + +private: required_device<cpu_device> m_maincpu; required_device<fd1797_t> m_fdc; required_device<i8155_device> m_io_i8155; @@ -70,35 +93,15 @@ public: required_shared_ptr<UINT8> m_video_ram; required_ioport_array<8> m_key; + address_space *m_program; + virtual void machine_start(); virtual void machine_reset(); virtual void video_start(); - UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); void update_interrupt(); - DECLARE_WRITE8_MEMBER( ctl_w ); - DECLARE_READ8_MEMBER( status_r ); - DECLARE_WRITE8_MEMBER( cmd_w ); - DECLARE_READ8_MEMBER( ieee488_r ); - DECLARE_READ8_MEMBER( port3_r ); - DECLARE_READ8_MEMBER( i8155_pa_r ); - DECLARE_WRITE8_MEMBER( i8155_pb_w ); - DECLARE_WRITE8_MEMBER( i8155_pc_w ); - DECLARE_WRITE8_MEMBER( io_i8155_pb_w ); - DECLARE_WRITE8_MEMBER( io_i8155_pc_w ); - DECLARE_WRITE_LINE_MEMBER( io_i8155_to_w ); - DECLARE_WRITE_LINE_MEMBER( srq_w ); - DECLARE_WRITE_LINE_MEMBER( atn_w ); - DECLARE_WRITE_LINE_MEMBER( rxrdy_w ); - DECLARE_WRITE_LINE_MEMBER( txrdy_w ); - DECLARE_WRITE_LINE_MEMBER( fdc_intrq_w ); - DIRECT_UPDATE_MEMBER(vixen_direct_update_handler); - - // memory state - int m_reset; - // keyboard state UINT8 m_col; @@ -122,12 +125,8 @@ public: int m_enb_ring_int; // video state - int m_alt; - int m_256; - - DECLARE_DRIVER_INIT(vixen); - TIMER_DEVICE_CALLBACK_MEMBER(vsync_tick); - IRQ_CALLBACK_MEMBER(vixen_int_ack); + bool m_alt; + bool m_256; }; #endif diff --git a/src/mame/includes/zx.h b/src/mame/includes/zx.h index c6165fd30d3..74eb54b4962 100644 --- a/src/mame/includes/zx.h +++ b/src/mame/includes/zx.h @@ -21,13 +21,6 @@ class zx_state : public driver_device { public: - enum - { - TIMER_TAPE_PULSE, - TIMER_ULA_NMI, - TIMER_ULA_IRQ - }; - zx_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), m_maincpu(*this, "maincpu"), @@ -49,49 +42,36 @@ public: UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - bitmap_ind16 m_bitmap; - - DECLARE_READ8_MEMBER(zx_ram_r); + DECLARE_READ8_MEMBER(ula_high_r); + DECLARE_READ8_MEMBER(ula_low_r); + DECLARE_WRITE16_MEMBER(refresh_w); DECLARE_READ8_MEMBER(zx80_io_r); DECLARE_READ8_MEMBER(zx81_io_r); DECLARE_READ8_MEMBER(pc8300_io_r); DECLARE_READ8_MEMBER(pow3000_io_r); DECLARE_WRITE8_MEMBER(zx80_io_w); DECLARE_WRITE8_MEMBER(zx81_io_w); - emu_timer *m_ula_nmi; - int m_ula_irq_active; - int m_ula_frame_vsync; - int m_ula_scanline_count; - UINT8 m_tape_bit; - UINT8 m_speaker_state; - int m_old_x; - int m_old_y; - UINT8 m_old_c; - UINT8 m_charline[32]; - UINT8 m_charline_ptr; - int m_offs1; - void zx_ula_bkgnd(UINT8 color); - DECLARE_WRITE8_MEMBER(zx_ram_w); - DECLARE_DIRECT_UPDATE_MEMBER(zx_setdirect); - DECLARE_DIRECT_UPDATE_MEMBER(pc8300_setdirect); - DECLARE_DIRECT_UPDATE_MEMBER(pow3000_setdirect); DECLARE_DRIVER_INIT(zx); virtual void machine_reset(); virtual void video_start(); DECLARE_PALETTE_INIT(zx); DECLARE_PALETTE_INIT(ts1000); - DECLARE_MACHINE_RESET(pc8300); - DECLARE_MACHINE_RESET(pow3000); - void screen_eof_zx(screen_device &screen, bool state); - TIMER_CALLBACK_MEMBER(zx_tape_pulse); - TIMER_CALLBACK_MEMBER(zx_ula_nmi); - TIMER_CALLBACK_MEMBER(zx_ula_irq); + void zx_tape_input(); + void zx_ula_hsync(); + + UINT32 get_ram_size(); protected: + enum + { + TIMER_TAPE_INPUT, + TIMER_ULA_HSYNC + }; + required_device<cpu_device> m_maincpu; required_device<ram_device> m_ram; required_device<cassette_image_device> m_cassette; - required_device<speaker_sound_device> m_speaker; + optional_device<speaker_sound_device> m_speaker; required_memory_region m_region_maincpu; optional_memory_region m_region_gfx1; required_ioport m_io_row0; @@ -105,8 +85,25 @@ protected: optional_ioport m_io_config; required_device<screen_device> m_screen; - void zx_ula_r(int offs, memory_region *region, const UINT8 param); + address_space *m_program; + emu_timer *m_tape_input, *m_ula_hsync; + + bool m_vsync_active, m_hsync_active, m_nmi_on, m_nmi_generator_active; + UINT64 m_base_vsync_clock, m_vsync_start_time; + UINT32 m_ypos; + + UINT8 m_prev_refresh; + UINT8 m_speaker_state; + + bitmap_ind16 *m_bitmap_render, *m_bitmap_buffer; + + UINT16 m_ula_char_buffer; + double m_cassette_cur_level; + virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); + + void drop_sync(); + void recalc_hsync(); }; #endif /* ZX_H_ */ diff --git a/src/mame/layout/by17.lay b/src/mame/layout/by17.lay index f8d3a97a5a9..b5b4cf178ce 100644 --- a/src/mame/layout/by17.lay +++ b/src/mame/layout/by17.lay @@ -1,142 +1,1316 @@ -<!-- BY17 copied from gp_1.lay --> +<!-- Pinball Machine, Bally ~ Template -17 MPU board --> <!-- 2014-07-26: Initial version. [Robbbert] --> +<!-- 2015-August: Added Lamp states, Solenoid states, Switch Matrix and a kit of playfield objects. [Quench] --> + + +<!-- Any state="9" items are not displayed and are only used for object alignment --> <mamelayout version="2"> - <element name="digit" defstate="0"> - <led7seg> - <color red="1.0" green="0.75" blue="0.0" /> - </led7seg> + <element name="Title_Bally"> <text string="Bally"><color red="0.25" green="0.5" blue="1.0" /></text></element> + + <element name="Text_Playfield"><text string="See PowerPlay and MataHari for mockup Playfield layouts"><color red="1.0" green="0.0" blue="1.0" /></text></element> + <element name="Text_Legend"> <text string="Consult game schematic for Switch, Lamp and Solenoid allocation"><color red="0.0" green="1.0" blue="0.0" /></text></element> + <element name="Text_Switch"> <text string="Switch Matrix"><color red="0.0" green="1.0" blue="1.0" /></text></element> + + + +<!-- Switches --> + + <element name="Switch_SlamTilt"> + <rect state="0"><color red="0.80" green="0.80" blue="0.80" /><bounds x="00" y="00" width="25" height="01" /></rect> + <rect state="0"><color red="0.80" green="0.80" blue="0.80" /><bounds x="00" y="08" width="13" height="01.5" /></rect> + <rect state="0"><color red="1.00" green="1.00" blue="0.00" /><bounds x="08" y="01" width="04" height="02" /></rect> + <rect state="0"><color red="1.00" green="1.00" blue="0.00" /><bounds x="08" y="06" width="04" height="02" /></rect> + + <rect state="0"><color red="0.70" green="0.70" blue="0.70" /><bounds x="19" y="01" width="06" height="04" /></rect> + <rect state="1"><color red="0.70" green="0.70" blue="0.70" /><bounds x="19" y="04" width="06" height="04" /></rect> + + <rect state="1"><color red="0.80" green="0.80" blue="0.80" /><bounds x="00" y="00" width="08" height="01" /></rect> + <rect state="1"><color red="0.80" green="0.80" blue="0.80" /><bounds x="08" y="01" width="08" height="01" /></rect> + <rect state="1"><color red="0.80" green="0.80" blue="0.80" /><bounds x="16" y="02" width="09" height="01" /></rect> + + + <rect state="1"><color red="0.80" green="0.80" blue="0.80" /><bounds x="00" y="08" width="13" height="01.5" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="0.00" /><bounds x="08" y="03" width="04" height="02" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="0.00" /><bounds x="08" y="06" width="04" height="02" /></rect> + </element> + + <element name="Switch_Tilt"> + <rect ><color red="0.80" green="0.80" blue="0.00" /><bounds x="00" y="00" width="17" height="17" /></rect> + <disk ><color red="0.00" green="0.00" blue="0.00" /><bounds x="01" y="01" width="15" height="15" /></disk> + <disk state="0"><color red="0.50" green="0.50" blue="0.50" /><bounds x="04" y="04" width="09" height="09" /></disk> + <disk state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="07" y="07" width="02" height="02" /></disk> + + <disk state="1"><color red="0.50" green="0.50" blue="0.50" /><bounds x="07" y="04" width="09" height="09" /></disk> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="11" y="07" width="02" height="02" /></disk> + </element> + + + <element name="Switch_Leaf_Vertical"> + <rect state="0"><color red="0.80" green="0.80" blue="0.80" /><bounds x="0" y="00" width="01" height="06" /></rect> + <rect state="0"><color red="0.80" green="0.80" blue="0.80" /><bounds x="8" y="00" width="01.5" height="06" /></rect> + <rect state="0"><color red="1.00" green="1.00" blue="0.00" /><bounds x="1" y="01" width="02" height="04" /></rect> + <rect state="0"><color red="1.00" green="1.00" blue="0.00" /><bounds x="6" y="01" width="02" height="04" /></rect> + + <rect state="1"><color red="0.80" green="0.80" blue="0.80" /><bounds x="1.5" y="00" width="01" height="06" /></rect> + <rect state="1"><color red="0.80" green="0.80" blue="0.80" /><bounds x="6.5" y="00" width="01" height="06" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="0.00" /><bounds x="2" y="01" width="02" height="04" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="0.00" /><bounds x="4.5" y="01" width="02" height="04" /></rect> + </element> + + <element name="Switch_RollOn_WireForm_Left"> + <text string=">" state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="8" y="0" width="11" height="11" /></text> + <rect state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="1" y="4" width="0.1" height="04" /></rect> + <rect state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="1" y="4" width="09" height="0.1" /></rect> + <rect state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="1" y="8" width="09" height="0.1" /></rect> + <rect state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="3" y="6" width="08" height="0.1" /></rect> + <text string=">" state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="8" y="0" width="11" height="11" /></text> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="1" y="4" width="0.1" height="04" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="1" y="4" width="09" height="0.1" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="1" y="8" width="09" height="0.1" /></rect> + </element> + + <element name="Switch_RollOn_WireForm_Down"> + <text string="/\" state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0" y="00" width="07" height="10" /></text> + <rect state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="1" y="17" width="04" height="0.1" /></rect> + <rect state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="1" y="09" width="0.1" height="09" /></rect> + <rect state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="5" y="09" width="0.1" height="09" /></rect> + <rect state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="3" y="07" width="0.1" height="08" /></rect> + <text string="/\" state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0" y="00" width="07" height="10" /></text> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="1" y="17" width="04" height="0.1" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="1" y="09" width="0.1" height="09" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="5" y="09" width="0.1" height="09" /></rect> + </element> + + <element name="Switch_RollOver_WireForm_Vertical"> + <text string="/\" state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0" y="00" width="07" height="10" /></text> + <text string="\/" state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0" y="17" width="07" height="10" /></text> + <rect state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="1" y="09" width="0.1" height="09" /></rect> + <rect state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="5" y="09" width="0.1" height="09" /></rect> + <rect state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="3" y="07" width="0.1" height="13" /></rect> + <text string="/\" state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0" y="00" width="07" height="10" /></text> + <text string="\/" state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0" y="17" width="07" height="10" /></text> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="1" y="09" width="0.1" height="09" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="5" y="09" width="0.1" height="09" /></rect> + </element> + + <element name="Switch_Target_Red_Forward" defstate="0"> + <rect ><color red="1.00" green="1.00" blue="1.00" /><bounds x="06" y="00" width="10" height="01" /></rect> + <rect ><color red="1.00" green="1.00" blue="1.00" /><bounds x="06" y="00" width="01" height="05" /></rect> + <rect ><color red="1.00" green="1.00" blue="1.00" /><bounds x="16" y="00" width="01" height="05" /></rect> + + <disk state="0"><color red="1.00" green="0.00" blue="0.00" /><bounds x="00" y="05" width="24" height="06" /></disk> + <disk state="1"><color red="1.00" green="0.00" blue="0.00" /><bounds x="00" y="02" width="24" height="06" /></disk> + </element> + + <element name="Target_White_Left" defstate="0"> + <rect ><color red="1.00" green="1.00" blue="1.00" /><bounds x="00" y="06" width="01" height="10" /></rect> + <rect ><color red="1.00" green="1.00" blue="1.00" /><bounds x="00" y="06" width="05" height="01" /></rect> + <rect ><color red="1.00" green="1.00" blue="1.00" /><bounds x="00" y="16" width="05" height="01" /></rect> + <disk state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="05" y="00" width="06" height="24" /></disk> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="02" y="00" width="06" height="24" /></disk> + </element> + + + <element name="Switch_RollOver_Button"> + <text string="*" state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="-10" y="-6" width="35" height="35" /></text> + <text string="*" state="1"><color red="0.00" green="0.00" blue="0.00" /><bounds x="-10" y="-6" width="35" height="35" /></text> + </element> + + <element name="Lamp_RollOver_Button" defstate="0"> + <disk state="0"><color red="0.15" green="0.04" blue="0.00" /><bounds x="0" y="0" width="15" height="15" /></disk> + <disk state="1"><color red="1.00" green="0.30" blue="0.00" /><bounds x="0" y="0" width="15" height="15" /></disk> + </element> + + <element name="Lamp_RollOver_Button_On"> + <disk><color red="1.00" green="0.30" blue="0.00" /><bounds x="0" y="0" width="15" height="15" /></disk> + </element> + + + <element name="Switch_Push-Button" defstate="0"> + <rect state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="07" y="04" width="16" height="01" /></rect> + <rect state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="12" y="00" width="01" height="04" /></rect> + <rect state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="17" y="00" width="01" height="04" /></rect> + <rect state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="12" y="00" width="05" height="01" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="07" y="08.5" width="16" height="01" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="12" y="04.5" width="01" height="04" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="17" y="04.5" width="01" height="04" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="12" y="04.5" width="05" height="01" /></rect> + <rect ><color red="1.00" green="1.00" blue="1.00" /><bounds x="00" y="12" width="09" height="01" /></rect> + <rect ><color red="1.00" green="1.00" blue="1.00" /><bounds x="21" y="12" width="09" height="01" /></rect> + <disk ><color red="1.00" green="1.00" blue="1.00" /><bounds x="07" y="10" width="06" height="06" /></disk> + <disk ><color red="1.00" green="1.00" blue="1.00" /><bounds x="18" y="10" width="06" height="06" /></disk> + </element> + + + + <element name="Key_Z"> <text string="Z"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_X"> <text string="X"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_C"> <text string="C"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_V"> <text string="V"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_B"> <text string="B"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_N"> <text string="N"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_M"> <text string="M"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_Comma"> <text string=","><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_Dot"> <text string="."><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_FSlash"><text string="/"><color red="1.00" green="0.66" blue="0.66" /></text></element> + + <element name="Key_A"> <text string="A"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_S"> <text string="S"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_D"> <text string="D"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_F"> <text string="F"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_G"> <text string="G"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_H"> <text string="H"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_J"> <text string="J"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_K"> <text string="K"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_L"> <text string="L"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_SColon"><text string=";"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_Quote"> <text string="'"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_Enter"> + <text string="<"><color red="1.00" green="0.66" blue="0.66" /><bounds x="00" y="00" width="07" height="10" /></text> + <text string="-"> <color red="1.00" green="0.66" blue="0.66" /><bounds x="00" y="00" width="07" height="10" /></text> + <text string="-"> <color red="1.00" green="0.66" blue="0.66" /><bounds x="02" y="00" width="07" height="10" /></text> + <text string="-"> <color red="1.00" green="0.66" blue="0.66" /><bounds x="04" y="00" width="07" height="10" /></text> + <text string="-"> <color red="1.00" green="0.66" blue="0.66" /><bounds x="06" y="00" width="07" height="10" /></text> + <disk > <color red="1.00" green="0.66" blue="0.66" /><bounds x="10" y="02" width="0.5" height="03" /></disk> + </element> + + <element name="Key_Q"> <text string="Q"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_W"> <text string="W"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_E"> <text string="E"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_R"> <text string="R"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_T"> <text string="T"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_Y"> <text string="Y"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_U"> <text string="U"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_I"> <text string="I"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_O"> <text string="O"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_P"> <text string="P"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_OBrkt"> <text string="["><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_CBrkt"> <text string="]"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_BSlash"><text string="\"><color red="1.00" green="0.66" blue="0.66" /></text></element> + + <element name="Key_1"> <text string="1"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_5"> <text string="5"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_6"> <text string="6"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_7"> <text string="7"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_9"> <text string="9"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_0"> <text string="0"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_BSpace"> + <text string="<"><color red="1.00" green="0.66" blue="0.66" /><bounds x="0" y="00" width="07" height="10" /></text> + <text string="-"> <color red="1.00" green="0.66" blue="0.66" /><bounds x="0" y="00" width="07" height="10" /></text> + <text string="-"> <color red="1.00" green="0.66" blue="0.66" /><bounds x="2" y="00" width="07" height="10" /></text> + <text string="-"> <color red="1.00" green="0.66" blue="0.66" /><bounds x="4" y="00" width="07" height="10" /></text> + <text string="-"> <color red="1.00" green="0.66" blue="0.66" /><bounds x="6" y="00" width="07" height="10" /></text> + </element> + <element name="Key_Equals"><text string="="><color red="1.00" green="0.66" blue="0.66" /></text></element> + + <element name="ST0"><text string="ST0"><color red="0.0" green="1.0" blue="1.0" /></text></element> + <element name="ST1"><text string="ST1"><color red="0.0" green="1.0" blue="1.0" /></text></element> + <element name="ST2"><text string="ST2"><color red="0.0" green="1.0" blue="1.0" /></text></element> + <element name="ST3"><text string="ST3"><color red="0.0" green="1.0" blue="1.0" /></text></element> + <element name="ST4"><text string="ST4"><color red="0.0" green="1.0" blue="1.0" /></text></element> + <element name="ST5"><text string="ST5"><color red="0.0" green="1.0" blue="1.0" /></text></element> + <element name="I0"> <text string="I0"> <color red="0.0" green="1.0" blue="1.0" /></text></element> + <element name="I1"> <text string="I1"> <color red="0.0" green="1.0" blue="1.0" /></text></element> + <element name="I2"> <text string="I2"> <color red="0.0" green="1.0" blue="1.0" /></text></element> + <element name="I3"> <text string="I3"> <color red="0.0" green="1.0" blue="1.0" /></text></element> + <element name="I4"> <text string="I4"> <color red="0.0" green="1.0" blue="1.0" /></text></element> + <element name="I5"> <text string="I5"> <color red="0.0" green="1.0" blue="1.0" /></text></element> + <element name="I6"> <text string="I6"> <color red="0.0" green="1.0" blue="1.0" /></text></element> + <element name="I7"> <text string="I7"> <color red="0.0" green="1.0" blue="1.0" /></text></element> + + + + + <element name="Solenoid_DropTarget_Tall" defstate="0"> + <rect state="1"><color red="1.00" green="0.00" blue="0.00" /><bounds x="00" y="00" width="07" height="15" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="01" y="01" width="04" height="12" /></rect> + </element> + <element name="DropTarget_Tall" defstate="0"> + <rect state="1"><color red="0.25" green="0.25" blue="0.25" /><bounds x="01" y="01" width="04" height="12" /></rect> + <rect state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="01" y="01" width="04" height="12" /></rect> + <rect state="9"><color red="0.00" green="1.00" blue="0.00" /><bounds x="00" y="00" width="07" height="15" /></rect> + </element> + + <element name="Solenoid_DropTarget_Wide" defstate="0"> + <rect state="1"><color red="1.00" green="0.00" blue="0.00" /><bounds x="00" y="00" width="15" height="07" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="01" y="01" width="12" height="04" /></rect> + </element> + <element name="DropTarget_Wide" defstate="0"> + <rect state="1"><color red="0.25" green="0.25" blue="0.25" /><bounds x="01" y="01" width="12" height="04" /></rect> + <rect state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="01" y="01" width="12" height="04" /></rect> + <rect state="9"><color red="0.00" green="1.00" blue="0.00" /><bounds x="00" y="00" width="15" height="07" /></rect> + </element> + + +<!-- Lamps --> + + <element name="Lamp_White" defstate="0"> + <disk state="0"><color red="0.15" green="0.15" blue="0.15" /></disk> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /></disk> + </element> + <element name="Lamp_Yellow" defstate="0"> + <disk state="0"><color red="0.15" green="0.15" blue="0.00" /></disk> + <disk state="1"><color red="1.00" green="1.00" blue="0.00" /></disk> + </element> + <element name="Lamp_Red" defstate="0"> <!-- Usually for Specials --> + <disk state="0"><color red="0.15" green="0.00" blue="0.00" /></disk> + <disk state="1"><color red="1.00" green="0.00" blue="0.00" /></disk> + </element> + <element name="Lamp_Amber" defstate="0"> <!-- Usually for Extra Ball--> + <disk state="0"><color red="0.15" green="0.06" blue="0.00" /></disk> + <disk state="1"><color red="1.00" green="0.40" blue="0.00" /></disk> + </element> + + + <element name="Lamp_P1"> + <rect><color red="0.10" green="0.10" blue="0.10" /></rect> + <text string="1" state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0" y="0" width="1" height="0.9" /></text> + <text string="1" state="0"><color red="0.25" green="0.25" blue="0.25" /><bounds x="0" y="0" width="1" height="0.9" /></text> + </element> + <element name="Lamp_P2"> + <rect><color red="0.10" green="0.10" blue="0.10" /></rect> + <text string="2" state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0" y="0" width="1" height="0.9" /></text> + <text string="2" state="0"><color red="0.25" green="0.25" blue="0.25" /><bounds x="0" y="0" width="1" height="0.9" /></text> + </element> + <element name="Lamp_P3"> + <rect><color red="0.10" green="0.10" blue="0.10" /></rect> + <text string="3" state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0.1" y="0" width="1" height="0.9" /></text> + <text string="3" state="0"><color red="0.25" green="0.25" blue="0.25" /><bounds x="0.1" y="0" width="1" height="0.9" /></text> + </element> + <element name="Lamp_P4"> + <rect><color red="0.10" green="0.10" blue="0.10" /></rect> + <text string="4" state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0" y="0" width="1" height="0.9" /></text> + <text string="4" state="0"><color red="0.25" green="0.25" blue="0.25" /><bounds x="0" y="0" width="1" height="0.9" /></text> + </element> + + <element name="Lamp_1P"> + <disk><color red="0.10" green="0.10" blue="0.10" /></disk> + <text string="1" state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0" y="0" width="1" height="0.9" /></text> + <text string="1" state="0"><color red="0.25" green="0.25" blue="0.25" /><bounds x="0" y="0" width="1" height="0.9" /></text> + </element> + <element name="Lamp_2P"> + <disk><color red="0.10" green="0.10" blue="0.10" /></disk> + <text string="2" state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0" y="0" width="1" height="0.9" /></text> + <text string="2" state="0"><color red="0.25" green="0.25" blue="0.25" /><bounds x="0" y="0" width="1" height="0.9" /></text> + </element> + <element name="Lamp_3P"> + <disk><color red="0.10" green="0.10" blue="0.10" /></disk> + <text string="3" state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0.1" y="0" width="1" height="0.9" /></text> + <text string="3" state="0"><color red="0.25" green="0.25" blue="0.25" /><bounds x="0.1" y="0" width="1" height="0.9" /></text> + </element> + <element name="Lamp_4P"> + <disk><color red="0.10" green="0.10" blue="0.10" /></disk> + <text string="4" state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0" y="0" width="1" height="0.9" /></text> + <text string="4" state="0"><color red="0.25" green="0.25" blue="0.25" /><bounds x="0" y="0" width="1" height="0.9" /></text> + </element> + + + <element name="Lamp_2x" defstate="0"> + <disk state="0"><color red="0.0" green="0.15" blue="0.0" /></disk> + <disk state="1"><color red="0.0" green="1.00" blue="0.0" /></disk> + <text string="2x"><color red="0.0" green="0.0" blue="0.0" /><bounds x="0" y="0.1" width="1" height="0.75" /></text> + </element> + <element name="Lamp_3x" defstate="0"> + <disk state="0"><color red="0.15" green="0.15" blue="0.0" /></disk> + <disk state="1"><color red="1.00" green="1.00" blue="0.0" /></disk> + <text string="3x"><color red="0.0" green="0.0" blue="0.0" /><bounds x="0" y="0.1" width="1" height="0.75" /></text> + </element> + <element name="Lamp_4x" defstate="0"> + <disk state="0"><color red="0.15" green="0.15" blue="0.0" /></disk> + <disk state="1"><color red="1.00" green="1.00" blue="0.0" /></disk> + <text string="4x"><color red="0.0" green="0.0" blue="0.0" /><bounds x="0" y="0.1" width="1" height="0.75" /></text> + </element> + <element name="Lamp_5x" defstate="0"> + <disk state="0"><color red="0.15" green="0.15" blue="0.15" /></disk> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /></disk> + <text string="5x"><color red="0.0" green="0.0" blue="0.0" /><bounds x="0" y="0.1" width="1" height="0.75" /></text> + </element> + + + <element name="Lamp_White_1k"> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /></disk> + <disk state="0"><color red="0.25" green="0.25" blue="0.25" /></disk> + <text string="1k"><color red="0.0" green="0.0" blue="0.0" /><bounds x="0" y="0.1" width="1" height="0.75" /></text> + </element> + <element name="Lamp_White_2k"> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /></disk> + <disk state="0"><color red="0.25" green="0.25" blue="0.25" /></disk> + <text string="2k"><color red="0.0" green="0.0" blue="0.0" /><bounds x="0" y="0.1" width="1" height="0.75" /></text> + </element> + <element name="Lamp_White_3k"> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /></disk> + <disk state="0"><color red="0.25" green="0.25" blue="0.25" /></disk> + <text string="3k"><color red="0.0" green="0.0" blue="0.0" /><bounds x="0" y="0.1" width="1" height="0.75" /></text> + </element> + <element name="Lamp_White_4k"> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /></disk> + <disk state="0"><color red="0.25" green="0.25" blue="0.25" /></disk> + <text string="4k"><color red="0.0" green="0.0" blue="0.0" /><bounds x="0" y="0.1" width="1" height="0.75" /></text> + </element> + <element name="Lamp_White_5k"> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /></disk> + <disk state="0"><color red="0.25" green="0.25" blue="0.25" /></disk> + <text string="5k"><color red="0.0" green="0.0" blue="0.0" /><bounds x="0" y="0.1" width="1" height="0.75" /></text> + </element> + <element name="Lamp_White_6k"> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /></disk> + <disk state="0"><color red="0.25" green="0.25" blue="0.25" /></disk> + <text string="6k"><color red="0.0" green="0.0" blue="0.0" /><bounds x="0" y="0.1" width="1" height="0.75" /></text> + </element> + <element name="Lamp_White_7k"> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /></disk> + <disk state="0"><color red="0.25" green="0.25" blue="0.25" /></disk> + <text string="7k"><color red="0.0" green="0.0" blue="0.0" /><bounds x="0" y="0.1" width="1" height="0.75" /></text> + </element> + <element name="Lamp_White_8k"> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /></disk> + <disk state="0"><color red="0.25" green="0.25" blue="0.25" /></disk> + <text string="8k"><color red="0.0" green="0.0" blue="0.0" /><bounds x="0" y="0.1" width="1" height="0.75" /></text> + </element> + <element name="Lamp_White_9k"> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /></disk> + <disk state="0"><color red="0.25" green="0.25" blue="0.25" /></disk> + <text string="9k"><color red="0.0" green="0.0" blue="0.0" /><bounds x="0" y="0.1" width="1" height="0.75" /></text> + </element> + <element name="Lamp_White_10k"> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0.0" y="0.0" width="1.10" height="1.00" /></disk> + <disk state="0"><color red="0.25" green="0.25" blue="0.25" /><bounds x="0.0" y="0.0" width="1.10" height="1.00" /></disk> + <text string="10k"><color red="0.0" green="0.0" blue="0.0" /><bounds x="0.1" y="0.1" width="1.00" height="0.75" /></text> + </element> + <element name="Lamp_White_12k"> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0.0" y="0.0" width="1.10" height="1.00" /></disk> + <disk state="0"><color red="0.25" green="0.25" blue="0.25" /><bounds x="0.0" y="0.0" width="1.10" height="1.00" /></disk> + <text string="12k"><color red="0.0" green="0.0" blue="0.0" /><bounds x="0.1" y="0.1" width="1.00" height="0.75" /></text> + </element> + <element name="Lamp_White_15k"> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0.0" y="0.0" width="1.10" height="1.00" /></disk> + <disk state="0"><color red="0.25" green="0.25" blue="0.25" /><bounds x="0.0" y="0.0" width="1.10" height="1.00" /></disk> + <text string="15k"><color red="0.0" green="0.0" blue="0.0" /><bounds x="0.1" y="0.1" width="1.00" height="0.75" /></text> + </element> + <element name="Lamp_White_20k"> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0.0" y="0.0" width="1.10" height="1.00" /></disk> + <disk state="0"><color red="0.25" green="0.25" blue="0.25" /><bounds x="0.0" y="0.0" width="1.10" height="1.00" /></disk> + <text string="20k"><color red="0.0" green="0.0" blue="0.0" /><bounds x="0.1" y="0.1" width="1.00" height="0.75" /></text> + </element> + <element name="Lamp_White_25k"> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0.0" y="0.0" width="1.10" height="1.00" /></disk> + <disk state="0"><color red="0.25" green="0.25" blue="0.25" /><bounds x="0.0" y="0.0" width="1.10" height="1.00" /></disk> + <text string="25k"><color red="0.0" green="0.0" blue="0.0" /><bounds x="0.1" y="0.1" width="1.00" height="0.75" /></text> + </element> + <element name="Lamp_White_50k"> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0.0" y="0.0" width="1.10" height="1.00" /></disk> + <disk state="0"><color red="0.25" green="0.25" blue="0.25" /><bounds x="0.0" y="0.0" width="1.10" height="1.00" /></disk> + <text string="50k"><color red="0.0" green="0.0" blue="0.0" /><bounds x="0.1" y="0.1" width="1.00" height="0.75" /></text> + </element> + + + <element name="Lamp_White_1"> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /></disk> + <disk state="0"><color red="0.25" green="0.25" blue="0.25" /></disk> + <text string="1"><color red="0.0" green="0.0" blue="0.0" /><bounds x="0" y="0.1" width="1" height="0.75" /></text> + </element> + <element name="Lamp_White_2"> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /></disk> + <disk state="0"><color red="0.25" green="0.25" blue="0.25" /></disk> + <text string="2"><color red="0.0" green="0.0" blue="0.0" /><bounds x="0" y="0.1" width="1" height="0.75" /></text> + </element> + <element name="Lamp_White_3"> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /></disk> + <disk state="0"><color red="0.25" green="0.25" blue="0.25" /></disk> + <text string="3"><color red="0.0" green="0.0" blue="0.0" /><bounds x="0" y="0.1" width="1" height="0.75" /></text> + </element> + <element name="Lamp_White_4"> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /></disk> + <disk state="0"><color red="0.25" green="0.25" blue="0.25" /></disk> + <text string="4"><color red="0.0" green="0.0" blue="0.0" /><bounds x="0" y="0.1" width="1" height="0.75" /></text> + </element> + <element name="Lamp_White_5"> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /></disk> + <disk state="0"><color red="0.25" green="0.25" blue="0.25" /></disk> + <text string="5"><color red="0.0" green="0.0" blue="0.0" /><bounds x="0" y="0.1" width="1" height="0.75" /></text> + </element> + + <element name="Lamp_White_A"> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /></disk> + <disk state="0"><color red="0.25" green="0.25" blue="0.25" /></disk> + <text string="A"><color red="0.0" green="0.0" blue="0.0" /><bounds x="0" y="0.1" width="1" height="0.75" /></text> + </element> + <element name="Lamp_White_B"> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /></disk> + <disk state="0"><color red="0.25" green="0.25" blue="0.25" /></disk> + <text string="B"><color red="0.0" green="0.0" blue="0.0" /><bounds x="0" y="0.1" width="1" height="0.75" /></text> + </element> + + + <element name="Credit_Indicator"> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="2.5" y="0" width="1.0" height="1.0" /></disk> + <disk state="0"><color red="0.25" green="0.25" blue="0.25" /><bounds x="2.5" y="0" width="1.0" height="1.0" /></disk> + <text string="Credit Indicator"><color red="1.0" green="1.0" blue="1.0" /><bounds x="0" y="1.1" width="6.5" height="0.90" /></text> + </element> + + + <element name="Lamp_Green_Arrow_Up_2x" defstate="1"> + <rect state="1"><color red="0.00" green="1.00" blue="0.00" /><bounds x="10" y="00" width="02" height="03" /></rect> + <rect state="0"><color red="0.00" green="0.15" blue="0.00" /><bounds x="10" y="00" width="02" height="03" /></rect> + <rect state="1"><color red="0.00" green="1.00" blue="0.00" /><bounds x="08" y="03" width="06" height="03" /></rect> + <rect state="0"><color red="0.00" green="0.15" blue="0.00" /><bounds x="08" y="03" width="06" height="03" /></rect> + <rect state="1"><color red="0.00" green="1.00" blue="0.00" /><bounds x="06" y="06" width="10" height="03" /></rect> + <rect state="0"><color red="0.00" green="0.15" blue="0.00" /><bounds x="06" y="06" width="10" height="03" /></rect> + <rect state="1"><color red="0.00" green="1.00" blue="0.00" /><bounds x="04" y="09" width="14" height="03" /></rect> + <rect state="0"><color red="0.00" green="0.15" blue="0.00" /><bounds x="04" y="09" width="14" height="03" /></rect> + <rect state="1"><color red="0.00" green="1.00" blue="0.00" /><bounds x="02" y="12" width="18" height="03" /></rect> + <rect state="0"><color red="0.00" green="0.15" blue="0.00" /><bounds x="02" y="12" width="18" height="03" /></rect> + <rect state="1"><color red="0.00" green="1.00" blue="0.00" /><bounds x="00" y="15" width="22" height="03" /></rect> + <rect state="0"><color red="0.00" green="0.15" blue="0.00" /><bounds x="00" y="15" width="22" height="03" /></rect> + <rect state="1"><color red="0.00" green="1.00" blue="0.00" /><bounds x="09" y="06" width="04" height="30" /></rect> + <rect state="0"><color red="0.00" green="0.15" blue="0.00" /><bounds x="09" y="06" width="04" height="30" /></rect> + <text string="2x"><color red="0.0" green="0.0" blue="0.0" /><bounds x="06" y="08" width="12" height="12" /></text> + </element> + + <element name="Lamp_Yellow_Arrow_Up_3x" defstate="1"> + <rect state="1"><color red="1.00" green="1.00" blue="0.00" /><bounds x="10" y="00" width="02" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.00" /><bounds x="10" y="00" width="02" height="03" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="0.00" /><bounds x="08" y="03" width="06" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.00" /><bounds x="08" y="03" width="06" height="03" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="0.00" /><bounds x="06" y="06" width="10" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.00" /><bounds x="06" y="06" width="10" height="03" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="0.00" /><bounds x="04" y="09" width="14" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.00" /><bounds x="04" y="09" width="14" height="03" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="0.00" /><bounds x="02" y="12" width="18" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.00" /><bounds x="02" y="12" width="18" height="03" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="0.00" /><bounds x="00" y="15" width="22" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.00" /><bounds x="00" y="15" width="22" height="03" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="0.00" /><bounds x="09" y="06" width="04" height="30" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.00" /><bounds x="09" y="06" width="04" height="30" /></rect> + <text string="3x"><color red="0.0" green="0.0" blue="0.0" /><bounds x="06" y="08" width="12" height="12" /></text> + </element> + + <element name="Lamp_White_Arrow_Up_5x" defstate="1"> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="10" y="00" width="02" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="10" y="00" width="02" height="03" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="08" y="03" width="06" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="08" y="03" width="06" height="03" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="06" y="06" width="10" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="06" y="06" width="10" height="03" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="04" y="09" width="14" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="04" y="09" width="14" height="03" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="02" y="12" width="18" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="02" y="12" width="18" height="03" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="00" y="15" width="22" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="00" y="15" width="22" height="03" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="09" y="06" width="04" height="30" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="09" y="06" width="04" height="30" /></rect> + <text string="5x"><color red="0.0" green="0.0" blue="0.0" /><bounds x="06" y="08" width="12" height="12" /></text> + </element> + + <element name="Lamp_White_Arrow_Up_3k" defstate="0"> + <rect state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="10" y="00" width="02" height="03" /></rect> + <rect state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="08" y="03" width="06" height="03" /></rect> + <rect state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="06" y="06" width="10" height="03" /></rect> + <rect state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="04" y="09" width="14" height="03" /></rect> + <rect state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="02" y="12" width="18" height="03" /></rect> + <rect state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="00" y="15" width="22" height="03" /></rect> + <rect state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="09" y="06" width="04" height="30" /></rect> + <text string="3k"><color red="0.0" green="0.0" blue="0.0" /><bounds x="06" y="08" width="12" height="12" /></text> + </element> + + <element name="Lamp_Green_Arrow_04_2x" defstate="1"> <!-- Point at 4 o clock --> + <rect state="1"><color red="0.00" green="1.00" blue="0.00" /><bounds x="00" y="00" width="08" height="03" /></rect> + <rect state="0"><color red="0.00" green="0.15" blue="0.00" /><bounds x="00" y="00" width="08" height="03" /></rect> + <rect state="1"><color red="0.00" green="1.00" blue="0.00" /><bounds x="05" y="03" width="08" height="03" /></rect> + <rect state="0"><color red="0.00" green="0.15" blue="0.00" /><bounds x="05" y="03" width="08" height="03" /></rect> + <rect state="1"><color red="0.00" green="1.00" blue="0.00" /><bounds x="10" y="06" width="08" height="03" /></rect> + <rect state="0"><color red="0.00" green="0.15" blue="0.00" /><bounds x="10" y="06" width="08" height="03" /></rect> + <rect state="1"><color red="0.00" green="1.00" blue="0.00" /><bounds x="24" y="03" width="02" height="03" /></rect> + <rect state="0"><color red="0.00" green="0.15" blue="0.00" /><bounds x="24" y="03" width="02" height="03" /></rect> + <rect state="1"><color red="0.00" green="1.00" blue="0.00" /><bounds x="22" y="06" width="06" height="03" /></rect> + <rect state="0"><color red="0.00" green="0.15" blue="0.00" /><bounds x="22" y="06" width="06" height="03" /></rect> + <rect state="1"><color red="0.00" green="1.00" blue="0.00" /><bounds x="15" y="09" width="15" height="03" /></rect> + <rect state="0"><color red="0.00" green="0.15" blue="0.00" /><bounds x="15" y="09" width="15" height="03" /></rect> + <rect state="1"><color red="0.00" green="1.00" blue="0.00" /><bounds x="18" y="12" width="14" height="03" /></rect> + <rect state="0"><color red="0.00" green="0.15" blue="0.00" /><bounds x="18" y="12" width="14" height="03" /></rect> + <rect state="1"><color red="0.00" green="1.00" blue="0.00" /><bounds x="17" y="15" width="17" height="03" /></rect> + <rect state="0"><color red="0.00" green="0.15" blue="0.00" /><bounds x="17" y="15" width="17" height="03" /></rect> + <rect state="1"><color red="0.00" green="1.00" blue="0.00" /><bounds x="16" y="18" width="20" height="03" /></rect> + <rect state="0"><color red="0.00" green="0.15" blue="0.00" /><bounds x="16" y="18" width="20" height="03" /></rect> + <text string="2x"><color red="0.0" green="0.0" blue="0.0" /><bounds x="18" y="08" width="15" height="15" /></text> + </element> + + <element name="Lamp_Yellow_Arrow_04_3x" defstate="1"> <!-- Point at 4 o clock --> + <rect state="1"><color red="1.00" green="1.00" blue="0.00" /><bounds x="00" y="00" width="08" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.00" /><bounds x="00" y="00" width="08" height="03" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="0.00" /><bounds x="05" y="03" width="08" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.00" /><bounds x="05" y="03" width="08" height="03" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="0.00" /><bounds x="10" y="06" width="08" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.00" /><bounds x="10" y="06" width="08" height="03" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="0.00" /><bounds x="24" y="03" width="02" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.00" /><bounds x="24" y="03" width="02" height="03" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="0.00" /><bounds x="22" y="06" width="06" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.00" /><bounds x="22" y="06" width="06" height="03" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="0.00" /><bounds x="15" y="09" width="15" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.00" /><bounds x="15" y="09" width="15" height="03" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="0.00" /><bounds x="18" y="12" width="14" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.00" /><bounds x="18" y="12" width="14" height="03" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="0.00" /><bounds x="17" y="15" width="17" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.00" /><bounds x="17" y="15" width="17" height="03" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="0.00" /><bounds x="16" y="18" width="20" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.00" /><bounds x="16" y="18" width="20" height="03" /></rect> + <text string="3x"><color red="0.0" green="0.0" blue="0.0" /><bounds x="18" y="08" width="15" height="15" /></text> + </element> + + <element name="Lamp_White_Arrow_08_5x" defstate="1"> <!-- Point at 8 o clock --> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="28" y="00" width="08" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="28" y="00" width="08" height="03" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="23" y="03" width="08" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="23" y="03" width="08" height="03" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="18" y="06" width="08" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="18" y="06" width="08" height="03" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="10" y="03" width="02" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="10" y="03" width="02" height="03" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="08" y="06" width="06" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="08" y="06" width="06" height="03" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="06" y="09" width="15" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="06" y="09" width="15" height="03" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="04" y="12" width="14" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="04" y="12" width="14" height="03" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="02" y="15" width="17" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="02" y="15" width="17" height="03" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="00" y="18" width="20" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="00" y="18" width="20" height="03" /></rect> + <text string="5x"><color red="0.0" green="0.0" blue="0.0" /><bounds x="06" y="08" width="15" height="15" /></text> + </element> + + <element name="Lamp_White_Arrow_01" defstate="1"> <!-- Point at 1 o clock --> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="18" y="00" width="03" height="20" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="18" y="00" width="03" height="20" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="15" y="02" width="03" height="17" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="15" y="02" width="03" height="17" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="12" y="04" width="03" height="14" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="12" y="04" width="03" height="14" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="09" y="06" width="03" height="15" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="09" y="06" width="03" height="15" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="06" y="08" width="03" height="06" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="06" y="08" width="03" height="06" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="03" y="10" width="03" height="02" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="03" y="10" width="03" height="02" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="06" y="18" width="03" height="08" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="06" y="18" width="03" height="08" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="03" y="23" width="03" height="08" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="03" y="23" width="03" height="08" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="00" y="28" width="03" height="08" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="00" y="28" width="03" height="08" /></rect> + </element> + + <element name="Lamp_Amber_Arrow_08" defstate="1"> <!-- Point at 8 o clock --> + <rect state="1"><color red="1.00" green="0.40" blue="0.00" /><bounds x="28" y="00" width="08" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.06" blue="0.00" /><bounds x="28" y="00" width="08" height="03" /></rect> + <rect state="1"><color red="1.00" green="0.40" blue="0.00" /><bounds x="23" y="03" width="08" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.06" blue="0.00" /><bounds x="23" y="03" width="08" height="03" /></rect> + <rect state="1"><color red="1.00" green="0.40" blue="0.00" /><bounds x="18" y="06" width="08" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.06" blue="0.00" /><bounds x="18" y="06" width="08" height="03" /></rect> + <rect state="1"><color red="1.00" green="0.40" blue="0.00" /><bounds x="10" y="03" width="02" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.06" blue="0.00" /><bounds x="10" y="03" width="02" height="03" /></rect> + <rect state="1"><color red="1.00" green="0.40" blue="0.00" /><bounds x="08" y="06" width="06" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.06" blue="0.00" /><bounds x="08" y="06" width="06" height="03" /></rect> + <rect state="1"><color red="1.00" green="0.40" blue="0.00" /><bounds x="06" y="09" width="15" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.06" blue="0.00" /><bounds x="06" y="09" width="15" height="03" /></rect> + <rect state="1"><color red="1.00" green="0.40" blue="0.00" /><bounds x="04" y="12" width="14" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.06" blue="0.00" /><bounds x="04" y="12" width="14" height="03" /></rect> + <rect state="1"><color red="1.00" green="0.40" blue="0.00" /><bounds x="02" y="15" width="17" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.06" blue="0.00" /><bounds x="02" y="15" width="17" height="03" /></rect> + <rect state="1"><color red="1.00" green="0.40" blue="0.00" /><bounds x="00" y="18" width="20" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.06" blue="0.00" /><bounds x="00" y="18" width="20" height="03" /></rect> + </element> + + <element name="Lamp_Amber_Arrow_10" defstate="1"> <!-- Point at 10 o clock --> + <rect state="1"><color red="1.00" green="0.40" blue="0.00" /><bounds x="28" y="18" width="08" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.06" blue="0.00" /><bounds x="28" y="18" width="08" height="03" /></rect> + <rect state="1"><color red="1.00" green="0.40" blue="0.00" /><bounds x="23" y="15" width="08" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.06" blue="0.00" /><bounds x="23" y="15" width="08" height="03" /></rect> + <rect state="1"><color red="1.00" green="0.40" blue="0.00" /><bounds x="18" y="12" width="08" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.06" blue="0.00" /><bounds x="18" y="12" width="08" height="03" /></rect> + <rect state="1"><color red="1.00" green="0.40" blue="0.00" /><bounds x="10" y="15" width="02" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.06" blue="0.00" /><bounds x="10" y="15" width="02" height="03" /></rect> + <rect state="1"><color red="1.00" green="0.40" blue="0.00" /><bounds x="08" y="12" width="06" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.06" blue="0.00" /><bounds x="08" y="12" width="06" height="03" /></rect> + <rect state="1"><color red="1.00" green="0.40" blue="0.00" /><bounds x="06" y="09" width="15" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.06" blue="0.00" /><bounds x="06" y="09" width="15" height="03" /></rect> + <rect state="1"><color red="1.00" green="0.40" blue="0.00" /><bounds x="04" y="06" width="14" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.06" blue="0.00" /><bounds x="04" y="06" width="14" height="03" /></rect> + <rect state="1"><color red="1.00" green="0.40" blue="0.00" /><bounds x="02" y="03" width="17" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.06" blue="0.00" /><bounds x="02" y="03" width="17" height="03" /></rect> + <rect state="1"><color red="1.00" green="0.40" blue="0.00" /><bounds x="00" y="00" width="20" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.06" blue="0.00" /><bounds x="00" y="00" width="20" height="03" /></rect> + </element> + + <element name="Lamp_Red_Arrow_08" defstate="1"> <!-- Point at 8 o clock --> + <rect state="1"><color red="1.00" green="0.00" blue="0.00" /><bounds x="28" y="00" width="08" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.00" blue="0.00" /><bounds x="28" y="00" width="08" height="03" /></rect> + <rect state="1"><color red="1.00" green="0.00" blue="0.00" /><bounds x="23" y="03" width="08" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.00" blue="0.00" /><bounds x="23" y="03" width="08" height="03" /></rect> + <rect state="1"><color red="1.00" green="0.00" blue="0.00" /><bounds x="18" y="06" width="08" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.00" blue="0.00" /><bounds x="18" y="06" width="08" height="03" /></rect> + <rect state="1"><color red="1.00" green="0.00" blue="0.00" /><bounds x="10" y="03" width="02" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.00" blue="0.00" /><bounds x="10" y="03" width="02" height="03" /></rect> + <rect state="1"><color red="1.00" green="0.00" blue="0.00" /><bounds x="08" y="06" width="06" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.00" blue="0.00" /><bounds x="08" y="06" width="06" height="03" /></rect> + <rect state="1"><color red="1.00" green="0.00" blue="0.00" /><bounds x="06" y="09" width="15" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.00" blue="0.00" /><bounds x="06" y="09" width="15" height="03" /></rect> + <rect state="1"><color red="1.00" green="0.00" blue="0.00" /><bounds x="04" y="12" width="14" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.00" blue="0.00" /><bounds x="04" y="12" width="14" height="03" /></rect> + <rect state="1"><color red="1.00" green="0.00" blue="0.00" /><bounds x="02" y="15" width="17" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.00" blue="0.00" /><bounds x="02" y="15" width="17" height="03" /></rect> + <rect state="1"><color red="1.00" green="0.00" blue="0.00" /><bounds x="00" y="18" width="20" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.00" blue="0.00" /><bounds x="00" y="18" width="20" height="03" /></rect> + </element> + + <element name="Lamp_White_Arrow_11_A" defstate="1"> <!-- Point at 11 o clock --> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="00" y="00" width="03" height="20" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="00" y="00" width="03" height="20" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="03" y="02" width="03" height="17" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="03" y="02" width="03" height="17" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="06" y="04" width="03" height="14" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="06" y="04" width="03" height="14" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="09" y="06" width="03" height="15" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="09" y="06" width="03" height="15" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="12" y="08" width="03" height="06" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="12" y="08" width="03" height="06" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="15" y="10" width="03" height="02" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="15" y="10" width="03" height="02" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="12" y="18" width="03" height="08" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="12" y="18" width="03" height="08" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="15" y="23" width="03" height="08" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="15" y="23" width="03" height="08" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="18" y="28" width="03" height="08" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="18" y="28" width="03" height="08" /></rect> + <text string="A"><color red="0.0" green="0.0" blue="0.0" /><bounds x="-2" y="03" width="18" height="18" /></text> + </element> + + <element name="Lamp_White_Arrow_01_B" defstate="1"> <!-- Point at 1 o clock --> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="18" y="00" width="03" height="20" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="18" y="00" width="03" height="20" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="15" y="02" width="03" height="17" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="15" y="02" width="03" height="17" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="12" y="04" width="03" height="14" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="12" y="04" width="03" height="14" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="09" y="06" width="03" height="15" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="09" y="06" width="03" height="15" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="06" y="08" width="03" height="06" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="06" y="08" width="03" height="06" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="03" y="10" width="03" height="02" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="03" y="10" width="03" height="02" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="06" y="18" width="03" height="08" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="06" y="18" width="03" height="08" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="03" y="23" width="03" height="08" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="03" y="23" width="03" height="08" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="00" y="28" width="03" height="08" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="00" y="28" width="03" height="08" /></rect> + <text string="B"><color red="0.0" green="0.0" blue="0.0" /><bounds x="06" y="03" width="18" height="18" /></text> + </element> + + +<!-- Backbox Indicators --> + + <element name="Text_Credit"><text string="CREDIT"><color red="1.0" green="1.0" blue="1.0" /></text></element> + <element name="Text_Lamps"><text string="Lamps"><color red="1.0" green="1.0" blue="1.0" /></text></element> + <element name="Text_15"><text string="U1 0-14"><color red="1.0" green="1.0" blue="1.0" /></text></element> + <element name="Text_30"><text string="U2 0-14"><color red="1.0" green="1.0" blue="1.0" /></text></element> + <element name="Text_45"><text string="U3 0-14"><color red="1.0" green="1.0" blue="1.0" /></text></element> + <element name="Text_60"><text string="U4 0-14"><color red="1.0" green="1.0" blue="1.0" /></text></element> + <element name="Text_Solenoids"><text string="Momentary Solenoids"><color red="1.0" green="1.0" blue="1.0" /></text></element> + <element name="Text_Coils"><text string="Coils"><color red="1.0" green="1.0" blue="1.0" /></text></element> + <element name="Text_MPU_LED"><text string="MPU LED"><color red="1.0" green="1.0" blue="1.0" /></text></element> + <element name="Text_Activity"><text string="Activity Switch"><color red="1.0" green="1.0" blue="1.0" /></text></element> + <element name="Text_Service"><text string="Service Switch"><color red="1.0" green="1.0" blue="1.0" /></text></element> + <element name="Text_Slam"><text string="Slam Switch"><color red="1.0" green="1.0" blue="1.0" /></text></element> + <element name="Text_Tilt"><text string="Tilt Switch"><color red="1.0" green="1.0" blue="1.0" /></text></element> + <element name="Text_Knocker"><text string="Knocker"><color red="1.0" green="1.0" blue="1.0" /></text></element> + + + <element name="High_Score_To_Date" defstate="0"> + <text string="HIGH SCORE TO DATE" state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0" y="0.1" width="1" height="1" /></text> + <text string="HIGH SCORE TO DATE" state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="0" y="0.1" width="1" height="1" /></text> + </element> + <element name="Ball_In_Play" defstate="0"> + <text string="BALL IN PLAY" state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0.1" y="0.1" width="1" height="0.8" /></text> + <text string="BALL IN PLAY" state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="0.1" y="0.1" width="1" height="0.8" /></text> + </element> + <element name="Match" defstate="0"> + <text string="MATCH" state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0" y="0.1" width="1" height="0.8" /></text> + <text string="MATCH" state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="0" y="0.1" width="1" height="0.8" /></text> + </element> + <element name="Game_Over" defstate="0"> + <text string="GAME OVER" state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0" y="0.1" width="1" height="0.8" /></text> + <text string="GAME OVER" state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="0" y="0.1" width="1" height="0.8" /></text> + </element> + <element name="Tilt" defstate="0"> + <text string="TILT" state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0" y="0.1" width="1" height="0.8" /></text> + <text string="TILT" state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="0" y="0.1" width="1" height="0.8" /></text> + </element> + <element name="Shoot_Again" defstate="0"> + <text string="SAME PLAYER" state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0" y="0.1" width="1" height="0.8" /></text> + <text string="SAME PLAYER" state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="0" y="0.1" width="1" height="0.8" /></text> + <text string="SHOOTS AGAIN" state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0" y="0.9" width="1" height="0.8" /></text> + <text string="SHOOTS AGAIN" state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="0" y="0.9" width="1" height="0.8" /></text> + </element> + + + <element name="Digit" defstate="0"> + <led7seg><color red="1.0" green="0.35" blue="0.0" /></led7seg> + </element> + + <element name="LED_Green" defstate="1"> + <disk state="0"><color red="0.0" green="0.25" blue="0.0" /></disk> + <disk state="1"><color red="0.0" green="1.00" blue="0.0" /></disk> + </element> + + <element name="LED_Red" defstate="1"> + <disk state="0"><color red="0.25" green="0.0" blue="0.0" /></disk> + <disk state="1"><color red="1.00" green="0.0" blue="0.0" /></disk> + </element> + + + +<!-- Solenoids --> + + <element name="Solenoid_PullDown"> + <rect state="0"><color red="1.0" green="1.0" blue="1.0" /><bounds x="3" y="0" width="03" height="09" /></rect> + <rect state="0"><color red="0.0" green="1.0" blue="1.0" /><bounds x="0" y="8" width="10" height="11" /></rect> + <rect state="1"><color red="1.0" green="1.0" blue="0.0" /><bounds x="0" y="8" width="10" height="11" /></rect> + </element> + + <element name="Coil_PullDown"> + <rect state="0"><color red="1.0" green="1.0" blue="1.0" /><bounds x="8" y="0" width="02" height="01" /></rect> + <rect state="0"><color red="1.0" green="1.0" blue="1.0" /><bounds x="6" y="1" width="02" height="01" /></rect> + <rect state="0"><color red="1.0" green="1.0" blue="1.0" /><bounds x="4" y="2" width="02" height="01" /></rect> + <rect state="0"><color red="1.0" green="1.0" blue="1.0" /><bounds x="2" y="3" width="02" height="01" /></rect> + <rect state="0"><color red="1.0" green="1.0" blue="1.0" /><bounds x="0" y="4" width="02" height="01" /></rect> + <rect ><color red="1.0" green="1.0" blue="1.0" /><bounds x="0" y="5" width="02" height="02" /></rect> + <rect state="1"><color red="1.0" green="1.0" blue="1.0" /><bounds x="0" y="4" width="10" height="01" /></rect> + + <rect state="0"><color red="0.0" green="1.0" blue="1.0" /><bounds x="0" y="8" width="10" height="11" /></rect> + <rect state="1"><color red="1.0" green="1.0" blue="0.0" /><bounds x="0" y="8" width="10" height="11" /></rect> </element> - <element name="red_led"> - <disk><color red="1.0" green="0.0" blue="0.0" /></disk> + + + <element name="Solenoid_Knocker" defstate="0"> + <rect state="0"><color red="1.0" green="1.0" blue="1.0" /><bounds x="03" y="14" width="03" height="08" /></rect> + <rect state="1"><color red="1.0" green="0.0" blue="0.0" /><bounds x="03" y="00" width="03" height="04" /></rect> + <rect state="0"><color red="0.0" green="1.0" blue="1.0" /><bounds x="00" y="04" width="10" height="11" /></rect> + <rect state="1"><color red="1.0" green="1.0" blue="0.0" /><bounds x="00" y="04" width="10" height="11" /></rect> + </element> + + <element name="Solenoid_Outhole" defstate="0"> + <text string="\" state="1"><color red="1.0" green="0.0" blue="0.0" /><bounds x="17" y="00" width="05" height="16" /></text> + <text string="\" state="0"><color red="1.0" green="1.0" blue="1.0" /><bounds x="02" y="00" width="05" height="16" /></text> + <text string="\" state="1"><color red="1.0" green="0.0" blue="0.0" /><bounds x="18" y="00" width="05" height="16" /></text> + <text string="\" state="0"><color red="1.0" green="1.0" blue="1.0" /><bounds x="03" y="00" width="05" height="16" /></text> + <text string="\" state="1"><color red="1.0" green="0.0" blue="0.0" /><bounds x="19" y="00" width="05" height="16" /></text> + <text string="\" state="0"><color red="1.0" green="1.0" blue="1.0" /><bounds x="04" y="00" width="05" height="16" /></text> + <text string="\" state="1"><color red="1.0" green="0.0" blue="0.0" /><bounds x="20" y="00" width="05" height="16" /></text> + <text string="\" state="0"><color red="1.0" green="1.0" blue="1.0" /><bounds x="05" y="00" width="05" height="16" /></text> + <rect state="1"><color red="1.0" green="0.0" blue="0.0" /><bounds x="02" y="02" width="18" height="10" /></rect> + <rect ><color red="1.0" green="1.0" blue="1.0" /><bounds x="00" y="14" width="25" height="02" /></rect> + <text string="Outhole" ><color red="1.0" green="1.0" blue="1.0" /><bounds x="30" y="12" width="28" height="9.5" /></text> + </element> + + <element name="Solenoid_Kickback" defstate="0"> + <rect state="1"><color red="1.0" green="1.0" blue="1.0" /><bounds x="3" y="00" width="03" height="15" /></rect> + <rect state="0"><color red="1.0" green="1.0" blue="1.0" /><bounds x="3" y="07" width="03" height="08" /></rect> + <rect state="1"><color red="1.0" green="0.0" blue="0.0" /><bounds x="0" y="00" width="10" height="04" /></rect> + <rect state="0"><color red="1.0" green="1.0" blue="1.0" /><bounds x="0" y="07" width="10" height="04" /></rect> + </element> + + <element name="Solenoid_SlingShot_Left" defstate="0"> + <text string="\" state="1"><color red="1.0" green="0.0" blue="0.0" /><bounds x="05" y="00" width="65" height="80" /></text> + <text string="\" state="0"><color red="1.0" green="1.0" blue="1.0" /><bounds x="00" y="00" width="65" height="80" /></text> + <rect ><color red="1.0" green="1.0" blue="1.0" /><bounds x="20" y="16" width="04" height="60" /></rect> + <rect ><color red="1.0" green="1.0" blue="1.0" /><bounds x="20" y="76" width="24.5" height="04" /></rect> + </element> + <element name="Solenoid_SlingShot_Right" defstate="0"> + <text string="/" state="1"><color red="1.0" green="0.0" blue="0.0" /><bounds x="-5" y="00" width="65" height="80" /></text> + <text string="/" state="0"><color red="1.0" green="1.0" blue="1.0" /><bounds x="00" y="00" width="65" height="80" /></text> + <rect ><color red="1.0" green="1.0" blue="1.0" /><bounds x="40" y="16" width="04" height="60" /></rect> + <rect ><color red="1.0" green="1.0" blue="1.0" /><bounds x="19.5" y="76" width="24" height="04" /></rect> + </element> + + + <element name="Solenoid_Bumper_Blue_Star" defstate="0"> + <disk state="0"> <color red="1.0" green="1.0" blue="1.0" /><bounds x="0" y="0" width="80" height="80" /></disk> + <disk state="1"> <color red="1.0" green="0.0" blue="0.0" /><bounds x="0" y="0" width="80" height="80" /></disk> + <text string="*"><color red="0.3" green="0.5" blue="1.0" /><bounds x="-61" y="-38.5" width="206" height="206" /></text> + <disk> <color red="1.0" green="1.0" blue="1.0" /><bounds x="18" y="18" width="44" height="44" /></disk> + </element> + <element name="Switch_Bumper_Blue_Star" defstate="0"> + <text string="*" state="9"><color red="0.3" green="0.5" blue="1.0" /><bounds x="-61" y="-38.5" width="206" height="206" /></text> + <disk state="0"><color red="0.3" green="0.3" blue="1.0" /><bounds x="14" y="15" width="50" height="50" /></disk> + <disk state="1"><color red="0.5" green="0.5" blue="0.5" /><bounds x="14" y="15" width="50" height="50" /></disk> + </element> + <element name="Lamp_Bumper_Blue_1000" defstate="1"> + <text string="*" state="9"><color red="0.3" green="0.5" blue="1.0" /><bounds x="-61" y="-38.5" width="206" height="206" /></text> + <disk state="0"><color red="0.7" green="0.7" blue="0.7" /><bounds x="18" y="18" width="44" height="44" /></disk> + <disk state="1"><color red="1.0" green="1.0" blue="1.0" /><bounds x="18" y="18" width="44" height="44" /></disk> + <text string="1000"> <color red="0.3" green="0.5" blue="1.0" /><bounds x="07" y="29" width="70" height="23" /></text> + </element> + + <element name="Solenoid_Bumper_Red_Star" defstate="0"> + <disk state="0"> <color red="1.0" green="1.0" blue="1.0" /><bounds x="0" y="0" width="80" height="80" /></disk> + <disk state="1"> <color red="1.0" green="0.0" blue="0.0" /><bounds x="0" y="0" width="80" height="80" /></disk> + <text string="*"><color red="1.0" green="0.0" blue="0.0" /><bounds x="-61" y="-38.5" width="206" height="206" /></text> + <disk> <color red="1.0" green="1.0" blue="1.0" /><bounds x="18" y="18" width="44" height="44" /></disk> + </element> + <element name="Switch_Bumper_Red_Star" defstate="0"> + <text string="*" state="9"><color red="1.0" green="0.0" blue="0.0" /><bounds x="-61" y="-38.5" width="206" height="206" /></text> + <disk state="0"><color red="1.0" green="0.0" blue="0.0" /><bounds x="14" y="15" width="50" height="50" /></disk> + <disk state="1"><color red="0.5" green="0.5" blue="0.5" /><bounds x="14" y="15" width="50" height="50" /></disk> + </element> + <element name="Lamp_Bumper_Red_1000" defstate="0"> + <text string="*" state="9"><color red="0.0" green="0.0" blue="0.0" /><bounds x="-61" y="-38.5" width="206" height="206" /></text> + <disk state="0"><color red="0.7" green="0.7" blue="0.7" /><bounds x="18" y="18" width="44" height="44" /></disk> + <disk state="1"><color red="1.0" green="1.0" blue="1.0" /><bounds x="18" y="18" width="44" height="44" /></disk> + <text string="1000"> <color red="1.0" green="0.0" blue="0.0" /><bounds x="07" y="29" width="70" height="23" /></text> + </element> + + <element name="Solenoid_Bumper_Yellow_Star" defstate="0"> + <disk state="0"> <color red="1.0" green="1.0" blue="1.0" /><bounds x="0" y="0" width="80" height="80" /></disk> + <disk state="1"> <color red="1.0" green="0.0" blue="0.0" /><bounds x="0" y="0" width="80" height="80" /></disk> + <text string="*"><color red="1.0" green="1.0" blue="0.0" /><bounds x="-61" y="-38.5" width="206" height="206" /></text> + <disk> <color red="1.0" green="1.0" blue="1.0" /><bounds x="18" y="18" width="44" height="44" /></disk> + </element> + <element name="Switch_Bumper_Yellow_Star" defstate="0"> + <text string="*" state="9"><color red="1.0" green="1.0" blue="0.0" /><bounds x="-61" y="-38.5" width="206" height="206" /></text> + <disk state="0"><color red="1.0" green="1.0" blue="0.0" /><bounds x="14" y="15" width="50" height="50" /></disk> + <disk state="1"><color red="0.5" green="0.5" blue="0.5" /><bounds x="14" y="15" width="50" height="50" /></disk> + </element> + + <element name="Solenoid_Bumper_Green_Star" defstate="0"> + <disk state="0"> <color red="1.0" green="1.0" blue="1.0" /><bounds x="0" y="0" width="80" height="80" /></disk> + <disk state="1"> <color red="1.0" green="0.0" blue="0.0" /><bounds x="0" y="0" width="80" height="80" /></disk> + <text string="*"><color red="0.0" green="1.0" blue="0.0" /><bounds x="-61" y="-38.5" width="206" height="206" /></text> + <disk> <color red="1.0" green="1.0" blue="1.0" /><bounds x="18" y="18" width="44" height="44" /></disk> + </element> + <element name="Switch_Bumper_Green_Star" defstate="0"> + <text string="*" state="9"><color red="0.0" green="1.0" blue="0.0" /><bounds x="-61" y="-38.5" width="206" height="206" /></text> + <disk state="0"><color red="0.0" green="1.0" blue="0.0" /><bounds x="14" y="15" width="50" height="50" /></disk> + <disk state="1"><color red="0.5" green="0.5" blue="0.5" /><bounds x="14" y="15" width="50" height="50" /></disk> + </element> + + <element name="Lamp_Bumper_Silver_100" defstate="1"> + <text string="*" state="9"><color red="0.5" green="0.5" blue="0.5" /><bounds x="-61" y="-38.5" width="206" height="206" /></text> + <disk ><color red="1.0" green="1.0" blue="1.0" /><bounds x="18" y="18" width="44" height="44" /></disk> + <text string="100"> <color red="0.5" green="0.5" blue="0.5" /><bounds x="07" y="29" width="66" height="23" /></text> + </element> + <element name="Lamp_Bumper_Silver_1000" defstate="1"> + <text string="*" state="9"><color red="0.5" green="0.5" blue="0.5" /><bounds x="-61" y="-38.5" width="206" height="206" /></text> + <disk state="0"><color red="0.7" green="0.7" blue="0.7" /><bounds x="18" y="18" width="44" height="44" /></disk> + <disk state="1"><color red="1.0" green="1.0" blue="1.0" /><bounds x="18" y="18" width="44" height="44" /></disk> + <text string="1000"> <color red="0.5" green="0.5" blue="0.5" /><bounds x="07" y="29" width="70" height="23" /></text> + </element> + + + <element name="Solenoid_Saucer" defstate="0"> + <disk> <color red="1.0" green="0.8" blue="0.5" /><bounds x="00" y="00" width="70" height="70" /></disk> <!-- 71 --> + <disk> <color red="0.7" green="0.7" blue="0.7" /><bounds x="10" y="10" width="49" height="49" /></disk> <!-- 51 --> + <rect state="0"><color red="0.3" green="0.3" blue="0.3" /><bounds x="31" y="07" width="07" height="25" /></rect> + <rect state="1"><color red="1.0" green="0.0" blue="0.0" /><bounds x="31" y="07" width="07" height="25" /></rect> + <disk> <color red="0.0" green="0.0" blue="0.0" /><bounds x="27" y="40" width="15" height="15" /></disk> + </element> + <element name="Switch_Saucer" defstate="0"> + <disk state="9"><color red="1.0" green="0.8" blue="0.5" /><bounds x="00" y="00" width="70" height="70" /></disk> + <disk state="0"><color red="1.0" green="1.0" blue="1.0" /><bounds x="30" y="43" width="09" height="09" /></disk> + <disk state="1"><color red="0.0" green="0.0" blue="0.0" /><bounds x="30" y="43" width="09" height="09" /></disk> + </element> + + <element name="Solenoid_Saucer_Large" defstate="0"> + <disk> <color red="1.0" green="0.8" blue="0.5" /><bounds x="00" y="00" width="70" height="70" /></disk> + <disk> <color red="0.7" green="0.7" blue="0.7" /><bounds x="17" y="17" width="36" height="36" /></disk> + <rect state="0"><color red="0.3" green="0.3" blue="0.3" /><bounds x="33" y="14" width="04" height="21" /></rect> + <rect state="1"><color red="1.0" green="0.0" blue="0.0" /><bounds x="33" y="14" width="04" height="21" /></rect> + <disk> <color red="0.0" green="0.0" blue="0.0" /><bounds x="29" y="40" width="12" height="12" /></disk> </element> - <element name="background"> + <element name="Switch_Saucer_Large" defstate="0"> + <disk state="9"><color red="1.0" green="0.8" blue="0.5" /><bounds x="00" y="00" width="70" height="70" /></disk> + <disk state="0"><color red="1.0" green="1.0" blue="1.0" /><bounds x="31" y="42" width="08" height="08" /></disk> + <disk state="1"><color red="0.0" green="0.0" blue="0.0" /><bounds x="31" y="42" width="08" height="08" /></disk> + </element> + + + <element name="Coil_Post_Up" defstate="0"> + <disk state="1"><color red="1.0" green="0.0" blue="0.0" /><bounds x="00" y="00" width="21" height="21" /></disk> + </element> + <element name="Solenoid_Post_Down" defstate="0"> + <disk state="9"><color red="1.00" green="0.00" blue="0.00" /><bounds x="00" y="00" width="21" height="21" /></disk> + <disk state="1"><color red="0.50" green="0.10" blue="0.00" /><bounds x="01" y="01" width="19" height="19" /></disk> + <disk state="1"><color red="0.15" green="0.06" blue="0.00" /><bounds x="02" y="02" width="17" height="17" /></disk> + <rect state="1"><color red="0.50" green="0.10" blue="0.00" /><bounds x="10" y="02" width="01" height="17" /></rect> + <rect state="1"><color red="0.50" green="0.10" blue="0.00" /><bounds x="02" y="10" width="17" height="01" /></rect> + <disk state="1"><color red="1.00" green="0.00" blue="0.00" /><bounds x="08" y="08" width="06" height="06" /></disk> + </element> + <element name="Lamp_Post" defstate="0"> + <disk state="9"><color red="1.00" green="0.00" blue="0.00" /><bounds x="00" y="00" width="21" height="21" /></disk> + <disk ><color red="0.50" green="0.10" blue="0.00" /><bounds x="01" y="01" width="19" height="19" /></disk> + <disk state="0"><color red="0.15" green="0.06" blue="0.00" /><bounds x="02" y="02" width="17" height="17" /></disk> + <disk state="1"><color red="0.80" green="0.20" blue="0.00" /><bounds x="02" y="02" width="17" height="17" /></disk> + <rect ><color red="0.50" green="0.10" blue="0.00" /><bounds x="10" y="02" width="01" height="17" /></rect> + <rect ><color red="0.50" green="0.10" blue="0.00" /><bounds x="02" y="10" width="17" height="01" /></rect> + </element> + + +<!-- Line colours --> + + <element name="Draw_White" defstate="1"> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds left="0" top="0" right="1" bottom="1" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds left="0" top="0" right="1" bottom="1" /></rect> + </element> + <element name="Draw_Red" defstate="1"> + <rect state="1"><color red="1.00" green="0.00" blue="0.00" /><bounds left="0" top="0" right="1" bottom="1" /></rect> + <rect state="0"><color red="0.15" green="0.00" blue="0.00" /><bounds left="0" top="0" right="1" bottom="1" /></rect> + </element> + <element name="Draw_Amber" defstate="1"> + <rect state="1"><color red="1.00" green="0.40" blue="0.00" /><bounds left="0" top="0" right="1" bottom="1" /></rect> + <rect state="0"><color red="0.15" green="0.06" blue="0.00" /><bounds left="0" top="0" right="1" bottom="1" /></rect> + </element> + + <element name="Canvas"> <rect> - <bounds left="0" top="0" right="1" bottom="1" /> <color red="0.0" green="0.0" blue="0.0" /> + <bounds left="0" top="0" right="1" bottom="1" /> </rect> </element> - <element name="P0"><text string="Ball / Match"><color red="1.0" green="1.0" blue="1.0" /></text></element> - <element name="P1"><text string="Credits"><color red="1.0" green="1.0" blue="1.0" /></text></element> - <element name="P2"><text string="Players"><color red="1.0" green="1.0" blue="1.0" /></text></element> - <element name="P3"><text string="Player 1"><color red="1.0" green="1.0" blue="1.0" /></text></element> - <element name="P4"><text string="Player 2"><color red="1.0" green="1.0" blue="1.0" /></text></element> - <element name="P5"><text string="Player 3"><color red="1.0" green="1.0" blue="1.0" /></text></element> - <element name="P6"><text string="Player 4"><color red="1.0" green="1.0" blue="1.0" /></text></element> - <view name="Default Layout"> + + + + + <view name="Blank Playfield"> <!-- Background --> - <backdrop element="background"> - <bounds left="0" top="20" right="274" bottom="394" /> - </backdrop> + <backdrop element="Canvas"><bounds x="000" y="000" width="640" height="480" /></backdrop> - <!-- LEDs --> + <bezel element="Draw_White"><bounds x="000" y="000" width="640" height="001" /></bezel> + <bezel element="Draw_White"><bounds x="000" y="000" width="001" height="480" /></bezel> + <bezel element="Draw_White"><bounds x="640" y="000" width="001" height="480" /></bezel> + <bezel element="Draw_White"><bounds x="000" y="480" width="640" height="001" /></bezel> + <bezel element="Draw_White"><bounds x="320" y="000" width="001" height="480" /></bezel> + <bezel element="Draw_White"><bounds x="320" y="320" width="320" height="001" /></bezel> + <!-- <bezel element="Draw_White"><bounds x="159" y="000" width="001" height="480" /></bezel> --> - <!-- Player 1 Score --> - <bezel name="digit5" element="digit"> - <bounds left="10" top="45" right="44" bottom="84" /> - </bezel> - <bezel name="digit4" element="digit"> - <bounds left="54" top="45" right="88" bottom="84" /> - </bezel> - <bezel name="digit3" element="digit"> - <bounds left="98" top="45" right="132" bottom="84" /> - </bezel> - <bezel name="digit2" element="digit"> - <bounds left="142" top="45" right="176" bottom="84" /> - </bezel> - <bezel name="digit1" element="digit"> - <bounds left="186" top="45" right="220" bottom="84" /> - </bezel> - <bezel name="digit0" element="digit"> - <bounds left="230" top="45" right="264" bottom="84" /> - </bezel> + <bezel element="Title_Bally"><bounds x="430" y="18" width="105" height="30" /></bezel> + + <bezel element="Text_Playfield"><bounds x="040" y="010" width="250" height="14" /></bezel> + <bezel element="Text_Legend"><bounds x="018" y="35" width="300" height="12" /></bezel> + + + <!-- Backbox --> + + <!-- MPU Board Power On Self Test LED --> + <bezel element="Text_MPU_LED"> <bounds x="609" y="342" width="30" height="10" /></bezel> + <bezel name="led0" element="LED_Green"><bounds x="618" y="328" width="10" height="10" /></bezel> + + <!-- MPU Board Activity Switch --> + <bezel element="Text_Activity"> <bounds x="540" y="342" width="50" height="10" /></bezel> + <bezel element="Switch_Push-Button" inputtag="TEST" inputmask="0x02"><bounds x="550" y="331" width="20" height="10" /></bezel> + <bezel element="Key_0"> <bounds x="571" y="330" width="10" height="10" /></bezel> + + + <!-- Player 1 Score --> + <bezel name="lamp14" element="Lamp_P1"><bounds x="330" y="55" width="15" height="15" /></bezel> <!-- Backbox ~ 1st Player Up --> + <bezel name="digit17" element="Digit"><bounds x="360" y="55" width="10" height="15" /></bezel> + <bezel name="digit16" element="Digit"><bounds x="374" y="55" width="10" height="15" /></bezel> + <bezel name="digit15" element="Digit"><bounds x="388" y="55" width="10" height="15" /></bezel> + <bezel name="digit14" element="Digit"><bounds x="402" y="55" width="10" height="15" /></bezel> + <bezel name="digit13" element="Digit"><bounds x="416" y="55" width="10" height="15" /></bezel> + <bezel name="digit12" element="Digit"><bounds x="430" y="55" width="10" height="15" /></bezel> + <bezel name="digit11" element="Digit"><bounds x="444" y="55" width="10" height="15" /></bezel> <!-- Player 2 Score --> - <bezel name="digit15" element="digit"> - <bounds left="10" top="105" right="44" bottom="144" /> - </bezel> - <bezel name="digit14" element="digit"> - <bounds left="54" top="105" right="88" bottom="144" /> - </bezel> - <bezel name="digit13" element="digit"> - <bounds left="98" top="105" right="132" bottom="144" /> - </bezel> - <bezel name="digit12" element="digit"> - <bounds left="142" top="105" right="176" bottom="144" /> - </bezel> - <bezel name="digit11" element="digit"> - <bounds left="186" top="105" right="220" bottom="144" /> - </bezel> - <bezel name="digit10" element="digit"> - <bounds left="230" top="105" right="264" bottom="144" /> - </bezel> + <bezel name="lamp29" element="Lamp_P2"><bounds x="615" y="55" width="15" height="15" /></bezel> <!-- Backbox ~ 2nd Player Up --> + <bezel name="digit27" element="Digit"><bounds x="506" y="55" width="10" height="15" /></bezel> + <bezel name="digit26" element="Digit"><bounds x="520" y="55" width="10" height="15" /></bezel> + <bezel name="digit25" element="Digit"><bounds x="534" y="55" width="10" height="15" /></bezel> + <bezel name="digit24" element="Digit"><bounds x="548" y="55" width="10" height="15" /></bezel> + <bezel name="digit23" element="Digit"><bounds x="562" y="55" width="10" height="15" /></bezel> + <bezel name="digit22" element="Digit"><bounds x="576" y="55" width="10" height="15" /></bezel> + <bezel name="digit21" element="Digit"><bounds x="590" y="55" width="10" height="15" /></bezel> <!-- Player 3 Score --> - <bezel name="digit25" element="digit"> - <bounds left="10" top="165" right="44" bottom="204" /> - </bezel> - <bezel name="digit24" element="digit"> - <bounds left="54" top="165" right="88" bottom="204" /> - </bezel> - <bezel name="digit23" element="digit"> - <bounds left="98" top="165" right="132" bottom="204" /> - </bezel> - <bezel name="digit22" element="digit"> - <bounds left="142" top="165" right="176" bottom="204" /> - </bezel> - <bezel name="digit21" element="digit"> - <bounds left="186" top="165" right="220" bottom="204" /> - </bezel> - <bezel name="digit20" element="digit"> - <bounds left="230" top="165" right="264" bottom="204" /> - </bezel> + <bezel name="lamp44" element="Lamp_P3"><bounds x="330" y="250" width="15" height="15" /></bezel> <!-- Backbox ~ 3rd Player Up --> + <bezel name="digit37" element="Digit"><bounds x="360" y="250" width="10" height="15" /></bezel> + <bezel name="digit36" element="Digit"><bounds x="374" y="250" width="10" height="15" /></bezel> + <bezel name="digit35" element="Digit"><bounds x="388" y="250" width="10" height="15" /></bezel> + <bezel name="digit34" element="Digit"><bounds x="402" y="250" width="10" height="15" /></bezel> + <bezel name="digit33" element="Digit"><bounds x="416" y="250" width="10" height="15" /></bezel> + <bezel name="digit32" element="Digit"><bounds x="430" y="250" width="10" height="15" /></bezel> + <bezel name="digit31" element="Digit"><bounds x="444" y="250" width="10" height="15" /></bezel> <!-- Player 4 Score --> - <bezel name="digit35" element="digit"> - <bounds left="10" top="225" right="44" bottom="264" /> - </bezel> - <bezel name="digit34" element="digit"> - <bounds left="54" top="225" right="88" bottom="264" /> - </bezel> - <bezel name="digit33" element="digit"> - <bounds left="98" top="225" right="132" bottom="264" /> - </bezel> - <bezel name="digit32" element="digit"> - <bounds left="142" top="225" right="176" bottom="264" /> - </bezel> - <bezel name="digit31" element="digit"> - <bounds left="186" top="225" right="220" bottom="264" /> - </bezel> - <bezel name="digit30" element="digit"> - <bounds left="230" top="225" right="264" bottom="264" /> - </bezel> - - <!-- Credits and Balls --> - <bezel name="digit44" element="digit"> - <bounds left="10" top="345" right="44" bottom="384" /> - </bezel> - <bezel name="digit43" element="digit"> - <bounds left="54" top="345" right="88" bottom="384" /> - </bezel> - <bezel name="digit41" element="digit"> - <bounds left="186" top="345" right="220" bottom="384" /> - </bezel> - <bezel name="digit40" element="digit"> - <bounds left="230" top="345" right="264" bottom="384" /> - </bezel> - - <bezel element="P0"><bounds left="200" right="258" top="330" bottom="342" /></bezel> - <bezel element="P1"><bounds left="30" right="88" top="330" bottom="342" /></bezel> - <bezel name="text3" element="P3"><bounds left="100" right="180" top="30" bottom="42" /></bezel> - <bezel name="text2" element="P4"><bounds left="100" right="180" top="90" bottom="102" /></bezel> - <bezel name="text1" element="P5"><bounds left="100" right="180" top="150" bottom="162" /></bezel> - <bezel name="text0" element="P6"><bounds left="100" right="180" top="210" bottom="222" /></bezel> - <bezel name="led0" element="red_led"> - <bounds left="110" right="125" top="360" bottom="375" /></bezel> + <bezel name="lamp59" element="Lamp_P4"><bounds x="615" y="250" width="15" height="15" /></bezel> <!-- Backbox ~ 4th Player Up --> + <bezel name="digit47" element="Digit"><bounds x="506" y="250" width="10" height="15" /></bezel> + <bezel name="digit46" element="Digit"><bounds x="520" y="250" width="10" height="15" /></bezel> + <bezel name="digit45" element="Digit"><bounds x="534" y="250" width="10" height="15" /></bezel> + <bezel name="digit44" element="Digit"><bounds x="548" y="250" width="10" height="15" /></bezel> + <bezel name="digit43" element="Digit"><bounds x="562" y="250" width="10" height="15" /></bezel> + <bezel name="digit42" element="Digit"><bounds x="576" y="250" width="10" height="15" /></bezel> + <bezel name="digit41" element="Digit"><bounds x="590" y="250" width="10" height="15" /></bezel> + + <!-- Credits and Ball In Play / Match --> + <bezel element="Text_Credit"><bounds x="542" y="142" width="48" height="8" /></bezel> + <bezel name="lamp12" element="Ball_In_Play"><bounds x="586" y="105" width="50" height="11" /></bezel> <!-- Backbox ~ Ball In Play --> + <bezel name="lamp25" element="Match"><bounds x="596" y="152" width="25" height="11" /></bezel> <!-- Backbox ~ Match --> + <bezel name="digit55" element="Digit"><bounds x="554" y="125" width="10" height="15" /></bezel> + <bezel name="digit54" element="Digit"><bounds x="568" y="125" width="10" height="15" /></bezel> + <bezel name="digit52" element="Digit"><bounds x="596" y="125" width="10" height="15" /></bezel> + <bezel name="digit51" element="Digit"><bounds x="610" y="125" width="10" height="15" /></bezel> + + <bezel name="lamp10" element="Shoot_Again"><bounds x="420" y="295" width="60" height="19" /></bezel> <!-- Backbox ~ Same Player Shoots Again --> + <bezel name="lamp13" element="Lamp_1P"><bounds x="345" y="297" width="15" height="15" /></bezel> <!-- Backbox ~ 1 Player Game --> + <bezel name="lamp28" element="Lamp_2P"><bounds x="360" y="297" width="15" height="15" /></bezel> <!-- Backbox ~ 2 Player Game --> + <bezel name="lamp43" element="Lamp_3P"><bounds x="375" y="297" width="15" height="15" /></bezel> <!-- Backbox ~ 3 Player Game --> + <bezel name="lamp58" element="Lamp_4P"><bounds x="390" y="297" width="15" height="15" /></bezel> <!-- Backbox ~ 4 Player Game --> + <bezel name="lamp27" element="High_Score_To_Date"><bounds x="438" y="6" width="90" height="11" /></bezel> <!-- Backbox ~ High Score To Date --> + <bezel name="lamp42" element="Game_Over"><bounds x="580" y="300" width="45" height="11" /></bezel> <!-- Backbox ~ Game Over --> + <bezel name="lamp57" element="Tilt"><bounds x="480" y="297" width="50" height="16" /></bezel> <!-- Backbox ~ Tilt --> + + + + <bezel element="Text_Lamps"><bounds x="410" y="360" width="60" height="11" /></bezel> + <bezel element="Text_15"><bounds x="552" y="373" width="30" height="11" /></bezel> + <bezel element="Text_30"><bounds x="552" y="388" width="30" height="11" /></bezel> + <bezel element="Text_45"><bounds x="552" y="403" width="30" height="11" /></bezel> + <bezel element="Text_60"><bounds x="552" y="418" width="30" height="11" /></bezel> + + <!-- Lamps controlled by U1 on Lamp Driver Board --> + <bezel name="lamp0" element="Lamp_White"><bounds x="330" y="375" width="8" height="8" /></bezel> + <bezel name="lamp1" element="Lamp_White"><bounds x="345" y="375" width="8" height="8" /></bezel> + <bezel name="lamp2" element="Lamp_White"><bounds x="360" y="375" width="8" height="8" /></bezel> + <bezel name="lamp3" element="Lamp_White"><bounds x="375" y="375" width="8" height="8" /></bezel> + <bezel name="lamp4" element="Lamp_White"><bounds x="390" y="375" width="8" height="8" /></bezel> + <bezel name="lamp5" element="Lamp_White"><bounds x="405" y="375" width="8" height="8" /></bezel> + <bezel name="lamp6" element="Lamp_White"><bounds x="420" y="375" width="8" height="8" /></bezel> + <bezel name="lamp7" element="Lamp_White"><bounds x="435" y="375" width="8" height="8" /></bezel> + <bezel name="lamp8" element="Lamp_White"><bounds x="450" y="375" width="8" height="8" /></bezel> + <bezel name="lamp9" element="Lamp_White"><bounds x="465" y="375" width="8" height="8" /></bezel> + <bezel name="lamp10" element="Lamp_White"><bounds x="480" y="375" width="8" height="8" /></bezel> + <bezel name="lamp11" element="Lamp_White"><bounds x="495" y="375" width="8" height="8" /></bezel> + <bezel name="lamp12" element="Lamp_White"><bounds x="510" y="375" width="8" height="8" /></bezel> + <bezel name="lamp13" element="Lamp_White"><bounds x="525" y="375" width="8" height="8" /></bezel> + <bezel name="lamp14" element="Lamp_White"><bounds x="540" y="375" width="8" height="8" /></bezel> + + <!-- Lamps controlled by U2 on Lamp Driver Board --> + <bezel name="lamp15" element="Lamp_White"><bounds x="330" y="390" width="8" height="8" /></bezel> + <bezel name="lamp16" element="Lamp_White"><bounds x="345" y="390" width="8" height="8" /></bezel> + <bezel name="lamp17" element="Lamp_White"><bounds x="360" y="390" width="8" height="8" /></bezel> + <bezel name="lamp18" element="Lamp_White"><bounds x="375" y="390" width="8" height="8" /></bezel> + <bezel name="lamp19" element="Lamp_White"><bounds x="390" y="390" width="8" height="8" /></bezel> + <bezel name="lamp20" element="Lamp_White"><bounds x="405" y="390" width="8" height="8" /></bezel> + <bezel name="lamp21" element="Lamp_White"><bounds x="420" y="390" width="8" height="8" /></bezel> + <bezel name="lamp22" element="Lamp_White"><bounds x="435" y="390" width="8" height="8" /></bezel> + <bezel name="lamp23" element="Lamp_White"><bounds x="450" y="390" width="8" height="8" /></bezel> + <bezel name="lamp24" element="Lamp_White"><bounds x="465" y="390" width="8" height="8" /></bezel> + <bezel name="lamp25" element="Lamp_White"><bounds x="480" y="390" width="8" height="8" /></bezel> + <bezel name="lamp26" element="Lamp_White"><bounds x="495" y="390" width="8" height="8" /></bezel> + <bezel name="lamp27" element="Lamp_White"><bounds x="510" y="390" width="8" height="8" /></bezel> + <bezel name="lamp28" element="Lamp_White"><bounds x="525" y="390" width="8" height="8" /></bezel> + <bezel name="lamp29" element="Lamp_White"><bounds x="540" y="390" width="8" height="8" /></bezel> + + <!-- Lamps controlled by U3 on Lamp Driver Board --> + <bezel name="lamp30" element="Lamp_White"><bounds x="330" y="405" width="8" height="8" /></bezel> + <bezel name="lamp31" element="Lamp_White"><bounds x="345" y="405" width="8" height="8" /></bezel> + <bezel name="lamp32" element="Lamp_White"><bounds x="360" y="405" width="8" height="8" /></bezel> + <bezel name="lamp33" element="Lamp_White"><bounds x="375" y="405" width="8" height="8" /></bezel> + <bezel name="lamp34" element="Lamp_White"><bounds x="390" y="405" width="8" height="8" /></bezel> + <bezel name="lamp35" element="Lamp_White"><bounds x="405" y="405" width="8" height="8" /></bezel> + <bezel name="lamp36" element="Lamp_White"><bounds x="420" y="405" width="8" height="8" /></bezel> + <bezel name="lamp37" element="Lamp_White"><bounds x="435" y="405" width="8" height="8" /></bezel> + <bezel name="lamp38" element="Lamp_White"><bounds x="450" y="405" width="8" height="8" /></bezel> + <bezel name="lamp39" element="Lamp_White"><bounds x="465" y="405" width="8" height="8" /></bezel> + <bezel name="lamp40" element="Lamp_White"><bounds x="480" y="405" width="8" height="8" /></bezel> + <bezel name="lamp41" element="Lamp_White"><bounds x="495" y="405" width="8" height="8" /></bezel> + <bezel name="lamp42" element="Lamp_White"><bounds x="510" y="405" width="8" height="8" /></bezel> + <bezel name="lamp43" element="Lamp_White"><bounds x="525" y="405" width="8" height="8" /></bezel> + <bezel name="lamp44" element="Lamp_White"><bounds x="540" y="405" width="8" height="8" /></bezel> + + <!-- Lamps controlled by U4 on Lamp Driver Board --> + <bezel name="lamp45" element="Lamp_White"><bounds x="330" y="420" width="8" height="8" /></bezel> + <bezel name="lamp46" element="Lamp_White"><bounds x="345" y="420" width="8" height="8" /></bezel> + <bezel name="lamp47" element="Lamp_White"><bounds x="360" y="420" width="8" height="8" /></bezel> + <bezel name="lamp48" element="Lamp_White"><bounds x="375" y="420" width="8" height="8" /></bezel> + <bezel name="lamp49" element="Lamp_White"><bounds x="390" y="420" width="8" height="8" /></bezel> + <bezel name="lamp50" element="Lamp_White"><bounds x="405" y="420" width="8" height="8" /></bezel> + <bezel name="lamp51" element="Lamp_White"><bounds x="420" y="420" width="8" height="8" /></bezel> + <bezel name="lamp52" element="Lamp_White"><bounds x="435" y="420" width="8" height="8" /></bezel> + <bezel name="lamp53" element="Lamp_White"><bounds x="450" y="420" width="8" height="8" /></bezel> + <bezel name="lamp54" element="Lamp_White"><bounds x="465" y="420" width="8" height="8" /></bezel> + <bezel name="lamp55" element="Lamp_White"><bounds x="480" y="420" width="8" height="8" /></bezel> + <bezel name="lamp56" element="Lamp_White"><bounds x="495" y="420" width="8" height="8" /></bezel> + <bezel name="lamp57" element="Lamp_White"><bounds x="510" y="420" width="8" height="8" /></bezel> + <bezel name="lamp58" element="Lamp_White"><bounds x="525" y="420" width="8" height="8" /></bezel> + <bezel name="lamp59" element="Lamp_White"><bounds x="540" y="420" width="8" height="8" /></bezel> + + + <bezel element="Text_Solenoids"><bounds x="382" y="437" width="100" height="11" /></bezel> + <bezel name="solenoid0" element="Solenoid_PullDown"><bounds x="330" y="452" width="9" height="19" /></bezel> + <bezel name="solenoid1" element="Solenoid_PullDown"><bounds x="345" y="452" width="9" height="19" /></bezel> + <bezel name="solenoid2" element="Solenoid_PullDown"><bounds x="360" y="452" width="9" height="19" /></bezel> + <bezel name="solenoid3" element="Solenoid_PullDown"><bounds x="375" y="452" width="9" height="19" /></bezel> + <bezel name="solenoid4" element="Solenoid_PullDown"><bounds x="390" y="452" width="9" height="19" /></bezel> + <bezel name="solenoid5" element="Solenoid_PullDown"><bounds x="405" y="452" width="9" height="19" /></bezel> + <bezel name="solenoid6" element="Solenoid_PullDown"><bounds x="420" y="452" width="9" height="19" /></bezel> + <bezel name="solenoid7" element="Solenoid_PullDown"><bounds x="435" y="452" width="9" height="19" /></bezel> + <bezel name="solenoid8" element="Solenoid_PullDown"><bounds x="450" y="452" width="9" height="19" /></bezel> + <bezel name="solenoid9" element="Solenoid_PullDown"><bounds x="465" y="452" width="9" height="19" /></bezel> + <bezel name="solenoid10" element="Solenoid_PullDown"><bounds x="480" y="452" width="9" height="19" /></bezel> + <bezel name="solenoid11" element="Solenoid_PullDown"><bounds x="495" y="452" width="9" height="19" /></bezel> + <bezel name="solenoid12" element="Solenoid_PullDown"><bounds x="510" y="452" width="9" height="19" /></bezel> + <bezel name="solenoid13" element="Solenoid_PullDown"><bounds x="525" y="452" width="9" height="19" /></bezel> + <bezel name="solenoid14" element="Solenoid_PullDown"><bounds x="540" y="452" width="9" height="19" /></bezel> + + <bezel element="Text_Coils"><bounds x="572" y="437" width="50" height="11" /></bezel> + <bezel name="solenoid16" element="Coil_PullDown"><bounds x="570" y="459" width="09" height="12" /></bezel> + <bezel name="solenoid17" element="Coil_PullDown"><bounds x="585" y="459" width="09" height="12" /></bezel> + <bezel name="solenoid18" element="Coil_PullDown"><bounds x="600" y="459" width="09" height="12" /></bezel> + <bezel name="solenoid19" element="Coil_PullDown"><bounds x="615" y="459" width="09" height="12" /></bezel> + + + + <!-- Cabinet Switches --> + <bezel element="Text_Service"> <bounds x="485" y="342" width="50" height="10" /></bezel> + <bezel element="Switch_Push-Button" inputtag="TEST" inputmask="0x01"><bounds x="495" y="331" width="20" height="10" /></bezel> + <bezel element="Key_9"> <bounds x="516" y="330" width="10" height="10" /></bezel> + + <bezel element="Text_Slam"> <bounds x="430" y="342" width="50" height="10" /></bezel> + <bezel element="Switch_SlamTilt" inputtag="X1" inputmask="0x80"><bounds x="434" y="331" width="25" height="08" /></bezel> + <bezel element="Key_Equals"> <bounds x="461" y="330" width="10" height="10" /></bezel> + + <bezel element="Text_Tilt"> <bounds x="380" y="342" width="50" height="10" /></bezel> + <bezel element="Switch_Tilt" inputtag="X0" inputmask="0x40"><bounds x="390" y="324" width="17" height="17" /></bezel> + <bezel element="Key_T"> <bounds x="411" y="330" width="10" height="10" /></bezel> + + + <!-- Misc Solenoids --> + <bezel name="solenoid5" element="Solenoid_Knocker"><bounds x="336" y="321" width="09" height="22" /></bezel> + <bezel element="Text_Knocker"> <!-- Knocker --> <bounds x="322" y="342" width="40" height="10" /></bezel> + + <!-- Misc Lamps --> + <bezel name="lamp55" element="Credit_Indicator"><bounds x="23" y="456" width="70" height="21" /></bezel> <!-- Credit Indicator --> + + + <!-- Outhole --> + <bezel name="solenoid6" element="Solenoid_Outhole"> <bounds x="150" y="455" width="58" height="22" /></bezel> + <bezel element="Switch_RollOn_WireForm_Left" inputtag="X0" inputmask="0x80"><bounds x="163" y="453" width="20" height="16" /></bezel> + <bezel element="Key_BSpace"> <bounds x="185" y="455" width="15" height="14" /></bezel> + + + + <bezel element="Text_Switch"><bounds x="070" y="65" width="70" height="12" /></bezel> + <bezel element="ST0"> <bounds x="020" y="080" width="30" height="11" /></bezel> + <bezel element="ST1"> <bounds x="055" y="080" width="30" height="11" /></bezel> + <bezel element="ST2"> <bounds x="090" y="080" width="30" height="11" /></bezel> + <bezel element="ST3"> <bounds x="125" y="080" width="30" height="11" /></bezel> + <bezel element="ST4"> <bounds x="160" y="080" width="30" height="11" /></bezel> + <bezel element="I0"> <bounds x="001" y="100" width="20" height="11" /></bezel> + <bezel element="I1"> <bounds x="001" y="130" width="20" height="11" /></bezel> + <bezel element="I2"> <bounds x="001" y="160" width="20" height="11" /></bezel> + <bezel element="I3"> <bounds x="001" y="190" width="20" height="11" /></bezel> + <bezel element="I4"> <bounds x="001" y="220" width="20" height="11" /></bezel> + <bezel element="I5"> <bounds x="001" y="250" width="20" height="11" /></bezel> + <bezel element="I6"> <bounds x="001" y="280" width="20" height="11" /></bezel> + <bezel element="I7"> <bounds x="001" y="310" width="20" height="11" /></bezel> + + + <bezel element="Switch_Push-Button" inputtag="X0" inputmask="0x01"><bounds x="25" y="100" width="20" height="10" /></bezel> + <bezel element="Key_Dot"> <bounds x="28" y="107" width="14" height="14" /></bezel> + <bezel element="Switch_Push-Button" inputtag="X0" inputmask="0x02"><bounds x="25" y="130" width="20" height="10" /></bezel> + <bezel element="Key_FSlash"> <bounds x="31" y="141" width="10" height="10" /></bezel> + <bezel element="Switch_Push-Button" inputtag="X0" inputmask="0x04"><bounds x="25" y="160" width="20" height="10" /></bezel> + <bezel element="Key_OBrkt"> <bounds x="31" y="171" width="10" height="10" /></bezel> + <bezel element="Switch_Push-Button" inputtag="X0" inputmask="0x08"><bounds x="25" y="190" width="20" height="10" /></bezel> + <bezel element="Key_CBrkt"> <bounds x="31" y="201" width="10" height="10" /></bezel> + <bezel element="Switch_Push-Button" inputtag="X0" inputmask="0x10"><bounds x="25" y="220" width="20" height="10" /></bezel> + <bezel element="Key_BSlash"> <bounds x="31" y="231" width="10" height="10" /></bezel> + <bezel element="Switch_Push-Button" inputtag="X0" inputmask="0x20"><bounds x="25" y="250" width="20" height="10" /></bezel> + <bezel element="Key_1"> <bounds x="31" y="261" width="10" height="10" /></bezel> + <bezel element="Switch_Push-Button" inputtag="X0" inputmask="0x40"><bounds x="25" y="280" width="20" height="10" /></bezel> + <bezel element="Key_T"> <bounds x="31" y="291" width="10" height="10" /></bezel> + <bezel element="Switch_Push-Button" inputtag="X0" inputmask="0x80"><bounds x="25" y="310" width="20" height="10" /></bezel> + <bezel element="Key_BSpace"> <bounds x="28" y="320" width="15" height="14" /></bezel> + + + <bezel element="Switch_Push-Button" inputtag="X1" inputmask="0x01"><bounds x="60" y="100" width="20" height="10" /></bezel> + <bezel element="Key_7"> <bounds x="66" y="111" width="10" height="10" /></bezel> + <bezel element="Switch_Push-Button" inputtag="X1" inputmask="0x02"><bounds x="60" y="130" width="20" height="10" /></bezel> + <bezel element="Key_5"> <bounds x="66" y="141" width="10" height="10" /></bezel> + <bezel element="Switch_Push-Button" inputtag="X1" inputmask="0x04"><bounds x="60" y="160" width="20" height="10" /></bezel> + <bezel element="Key_6"> <bounds x="66" y="171" width="10" height="10" /></bezel> + <bezel element="Switch_Push-Button" inputtag="X1" inputmask="0x08"><bounds x="60" y="190" width="20" height="10" /></bezel> + <bezel element="Key_Enter"> <bounds x="63" y="199" width="15" height="14" /></bezel> + <bezel element="Switch_Push-Button" inputtag="X1" inputmask="0x10"><bounds x="60" y="220" width="20" height="10" /></bezel> + <bezel element="Key_Quote"> <bounds x="64" y="230" width="14" height="14" /></bezel> + <bezel element="Switch_Push-Button" inputtag="X1" inputmask="0x20"><bounds x="60" y="250" width="20" height="10" /></bezel> + <bezel element="Key_SColon"> <bounds x="65" y="259" width="11" height="11" /></bezel> + <bezel element="Switch_Push-Button" inputtag="X1" inputmask="0x40"><bounds x="60" y="280" width="20" height="10" /></bezel> + <bezel element="Key_L"> <bounds x="66" y="291" width="10" height="10" /></bezel> + <bezel element="Switch_Push-Button" inputtag="X1" inputmask="0x80"><bounds x="60" y="310" width="20" height="10" /></bezel> + <bezel element="Key_Equals"> <bounds x="66" y="321" width="10" height="10" /></bezel> + + + <bezel element="Switch_Push-Button" inputtag="X2" inputmask="0x01"><bounds x="095" y="100" width="20" height="10" /></bezel> + <bezel element="Key_K"> <bounds x="101" y="111" width="10" height="10" /></bezel> + <bezel element="Switch_Push-Button" inputtag="X2" inputmask="0x02"><bounds x="095" y="130" width="20" height="10" /></bezel> + <bezel element="Key_J"> <bounds x="101" y="141" width="10" height="10" /></bezel> + <bezel element="Switch_Push-Button" inputtag="X2" inputmask="0x04"><bounds x="095" y="160" width="20" height="10" /></bezel> + <bezel element="Key_H"> <bounds x="101" y="171" width="10" height="10" /></bezel> + <bezel element="Switch_Push-Button" inputtag="X2" inputmask="0x08"><bounds x="095" y="190" width="20" height="10" /></bezel> + <bezel element="Key_G"> <bounds x="101" y="201" width="10" height="10" /></bezel> + <bezel element="Switch_Push-Button" inputtag="X2" inputmask="0x10"><bounds x="095" y="220" width="20" height="10" /></bezel> + <bezel element="Key_F"> <bounds x="101" y="231" width="10" height="10" /></bezel> + <bezel element="Switch_Push-Button" inputtag="X2" inputmask="0x20"><bounds x="095" y="250" width="20" height="10" /></bezel> + <bezel element="Key_D"> <bounds x="101" y="261" width="10" height="10" /></bezel> + <bezel element="Switch_Push-Button" inputtag="X2" inputmask="0x40"><bounds x="095" y="280" width="20" height="10" /></bezel> + <bezel element="Key_S"> <bounds x="101" y="291" width="10" height="10" /></bezel> + <bezel element="Switch_Push-Button" inputtag="X2" inputmask="0x80"><bounds x="095" y="310" width="20" height="10" /></bezel> + <bezel element="Key_A"> <bounds x="101" y="321" width="10" height="10" /></bezel> + + + <bezel element="Switch_Push-Button" inputtag="X3" inputmask="0x01"><bounds x="130" y="100" width="20" height="10" /></bezel> + <bezel element="Key_O"> <bounds x="136" y="111" width="10" height="10" /></bezel> + <bezel element="Switch_Push-Button" inputtag="X3" inputmask="0x02"><bounds x="130" y="130" width="20" height="10" /></bezel> + <bezel element="Key_I"> <bounds x="136" y="141" width="10" height="10" /></bezel> + <bezel element="Switch_Push-Button" inputtag="X3" inputmask="0x04"><bounds x="130" y="160" width="20" height="10" /></bezel> + <bezel element="Key_U"> <bounds x="136" y="171" width="10" height="10" /></bezel> + <bezel element="Switch_Push-Button" inputtag="X3" inputmask="0x08"><bounds x="130" y="190" width="20" height="10" /></bezel> + <bezel element="Key_Y"> <bounds x="136" y="201" width="10" height="10" /></bezel> + <bezel element="Switch_Push-Button" inputtag="X3" inputmask="0x10"><bounds x="130" y="220" width="20" height="10" /></bezel> + <bezel element="Key_R"> <bounds x="136" y="231" width="10" height="10" /></bezel> + <bezel element="Switch_Push-Button" inputtag="X3" inputmask="0x20"><bounds x="130" y="250" width="20" height="10" /></bezel> + <bezel element="Key_E"> <bounds x="136" y="261" width="10" height="10" /></bezel> + <bezel element="Switch_Push-Button" inputtag="X3" inputmask="0x40"><bounds x="130" y="280" width="20" height="10" /></bezel> + <bezel element="Key_W"> <bounds x="136" y="291" width="10" height="10" /></bezel> + <bezel element="Switch_Push-Button" inputtag="X3" inputmask="0x80"><bounds x="130" y="310" width="20" height="10" /></bezel> + <bezel element="Key_Q"> <bounds x="136" y="321" width="10" height="10" /></bezel> + + + <bezel element="Switch_Push-Button" inputtag="X4" inputmask="0x01"><bounds x="165" y="100" width="20" height="10" /></bezel> + <bezel element="Key_Comma"> <bounds x="168" y="107" width="14" height="14" /></bezel> + <bezel element="Switch_Push-Button" inputtag="X4" inputmask="0x02"><bounds x="165" y="130" width="20" height="10" /></bezel> + <bezel element="Key_M"> <bounds x="171" y="141" width="10" height="10" /></bezel> + <bezel element="Switch_Push-Button" inputtag="X4" inputmask="0x04"><bounds x="165" y="160" width="20" height="10" /></bezel> + <bezel element="Key_N"> <bounds x="171" y="171" width="10" height="10" /></bezel> + <bezel element="Switch_Push-Button" inputtag="X4" inputmask="0x08"><bounds x="165" y="190" width="20" height="10" /></bezel> + <bezel element="Key_B"> <bounds x="171" y="201" width="10" height="10" /></bezel> + <bezel element="Switch_Push-Button" inputtag="X4" inputmask="0x10"><bounds x="165" y="220" width="20" height="10" /></bezel> + <bezel element="Key_V"> <bounds x="171" y="231" width="10" height="10" /></bezel> + <bezel element="Switch_Push-Button" inputtag="X4" inputmask="0x20"><bounds x="165" y="250" width="20" height="10" /></bezel> + <bezel element="Key_C"> <bounds x="171" y="261" width="10" height="10" /></bezel> + <bezel element="Switch_Push-Button" inputtag="X4" inputmask="0x40"><bounds x="165" y="280" width="20" height="10" /></bezel> + <bezel element="Key_X"> <bounds x="171" y="291" width="10" height="10" /></bezel> + <bezel element="Switch_Push-Button" inputtag="X4" inputmask="0x80"><bounds x="165" y="310" width="20" height="10" /></bezel> + <bezel element="Key_Z"> <bounds x="171" y="321" width="10" height="10" /></bezel> + </view> + </mamelayout> diff --git a/src/mame/layout/by17_matahari.lay b/src/mame/layout/by17_matahari.lay new file mode 100644 index 00000000000..60cc5ab8d4f --- /dev/null +++ b/src/mame/layout/by17_matahari.lay @@ -0,0 +1,1070 @@ +<!-- Pinball Machine, Bally ~ Mata Hari --> +<!-- [Quench] October 2015 --> + + +<!-- Any state="9" items are not displayed and are only used for object alignment --> + +<mamelayout version="2"> + + <element name="Title_MataHari"><text string="Mata Hari"><color red="1.00" green="0.0" blue="0.0" /></text></element> + + + +<!-- Switches --> + + <element name="Switch_SlamTilt"> + <rect state="0"><color red="0.80" green="0.80" blue="0.80" /><bounds x="00" y="00" width="25" height="01" /></rect> + <rect state="0"><color red="0.80" green="0.80" blue="0.80" /><bounds x="00" y="08" width="13" height="01.5" /></rect> + <rect state="0"><color red="1.00" green="1.00" blue="0.00" /><bounds x="08" y="01" width="04" height="02" /></rect> + <rect state="0"><color red="1.00" green="1.00" blue="0.00" /><bounds x="08" y="06" width="04" height="02" /></rect> + + <rect state="0"><color red="0.70" green="0.70" blue="0.70" /><bounds x="19" y="01" width="06" height="04" /></rect> + <rect state="1"><color red="0.70" green="0.70" blue="0.70" /><bounds x="19" y="04" width="06" height="04" /></rect> + + <rect state="1"><color red="0.80" green="0.80" blue="0.80" /><bounds x="00" y="00" width="08" height="01" /></rect> + <rect state="1"><color red="0.80" green="0.80" blue="0.80" /><bounds x="08" y="01" width="08" height="01" /></rect> + <rect state="1"><color red="0.80" green="0.80" blue="0.80" /><bounds x="16" y="02" width="09" height="01" /></rect> + + + <rect state="1"><color red="0.80" green="0.80" blue="0.80" /><bounds x="00" y="08" width="13" height="01.5" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="0.00" /><bounds x="08" y="03" width="04" height="02" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="0.00" /><bounds x="08" y="06" width="04" height="02" /></rect> + </element> + + <element name="Switch_Tilt"> + <rect ><color red="0.80" green="0.80" blue="0.00" /><bounds x="00" y="00" width="17" height="17" /></rect> + <disk ><color red="0.00" green="0.00" blue="0.00" /><bounds x="01" y="01" width="15" height="15" /></disk> + <disk state="0"><color red="0.50" green="0.50" blue="0.50" /><bounds x="04" y="04" width="09" height="09" /></disk> + <disk state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="07" y="07" width="02" height="02" /></disk> + + <disk state="1"><color red="0.50" green="0.50" blue="0.50" /><bounds x="07" y="04" width="09" height="09" /></disk> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="11" y="07" width="02" height="02" /></disk> + </element> + + + <element name="Switch_Leaf_Vertical"> + <rect state="0"><color red="0.80" green="0.80" blue="0.80" /><bounds x="0" y="00" width="01" height="06" /></rect> + <rect state="0"><color red="0.80" green="0.80" blue="0.80" /><bounds x="8" y="00" width="01.5" height="06" /></rect> + <rect state="0"><color red="1.00" green="1.00" blue="0.00" /><bounds x="1" y="01" width="02" height="04" /></rect> + <rect state="0"><color red="1.00" green="1.00" blue="0.00" /><bounds x="6" y="01" width="02" height="04" /></rect> + + <rect state="1"><color red="0.80" green="0.80" blue="0.80" /><bounds x="1.5" y="00" width="01" height="06" /></rect> + <rect state="1"><color red="0.80" green="0.80" blue="0.80" /><bounds x="6.5" y="00" width="01" height="06" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="0.00" /><bounds x="2" y="01" width="02" height="04" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="0.00" /><bounds x="4.5" y="01" width="02" height="04" /></rect> + </element> + + <element name="Switch_RollOn_WireForm_Left"> + <text string=">" state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="8" y="0" width="11" height="11" /></text> + <rect state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="1" y="4" width="0.1" height="04" /></rect> + <rect state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="1" y="4" width="09" height="0.1" /></rect> + <rect state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="1" y="8" width="09" height="0.1" /></rect> + <rect state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="3" y="6" width="08" height="0.1" /></rect> + <text string=">" state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="8" y="0" width="11" height="11" /></text> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="1" y="4" width="0.1" height="04" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="1" y="4" width="09" height="0.1" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="1" y="8" width="09" height="0.1" /></rect> + </element> + + <element name="Switch_RollOver_WireForm_Vertical"> + <text string="/\" state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0" y="00" width="07" height="10" /></text> + <text string="\/" state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0" y="17" width="07" height="10" /></text> + <rect state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="1" y="09" width="0.1" height="09" /></rect> + <rect state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="5" y="09" width="0.1" height="09" /></rect> + <rect state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="3" y="07" width="0.1" height="13" /></rect> + <text string="/\" state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0" y="00" width="07" height="10" /></text> + <text string="\/" state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0" y="17" width="07" height="10" /></text> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="1" y="09" width="0.1" height="09" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="5" y="09" width="0.1" height="09" /></rect> + </element> + + + <element name="Switch_Push-Button" defstate="0"> + <rect state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="07" y="04" width="16" height="01" /></rect> + <rect state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="12" y="00" width="01" height="04" /></rect> + <rect state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="17" y="00" width="01" height="04" /></rect> + <rect state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="12" y="00" width="05" height="01" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="07" y="08.5" width="16" height="01" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="12" y="04.5" width="01" height="04" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="17" y="04.5" width="01" height="04" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="12" y="04.5" width="05" height="01" /></rect> + <rect ><color red="1.00" green="1.00" blue="1.00" /><bounds x="00" y="12" width="09" height="01" /></rect> + <rect ><color red="1.00" green="1.00" blue="1.00" /><bounds x="21" y="12" width="09" height="01" /></rect> + <disk ><color red="1.00" green="1.00" blue="1.00" /><bounds x="07" y="10" width="06" height="06" /></disk> + <disk ><color red="1.00" green="1.00" blue="1.00" /><bounds x="18" y="10" width="06" height="06" /></disk> + </element> + + + + <element name="Key_Z"> <text string="Z"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_X"> <text string="X"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_C"> <text string="C"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_V"> <text string="V"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_B"> <text string="B"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_N"> <text string="N"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_M"> <text string="M"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_Comma"> <text string=","><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_Dot"> <text string="."><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_FSlash"><text string="/"><color red="1.00" green="0.66" blue="0.66" /></text></element> + + <element name="Key_A"> <text string="A"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_S"> <text string="S"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_D"> <text string="D"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_F"> <text string="F"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_G"> <text string="G"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_H"> <text string="H"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_J"> <text string="J"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_K"> <text string="K"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_L"> <text string="L"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_SColon"><text string=";"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_Quote"> <text string="'"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_Enter"> + <text string="<"><color red="1.00" green="0.66" blue="0.66" /><bounds x="00" y="00" width="07" height="10" /></text> + <text string="-"> <color red="1.00" green="0.66" blue="0.66" /><bounds x="00" y="00" width="07" height="10" /></text> + <text string="-"> <color red="1.00" green="0.66" blue="0.66" /><bounds x="02" y="00" width="07" height="10" /></text> + <text string="-"> <color red="1.00" green="0.66" blue="0.66" /><bounds x="04" y="00" width="07" height="10" /></text> + <text string="-"> <color red="1.00" green="0.66" blue="0.66" /><bounds x="06" y="00" width="07" height="10" /></text> + <disk > <color red="1.00" green="0.66" blue="0.66" /><bounds x="10" y="02" width="0.5" height="03" /></disk> + </element> + + <element name="Key_Q"> <text string="Q"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_W"> <text string="W"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_E"> <text string="E"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_R"> <text string="R"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_T"> <text string="T"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_Y"> <text string="Y"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_U"> <text string="U"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_I"> <text string="I"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_O"> <text string="O"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_P"> <text string="P"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_OBrkt"> <text string="["><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_CBrkt"> <text string="]"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_BSlash"><text string="\"><color red="1.00" green="0.66" blue="0.66" /></text></element> + + <element name="Key_1"> <text string="1"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_5"> <text string="5"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_6"> <text string="6"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_7"> <text string="7"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_9"> <text string="9"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_0"> <text string="0"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_BSpace"> + <text string="<"><color red="1.00" green="0.66" blue="0.66" /><bounds x="0" y="00" width="07" height="10" /></text> + <text string="-"> <color red="1.00" green="0.66" blue="0.66" /><bounds x="0" y="00" width="07" height="10" /></text> + <text string="-"> <color red="1.00" green="0.66" blue="0.66" /><bounds x="2" y="00" width="07" height="10" /></text> + <text string="-"> <color red="1.00" green="0.66" blue="0.66" /><bounds x="4" y="00" width="07" height="10" /></text> + <text string="-"> <color red="1.00" green="0.66" blue="0.66" /><bounds x="6" y="00" width="07" height="10" /></text> + </element> + <element name="Key_Equals"><text string="="><color red="1.00" green="0.66" blue="0.66" /></text></element> + + + + <element name="Solenoid_DropTarget_Tall" defstate="0"> + <rect state="1"><color red="1.00" green="0.00" blue="0.00" /><bounds x="00" y="00" width="07" height="15" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="01" y="01" width="04" height="12" /></rect> + </element> + <element name="DropTarget_Tall" defstate="0"> + <rect state="1"><color red="0.25" green="0.25" blue="0.25" /><bounds x="01" y="01" width="04" height="12" /></rect> + <rect state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="01" y="01" width="04" height="12" /></rect> + <rect state="9"><color red="0.00" green="1.00" blue="0.00" /><bounds x="00" y="00" width="07" height="15" /></rect> + </element> + + <element name="Solenoid_DropTarget_Wide" defstate="0"> + <rect state="1"><color red="1.00" green="0.00" blue="0.00" /><bounds x="00" y="00" width="15" height="07" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="01" y="01" width="12" height="04" /></rect> + </element> + <element name="DropTarget_Wide" defstate="0"> + <rect state="1"><color red="0.25" green="0.25" blue="0.25" /><bounds x="01" y="01" width="12" height="04" /></rect> + <rect state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="01" y="01" width="12" height="04" /></rect> + <rect state="9"><color red="0.00" green="1.00" blue="0.00" /><bounds x="00" y="00" width="15" height="07" /></rect> + </element> + + +<!-- Lamps --> + + <element name="Lamp_White" defstate="0"> + <disk state="0"><color red="0.15" green="0.15" blue="0.15" /></disk> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /></disk> + </element> + <element name="Lamp_Red" defstate="0"> <!-- Usually for Specials --> + <disk state="0"><color red="0.15" green="0.00" blue="0.00" /></disk> + <disk state="1"><color red="1.00" green="0.00" blue="0.00" /></disk> + </element> + <element name="Lamp_Amber" defstate="0"> <!-- Usually for Extra Ball--> + <disk state="0"><color red="0.15" green="0.06" blue="0.00" /></disk> + <disk state="1"><color red="1.00" green="0.40" blue="0.00" /></disk> + </element> + + + <element name="Lamp_P1"> + <rect><color red="0.10" green="0.10" blue="0.10" /></rect> + <text string="1" state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0" y="0" width="1" height="0.9" /></text> + <text string="1" state="0"><color red="0.25" green="0.25" blue="0.25" /><bounds x="0" y="0" width="1" height="0.9" /></text> + </element> + <element name="Lamp_P2"> + <rect><color red="0.10" green="0.10" blue="0.10" /></rect> + <text string="2" state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0" y="0" width="1" height="0.9" /></text> + <text string="2" state="0"><color red="0.25" green="0.25" blue="0.25" /><bounds x="0" y="0" width="1" height="0.9" /></text> + </element> + <element name="Lamp_P3"> + <rect><color red="0.10" green="0.10" blue="0.10" /></rect> + <text string="3" state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0.1" y="0" width="1" height="0.9" /></text> + <text string="3" state="0"><color red="0.25" green="0.25" blue="0.25" /><bounds x="0.1" y="0" width="1" height="0.9" /></text> + </element> + <element name="Lamp_P4"> + <rect><color red="0.10" green="0.10" blue="0.10" /></rect> + <text string="4" state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0" y="0" width="1" height="0.9" /></text> + <text string="4" state="0"><color red="0.25" green="0.25" blue="0.25" /><bounds x="0" y="0" width="1" height="0.9" /></text> + </element> + + <element name="Lamp_1P"> + <disk><color red="0.10" green="0.10" blue="0.10" /></disk> + <text string="1" state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0" y="0" width="1" height="0.9" /></text> + <text string="1" state="0"><color red="0.25" green="0.25" blue="0.25" /><bounds x="0" y="0" width="1" height="0.9" /></text> + </element> + <element name="Lamp_2P"> + <disk><color red="0.10" green="0.10" blue="0.10" /></disk> + <text string="2" state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0" y="0" width="1" height="0.9" /></text> + <text string="2" state="0"><color red="0.25" green="0.25" blue="0.25" /><bounds x="0" y="0" width="1" height="0.9" /></text> + </element> + <element name="Lamp_3P"> + <disk><color red="0.10" green="0.10" blue="0.10" /></disk> + <text string="3" state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0.1" y="0" width="1" height="0.9" /></text> + <text string="3" state="0"><color red="0.25" green="0.25" blue="0.25" /><bounds x="0.1" y="0" width="1" height="0.9" /></text> + </element> + <element name="Lamp_4P"> + <disk><color red="0.10" green="0.10" blue="0.10" /></disk> + <text string="4" state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0" y="0" width="1" height="0.9" /></text> + <text string="4" state="0"><color red="0.25" green="0.25" blue="0.25" /><bounds x="0" y="0" width="1" height="0.9" /></text> + </element> + + + <element name="Lamp_White_1k"> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /></disk> + <disk state="0"><color red="0.25" green="0.25" blue="0.25" /></disk> + <text string="1k"><color red="0.0" green="0.0" blue="0.0" /><bounds x="0" y="0.1" width="1" height="0.75" /></text> + </element> + <element name="Lamp_White_2k"> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /></disk> + <disk state="0"><color red="0.25" green="0.25" blue="0.25" /></disk> + <text string="2k"><color red="0.0" green="0.0" blue="0.0" /><bounds x="0" y="0.1" width="1" height="0.75" /></text> + </element> + <element name="Lamp_White_3k"> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /></disk> + <disk state="0"><color red="0.25" green="0.25" blue="0.25" /></disk> + <text string="3k"><color red="0.0" green="0.0" blue="0.0" /><bounds x="0" y="0.1" width="1" height="0.75" /></text> + </element> + <element name="Lamp_White_4k"> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /></disk> + <disk state="0"><color red="0.25" green="0.25" blue="0.25" /></disk> + <text string="4k"><color red="0.0" green="0.0" blue="0.0" /><bounds x="0" y="0.1" width="1" height="0.75" /></text> + </element> + <element name="Lamp_White_5k"> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /></disk> + <disk state="0"><color red="0.25" green="0.25" blue="0.25" /></disk> + <text string="5k"><color red="0.0" green="0.0" blue="0.0" /><bounds x="0" y="0.1" width="1" height="0.75" /></text> + </element> + <element name="Lamp_White_6k"> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /></disk> + <disk state="0"><color red="0.25" green="0.25" blue="0.25" /></disk> + <text string="6k"><color red="0.0" green="0.0" blue="0.0" /><bounds x="0" y="0.1" width="1" height="0.75" /></text> + </element> + <element name="Lamp_White_7k"> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /></disk> + <disk state="0"><color red="0.25" green="0.25" blue="0.25" /></disk> + <text string="7k"><color red="0.0" green="0.0" blue="0.0" /><bounds x="0" y="0.1" width="1" height="0.75" /></text> + </element> + <element name="Lamp_White_8k"> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /></disk> + <disk state="0"><color red="0.25" green="0.25" blue="0.25" /></disk> + <text string="8k"><color red="0.0" green="0.0" blue="0.0" /><bounds x="0" y="0.1" width="1" height="0.75" /></text> + </element> + <element name="Lamp_White_9k"> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /></disk> + <disk state="0"><color red="0.25" green="0.25" blue="0.25" /></disk> + <text string="9k"><color red="0.0" green="0.0" blue="0.0" /><bounds x="0" y="0.1" width="1" height="0.75" /></text> + </element> + <element name="Lamp_White_10k"> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0.0" y="0.0" width="1.10" height="1.00" /></disk> + <disk state="0"><color red="0.25" green="0.25" blue="0.25" /><bounds x="0.0" y="0.0" width="1.10" height="1.00" /></disk> + <text string="10k"><color red="0.0" green="0.0" blue="0.0" /><bounds x="0.1" y="0.1" width="1.00" height="0.75" /></text> + </element> + <element name="Lamp_White_20k"> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0.0" y="0.0" width="1.10" height="1.00" /></disk> + <disk state="0"><color red="0.25" green="0.25" blue="0.25" /><bounds x="0.0" y="0.0" width="1.10" height="1.00" /></disk> + <text string="20k"><color red="0.0" green="0.0" blue="0.0" /><bounds x="0.1" y="0.1" width="1.00" height="0.75" /></text> + </element> + <element name="Lamp_White_50k"> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0.0" y="0.0" width="1.10" height="1.00" /></disk> + <disk state="0"><color red="0.25" green="0.25" blue="0.25" /><bounds x="0.0" y="0.0" width="1.10" height="1.00" /></disk> + <text string="50k"><color red="0.0" green="0.0" blue="0.0" /><bounds x="0.1" y="0.1" width="1.00" height="0.75" /></text> + </element> + + + <element name="Lamp_White_A"> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /></disk> + <disk state="0"><color red="0.25" green="0.25" blue="0.25" /></disk> + <text string="A"><color red="0.0" green="0.0" blue="0.0" /><bounds x="0" y="0.1" width="1" height="0.75" /></text> + </element> + <element name="Lamp_White_B"> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /></disk> + <disk state="0"><color red="0.25" green="0.25" blue="0.25" /></disk> + <text string="B"><color red="0.0" green="0.0" blue="0.0" /><bounds x="0" y="0.1" width="1" height="0.75" /></text> + </element> + + + <element name="Credit_Indicator"> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="2.5" y="0" width="1.0" height="1.0" /></disk> + <disk state="0"><color red="0.25" green="0.25" blue="0.25" /><bounds x="2.5" y="0" width="1.0" height="1.0" /></disk> + <text string="Credit Indicator"><color red="1.0" green="1.0" blue="1.0" /><bounds x="0" y="1.1" width="6.5" height="0.90" /></text> + </element> + + + <element name="Lamp_Green_Arrow_Up_2x" defstate="1"> + <rect state="1"><color red="0.00" green="1.00" blue="0.00" /><bounds x="10" y="00" width="02" height="03" /></rect> + <rect state="0"><color red="0.00" green="0.15" blue="0.00" /><bounds x="10" y="00" width="02" height="03" /></rect> + <rect state="1"><color red="0.00" green="1.00" blue="0.00" /><bounds x="08" y="03" width="06" height="03" /></rect> + <rect state="0"><color red="0.00" green="0.15" blue="0.00" /><bounds x="08" y="03" width="06" height="03" /></rect> + <rect state="1"><color red="0.00" green="1.00" blue="0.00" /><bounds x="06" y="06" width="10" height="03" /></rect> + <rect state="0"><color red="0.00" green="0.15" blue="0.00" /><bounds x="06" y="06" width="10" height="03" /></rect> + <rect state="1"><color red="0.00" green="1.00" blue="0.00" /><bounds x="04" y="09" width="14" height="03" /></rect> + <rect state="0"><color red="0.00" green="0.15" blue="0.00" /><bounds x="04" y="09" width="14" height="03" /></rect> + <rect state="1"><color red="0.00" green="1.00" blue="0.00" /><bounds x="02" y="12" width="18" height="03" /></rect> + <rect state="0"><color red="0.00" green="0.15" blue="0.00" /><bounds x="02" y="12" width="18" height="03" /></rect> + <rect state="1"><color red="0.00" green="1.00" blue="0.00" /><bounds x="00" y="15" width="22" height="03" /></rect> + <rect state="0"><color red="0.00" green="0.15" blue="0.00" /><bounds x="00" y="15" width="22" height="03" /></rect> + <rect state="1"><color red="0.00" green="1.00" blue="0.00" /><bounds x="09" y="06" width="04" height="30" /></rect> + <rect state="0"><color red="0.00" green="0.15" blue="0.00" /><bounds x="09" y="06" width="04" height="30" /></rect> + <text string="2x"><color red="0.0" green="0.0" blue="0.0" /><bounds x="06" y="08" width="12" height="12" /></text> + </element> + + <element name="Lamp_Yellow_Arrow_Up_3x" defstate="1"> + <rect state="1"><color red="1.00" green="1.00" blue="0.00" /><bounds x="10" y="00" width="02" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.00" /><bounds x="10" y="00" width="02" height="03" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="0.00" /><bounds x="08" y="03" width="06" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.00" /><bounds x="08" y="03" width="06" height="03" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="0.00" /><bounds x="06" y="06" width="10" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.00" /><bounds x="06" y="06" width="10" height="03" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="0.00" /><bounds x="04" y="09" width="14" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.00" /><bounds x="04" y="09" width="14" height="03" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="0.00" /><bounds x="02" y="12" width="18" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.00" /><bounds x="02" y="12" width="18" height="03" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="0.00" /><bounds x="00" y="15" width="22" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.00" /><bounds x="00" y="15" width="22" height="03" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="0.00" /><bounds x="09" y="06" width="04" height="30" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.00" /><bounds x="09" y="06" width="04" height="30" /></rect> + <text string="3x"><color red="0.0" green="0.0" blue="0.0" /><bounds x="06" y="08" width="12" height="12" /></text> + </element> + + <element name="Lamp_White_Arrow_Up_5x" defstate="1"> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="10" y="00" width="02" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="10" y="00" width="02" height="03" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="08" y="03" width="06" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="08" y="03" width="06" height="03" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="06" y="06" width="10" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="06" y="06" width="10" height="03" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="04" y="09" width="14" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="04" y="09" width="14" height="03" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="02" y="12" width="18" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="02" y="12" width="18" height="03" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="00" y="15" width="22" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="00" y="15" width="22" height="03" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="09" y="06" width="04" height="30" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="09" y="06" width="04" height="30" /></rect> + <text string="5x"><color red="0.0" green="0.0" blue="0.0" /><bounds x="06" y="08" width="12" height="12" /></text> + </element> + + <element name="Lamp_White_Arrow_Up_3k" defstate="0"> + <rect state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="10" y="00" width="02" height="03" /></rect> + <rect state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="08" y="03" width="06" height="03" /></rect> + <rect state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="06" y="06" width="10" height="03" /></rect> + <rect state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="04" y="09" width="14" height="03" /></rect> + <rect state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="02" y="12" width="18" height="03" /></rect> + <rect state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="00" y="15" width="22" height="03" /></rect> + <rect state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="09" y="06" width="04" height="30" /></rect> + <text string="3k"><color red="0.0" green="0.0" blue="0.0" /><bounds x="06" y="08" width="12" height="12" /></text> + </element> + + <element name="Lamp_Green_Arrow_04_2x" defstate="1"> <!-- Point at 4 o clock --> + <rect state="1"><color red="0.00" green="1.00" blue="0.00" /><bounds x="00" y="00" width="08" height="03" /></rect> + <rect state="0"><color red="0.00" green="0.15" blue="0.00" /><bounds x="00" y="00" width="08" height="03" /></rect> + <rect state="1"><color red="0.00" green="1.00" blue="0.00" /><bounds x="05" y="03" width="08" height="03" /></rect> + <rect state="0"><color red="0.00" green="0.15" blue="0.00" /><bounds x="05" y="03" width="08" height="03" /></rect> + <rect state="1"><color red="0.00" green="1.00" blue="0.00" /><bounds x="10" y="06" width="08" height="03" /></rect> + <rect state="0"><color red="0.00" green="0.15" blue="0.00" /><bounds x="10" y="06" width="08" height="03" /></rect> + <rect state="1"><color red="0.00" green="1.00" blue="0.00" /><bounds x="24" y="03" width="02" height="03" /></rect> + <rect state="0"><color red="0.00" green="0.15" blue="0.00" /><bounds x="24" y="03" width="02" height="03" /></rect> + <rect state="1"><color red="0.00" green="1.00" blue="0.00" /><bounds x="22" y="06" width="06" height="03" /></rect> + <rect state="0"><color red="0.00" green="0.15" blue="0.00" /><bounds x="22" y="06" width="06" height="03" /></rect> + <rect state="1"><color red="0.00" green="1.00" blue="0.00" /><bounds x="15" y="09" width="15" height="03" /></rect> + <rect state="0"><color red="0.00" green="0.15" blue="0.00" /><bounds x="15" y="09" width="15" height="03" /></rect> + <rect state="1"><color red="0.00" green="1.00" blue="0.00" /><bounds x="18" y="12" width="14" height="03" /></rect> + <rect state="0"><color red="0.00" green="0.15" blue="0.00" /><bounds x="18" y="12" width="14" height="03" /></rect> + <rect state="1"><color red="0.00" green="1.00" blue="0.00" /><bounds x="17" y="15" width="17" height="03" /></rect> + <rect state="0"><color red="0.00" green="0.15" blue="0.00" /><bounds x="17" y="15" width="17" height="03" /></rect> + <rect state="1"><color red="0.00" green="1.00" blue="0.00" /><bounds x="16" y="18" width="20" height="03" /></rect> + <rect state="0"><color red="0.00" green="0.15" blue="0.00" /><bounds x="16" y="18" width="20" height="03" /></rect> + <text string="2x"><color red="0.0" green="0.0" blue="0.0" /><bounds x="18" y="08" width="15" height="15" /></text> + </element> + + <element name="Lamp_Yellow_Arrow_04_3x" defstate="1"> <!-- Point at 4 o clock --> + <rect state="1"><color red="1.00" green="1.00" blue="0.00" /><bounds x="00" y="00" width="08" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.00" /><bounds x="00" y="00" width="08" height="03" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="0.00" /><bounds x="05" y="03" width="08" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.00" /><bounds x="05" y="03" width="08" height="03" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="0.00" /><bounds x="10" y="06" width="08" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.00" /><bounds x="10" y="06" width="08" height="03" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="0.00" /><bounds x="24" y="03" width="02" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.00" /><bounds x="24" y="03" width="02" height="03" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="0.00" /><bounds x="22" y="06" width="06" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.00" /><bounds x="22" y="06" width="06" height="03" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="0.00" /><bounds x="15" y="09" width="15" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.00" /><bounds x="15" y="09" width="15" height="03" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="0.00" /><bounds x="18" y="12" width="14" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.00" /><bounds x="18" y="12" width="14" height="03" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="0.00" /><bounds x="17" y="15" width="17" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.00" /><bounds x="17" y="15" width="17" height="03" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="0.00" /><bounds x="16" y="18" width="20" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.00" /><bounds x="16" y="18" width="20" height="03" /></rect> + <text string="3x"><color red="0.0" green="0.0" blue="0.0" /><bounds x="18" y="08" width="15" height="15" /></text> + </element> + + <element name="Lamp_White_Arrow_08_5x" defstate="1"> <!-- Point at 8 o clock --> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="28" y="00" width="08" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="28" y="00" width="08" height="03" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="23" y="03" width="08" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="23" y="03" width="08" height="03" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="18" y="06" width="08" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="18" y="06" width="08" height="03" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="10" y="03" width="02" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="10" y="03" width="02" height="03" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="08" y="06" width="06" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="08" y="06" width="06" height="03" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="06" y="09" width="15" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="06" y="09" width="15" height="03" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="04" y="12" width="14" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="04" y="12" width="14" height="03" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="02" y="15" width="17" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="02" y="15" width="17" height="03" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="00" y="18" width="20" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="00" y="18" width="20" height="03" /></rect> + <text string="5x"><color red="0.0" green="0.0" blue="0.0" /><bounds x="06" y="08" width="15" height="15" /></text> + </element> + + <element name="Lamp_Amber_Arrow_08" defstate="1"> <!-- Point at 8 o clock --> + <rect state="1"><color red="1.00" green="0.40" blue="0.00" /><bounds x="28" y="00" width="08" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.06" blue="0.00" /><bounds x="28" y="00" width="08" height="03" /></rect> + <rect state="1"><color red="1.00" green="0.40" blue="0.00" /><bounds x="23" y="03" width="08" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.06" blue="0.00" /><bounds x="23" y="03" width="08" height="03" /></rect> + <rect state="1"><color red="1.00" green="0.40" blue="0.00" /><bounds x="18" y="06" width="08" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.06" blue="0.00" /><bounds x="18" y="06" width="08" height="03" /></rect> + <rect state="1"><color red="1.00" green="0.40" blue="0.00" /><bounds x="10" y="03" width="02" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.06" blue="0.00" /><bounds x="10" y="03" width="02" height="03" /></rect> + <rect state="1"><color red="1.00" green="0.40" blue="0.00" /><bounds x="08" y="06" width="06" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.06" blue="0.00" /><bounds x="08" y="06" width="06" height="03" /></rect> + <rect state="1"><color red="1.00" green="0.40" blue="0.00" /><bounds x="06" y="09" width="15" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.06" blue="0.00" /><bounds x="06" y="09" width="15" height="03" /></rect> + <rect state="1"><color red="1.00" green="0.40" blue="0.00" /><bounds x="04" y="12" width="14" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.06" blue="0.00" /><bounds x="04" y="12" width="14" height="03" /></rect> + <rect state="1"><color red="1.00" green="0.40" blue="0.00" /><bounds x="02" y="15" width="17" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.06" blue="0.00" /><bounds x="02" y="15" width="17" height="03" /></rect> + <rect state="1"><color red="1.00" green="0.40" blue="0.00" /><bounds x="00" y="18" width="20" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.06" blue="0.00" /><bounds x="00" y="18" width="20" height="03" /></rect> + </element> + + <element name="Lamp_White_Arrow_11_A" defstate="1"> <!-- Point at 11 o clock --> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="00" y="00" width="03" height="20" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="00" y="00" width="03" height="20" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="03" y="02" width="03" height="17" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="03" y="02" width="03" height="17" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="06" y="04" width="03" height="14" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="06" y="04" width="03" height="14" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="09" y="06" width="03" height="15" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="09" y="06" width="03" height="15" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="12" y="08" width="03" height="06" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="12" y="08" width="03" height="06" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="15" y="10" width="03" height="02" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="15" y="10" width="03" height="02" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="12" y="18" width="03" height="08" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="12" y="18" width="03" height="08" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="15" y="23" width="03" height="08" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="15" y="23" width="03" height="08" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="18" y="28" width="03" height="08" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="18" y="28" width="03" height="08" /></rect> + <text string="A"><color red="0.0" green="0.0" blue="0.0" /><bounds x="-2" y="03" width="18" height="18" /></text> + </element> + + <element name="Lamp_White_Arrow_01_B" defstate="1"> <!-- Point at 1 o clock --> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="18" y="00" width="03" height="20" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="18" y="00" width="03" height="20" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="15" y="02" width="03" height="17" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="15" y="02" width="03" height="17" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="12" y="04" width="03" height="14" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="12" y="04" width="03" height="14" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="09" y="06" width="03" height="15" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="09" y="06" width="03" height="15" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="06" y="08" width="03" height="06" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="06" y="08" width="03" height="06" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="03" y="10" width="03" height="02" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="03" y="10" width="03" height="02" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="06" y="18" width="03" height="08" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="06" y="18" width="03" height="08" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="03" y="23" width="03" height="08" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="03" y="23" width="03" height="08" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="00" y="28" width="03" height="08" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="00" y="28" width="03" height="08" /></rect> + <text string="B"><color red="0.0" green="0.0" blue="0.0" /><bounds x="06" y="03" width="18" height="18" /></text> + </element> + + +<!-- Backbox Indicators --> + + <element name="Text_Credit"><text string="CREDIT"><color red="1.0" green="1.0" blue="1.0" /></text></element> + <element name="Text_Lamps"><text string="Lamps"><color red="1.0" green="1.0" blue="1.0" /></text></element> + <element name="Text_15"><text string="U1 0-14"><color red="1.0" green="1.0" blue="1.0" /></text></element> + <element name="Text_30"><text string="U2 0-14"><color red="1.0" green="1.0" blue="1.0" /></text></element> + <element name="Text_45"><text string="U3 0-14"><color red="1.0" green="1.0" blue="1.0" /></text></element> + <element name="Text_60"><text string="U4 0-14"><color red="1.0" green="1.0" blue="1.0" /></text></element> + <element name="Text_Solenoids"><text string="Momentary Solenoids"><color red="1.0" green="1.0" blue="1.0" /></text></element> + <element name="Text_Coils"><text string="Coils"><color red="1.0" green="1.0" blue="1.0" /></text></element> + <element name="Text_MPU_LED"><text string="MPU LED"><color red="1.0" green="1.0" blue="1.0" /></text></element> + <element name="Text_Activity"><text string="Activity Switch"><color red="1.0" green="1.0" blue="1.0" /></text></element> + <element name="Text_Service"><text string="Service Switch"><color red="1.0" green="1.0" blue="1.0" /></text></element> + <element name="Text_Slam"><text string="Slam Switch"><color red="1.0" green="1.0" blue="1.0" /></text></element> + <element name="Text_Tilt"><text string="Tilt Switch"><color red="1.0" green="1.0" blue="1.0" /></text></element> + <element name="Text_Knocker"><text string="Knocker"><color red="1.0" green="1.0" blue="1.0" /></text></element> + + + <element name="High_Score_To_Date" defstate="0"> + <text string="HIGH SCORE TO DATE" state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0" y="0.1" width="1" height="1" /></text> + <text string="HIGH SCORE TO DATE" state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="0" y="0.1" width="1" height="1" /></text> + </element> + <element name="Ball_In_Play" defstate="0"> + <text string="BALL IN PLAY" state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0.1" y="0.1" width="1" height="0.8" /></text> + <text string="BALL IN PLAY" state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="0.1" y="0.1" width="1" height="0.8" /></text> + </element> + <element name="Match" defstate="0"> + <text string="MATCH" state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0" y="0.1" width="1" height="0.8" /></text> + <text string="MATCH" state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="0" y="0.1" width="1" height="0.8" /></text> + </element> + <element name="Game_Over" defstate="0"> + <text string="GAME OVER" state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0" y="0.1" width="1" height="0.8" /></text> + <text string="GAME OVER" state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="0" y="0.1" width="1" height="0.8" /></text> + </element> + <element name="Tilt" defstate="0"> + <text string="TILT" state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0" y="0.1" width="1" height="0.8" /></text> + <text string="TILT" state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="0" y="0.1" width="1" height="0.8" /></text> + </element> + <element name="Shoot_Again" defstate="0"> + <text string="SAME PLAYER" state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0" y="0.1" width="1" height="0.8" /></text> + <text string="SAME PLAYER" state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="0" y="0.1" width="1" height="0.8" /></text> + <text string="SHOOTS AGAIN" state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0" y="0.9" width="1" height="0.8" /></text> + <text string="SHOOTS AGAIN" state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="0" y="0.9" width="1" height="0.8" /></text> + </element> + + + <element name="Digit" defstate="0"> + <led7seg><color red="1.0" green="0.35" blue="0.0" /></led7seg> + </element> + + <element name="LED_Green" defstate="1"> + <disk state="0"><color red="0.0" green="0.25" blue="0.0" /></disk> + <disk state="1"><color red="0.0" green="1.00" blue="0.0" /></disk> + </element> + + + +<!-- Solenoids --> + + <element name="Solenoid_PullDown"> + <rect state="0"><color red="1.0" green="1.0" blue="1.0" /><bounds x="3" y="0" width="03" height="09" /></rect> + <rect state="0"><color red="0.0" green="1.0" blue="1.0" /><bounds x="0" y="8" width="10" height="11" /></rect> + <rect state="1"><color red="1.0" green="1.0" blue="0.0" /><bounds x="0" y="8" width="10" height="11" /></rect> + </element> + + <element name="Coil_PullDown"> + <rect state="0"><color red="1.0" green="1.0" blue="1.0" /><bounds x="8" y="0" width="02" height="01" /></rect> + <rect state="0"><color red="1.0" green="1.0" blue="1.0" /><bounds x="6" y="1" width="02" height="01" /></rect> + <rect state="0"><color red="1.0" green="1.0" blue="1.0" /><bounds x="4" y="2" width="02" height="01" /></rect> + <rect state="0"><color red="1.0" green="1.0" blue="1.0" /><bounds x="2" y="3" width="02" height="01" /></rect> + <rect state="0"><color red="1.0" green="1.0" blue="1.0" /><bounds x="0" y="4" width="02" height="01" /></rect> + <rect ><color red="1.0" green="1.0" blue="1.0" /><bounds x="0" y="5" width="02" height="02" /></rect> + <rect state="1"><color red="1.0" green="1.0" blue="1.0" /><bounds x="0" y="4" width="10" height="01" /></rect> + + <rect state="0"><color red="0.0" green="1.0" blue="1.0" /><bounds x="0" y="8" width="10" height="11" /></rect> + <rect state="1"><color red="1.0" green="1.0" blue="0.0" /><bounds x="0" y="8" width="10" height="11" /></rect> + </element> + + + <element name="Solenoid_Knocker" defstate="0"> + <rect state="0"><color red="1.0" green="1.0" blue="1.0" /><bounds x="03" y="14" width="03" height="08" /></rect> + <rect state="1"><color red="1.0" green="0.0" blue="0.0" /><bounds x="03" y="00" width="03" height="04" /></rect> + <rect state="0"><color red="0.0" green="1.0" blue="1.0" /><bounds x="00" y="04" width="10" height="11" /></rect> + <rect state="1"><color red="1.0" green="1.0" blue="0.0" /><bounds x="00" y="04" width="10" height="11" /></rect> + </element> + + <element name="Solenoid_Outhole" defstate="0"> + <text string="\" state="1"><color red="1.0" green="0.0" blue="0.0" /><bounds x="17" y="00" width="05" height="16" /></text> + <text string="\" state="0"><color red="1.0" green="1.0" blue="1.0" /><bounds x="02" y="00" width="05" height="16" /></text> + <text string="\" state="1"><color red="1.0" green="0.0" blue="0.0" /><bounds x="18" y="00" width="05" height="16" /></text> + <text string="\" state="0"><color red="1.0" green="1.0" blue="1.0" /><bounds x="03" y="00" width="05" height="16" /></text> + <text string="\" state="1"><color red="1.0" green="0.0" blue="0.0" /><bounds x="19" y="00" width="05" height="16" /></text> + <text string="\" state="0"><color red="1.0" green="1.0" blue="1.0" /><bounds x="04" y="00" width="05" height="16" /></text> + <text string="\" state="1"><color red="1.0" green="0.0" blue="0.0" /><bounds x="20" y="00" width="05" height="16" /></text> + <text string="\" state="0"><color red="1.0" green="1.0" blue="1.0" /><bounds x="05" y="00" width="05" height="16" /></text> + <rect state="1"><color red="1.0" green="0.0" blue="0.0" /><bounds x="02" y="02" width="18" height="10" /></rect> + <rect ><color red="1.0" green="1.0" blue="1.0" /><bounds x="00" y="14" width="25" height="02" /></rect> + <text string="Outhole" ><color red="1.0" green="1.0" blue="1.0" /><bounds x="30" y="12" width="28" height="9.5" /></text> + </element> + + <element name="Solenoid_SlingShot_Left" defstate="0"> + <text string="\" state="1"><color red="1.0" green="0.0" blue="0.0" /><bounds x="05" y="00" width="65" height="80" /></text> + <text string="\" state="0"><color red="1.0" green="1.0" blue="1.0" /><bounds x="00" y="00" width="65" height="80" /></text> + <rect ><color red="1.0" green="1.0" blue="1.0" /><bounds x="20" y="16" width="04" height="60" /></rect> + <rect ><color red="1.0" green="1.0" blue="1.0" /><bounds x="20" y="76" width="24.5" height="04" /></rect> + </element> + <element name="Solenoid_SlingShot_Right" defstate="0"> + <text string="/" state="1"><color red="1.0" green="0.0" blue="0.0" /><bounds x="-5" y="00" width="65" height="80" /></text> + <text string="/" state="0"><color red="1.0" green="1.0" blue="1.0" /><bounds x="00" y="00" width="65" height="80" /></text> + <rect ><color red="1.0" green="1.0" blue="1.0" /><bounds x="40" y="16" width="04" height="60" /></rect> + <rect ><color red="1.0" green="1.0" blue="1.0" /><bounds x="19.5" y="76" width="24" height="04" /></rect> + </element> + + + <element name="Solenoid_Bumper_Red_Star" defstate="0"> + <disk state="0"> <color red="1.0" green="1.0" blue="1.0" /><bounds x="0" y="0" width="80" height="80" /></disk> + <disk state="1"> <color red="1.0" green="0.0" blue="0.0" /><bounds x="0" y="0" width="80" height="80" /></disk> + <text string="*"><color red="1.0" green="0.0" blue="0.0" /><bounds x="-61" y="-38.5" width="206" height="206" /></text> + <disk> <color red="1.0" green="1.0" blue="1.0" /><bounds x="18" y="18" width="44" height="44" /></disk> + </element> + <element name="Switch_Bumper_Red_Star" defstate="0"> + <text string="*" state="9"><color red="1.0" green="0.0" blue="0.0" /><bounds x="-61" y="-38.5" width="206" height="206" /></text> + <disk state="0"><color red="1.0" green="0.0" blue="0.0" /><bounds x="14" y="15" width="50" height="50" /></disk> + <disk state="1"><color red="0.5" green="0.5" blue="0.5" /><bounds x="14" y="15" width="50" height="50" /></disk> + </element> + <element name="Lamp_Bumper_Silver_1000" defstate="1"> + <text string="*" state="9"><color red="0.5" green="0.5" blue="0.5" /><bounds x="-61" y="-38.5" width="206" height="206" /></text> + <disk state="0"><color red="0.7" green="0.7" blue="0.7" /><bounds x="18" y="18" width="44" height="44" /></disk> + <disk state="1"><color red="1.0" green="1.0" blue="1.0" /><bounds x="18" y="18" width="44" height="44" /></disk> + <text string="1000"> <color red="0.5" green="0.5" blue="0.5" /><bounds x="07" y="29" width="70" height="23" /></text> + </element> + + <element name="Solenoid_Bumper_Yellow_Star" defstate="0"> + <disk state="0"> <color red="1.0" green="1.0" blue="1.0" /><bounds x="0" y="0" width="80" height="80" /></disk> + <disk state="1"> <color red="1.0" green="0.0" blue="0.0" /><bounds x="0" y="0" width="80" height="80" /></disk> + <text string="*"><color red="1.0" green="1.0" blue="0.0" /><bounds x="-61" y="-38.5" width="206" height="206" /></text> + <disk> <color red="1.0" green="1.0" blue="1.0" /><bounds x="18" y="18" width="44" height="44" /></disk> + </element> + <element name="Switch_Bumper_Yellow_Star" defstate="0"> + <text string="*" state="9"><color red="1.0" green="1.0" blue="0.0" /><bounds x="-61" y="-38.5" width="206" height="206" /></text> + <disk state="0"><color red="1.0" green="1.0" blue="0.0" /><bounds x="14" y="15" width="50" height="50" /></disk> + <disk state="1"><color red="0.5" green="0.5" blue="0.5" /><bounds x="14" y="15" width="50" height="50" /></disk> + </element> + <element name="Lamp_Bumper_Silver_100" defstate="1"> + <text string="*" state="9"><color red="0.5" green="0.5" blue="0.5" /><bounds x="-61" y="-38.5" width="206" height="206" /></text> + <disk ><color red="1.0" green="1.0" blue="1.0" /><bounds x="18" y="18" width="44" height="44" /></disk> + <text string="100"> <color red="0.5" green="0.5" blue="0.5" /><bounds x="07" y="29" width="66" height="23" /></text> + </element> + + + <element name="Solenoid_Saucer_Large" defstate="0"> + <disk> <color red="1.0" green="0.8" blue="0.5" /><bounds x="00" y="00" width="70" height="70" /></disk> + <disk> <color red="0.7" green="0.7" blue="0.7" /><bounds x="17" y="17" width="36" height="36" /></disk> + <rect state="0"><color red="0.3" green="0.3" blue="0.3" /><bounds x="33" y="14" width="04" height="21" /></rect> + <rect state="1"><color red="1.0" green="0.0" blue="0.0" /><bounds x="33" y="14" width="04" height="21" /></rect> + <disk> <color red="0.0" green="0.0" blue="0.0" /><bounds x="29" y="40" width="12" height="12" /></disk> + </element> + <element name="Switch_Saucer_Large" defstate="0"> + <disk state="9"><color red="1.0" green="0.8" blue="0.5" /><bounds x="00" y="00" width="70" height="70" /></disk> + <disk state="0"><color red="1.0" green="1.0" blue="1.0" /><bounds x="31" y="42" width="08" height="08" /></disk> + <disk state="1"><color red="0.0" green="0.0" blue="0.0" /><bounds x="31" y="42" width="08" height="08" /></disk> + </element> + + +<!-- Line colours --> + + <element name="Draw_White" defstate="1"> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds left="0" top="0" right="1" bottom="1" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds left="0" top="0" right="1" bottom="1" /></rect> + </element> + <element name="Draw_Red" defstate="1"> + <rect state="1"><color red="1.00" green="0.00" blue="0.00" /><bounds left="0" top="0" right="1" bottom="1" /></rect> + <rect state="0"><color red="0.15" green="0.00" blue="0.00" /><bounds left="0" top="0" right="1" bottom="1" /></rect> + </element> + <element name="Draw_Amber" defstate="1"> + <rect state="1"><color red="1.00" green="0.40" blue="0.00" /><bounds left="0" top="0" right="1" bottom="1" /></rect> + <rect state="0"><color red="0.15" green="0.06" blue="0.00" /><bounds left="0" top="0" right="1" bottom="1" /></rect> + </element> + + <element name="Canvas"> + <rect> + <color red="0.0" green="0.0" blue="0.0" /> + <bounds left="0" top="0" right="1" bottom="1" /> + </rect> + </element> + + + + + + <view name="Mata Hari Playfield"> + + <!-- Background --> + <backdrop element="Canvas"><bounds x="0" y="0" width="640" height="480" /></backdrop> + + <bezel element="Draw_White"><bounds x="0" y="0" width="640" height="1" /></bezel> + <bezel element="Draw_White"><bounds x="0" y="0" width="1" height="480" /></bezel> + <bezel element="Draw_White"><bounds x="640" y="0" width="1" height="480" /></bezel> + <bezel element="Draw_White"><bounds x="0" y="480" width="640" height="1" /></bezel> + <bezel element="Draw_White"><bounds x="320" y="0" width="1" height="480" /></bezel> + <bezel element="Draw_White"><bounds x="320" y="320" width="320" height="1" /></bezel> + <!-- <bezel element="Draw_White"><bounds x="159" y="0" width="1" height="480" /></bezel> --> + + <bezel element="Title_MataHari"><bounds x="430" y="18" width="105" height="30" /></bezel> + + + <!-- Backbox --> + + <!-- MPU Board Power On Self Test LED --> + <bezel element="Text_MPU_LED"> <bounds x="609" y="342" width="30" height="10" /></bezel> + <bezel name="led0" element="LED_Green"><bounds x="618" y="328" width="10" height="10" /></bezel> + + <!-- MPU Board Activity Switch --> + <bezel element="Text_Activity"> <bounds x="540" y="342" width="50" height="10" /></bezel> + <bezel element="Switch_Push-Button" inputtag="TEST" inputmask="0x02"><bounds x="550" y="331" width="20" height="10" /></bezel> + <bezel element="Key_0"> <bounds x="571" y="330" width="10" height="10" /></bezel> + + + <!-- Player 1 Score --> + <bezel name="lamp14" element="Lamp_P1"><bounds x="330" y="55" width="15" height="15" /></bezel> <!-- Backbox ~ 1st Player Up --> + <bezel name="digit17" element="Digit"><bounds x="360" y="55" width="10" height="15" /></bezel> + <bezel name="digit16" element="Digit"><bounds x="374" y="55" width="10" height="15" /></bezel> + <bezel name="digit15" element="Digit"><bounds x="388" y="55" width="10" height="15" /></bezel> + <bezel name="digit14" element="Digit"><bounds x="402" y="55" width="10" height="15" /></bezel> + <bezel name="digit13" element="Digit"><bounds x="416" y="55" width="10" height="15" /></bezel> + <bezel name="digit12" element="Digit"><bounds x="430" y="55" width="10" height="15" /></bezel> + <bezel name="digit11" element="Digit"><bounds x="444" y="55" width="10" height="15" /></bezel> + + <!-- Player 2 Score --> + <bezel name="lamp29" element="Lamp_P2"><bounds x="615" y="55" width="15" height="15" /></bezel> <!-- Backbox ~ 2nd Player Up --> + <bezel name="digit27" element="Digit"><bounds x="506" y="55" width="10" height="15" /></bezel> + <bezel name="digit26" element="Digit"><bounds x="520" y="55" width="10" height="15" /></bezel> + <bezel name="digit25" element="Digit"><bounds x="534" y="55" width="10" height="15" /></bezel> + <bezel name="digit24" element="Digit"><bounds x="548" y="55" width="10" height="15" /></bezel> + <bezel name="digit23" element="Digit"><bounds x="562" y="55" width="10" height="15" /></bezel> + <bezel name="digit22" element="Digit"><bounds x="576" y="55" width="10" height="15" /></bezel> + <bezel name="digit21" element="Digit"><bounds x="590" y="55" width="10" height="15" /></bezel> + + <!-- Player 3 Score --> + <bezel name="lamp44" element="Lamp_P3"><bounds x="330" y="250" width="15" height="15" /></bezel> <!-- Backbox ~ 3rd Player Up --> + <bezel name="digit37" element="Digit"><bounds x="360" y="250" width="10" height="15" /></bezel> + <bezel name="digit36" element="Digit"><bounds x="374" y="250" width="10" height="15" /></bezel> + <bezel name="digit35" element="Digit"><bounds x="388" y="250" width="10" height="15" /></bezel> + <bezel name="digit34" element="Digit"><bounds x="402" y="250" width="10" height="15" /></bezel> + <bezel name="digit33" element="Digit"><bounds x="416" y="250" width="10" height="15" /></bezel> + <bezel name="digit32" element="Digit"><bounds x="430" y="250" width="10" height="15" /></bezel> + <bezel name="digit31" element="Digit"><bounds x="444" y="250" width="10" height="15" /></bezel> + + <!-- Player 4 Score --> + <bezel name="lamp59" element="Lamp_P4"><bounds x="615" y="250" width="15" height="15" /></bezel> <!-- Backbox ~ 4th Player Up --> + <bezel name="digit47" element="Digit"><bounds x="506" y="250" width="10" height="15" /></bezel> + <bezel name="digit46" element="Digit"><bounds x="520" y="250" width="10" height="15" /></bezel> + <bezel name="digit45" element="Digit"><bounds x="534" y="250" width="10" height="15" /></bezel> + <bezel name="digit44" element="Digit"><bounds x="548" y="250" width="10" height="15" /></bezel> + <bezel name="digit43" element="Digit"><bounds x="562" y="250" width="10" height="15" /></bezel> + <bezel name="digit42" element="Digit"><bounds x="576" y="250" width="10" height="15" /></bezel> + <bezel name="digit41" element="Digit"><bounds x="590" y="250" width="10" height="15" /></bezel> + + <!-- Credits and Ball In Play / Match --> + <bezel element="Text_Credit"><bounds x="542" y="142" width="48" height="8" /></bezel> + <bezel name="lamp12" element="Ball_In_Play"><bounds x="586" y="105" width="50" height="11" /></bezel> <!-- Backbox ~ Ball In Play --> + <bezel name="lamp25" element="Match"><bounds x="596" y="152" width="25" height="11" /></bezel> <!-- Backbox ~ Match --> + <bezel name="digit55" element="Digit"><bounds x="554" y="125" width="10" height="15" /></bezel> + <bezel name="digit54" element="Digit"><bounds x="568" y="125" width="10" height="15" /></bezel> + <bezel name="digit52" element="Digit"><bounds x="596" y="125" width="10" height="15" /></bezel> + <bezel name="digit51" element="Digit"><bounds x="610" y="125" width="10" height="15" /></bezel> + + <bezel name="lamp10" element="Shoot_Again"><bounds x="420" y="295" width="60" height="19" /></bezel> <!-- Backbox ~ Same Player Shoots Again --> + <bezel name="lamp13" element="Lamp_1P"><bounds x="345" y="297" width="15" height="15" /></bezel> <!-- Backbox ~ 1 Player Game --> + <bezel name="lamp28" element="Lamp_2P"><bounds x="360" y="297" width="15" height="15" /></bezel> <!-- Backbox ~ 2 Player Game --> + <bezel name="lamp43" element="Lamp_3P"><bounds x="375" y="297" width="15" height="15" /></bezel> <!-- Backbox ~ 3 Player Game --> + <bezel name="lamp58" element="Lamp_4P"><bounds x="390" y="297" width="15" height="15" /></bezel> <!-- Backbox ~ 4 Player Game --> + <bezel name="lamp27" element="High_Score_To_Date"><bounds x="438" y="6" width="90" height="11" /></bezel> <!-- Backbox ~ High Score To Date --> + <bezel name="lamp42" element="Game_Over"><bounds x="580" y="300" width="45" height="11" /></bezel> <!-- Backbox ~ Game Over --> + <bezel name="lamp57" element="Tilt"><bounds x="480" y="297" width="50" height="16" /></bezel> <!-- Backbox ~ Tilt --> + + + + <bezel element="Text_Lamps"><bounds x="410" y="360" width="60" height="11" /></bezel> + <bezel element="Text_15"><bounds x="552" y="373" width="30" height="11" /></bezel> + <bezel element="Text_30"><bounds x="552" y="388" width="30" height="11" /></bezel> + <bezel element="Text_45"><bounds x="552" y="403" width="30" height="11" /></bezel> + <bezel element="Text_60"><bounds x="552" y="418" width="30" height="11" /></bezel> + + <!-- Lamps controlled by U1 on Lamp Driver Board --> + <bezel name="lamp0" element="Lamp_White"><bounds x="330" y="375" width="8" height="8" /></bezel> <!-- U1 00 --> + <bezel name="lamp1" element="Lamp_White"><bounds x="345" y="375" width="8" height="8" /></bezel> <!-- U1 01 --> + <bezel name="lamp2" element="Lamp_White"><bounds x="360" y="375" width="8" height="8" /></bezel> <!-- U1 02 --> + <bezel name="lamp3" element="Lamp_White"><bounds x="375" y="375" width="8" height="8" /></bezel> <!-- U1 03 --> + <bezel name="lamp4" element="Lamp_White"><bounds x="390" y="375" width="8" height="8" /></bezel> <!-- U1 04 --> + <bezel name="lamp5" element="Lamp_White"><bounds x="405" y="375" width="8" height="8" /></bezel> <!-- U1 05 --> + <bezel name="lamp6" element="Lamp_White"><bounds x="420" y="375" width="8" height="8" /></bezel> <!-- U1 06 --> + <bezel name="lamp7" element="Lamp_White"><bounds x="435" y="375" width="8" height="8" /></bezel> <!-- U1 07 --> + <bezel name="lamp8" element="Lamp_White"><bounds x="450" y="375" width="8" height="8" /></bezel> <!-- U1 08 --> + <bezel name="lamp9" element="Lamp_White"><bounds x="465" y="375" width="8" height="8" /></bezel> <!-- U1 09 --> + <bezel name="lamp10" element="Lamp_White"><bounds x="480" y="375" width="8" height="8" /></bezel> <!-- U1 10 --> + <bezel name="lamp11" element="Lamp_White"><bounds x="495" y="375" width="8" height="8" /></bezel> <!-- U1 11 --> + <bezel name="lamp12" element="Lamp_White"><bounds x="510" y="375" width="8" height="8" /></bezel> <!-- U1 12 --> + <bezel name="lamp13" element="Lamp_White"><bounds x="525" y="375" width="8" height="8" /></bezel> <!-- U1 13 --> + <bezel name="lamp14" element="Lamp_White"><bounds x="540" y="375" width="8" height="8" /></bezel> <!-- U1 14 --> + + <!-- Lamps controlled by U2 on Lamp Driver Board --> + <bezel name="lamp15" element="Lamp_White"><bounds x="330" y="390" width="8" height="8" /></bezel> <!-- U2 00 --> + <bezel name="lamp16" element="Lamp_White"><bounds x="345" y="390" width="8" height="8" /></bezel> <!-- U2 01 --> + <bezel name="lamp17" element="Lamp_White"><bounds x="360" y="390" width="8" height="8" /></bezel> <!-- U2 02 --> + <bezel name="lamp18" element="Lamp_White"><bounds x="375" y="390" width="8" height="8" /></bezel> <!-- U2 03 --> + <bezel name="lamp19" element="Lamp_White"><bounds x="390" y="390" width="8" height="8" /></bezel> <!-- U2 04 --> + <bezel name="lamp20" element="Lamp_White"><bounds x="405" y="390" width="8" height="8" /></bezel> <!-- U2 05 --> + <bezel name="lamp21" element="Lamp_White"><bounds x="420" y="390" width="8" height="8" /></bezel> <!-- U2 06 --> + <bezel name="lamp22" element="Lamp_White"><bounds x="435" y="390" width="8" height="8" /></bezel> <!-- U2 07 --> + <bezel name="lamp23" element="Lamp_White"><bounds x="450" y="390" width="8" height="8" /></bezel> <!-- U2 08 --> + <bezel name="lamp24" element="Lamp_White"><bounds x="465" y="390" width="8" height="8" /></bezel> <!-- U2 09 --> + <bezel name="lamp25" element="Lamp_White"><bounds x="480" y="390" width="8" height="8" /></bezel> <!-- U2 10 --> + <bezel name="lamp26" element="Lamp_White"><bounds x="495" y="390" width="8" height="8" /></bezel> <!-- U2 11 --> + <bezel name="lamp27" element="Lamp_White"><bounds x="510" y="390" width="8" height="8" /></bezel> <!-- U2 12 --> + <bezel name="lamp28" element="Lamp_White"><bounds x="525" y="390" width="8" height="8" /></bezel> <!-- U2 13 --> + <bezel name="lamp29" element="Lamp_White"><bounds x="540" y="390" width="8" height="8" /></bezel> <!-- U2 14 --> + + <!-- Lamps controlled by U3 on Lamp Driver Board --> + <bezel name="lamp30" element="Lamp_White"><bounds x="330" y="405" width="8" height="8" /></bezel> <!-- U3 00 --> + <bezel name="lamp31" element="Lamp_White"><bounds x="345" y="405" width="8" height="8" /></bezel> <!-- U3 01 --> + <bezel name="lamp32" element="Lamp_White"><bounds x="360" y="405" width="8" height="8" /></bezel> <!-- U3 02 --> + <bezel name="lamp33" element="Lamp_White"><bounds x="375" y="405" width="8" height="8" /></bezel> <!-- U3 03 --> + <bezel name="lamp34" element="Lamp_White"><bounds x="390" y="405" width="8" height="8" /></bezel> <!-- U3 04 --> + <bezel name="lamp35" element="Lamp_White"><bounds x="405" y="405" width="8" height="8" /></bezel> <!-- U3 05 --> + <bezel name="lamp36" element="Lamp_White"><bounds x="420" y="405" width="8" height="8" /></bezel> <!-- U3 06 --> + <bezel name="lamp37" element="Lamp_White"><bounds x="435" y="405" width="8" height="8" /></bezel> <!-- U3 07 --> + <bezel name="lamp38" element="Lamp_White"><bounds x="450" y="405" width="8" height="8" /></bezel> <!-- U3 08 --> + <bezel name="lamp39" element="Lamp_White"><bounds x="465" y="405" width="8" height="8" /></bezel> <!-- U3 09 --> + <bezel name="lamp40" element="Lamp_White"><bounds x="480" y="405" width="8" height="8" /></bezel> <!-- U3 10 --> + <bezel name="lamp41" element="Lamp_White"><bounds x="495" y="405" width="8" height="8" /></bezel> <!-- U3 11 --> + <bezel name="lamp42" element="Lamp_White"><bounds x="510" y="405" width="8" height="8" /></bezel> <!-- U3 12 --> + <bezel name="lamp43" element="Lamp_White"><bounds x="525" y="405" width="8" height="8" /></bezel> <!-- U3 13 --> + <bezel name="lamp44" element="Lamp_White"><bounds x="540" y="405" width="8" height="8" /></bezel> <!-- U3 14 --> + + <!-- Lamps controlled by U4 on Lamp Driver Board --> + <bezel name="lamp45" element="Lamp_White"><bounds x="330" y="420" width="8" height="8" /></bezel> <!-- U4 00 --> + <bezel name="lamp46" element="Lamp_White"><bounds x="345" y="420" width="8" height="8" /></bezel> <!-- U4 01 --> + <bezel name="lamp47" element="Lamp_White"><bounds x="360" y="420" width="8" height="8" /></bezel> <!-- U4 02 --> + <bezel name="lamp48" element="Lamp_White"><bounds x="375" y="420" width="8" height="8" /></bezel> <!-- U4 03 --> + <bezel name="lamp49" element="Lamp_White"><bounds x="390" y="420" width="8" height="8" /></bezel> <!-- U4 04 --> + <bezel name="lamp50" element="Lamp_White"><bounds x="405" y="420" width="8" height="8" /></bezel> <!-- U4 05 --> + <bezel name="lamp51" element="Lamp_White"><bounds x="420" y="420" width="8" height="8" /></bezel> <!-- U4 06 --> + <bezel name="lamp52" element="Lamp_White"><bounds x="435" y="420" width="8" height="8" /></bezel> <!-- U4 07 --> + <bezel name="lamp53" element="Lamp_White"><bounds x="450" y="420" width="8" height="8" /></bezel> <!-- U4 08 --> + <bezel name="lamp54" element="Lamp_White"><bounds x="465" y="420" width="8" height="8" /></bezel> <!-- U4 09 --> + <bezel name="lamp55" element="Lamp_White"><bounds x="480" y="420" width="8" height="8" /></bezel> <!-- U4 10 --> + <bezel name="lamp56" element="Lamp_White"><bounds x="495" y="420" width="8" height="8" /></bezel> <!-- U4 11 --> + <bezel name="lamp57" element="Lamp_White"><bounds x="510" y="420" width="8" height="8" /></bezel> <!-- U4 12 --> + <bezel name="lamp58" element="Lamp_White"><bounds x="525" y="420" width="8" height="8" /></bezel> <!-- U4 13 --> + <bezel name="lamp59" element="Lamp_White"><bounds x="540" y="420" width="8" height="8" /></bezel> <!-- U4 14 --> + + + <bezel element="Text_Solenoids"><bounds x="382" y="437" width="100" height="11" /></bezel> + <bezel name="solenoid0" element="Solenoid_PullDown"><bounds x="330" y="452" width="9" height="19" /></bezel> + <bezel name="solenoid1" element="Solenoid_PullDown"><bounds x="345" y="452" width="9" height="19" /></bezel> + <bezel name="solenoid2" element="Solenoid_PullDown"><bounds x="360" y="452" width="9" height="19" /></bezel> + <bezel name="solenoid3" element="Solenoid_PullDown"><bounds x="375" y="452" width="9" height="19" /></bezel> + <bezel name="solenoid4" element="Solenoid_PullDown"><bounds x="390" y="452" width="9" height="19" /></bezel> + <bezel name="solenoid5" element="Solenoid_PullDown"><bounds x="405" y="452" width="9" height="19" /></bezel> + <bezel name="solenoid6" element="Solenoid_PullDown"><bounds x="420" y="452" width="9" height="19" /></bezel> + <bezel name="solenoid7" element="Solenoid_PullDown"><bounds x="435" y="452" width="9" height="19" /></bezel> + <bezel name="solenoid8" element="Solenoid_PullDown"><bounds x="450" y="452" width="9" height="19" /></bezel> + <bezel name="solenoid9" element="Solenoid_PullDown"><bounds x="465" y="452" width="9" height="19" /></bezel> + <bezel name="solenoid10" element="Solenoid_PullDown"><bounds x="480" y="452" width="9" height="19" /></bezel> + <bezel name="solenoid11" element="Solenoid_PullDown"><bounds x="495" y="452" width="9" height="19" /></bezel> + <bezel name="solenoid12" element="Solenoid_PullDown"><bounds x="510" y="452" width="9" height="19" /></bezel> + <bezel name="solenoid13" element="Solenoid_PullDown"><bounds x="525" y="452" width="9" height="19" /></bezel> + <bezel name="solenoid14" element="Solenoid_PullDown"><bounds x="540" y="452" width="9" height="19" /></bezel> + + <bezel element="Text_Coils"><bounds x="572" y="437" width="50" height="11" /></bezel> + <bezel name="solenoid16" element="Coil_PullDown"><bounds x="570" y="459" width="09" height="12" /></bezel> + <bezel name="solenoid17" element="Coil_PullDown"><bounds x="585" y="459" width="09" height="12" /></bezel> + <bezel name="solenoid18" element="Coil_PullDown"><bounds x="600" y="459" width="09" height="12" /></bezel> + <bezel name="solenoid19" element="Coil_PullDown"><bounds x="615" y="459" width="09" height="12" /></bezel> + + + + <!-- Cabinet Switches --> + <bezel element="Text_Service"> <bounds x="485" y="342" width="50" height="10" /></bezel> + <bezel element="Switch_Push-Button" inputtag="TEST" inputmask="0x01"><bounds x="495" y="331" width="20" height="10" /></bezel> + <bezel element="Key_9"> <bounds x="516" y="330" width="10" height="10" /></bezel> + + <bezel element="Text_Slam"> <bounds x="430" y="342" width="50" height="10" /></bezel> + <bezel element="Switch_SlamTilt" inputtag="X1" inputmask="0x80"><bounds x="434" y="331" width="25" height="08" /></bezel> + <bezel element="Key_Equals"> <bounds x="461" y="330" width="10" height="10" /></bezel> + + <bezel element="Text_Tilt"> <bounds x="380" y="342" width="50" height="10" /></bezel> + <bezel element="Switch_Tilt" inputtag="X0" inputmask="0x40"><bounds x="390" y="324" width="17" height="17" /></bezel> + <bezel element="Key_T"> <bounds x="411" y="330" width="10" height="10" /></bezel> + + + <!-- Misc Solenoids --> + <bezel name="solenoid5" element="Solenoid_Knocker"><bounds x="336" y="321" width="09" height="22" /></bezel> + <bezel element="Text_Knocker"> <!-- Knocker --> <bounds x="322" y="342" width="40" height="10" /></bezel> + + + <!-- Misc Lamps --> + <bezel name="lamp55" element="Credit_Indicator"><bounds x="23" y="456" width="70" height="21" /></bezel> <!-- Credit Indicator --> + + <bezel name="lamp52" element="Lamp_White_50k"><bounds x="009" y="322" width="09" height="09" /></bezel> <!-- 50,000 Outlane Left --> + <bezel name="lamp37" element="Lamp_White_50k"><bounds x="301" y="322" width="09" height="09" /></bezel> <!-- 50,000 Outlane Right --> + <!-- Bonus End of Ball Lamps --> + <bezel name="lamp0" element="Lamp_White_1k"> <bounds x="155" y="413" width="09" height="09" /></bezel> <!-- Bonus 1000 --> + <bezel name="lamp15" element="Lamp_White_2k"> <bounds x="155" y="400" width="09" height="09" /></bezel> <!-- Bonus 2000 --> + <bezel name="lamp30" element="Lamp_White_3k"> <bounds x="155" y="387" width="09" height="09" /></bezel> <!-- Bonus 3000 --> + <bezel name="lamp45" element="Lamp_White_4k"> <bounds x="155" y="374" width="09" height="09" /></bezel> <!-- Bonus 4000 --> + <bezel name="lamp1" element="Lamp_White_5k"> <bounds x="155" y="361" width="09" height="09" /></bezel> <!-- Bonus 5000 --> + <bezel name="lamp16" element="Lamp_White_6k"> <bounds x="155" y="348" width="09" height="09" /></bezel> <!-- Bonus 6000 --> + <bezel name="lamp31" element="Lamp_White_7k"> <bounds x="155" y="335" width="09" height="09" /></bezel> <!-- Bonus 7000 --> + <bezel name="lamp46" element="Lamp_White_8k"> <bounds x="155" y="322" width="09" height="09" /></bezel> <!-- Bonus 8000 --> + <bezel name="lamp2" element="Lamp_White_9k"> <bounds x="155" y="309" width="09" height="09" /></bezel> <!-- Bonus 9000 --> + <bezel name="lamp17" element="Lamp_White_10k"><bounds x="140" y="292" width="12" height="12" /></bezel> <!-- Bonus 10000 --> + <bezel name="lamp32" element="Lamp_White_20k"><bounds x="167" y="292" width="12" height="12" /></bezel> <!-- Bonus 20000 --> + <!-- Bonus Multiplier Lamps --> + <bezel name="lamp56" element="Lamp_Green_Arrow_04_2x"> <bounds x="111" y="317" width="20" height="12.5" /></bezel> <!-- 2X Bonus --> + <bezel name="lamp41" element="Lamp_Yellow_Arrow_04_3x"><bounds x="111" y="337" width="20" height="12.5" /></bezel> <!-- 3X Bonus --> + <bezel name="lamp26" element="Lamp_White_Arrow_08_5x"> <bounds x="188" y="317" width="20" height="12.5" /></bezel> <!-- 5X Bonus --> + <bezel name="lamp40" element="Lamp_Amber_Arrow_08"> <bounds x="188" y="337" width="20" height="12.5" /></bezel> <!-- Extra Ball --> + + <!-- Saucer Lamps --> + <bezel name="lamp24" element="Lamp_White_Arrow_Up_5x"> <bounds x="154" y="102" width="11" height="22" /></bezel> <!-- 5X Bonus Potential --> + <bezel name="lamp39" element="Lamp_Yellow_Arrow_Up_3x"><bounds x="154" y="128" width="11" height="22" /></bezel> <!-- 3X Bonus Potential --> + <bezel name="lamp54" element="Lamp_Green_Arrow_Up_2x"> <bounds x="154" y="154" width="11" height="22" /></bezel> <!-- 2X Bonus Potential --> + <bezel element="Lamp_White_Arrow_Up_3k"> <bounds x="154" y="180" width="11" height="22" /></bezel> <!-- Upper 3000 --> + + <!-- "A" & "B" Potential Lamps --> + <bezel name="lamp5" element="Lamp_White_1k"><bounds x="095" y="265" width="10" height="10" /></bezel> <!-- Upper 1000 --> + <bezel name="lamp20" element="Lamp_White_2k"><bounds x="115" y="265" width="10" height="10" /></bezel> <!-- Upper 2000 --> + <bezel name="lamp35" element="Lamp_White_3k"><bounds x="135" y="265" width="10" height="10" /></bezel> <!-- Upper 3000 --> + <bezel name="lamp50" element="Lamp_White_4k"><bounds x="155" y="265" width="10" height="10" /></bezel> <!-- Upper 4000 --> + <bezel name="lamp6" element="Lamp_White_5k"><bounds x="175" y="265" width="10" height="10" /></bezel> <!-- Upper 5000 --> + <bezel name="lamp21" element="Lamp_Amber"> <bounds x="195" y="265" width="10" height="10" /></bezel> <!-- Extra Ball Potential --> + <bezel name="lamp36" element="Lamp_Red"> <bounds x="215" y="265" width="10" height="10" /></bezel> <!-- Special Potential --> + + <!-- Drop Target Lamps --> + <bezel name="lamp47" element="Lamp_Red"><bounds x="153" y="225" width="14" height="14" /></bezel> <!-- Special Potential --> + + <!-- Outhole --> + <bezel name="solenoid6" element="Solenoid_Outhole"> <bounds x="150" y="455" width="58" height="22" /></bezel> + <bezel element="Switch_RollOn_WireForm_Left" inputtag="X0" inputmask="0x80"><bounds x="163" y="453" width="20" height="16" /></bezel> + <bezel element="Key_BSpace"> <bounds x="185" y="455" width="15" height="14" /></bezel> + + + <!-- Pop Bumper Left Upper --> + <bezel name="solenoid8" element="Solenoid_Bumper_Yellow_Star"> <bounds x="084" y="095" width="80" height="80" /></bezel> + <bezel element="Switch_Bumper_Yellow_Star" inputtag="X4" inputmask="0x80"><bounds x="084" y="095" width="80" height="80" /></bezel> + <bezel element="Lamp_Bumper_Silver_100"> <bounds x="084" y="095" width="80" height="80" /></bezel> + <bezel element="Key_Z"> <bounds x="119" y="144" width="09" height="09" /></bezel> + + <!-- Pop Bumper Right Upper --> + <bezel name="solenoid9" element="Solenoid_Bumper_Yellow_Star"> <bounds x="157" y="095" width="80" height="80" /></bezel> + <bezel element="Switch_Bumper_Yellow_Star" inputtag="X4" inputmask="0x40"><bounds x="157" y="095" width="80" height="80" /></bezel> + <bezel element="Lamp_Bumper_Silver_100"> <bounds x="157" y="095" width="80" height="80" /></bezel> + <bezel element="Key_X"> <bounds x="191" y="144" width="09" height="09" /></bezel> + + <!-- Pop Bumper Left Bottom --> + <bezel name="solenoid7" element="Solenoid_Bumper_Red_Star"> <bounds x="039" y="136" width="80" height="80" /></bezel> + <bezel element="Switch_Bumper_Red_Star" inputtag="X4" inputmask="0x20"><bounds x="039" y="136" width="80" height="80" /></bezel> + <bezel name="lamp53" element="Lamp_Bumper_Silver_1000"> <bounds x="039" y="136" width="80" height="80" /></bezel> + <bezel element="Key_C"> <bounds x="073" y="140" width="09" height="09" /></bezel> + + <!-- Pop Bumper Right Bottom --> + <bezel name="solenoid10" element="Solenoid_Bumper_Red_Star"> <bounds x="202" y="136" width="80" height="80" /></bezel> + <bezel element="Switch_Bumper_Red_Star" inputtag="X4" inputmask="0x10"><bounds x="202" y="136" width="80" height="80" /></bezel> + <bezel name="lamp38" element="Lamp_Bumper_Silver_1000"> <bounds x="202" y="136" width="80" height="80" /></bezel> + <bezel element="Key_V"> <bounds x="236" y="140" width="09" height="09" /></bezel> + + <!-- Slingshot Left --> + <bezel name="solenoid11" element="Solenoid_SlingShot_Left"> <bounds x="035" y="320" width="69" height="80" /></bezel> + <bezel element="Switch_Leaf_Vertical" inputtag="X4" inputmask="0x08"><bounds x="060" y="384" width="08" height="09" /></bezel> + <bezel element="Key_B"> <bounds x="060" y="375" width="09" height="09" /></bezel> + + <!-- Slingshot Right --> + <bezel name="solenoid13" element="Solenoid_SlingShot_Right"> <bounds x="221" y="320" width="69" height="80" /></bezel> + <bezel element="Switch_Leaf_Vertical" inputtag="X4" inputmask="0x04"><bounds x="257" y="384" width="08" height="09" /></bezel> + <bezel element="Key_N"> <bounds x="257" y="375" width="09" height="09" /></bezel> + + + <!-- Saucer --> + <bezel name="solenoid0" element="Solenoid_Saucer_Large"> <bounds x="141" y="40" width="35" height="35" /></bezel> + <bezel element="Switch_Saucer_Large" inputtag="X3" inputmask="0x80"><bounds x="141" y="40" width="35" height="35" /></bezel> + <bezel element="Key_Q"> <bounds x="155" y="28" width="09" height="09" /></bezel> + + + <!-- Drop Targets Leftside --> + <bezel name="solenoid12" element="Solenoid_DropTarget_Wide"> <bounds x="093" y="184" width="15" height="07" /></bezel> + <bezel element="DropTarget_Wide" inputtag="X2" inputmask="0x80"><bounds x="093" y="184" width="15" height="07" /></bezel> + <bezel element="Key_A"> <bounds x="108" y="188" width="09" height="09" /></bezel> + <bezel name="solenoid12" element="Solenoid_DropTarget_Wide"> <bounds x="078" y="195" width="15" height="07" /></bezel> + <bezel element="DropTarget_Wide" inputtag="X2" inputmask="0x40"><bounds x="078" y="195" width="15" height="07" /></bezel> + <bezel element="Key_S"> <bounds x="093" y="199" width="09" height="09" /></bezel> + <bezel name="solenoid12" element="Solenoid_DropTarget_Wide"> <bounds x="063" y="206" width="15" height="07" /></bezel> + <bezel element="DropTarget_Wide" inputtag="X2" inputmask="0x20"><bounds x="063" y="206" width="15" height="07" /></bezel> + <bezel element="Key_D"> <bounds x="078" y="210" width="09" height="09" /></bezel> + <bezel name="solenoid12" element="Solenoid_DropTarget_Wide"> <bounds x="048" y="217" width="15" height="07" /></bezel> + <bezel element="DropTarget_Wide" inputtag="X2" inputmask="0x10"><bounds x="048" y="217" width="15" height="07" /></bezel> + <bezel element="Key_F"> <bounds x="063" y="221" width="09" height="09" /></bezel> + + <!-- Drop Targets Rightside --> + <bezel name="solenoid14" element="Solenoid_DropTarget_Wide"> <bounds x="213" y="184" width="15" height="07" /></bezel> + <bezel element="DropTarget_Wide" inputtag="X2" inputmask="0x08"><bounds x="213" y="184" width="15" height="07" /></bezel> + <bezel element="Key_G"> <bounds x="205" y="188" width="09" height="09" /></bezel> + <bezel name="solenoid14" element="Solenoid_DropTarget_Wide"> <bounds x="228" y="195" width="15" height="07" /></bezel> + <bezel element="DropTarget_Wide" inputtag="X2" inputmask="0x04"><bounds x="228" y="195" width="15" height="07" /></bezel> + <bezel element="Key_H"> <bounds x="220" y="199" width="09" height="09" /></bezel> + <bezel name="solenoid14" element="Solenoid_DropTarget_Wide"> <bounds x="243" y="206" width="15" height="07" /></bezel> + <bezel element="DropTarget_Wide" inputtag="X2" inputmask="0x02"><bounds x="243" y="206" width="15" height="07" /></bezel> + <bezel element="Key_J"> <bounds x="235" y="210" width="09" height="09" /></bezel> + <bezel name="solenoid14" element="Solenoid_DropTarget_Wide"> <bounds x="258" y="217" width="15" height="07" /></bezel> + <bezel element="DropTarget_Wide" inputtag="X2" inputmask="0x01"><bounds x="258" y="217" width="15" height="07" /></bezel> + <bezel element="Key_K"> <bounds x="250" y="221" width="09" height="09" /></bezel> + + <!-- Drop Target Area Rebound switches --> + <bezel element="Switch_Leaf_Vertical" inputtag="X3" inputmask="0x04"><bounds x="252" y="190" width="08" height="09" /></bezel> + <bezel element="Key_U"> <bounds x="264" y="190" width="09" height="09" /></bezel> + <bezel element="Switch_Leaf_Vertical" inputtag="X3" inputmask="0x04"><bounds x="061" y="190" width="08" height="09" /></bezel> + <bezel element="Key_U"> <bounds x="050" y="190" width="09" height="09" /></bezel> + + + <!-- A & B Upper Lanes --> + <bezel name="lamp48" element="Lamp_White_A"> <bounds x="098" y="033" width="14" height="14" /></bezel> + <bezel element="Switch_RollOver_WireForm_Vertical" inputtag="X3" inputmask="0x40"><bounds x="100" y="060" width="09" height="27" /></bezel> + <bezel element="Key_W"> <bounds x="100" y="090" width="09" height="09" /></bezel> + <bezel name="lamp33" element="Lamp_White_B"> <bounds x="206" y="033" width="14" height="14" /></bezel> + <bezel element="Switch_RollOver_WireForm_Vertical" inputtag="X3" inputmask="0x20"><bounds x="208" y="060" width="09" height="27" /></bezel> + <bezel element="Key_E"> <bounds x="208" y="090" width="09" height="09" /></bezel> + + <!-- A & B Side Lanes --> + <bezel name="lamp48" element="Lamp_White_Arrow_11_A"> <!-- 11 o clock --> <bounds x="020" y="240" width="12.5" height="20" /></bezel> + <bezel element="Switch_RollOver_WireForm_Vertical" inputtag="X3" inputmask="0x10"><bounds x="009" y="150" width="09" height="27" /></bezel> + <bezel element="Key_R"> <bounds x="009" y="180" width="09" height="09" /></bezel> + <bezel name="lamp33" element="Lamp_White_Arrow_01_B"> <!-- 1 o clock --> <bounds x="286" y="240" width="12.5" height="20" /></bezel> + <bezel element="Switch_RollOver_WireForm_Vertical" inputtag="X3" inputmask="0x08"><bounds x="301" y="150" width="09" height="27" /></bezel> + <bezel element="Key_Y"> <bounds x="301" y="180" width="09" height="09" /></bezel> + + + <!-- Outlane switches / lamps --> + <bezel element="Switch_RollOver_WireForm_Vertical" inputtag="X4" inputmask="0x02"><bounds x="009" y="346" width="09" height="27" /></bezel> + <bezel element="Key_M"> <bounds x="009" y="376" width="09" height="09" /></bezel> + <bezel element="Switch_RollOver_WireForm_Vertical" inputtag="X4" inputmask="0x01"><bounds x="301" y="346" width="09" height="27" /></bezel> + <bezel element="Key_Comma"> <bounds x="301" y="376" width="09" height="09" /></bezel> + + <!-- Flipper Return Lane switches --> + <bezel element="Switch_RollOver_WireForm_Vertical" inputtag="X3" inputmask="0x02"><bounds x="030" y="348" width="09" height="27" /></bezel> + <bezel element="Key_I"> <bounds x="030" y="378" width="09" height="09" /></bezel> + <bezel element="Switch_RollOver_WireForm_Vertical" inputtag="X3" inputmask="0x01"><bounds x="280" y="348" width="09" height="27" /></bezel> + <bezel element="Key_O"> <bounds x="280" y="378" width="09" height="09" /></bezel> + + </view> + +</mamelayout> diff --git a/src/mame/layout/by17_pwerplay.lay b/src/mame/layout/by17_pwerplay.lay new file mode 100644 index 00000000000..b8a77b925ad --- /dev/null +++ b/src/mame/layout/by17_pwerplay.lay @@ -0,0 +1,929 @@ +<!-- Pinball Machine, Bally ~ PowerPlay --> +<!-- [Quench] September 2015 --> + + +<!-- Any state="9" items are not displayed and are only used for object alignment --> + +<mamelayout version="2"> + + <element name="Title_PowerPlay"><text string="PowerPlay"><color red="1.00" green="0.0" blue="0.5" /></text></element> + + + +<!-- Switches --> + + <element name="Switch_SlamTilt"> + <rect state="0"><color red="0.80" green="0.80" blue="0.80" /><bounds x="00" y="00" width="25" height="01" /></rect> + <rect state="0"><color red="0.80" green="0.80" blue="0.80" /><bounds x="00" y="08" width="13" height="01.5" /></rect> + <rect state="0"><color red="1.00" green="1.00" blue="0.00" /><bounds x="08" y="01" width="04" height="02" /></rect> + <rect state="0"><color red="1.00" green="1.00" blue="0.00" /><bounds x="08" y="06" width="04" height="02" /></rect> + + <rect state="0"><color red="0.70" green="0.70" blue="0.70" /><bounds x="19" y="01" width="06" height="04" /></rect> + <rect state="1"><color red="0.70" green="0.70" blue="0.70" /><bounds x="19" y="04" width="06" height="04" /></rect> + + <rect state="1"><color red="0.80" green="0.80" blue="0.80" /><bounds x="00" y="00" width="08" height="01" /></rect> + <rect state="1"><color red="0.80" green="0.80" blue="0.80" /><bounds x="08" y="01" width="08" height="01" /></rect> + <rect state="1"><color red="0.80" green="0.80" blue="0.80" /><bounds x="16" y="02" width="09" height="01" /></rect> + + + <rect state="1"><color red="0.80" green="0.80" blue="0.80" /><bounds x="00" y="08" width="13" height="01.5" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="0.00" /><bounds x="08" y="03" width="04" height="02" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="0.00" /><bounds x="08" y="06" width="04" height="02" /></rect> + </element> + + <element name="Switch_Tilt"> + <rect ><color red="0.80" green="0.80" blue="0.00" /><bounds x="00" y="00" width="17" height="17" /></rect> + <disk ><color red="0.00" green="0.00" blue="0.00" /><bounds x="01" y="01" width="15" height="15" /></disk> + <disk state="0"><color red="0.50" green="0.50" blue="0.50" /><bounds x="04" y="04" width="09" height="09" /></disk> + <disk state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="07" y="07" width="02" height="02" /></disk> + + <disk state="1"><color red="0.50" green="0.50" blue="0.50" /><bounds x="07" y="04" width="09" height="09" /></disk> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="11" y="07" width="02" height="02" /></disk> + </element> + + + <element name="Switch_Leaf_Vertical"> + <rect state="0"><color red="0.80" green="0.80" blue="0.80" /><bounds x="0" y="00" width="01" height="06" /></rect> + <rect state="0"><color red="0.80" green="0.80" blue="0.80" /><bounds x="8" y="00" width="01.5" height="06" /></rect> + <rect state="0"><color red="1.00" green="1.00" blue="0.00" /><bounds x="1" y="01" width="02" height="04" /></rect> + <rect state="0"><color red="1.00" green="1.00" blue="0.00" /><bounds x="6" y="01" width="02" height="04" /></rect> + + <rect state="1"><color red="0.80" green="0.80" blue="0.80" /><bounds x="1.5" y="00" width="01" height="06" /></rect> + <rect state="1"><color red="0.80" green="0.80" blue="0.80" /><bounds x="6.5" y="00" width="01" height="06" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="0.00" /><bounds x="2" y="01" width="02" height="04" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="0.00" /><bounds x="4.5" y="01" width="02" height="04" /></rect> + </element> + + <element name="Switch_RollOn_WireForm_Left"> + <text string=">" state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="8" y="0" width="11" height="11" /></text> + <rect state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="1" y="4" width="0.1" height="04" /></rect> + <rect state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="1" y="4" width="09" height="0.1" /></rect> + <rect state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="1" y="8" width="09" height="0.1" /></rect> + <rect state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="3" y="6" width="08" height="0.1" /></rect> + <text string=">" state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="8" y="0" width="11" height="11" /></text> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="1" y="4" width="0.1" height="04" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="1" y="4" width="09" height="0.1" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="1" y="8" width="09" height="0.1" /></rect> + </element> + + <element name="Switch_RollOver_WireForm_Vertical"> + <text string="/\" state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0" y="00" width="07" height="10" /></text> + <text string="\/" state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0" y="17" width="07" height="10" /></text> + <rect state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="1" y="09" width="0.1" height="09" /></rect> + <rect state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="5" y="09" width="0.1" height="09" /></rect> + <rect state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="3" y="07" width="0.1" height="13" /></rect> + <text string="/\" state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0" y="00" width="07" height="10" /></text> + <text string="\/" state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0" y="17" width="07" height="10" /></text> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="1" y="09" width="0.1" height="09" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="5" y="09" width="0.1" height="09" /></rect> + </element> + + <element name="Switch_Target_Red_Forward" defstate="0"> + <rect ><color red="1.00" green="1.00" blue="1.00" /><bounds x="06" y="00" width="10" height="01" /></rect> + <rect ><color red="1.00" green="1.00" blue="1.00" /><bounds x="06" y="00" width="01" height="05" /></rect> + <rect ><color red="1.00" green="1.00" blue="1.00" /><bounds x="16" y="00" width="01" height="05" /></rect> + + <disk state="0"><color red="1.00" green="0.00" blue="0.00" /><bounds x="00" y="05" width="24" height="06" /></disk> + <disk state="1"><color red="1.00" green="0.00" blue="0.00" /><bounds x="00" y="02" width="24" height="06" /></disk> + </element> + + <element name="Switch_RollOver_Button"> + <text string="*" state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="-10" y="-6" width="35" height="35" /></text> + <text string="*" state="1"><color red="0.00" green="0.00" blue="0.00" /><bounds x="-10" y="-6" width="35" height="35" /></text> + </element> + + <element name="Lamp_RollOver_Button" defstate="0"> + <disk state="0"><color red="0.15" green="0.04" blue="0.00" /><bounds x="0" y="0" width="15" height="15" /></disk> + <disk state="1"><color red="1.00" green="0.30" blue="0.00" /><bounds x="0" y="0" width="15" height="15" /></disk> + </element> + + <element name="Lamp_RollOver_Button_On"> + <disk><color red="1.00" green="0.30" blue="0.00" /><bounds x="0" y="0" width="15" height="15" /></disk> + </element> + + + <element name="Switch_Push-Button" defstate="0"> + <rect state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="07" y="04" width="16" height="01" /></rect> + <rect state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="12" y="00" width="01" height="04" /></rect> + <rect state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="17" y="00" width="01" height="04" /></rect> + <rect state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="12" y="00" width="05" height="01" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="07" y="08.5" width="16" height="01" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="12" y="04.5" width="01" height="04" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="17" y="04.5" width="01" height="04" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="12" y="04.5" width="05" height="01" /></rect> + <rect ><color red="1.00" green="1.00" blue="1.00" /><bounds x="00" y="12" width="09" height="01" /></rect> + <rect ><color red="1.00" green="1.00" blue="1.00" /><bounds x="21" y="12" width="09" height="01" /></rect> + <disk ><color red="1.00" green="1.00" blue="1.00" /><bounds x="07" y="10" width="06" height="06" /></disk> + <disk ><color red="1.00" green="1.00" blue="1.00" /><bounds x="18" y="10" width="06" height="06" /></disk> + </element> + + + + <element name="Key_Z"> <text string="Z"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_X"> <text string="X"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_C"> <text string="C"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_V"> <text string="V"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_B"> <text string="B"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_N"> <text string="N"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_M"> <text string="M"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_Comma"> <text string=","><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_Dot"> <text string="."><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_FSlash"><text string="/"><color red="1.00" green="0.66" blue="0.66" /></text></element> + + <element name="Key_A"> <text string="A"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_S"> <text string="S"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_D"> <text string="D"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_F"> <text string="F"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_G"> <text string="G"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_H"> <text string="H"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_J"> <text string="J"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_K"> <text string="K"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_L"> <text string="L"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_SColon"><text string=";"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_Quote"> <text string="'"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_Enter"> + <text string="<"><color red="1.00" green="0.66" blue="0.66" /><bounds x="00" y="00" width="07" height="10" /></text> + <text string="-"> <color red="1.00" green="0.66" blue="0.66" /><bounds x="00" y="00" width="07" height="10" /></text> + <text string="-"> <color red="1.00" green="0.66" blue="0.66" /><bounds x="02" y="00" width="07" height="10" /></text> + <text string="-"> <color red="1.00" green="0.66" blue="0.66" /><bounds x="04" y="00" width="07" height="10" /></text> + <text string="-"> <color red="1.00" green="0.66" blue="0.66" /><bounds x="06" y="00" width="07" height="10" /></text> + <disk > <color red="1.00" green="0.66" blue="0.66" /><bounds x="10" y="02" width="0.5" height="03" /></disk> + </element> + + <element name="Key_Q"> <text string="Q"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_W"> <text string="W"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_E"> <text string="E"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_R"> <text string="R"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_T"> <text string="T"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_Y"> <text string="Y"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_U"> <text string="U"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_I"> <text string="I"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_O"> <text string="O"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_P"> <text string="P"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_OBrkt"> <text string="["><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_CBrkt"> <text string="]"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_BSlash"><text string="\"><color red="1.00" green="0.66" blue="0.66" /></text></element> + + <element name="Key_1"> <text string="1"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_5"> <text string="5"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_6"> <text string="6"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_7"> <text string="7"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_9"> <text string="9"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_0"> <text string="0"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_BSpace"> + <text string="<"><color red="1.00" green="0.66" blue="0.66" /><bounds x="0" y="00" width="07" height="10" /></text> + <text string="-"> <color red="1.00" green="0.66" blue="0.66" /><bounds x="0" y="00" width="07" height="10" /></text> + <text string="-"> <color red="1.00" green="0.66" blue="0.66" /><bounds x="2" y="00" width="07" height="10" /></text> + <text string="-"> <color red="1.00" green="0.66" blue="0.66" /><bounds x="4" y="00" width="07" height="10" /></text> + <text string="-"> <color red="1.00" green="0.66" blue="0.66" /><bounds x="6" y="00" width="07" height="10" /></text> + </element> + <element name="Key_Equals"><text string="="><color red="1.00" green="0.66" blue="0.66" /></text></element> + + + + <element name="Solenoid_DropTarget_Tall" defstate="0"> + <rect state="1"><color red="1.00" green="0.00" blue="0.00" /><bounds x="00" y="00" width="07" height="15" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="01" y="01" width="04" height="12" /></rect> + </element> + <element name="DropTarget_Tall" defstate="0"> + <rect state="1"><color red="0.25" green="0.25" blue="0.25" /><bounds x="01" y="01" width="04" height="12" /></rect> + <rect state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="01" y="01" width="04" height="12" /></rect> + <rect state="9"><color red="0.00" green="1.00" blue="0.00" /><bounds x="00" y="00" width="07" height="15" /></rect> + </element> + + +<!-- Lamps --> + + <element name="Lamp_White" defstate="0"> + <disk state="0"><color red="0.15" green="0.15" blue="0.15" /></disk> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /></disk> + </element> + <element name="Lamp_Red" defstate="0"> <!-- Usually for Specials --> + <disk state="0"><color red="0.15" green="0.00" blue="0.00" /></disk> + <disk state="1"><color red="1.00" green="0.00" blue="0.00" /></disk> + </element> + <element name="Lamp_Amber" defstate="0"> <!-- Usually for Extra Ball--> + <disk state="0"><color red="0.15" green="0.06" blue="0.00" /></disk> + <disk state="1"><color red="1.00" green="0.40" blue="0.00" /></disk> + </element> + + + <element name="Lamp_P1"> + <rect><color red="0.10" green="0.10" blue="0.10" /></rect> + <text string="1" state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0" y="0" width="1" height="0.9" /></text> + <text string="1" state="0"><color red="0.25" green="0.25" blue="0.25" /><bounds x="0" y="0" width="1" height="0.9" /></text> + </element> + <element name="Lamp_P2"> + <rect><color red="0.10" green="0.10" blue="0.10" /></rect> + <text string="2" state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0" y="0" width="1" height="0.9" /></text> + <text string="2" state="0"><color red="0.25" green="0.25" blue="0.25" /><bounds x="0" y="0" width="1" height="0.9" /></text> + </element> + <element name="Lamp_P3"> + <rect><color red="0.10" green="0.10" blue="0.10" /></rect> + <text string="3" state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0.1" y="0" width="1" height="0.9" /></text> + <text string="3" state="0"><color red="0.25" green="0.25" blue="0.25" /><bounds x="0.1" y="0" width="1" height="0.9" /></text> + </element> + <element name="Lamp_P4"> + <rect><color red="0.10" green="0.10" blue="0.10" /></rect> + <text string="4" state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0" y="0" width="1" height="0.9" /></text> + <text string="4" state="0"><color red="0.25" green="0.25" blue="0.25" /><bounds x="0" y="0" width="1" height="0.9" /></text> + </element> + + <element name="Lamp_1P"> + <disk><color red="0.10" green="0.10" blue="0.10" /></disk> + <text string="1" state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0" y="0" width="1" height="0.9" /></text> + <text string="1" state="0"><color red="0.25" green="0.25" blue="0.25" /><bounds x="0" y="0" width="1" height="0.9" /></text> + </element> + <element name="Lamp_2P"> + <disk><color red="0.10" green="0.10" blue="0.10" /></disk> + <text string="2" state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0" y="0" width="1" height="0.9" /></text> + <text string="2" state="0"><color red="0.25" green="0.25" blue="0.25" /><bounds x="0" y="0" width="1" height="0.9" /></text> + </element> + <element name="Lamp_3P"> + <disk><color red="0.10" green="0.10" blue="0.10" /></disk> + <text string="3" state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0.1" y="0" width="1" height="0.9" /></text> + <text string="3" state="0"><color red="0.25" green="0.25" blue="0.25" /><bounds x="0.1" y="0" width="1" height="0.9" /></text> + </element> + <element name="Lamp_4P"> + <disk><color red="0.10" green="0.10" blue="0.10" /></disk> + <text string="4" state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0" y="0" width="1" height="0.9" /></text> + <text string="4" state="0"><color red="0.25" green="0.25" blue="0.25" /><bounds x="0" y="0" width="1" height="0.9" /></text> + </element> + + + <element name="Lamp_2x" defstate="0"> + <disk state="0"><color red="0.0" green="0.15" blue="0.0" /></disk> + <disk state="1"><color red="0.0" green="1.00" blue="0.0" /></disk> + <text string="2x"><color red="0.0" green="0.0" blue="0.0" /><bounds x="0" y="0.1" width="1" height="0.75" /></text> + </element> + <element name="Lamp_3x" defstate="0"> + <disk state="0"><color red="0.15" green="0.15" blue="0.0" /></disk> + <disk state="1"><color red="1.00" green="1.00" blue="0.0" /></disk> + <text string="3x"><color red="0.0" green="0.0" blue="0.0" /><bounds x="0" y="0.1" width="1" height="0.75" /></text> + </element> + <element name="Lamp_5x" defstate="0"> + <disk state="0"><color red="0.15" green="0.15" blue="0.15" /></disk> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /></disk> + <text string="5x"><color red="0.0" green="0.0" blue="0.0" /><bounds x="0" y="0.1" width="1" height="0.75" /></text> + </element> + + + <element name="Lamp_White_1k"> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /></disk> + <disk state="0"><color red="0.25" green="0.25" blue="0.25" /></disk> + <text string="1k"><color red="0.0" green="0.0" blue="0.0" /><bounds x="0" y="0.1" width="1" height="0.75" /></text> + </element> + <element name="Lamp_White_2k"> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /></disk> + <disk state="0"><color red="0.25" green="0.25" blue="0.25" /></disk> + <text string="2k"><color red="0.0" green="0.0" blue="0.0" /><bounds x="0" y="0.1" width="1" height="0.75" /></text> + </element> + <element name="Lamp_White_3k"> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /></disk> + <disk state="0"><color red="0.25" green="0.25" blue="0.25" /></disk> + <text string="3k"><color red="0.0" green="0.0" blue="0.0" /><bounds x="0" y="0.1" width="1" height="0.75" /></text> + </element> + <element name="Lamp_White_4k"> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /></disk> + <disk state="0"><color red="0.25" green="0.25" blue="0.25" /></disk> + <text string="4k"><color red="0.0" green="0.0" blue="0.0" /><bounds x="0" y="0.1" width="1" height="0.75" /></text> + </element> + <element name="Lamp_White_5k"> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /></disk> + <disk state="0"><color red="0.25" green="0.25" blue="0.25" /></disk> + <text string="5k"><color red="0.0" green="0.0" blue="0.0" /><bounds x="0" y="0.1" width="1" height="0.75" /></text> + </element> + <element name="Lamp_White_6k"> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /></disk> + <disk state="0"><color red="0.25" green="0.25" blue="0.25" /></disk> + <text string="6k"><color red="0.0" green="0.0" blue="0.0" /><bounds x="0" y="0.1" width="1" height="0.75" /></text> + </element> + <element name="Lamp_White_7k"> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /></disk> + <disk state="0"><color red="0.25" green="0.25" blue="0.25" /></disk> + <text string="7k"><color red="0.0" green="0.0" blue="0.0" /><bounds x="0" y="0.1" width="1" height="0.75" /></text> + </element> + <element name="Lamp_White_8k"> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /></disk> + <disk state="0"><color red="0.25" green="0.25" blue="0.25" /></disk> + <text string="8k"><color red="0.0" green="0.0" blue="0.0" /><bounds x="0" y="0.1" width="1" height="0.75" /></text> + </element> + <element name="Lamp_White_9k"> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /></disk> + <disk state="0"><color red="0.25" green="0.25" blue="0.25" /></disk> + <text string="9k"><color red="0.0" green="0.0" blue="0.0" /><bounds x="0" y="0.1" width="1" height="0.75" /></text> + </element> + <element name="Lamp_White_10k"> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0.0" y="0.0" width="1.10" height="1.00" /></disk> + <disk state="0"><color red="0.25" green="0.25" blue="0.25" /><bounds x="0.0" y="0.0" width="1.10" height="1.00" /></disk> + <text string="10k"><color red="0.0" green="0.0" blue="0.0" /><bounds x="0.1" y="0.1" width="1.00" height="0.75" /></text> + </element> + <element name="Lamp_White_12k"> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0.0" y="0.0" width="1.10" height="1.00" /></disk> + <disk state="0"><color red="0.25" green="0.25" blue="0.25" /><bounds x="0.0" y="0.0" width="1.10" height="1.00" /></disk> + <text string="12k"><color red="0.0" green="0.0" blue="0.0" /><bounds x="0.1" y="0.1" width="1.00" height="0.75" /></text> + </element> + <element name="Lamp_White_15k"> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0.0" y="0.0" width="1.10" height="1.00" /></disk> + <disk state="0"><color red="0.25" green="0.25" blue="0.25" /><bounds x="0.0" y="0.0" width="1.10" height="1.00" /></disk> + <text string="15k"><color red="0.0" green="0.0" blue="0.0" /><bounds x="0.1" y="0.1" width="1.00" height="0.75" /></text> + </element> + <element name="Lamp_White_20k"> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0.0" y="0.0" width="1.10" height="1.00" /></disk> + <disk state="0"><color red="0.25" green="0.25" blue="0.25" /><bounds x="0.0" y="0.0" width="1.10" height="1.00" /></disk> + <text string="20k"><color red="0.0" green="0.0" blue="0.0" /><bounds x="0.1" y="0.1" width="1.00" height="0.75" /></text> + </element> + + + <element name="Credit_Indicator"> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="2.5" y="0" width="1.0" height="1.0" /></disk> + <disk state="0"><color red="0.25" green="0.25" blue="0.25" /><bounds x="2.5" y="0" width="1.0" height="1.0" /></disk> + <text string="Credit Indicator"><color red="1.0" green="1.0" blue="1.0" /><bounds x="0" y="1.1" width="6.5" height="0.90" /></text> + </element> + + +<!-- Backbox Indicators --> + + <element name="Text_Credit"><text string="CREDIT"><color red="1.0" green="1.0" blue="1.0" /></text></element> + <element name="Text_Lamps"><text string="Lamps"><color red="1.0" green="1.0" blue="1.0" /></text></element> + <element name="Text_15"><text string="U1 0-14"><color red="1.0" green="1.0" blue="1.0" /></text></element> + <element name="Text_30"><text string="U2 0-14"><color red="1.0" green="1.0" blue="1.0" /></text></element> + <element name="Text_45"><text string="U3 0-14"><color red="1.0" green="1.0" blue="1.0" /></text></element> + <element name="Text_60"><text string="U4 0-14"><color red="1.0" green="1.0" blue="1.0" /></text></element> + <element name="Text_Solenoids"><text string="Momentary Solenoids"><color red="1.0" green="1.0" blue="1.0" /></text></element> + <element name="Text_Coils"><text string="Coils"><color red="1.0" green="1.0" blue="1.0" /></text></element> + <element name="Text_MPU_LED"><text string="MPU LED"><color red="1.0" green="1.0" blue="1.0" /></text></element> + <element name="Text_Activity"><text string="Activity Switch"><color red="1.0" green="1.0" blue="1.0" /></text></element> + <element name="Text_Service"><text string="Service Switch"><color red="1.0" green="1.0" blue="1.0" /></text></element> + <element name="Text_Slam"><text string="Slam Switch"><color red="1.0" green="1.0" blue="1.0" /></text></element> + <element name="Text_Tilt"><text string="Tilt Switch"><color red="1.0" green="1.0" blue="1.0" /></text></element> + <element name="Text_Knocker"><text string="Knocker"><color red="1.0" green="1.0" blue="1.0" /></text></element> + + + <element name="High_Score_To_Date" defstate="0"> + <text string="HIGH SCORE TO DATE" state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0" y="0.1" width="1" height="1" /></text> + <text string="HIGH SCORE TO DATE" state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="0" y="0.1" width="1" height="1" /></text> + </element> + <element name="Ball_In_Play" defstate="0"> + <text string="BALL IN PLAY" state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0.1" y="0.1" width="1" height="0.8" /></text> + <text string="BALL IN PLAY" state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="0.1" y="0.1" width="1" height="0.8" /></text> + </element> + <element name="Match" defstate="0"> + <text string="MATCH" state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0" y="0.1" width="1" height="0.8" /></text> + <text string="MATCH" state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="0" y="0.1" width="1" height="0.8" /></text> + </element> + <element name="Game_Over" defstate="0"> + <text string="GAME OVER" state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0" y="0.1" width="1" height="0.8" /></text> + <text string="GAME OVER" state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="0" y="0.1" width="1" height="0.8" /></text> + </element> + <element name="Tilt" defstate="0"> + <text string="TILT" state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0" y="0.1" width="1" height="0.8" /></text> + <text string="TILT" state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="0" y="0.1" width="1" height="0.8" /></text> + </element> + <element name="Shoot_Again" defstate="0"> + <text string="SAME PLAYER" state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0" y="0.1" width="1" height="0.8" /></text> + <text string="SAME PLAYER" state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="0" y="0.1" width="1" height="0.8" /></text> + <text string="SHOOTS AGAIN" state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0" y="0.9" width="1" height="0.8" /></text> + <text string="SHOOTS AGAIN" state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="0" y="0.9" width="1" height="0.8" /></text> + </element> + + + <element name="Digit" defstate="0"> + <led7seg><color red="1.0" green="0.35" blue="0.0" /></led7seg> + </element> + + <element name="LED_Green" defstate="1"> + <disk state="0"><color red="0.0" green="0.25" blue="0.0" /></disk> + <disk state="1"><color red="0.0" green="1.00" blue="0.0" /></disk> + </element> + + + +<!-- Solenoids --> + + <element name="Solenoid_PullDown"> + <rect state="0"><color red="1.0" green="1.0" blue="1.0" /><bounds x="3" y="0" width="03" height="09" /></rect> + <rect state="0"><color red="0.0" green="1.0" blue="1.0" /><bounds x="0" y="8" width="10" height="11" /></rect> + <rect state="1"><color red="1.0" green="1.0" blue="0.0" /><bounds x="0" y="8" width="10" height="11" /></rect> + </element> + + <element name="Coil_PullDown"> + <rect state="0"><color red="1.0" green="1.0" blue="1.0" /><bounds x="8" y="0" width="02" height="01" /></rect> + <rect state="0"><color red="1.0" green="1.0" blue="1.0" /><bounds x="6" y="1" width="02" height="01" /></rect> + <rect state="0"><color red="1.0" green="1.0" blue="1.0" /><bounds x="4" y="2" width="02" height="01" /></rect> + <rect state="0"><color red="1.0" green="1.0" blue="1.0" /><bounds x="2" y="3" width="02" height="01" /></rect> + <rect state="0"><color red="1.0" green="1.0" blue="1.0" /><bounds x="0" y="4" width="02" height="01" /></rect> + <rect ><color red="1.0" green="1.0" blue="1.0" /><bounds x="0" y="5" width="02" height="02" /></rect> + <rect state="1"><color red="1.0" green="1.0" blue="1.0" /><bounds x="0" y="4" width="10" height="01" /></rect> + + <rect state="0"><color red="0.0" green="1.0" blue="1.0" /><bounds x="0" y="8" width="10" height="11" /></rect> + <rect state="1"><color red="1.0" green="1.0" blue="0.0" /><bounds x="0" y="8" width="10" height="11" /></rect> + </element> + + + <element name="Solenoid_Knocker" defstate="0"> + <rect state="0"><color red="1.0" green="1.0" blue="1.0" /><bounds x="03" y="14" width="03" height="08" /></rect> + <rect state="1"><color red="1.0" green="0.0" blue="0.0" /><bounds x="03" y="00" width="03" height="04" /></rect> + <rect state="0"><color red="0.0" green="1.0" blue="1.0" /><bounds x="00" y="04" width="10" height="11" /></rect> + <rect state="1"><color red="1.0" green="1.0" blue="0.0" /><bounds x="00" y="04" width="10" height="11" /></rect> + </element> + + <element name="Solenoid_Outhole" defstate="0"> + <text string="\" state="1"><color red="1.0" green="0.0" blue="0.0" /><bounds x="17" y="00" width="05" height="16" /></text> + <text string="\" state="0"><color red="1.0" green="1.0" blue="1.0" /><bounds x="02" y="00" width="05" height="16" /></text> + <text string="\" state="1"><color red="1.0" green="0.0" blue="0.0" /><bounds x="18" y="00" width="05" height="16" /></text> + <text string="\" state="0"><color red="1.0" green="1.0" blue="1.0" /><bounds x="03" y="00" width="05" height="16" /></text> + <text string="\" state="1"><color red="1.0" green="0.0" blue="0.0" /><bounds x="19" y="00" width="05" height="16" /></text> + <text string="\" state="0"><color red="1.0" green="1.0" blue="1.0" /><bounds x="04" y="00" width="05" height="16" /></text> + <text string="\" state="1"><color red="1.0" green="0.0" blue="0.0" /><bounds x="20" y="00" width="05" height="16" /></text> + <text string="\" state="0"><color red="1.0" green="1.0" blue="1.0" /><bounds x="05" y="00" width="05" height="16" /></text> + <rect state="1"><color red="1.0" green="0.0" blue="0.0" /><bounds x="02" y="02" width="18" height="10" /></rect> + <rect ><color red="1.0" green="1.0" blue="1.0" /><bounds x="00" y="14" width="25" height="02" /></rect> + <text string="Outhole" ><color red="1.0" green="1.0" blue="1.0" /><bounds x="30" y="12" width="28" height="9.5" /></text> + </element> + + <element name="Solenoid_SlingShot_Left" defstate="0"> + <text string="\" state="1"><color red="1.0" green="0.0" blue="0.0" /><bounds x="05" y="00" width="65" height="80" /></text> + <text string="\" state="0"><color red="1.0" green="1.0" blue="1.0" /><bounds x="00" y="00" width="65" height="80" /></text> + <rect ><color red="1.0" green="1.0" blue="1.0" /><bounds x="20" y="16" width="04" height="60" /></rect> + <rect ><color red="1.0" green="1.0" blue="1.0" /><bounds x="20" y="76" width="24.5" height="04" /></rect> + </element> + <element name="Solenoid_SlingShot_Right" defstate="0"> + <text string="/" state="1"><color red="1.0" green="0.0" blue="0.0" /><bounds x="-5" y="00" width="65" height="80" /></text> + <text string="/" state="0"><color red="1.0" green="1.0" blue="1.0" /><bounds x="00" y="00" width="65" height="80" /></text> + <rect ><color red="1.0" green="1.0" blue="1.0" /><bounds x="40" y="16" width="04" height="60" /></rect> + <rect ><color red="1.0" green="1.0" blue="1.0" /><bounds x="19.5" y="76" width="24" height="04" /></rect> + </element> + + + <element name="Solenoid_Bumper_Red_Star" defstate="0"> + <disk state="0"> <color red="1.0" green="1.0" blue="1.0" /><bounds x="0" y="0" width="80" height="80" /></disk> + <disk state="1"> <color red="1.0" green="0.0" blue="0.0" /><bounds x="0" y="0" width="80" height="80" /></disk> + <text string="*"><color red="1.0" green="0.0" blue="0.0" /><bounds x="-61" y="-38.5" width="206" height="206" /></text> + <disk> <color red="1.0" green="1.0" blue="1.0" /><bounds x="18" y="18" width="44" height="44" /></disk> + </element> + <element name="Switch_Bumper_Red_Star" defstate="0"> + <text string="*" state="9"><color red="1.0" green="0.0" blue="0.0" /><bounds x="-61" y="-38.5" width="206" height="206" /></text> + <disk state="0"><color red="1.0" green="0.0" blue="0.0" /><bounds x="14" y="15" width="50" height="50" /></disk> + <disk state="1"><color red="0.5" green="0.5" blue="0.5" /><bounds x="14" y="15" width="50" height="50" /></disk> + </element> + <element name="Lamp_Bumper_Red_1000" defstate="0"> + <text string="*" state="9"><color red="0.0" green="0.0" blue="0.0" /><bounds x="-61" y="-38.5" width="206" height="206" /></text> + <disk state="0"><color red="0.7" green="0.7" blue="0.7" /><bounds x="18" y="18" width="44" height="44" /></disk> + <disk state="1"><color red="1.0" green="1.0" blue="1.0" /><bounds x="18" y="18" width="44" height="44" /></disk> + <text string="1000"> <color red="1.0" green="0.0" blue="0.0" /><bounds x="07" y="29" width="70" height="23" /></text> + </element> + + + <element name="Solenoid_Saucer" defstate="0"> + <disk> <color red="1.0" green="0.8" blue="0.5" /><bounds x="00" y="00" width="70" height="70" /></disk> <!-- 71 --> + <disk> <color red="0.7" green="0.7" blue="0.7" /><bounds x="10" y="10" width="49" height="49" /></disk> <!-- 51 --> + <rect state="0"><color red="0.3" green="0.3" blue="0.3" /><bounds x="31" y="07" width="07" height="25" /></rect> + <rect state="1"><color red="1.0" green="0.0" blue="0.0" /><bounds x="31" y="07" width="07" height="25" /></rect> + <disk> <color red="0.0" green="0.0" blue="0.0" /><bounds x="27" y="40" width="15" height="15" /></disk> + </element> + <element name="Switch_Saucer" defstate="0"> + <disk state="9"><color red="1.0" green="0.8" blue="0.5" /><bounds x="00" y="00" width="70" height="70" /></disk> + <disk state="0"><color red="1.0" green="1.0" blue="1.0" /><bounds x="30" y="43" width="09" height="09" /></disk> + <disk state="1"><color red="0.0" green="0.0" blue="0.0" /><bounds x="30" y="43" width="09" height="09" /></disk> + </element> + + + <element name="Coil_Post_Up" defstate="0"> + <disk state="1"><color red="1.0" green="0.0" blue="0.0" /><bounds x="00" y="00" width="21" height="21" /></disk> + </element> + <element name="Solenoid_Post_Down" defstate="0"> + <disk state="9"><color red="1.00" green="0.00" blue="0.00" /><bounds x="00" y="00" width="21" height="21" /></disk> + <disk state="1"><color red="0.50" green="0.10" blue="0.00" /><bounds x="01" y="01" width="19" height="19" /></disk> + <disk state="1"><color red="0.15" green="0.06" blue="0.00" /><bounds x="02" y="02" width="17" height="17" /></disk> + <rect state="1"><color red="0.50" green="0.10" blue="0.00" /><bounds x="10" y="02" width="01" height="17" /></rect> + <rect state="1"><color red="0.50" green="0.10" blue="0.00" /><bounds x="02" y="10" width="17" height="01" /></rect> + <disk state="1"><color red="1.00" green="0.00" blue="0.00" /><bounds x="08" y="08" width="06" height="06" /></disk> + </element> + <element name="Lamp_Post" defstate="0"> + <disk state="9"><color red="1.00" green="0.00" blue="0.00" /><bounds x="00" y="00" width="21" height="21" /></disk> + <disk ><color red="0.50" green="0.10" blue="0.00" /><bounds x="01" y="01" width="19" height="19" /></disk> + <disk state="0"><color red="0.15" green="0.06" blue="0.00" /><bounds x="02" y="02" width="17" height="17" /></disk> + <disk state="1"><color red="0.80" green="0.20" blue="0.00" /><bounds x="02" y="02" width="17" height="17" /></disk> + <rect ><color red="0.50" green="0.10" blue="0.00" /><bounds x="10" y="02" width="01" height="17" /></rect> + <rect ><color red="0.50" green="0.10" blue="0.00" /><bounds x="02" y="10" width="17" height="01" /></rect> + </element> + + +<!-- Line colours --> + + <element name="Draw_White" defstate="1"> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds left="0" top="0" right="1" bottom="1" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds left="0" top="0" right="1" bottom="1" /></rect> + </element> + <element name="Draw_Red" defstate="1"> + <rect state="1"><color red="1.00" green="0.00" blue="0.00" /><bounds left="0" top="0" right="1" bottom="1" /></rect> + <rect state="0"><color red="0.15" green="0.00" blue="0.00" /><bounds left="0" top="0" right="1" bottom="1" /></rect> + </element> + <element name="Draw_Amber" defstate="1"> + <rect state="1"><color red="1.00" green="0.40" blue="0.00" /><bounds left="0" top="0" right="1" bottom="1" /></rect> + <rect state="0"><color red="0.15" green="0.06" blue="0.00" /><bounds left="0" top="0" right="1" bottom="1" /></rect> + </element> + + <element name="Canvas"> + <rect> + <color red="0.0" green="0.0" blue="0.0" /> + <bounds left="0" top="0" right="1" bottom="1" /> + </rect> + </element> + + + + + + <view name="PowerPlay Playfield"> + + <!-- Background --> + <backdrop element="Canvas"><bounds x="000" y="000" width="640" height="480" /></backdrop> + + <bezel element="Draw_White"><bounds x="000" y="000" width="640" height="001" /></bezel> + <bezel element="Draw_White"><bounds x="000" y="000" width="001" height="480" /></bezel> + <bezel element="Draw_White"><bounds x="640" y="000" width="001" height="480" /></bezel> + <bezel element="Draw_White"><bounds x="000" y="480" width="640" height="001" /></bezel> + <bezel element="Draw_White"><bounds x="320" y="000" width="001" height="480" /></bezel> + <bezel element="Draw_White"><bounds x="320" y="320" width="320" height="001" /></bezel> + <!-- <bezel element="Draw_White"><bounds x="159" y="000" width="001" height="480" /></bezel> --> + + <bezel element="Title_PowerPlay"><bounds x="430" y="18" width="105" height="30" /></bezel> + + + <!-- Backbox --> + + <!-- MPU Board Power On Self Test LED --> + <bezel element="Text_MPU_LED"> <bounds x="609" y="342" width="30" height="10" /></bezel> + <bezel name="led0" element="LED_Green"><bounds x="618" y="328" width="10" height="10" /></bezel> + + <!-- MPU Board Activity Switch --> + <bezel element="Text_Activity"> <bounds x="540" y="342" width="50" height="10" /></bezel> + <bezel element="Switch_Push-Button" inputtag="TEST" inputmask="0x02"><bounds x="550" y="331" width="20" height="10" /></bezel> + <bezel element="Key_0"> <bounds x="571" y="330" width="10" height="10" /></bezel> + + + <!-- Player 1 Score --> + <bezel name="lamp14" element="Lamp_P1"><bounds x="330" y="55" width="15" height="15" /></bezel> <!-- Backbox ~ 1st Player Up --> + <bezel name="digit17" element="Digit"><bounds x="360" y="55" width="10" height="15" /></bezel> + <bezel name="digit16" element="Digit"><bounds x="374" y="55" width="10" height="15" /></bezel> + <bezel name="digit15" element="Digit"><bounds x="388" y="55" width="10" height="15" /></bezel> + <bezel name="digit14" element="Digit"><bounds x="402" y="55" width="10" height="15" /></bezel> + <bezel name="digit13" element="Digit"><bounds x="416" y="55" width="10" height="15" /></bezel> + <bezel name="digit12" element="Digit"><bounds x="430" y="55" width="10" height="15" /></bezel> + <bezel name="digit11" element="Digit"><bounds x="444" y="55" width="10" height="15" /></bezel> + + <!-- Player 2 Score --> + <bezel name="lamp29" element="Lamp_P2"><bounds x="615" y="55" width="15" height="15" /></bezel> <!-- Backbox ~ 2nd Player Up --> + <bezel name="digit27" element="Digit"><bounds x="506" y="55" width="10" height="15" /></bezel> + <bezel name="digit26" element="Digit"><bounds x="520" y="55" width="10" height="15" /></bezel> + <bezel name="digit25" element="Digit"><bounds x="534" y="55" width="10" height="15" /></bezel> + <bezel name="digit24" element="Digit"><bounds x="548" y="55" width="10" height="15" /></bezel> + <bezel name="digit23" element="Digit"><bounds x="562" y="55" width="10" height="15" /></bezel> + <bezel name="digit22" element="Digit"><bounds x="576" y="55" width="10" height="15" /></bezel> + <bezel name="digit21" element="Digit"><bounds x="590" y="55" width="10" height="15" /></bezel> + + <!-- Player 3 Score --> + <bezel name="lamp44" element="Lamp_P3"><bounds x="330" y="250" width="15" height="15" /></bezel> <!-- Backbox ~ 3rd Player Up --> + <bezel name="digit37" element="Digit"><bounds x="360" y="250" width="10" height="15" /></bezel> + <bezel name="digit36" element="Digit"><bounds x="374" y="250" width="10" height="15" /></bezel> + <bezel name="digit35" element="Digit"><bounds x="388" y="250" width="10" height="15" /></bezel> + <bezel name="digit34" element="Digit"><bounds x="402" y="250" width="10" height="15" /></bezel> + <bezel name="digit33" element="Digit"><bounds x="416" y="250" width="10" height="15" /></bezel> + <bezel name="digit32" element="Digit"><bounds x="430" y="250" width="10" height="15" /></bezel> + <bezel name="digit31" element="Digit"><bounds x="444" y="250" width="10" height="15" /></bezel> + + <!-- Player 4 Score --> + <bezel name="lamp59" element="Lamp_P4"><bounds x="615" y="250" width="15" height="15" /></bezel> <!-- Backbox ~ 4th Player Up --> + <bezel name="digit47" element="Digit"><bounds x="506" y="250" width="10" height="15" /></bezel> + <bezel name="digit46" element="Digit"><bounds x="520" y="250" width="10" height="15" /></bezel> + <bezel name="digit45" element="Digit"><bounds x="534" y="250" width="10" height="15" /></bezel> + <bezel name="digit44" element="Digit"><bounds x="548" y="250" width="10" height="15" /></bezel> + <bezel name="digit43" element="Digit"><bounds x="562" y="250" width="10" height="15" /></bezel> + <bezel name="digit42" element="Digit"><bounds x="576" y="250" width="10" height="15" /></bezel> + <bezel name="digit41" element="Digit"><bounds x="590" y="250" width="10" height="15" /></bezel> + + <!-- Credits and Ball In Play / Match --> + <bezel element="Text_Credit"><bounds x="542" y="142" width="48" height="8" /></bezel> + <bezel name="lamp12" element="Ball_In_Play"><bounds x="586" y="105" width="50" height="11" /></bezel> <!-- Backbox ~ Ball In Play --> + <bezel name="lamp25" element="Match"><bounds x="596" y="152" width="25" height="11" /></bezel> <!-- Backbox ~ Match --> + <bezel name="digit55" element="Digit"><bounds x="554" y="125" width="10" height="15" /></bezel> + <bezel name="digit54" element="Digit"><bounds x="568" y="125" width="10" height="15" /></bezel> + <bezel name="digit52" element="Digit"><bounds x="596" y="125" width="10" height="15" /></bezel> + <bezel name="digit51" element="Digit"><bounds x="610" y="125" width="10" height="15" /></bezel> + + <bezel name="lamp10" element="Shoot_Again"><bounds x="420" y="295" width="60" height="19" /></bezel> <!-- Backbox ~ Same Player Shoots Again --> + <bezel name="lamp13" element="Lamp_1P"><bounds x="345" y="297" width="15" height="15" /></bezel> <!-- Backbox ~ 1 Player Game --> + <bezel name="lamp28" element="Lamp_2P"><bounds x="360" y="297" width="15" height="15" /></bezel> <!-- Backbox ~ 2 Player Game --> + <bezel name="lamp43" element="Lamp_3P"><bounds x="375" y="297" width="15" height="15" /></bezel> <!-- Backbox ~ 3 Player Game --> + <bezel name="lamp58" element="Lamp_4P"><bounds x="390" y="297" width="15" height="15" /></bezel> <!-- Backbox ~ 4 Player Game --> + <bezel name="lamp27" element="High_Score_To_Date"><bounds x="438" y="6" width="90" height="11" /></bezel> <!-- Backbox ~ High Score To Date --> + <bezel name="lamp42" element="Game_Over"><bounds x="580" y="300" width="45" height="11" /></bezel> <!-- Backbox ~ Game Over --> + <bezel name="lamp57" element="Tilt"><bounds x="480" y="297" width="50" height="16" /></bezel> <!-- Backbox ~ Tilt --> + + + + <bezel element="Text_Lamps"><bounds x="410" y="360" width="60" height="11" /></bezel> + <bezel element="Text_15"><bounds x="552" y="373" width="30" height="11" /></bezel> + <bezel element="Text_30"><bounds x="552" y="388" width="30" height="11" /></bezel> + <bezel element="Text_45"><bounds x="552" y="403" width="30" height="11" /></bezel> + <bezel element="Text_60"><bounds x="552" y="418" width="30" height="11" /></bezel> + + <!-- Lamps controlled by U1 on Lamp Driver Board --> + <bezel name="lamp0" element="Lamp_White"><bounds x="330" y="375" width="8" height="8" /></bezel> + <bezel name="lamp1" element="Lamp_White"><bounds x="345" y="375" width="8" height="8" /></bezel> + <bezel name="lamp2" element="Lamp_White"><bounds x="360" y="375" width="8" height="8" /></bezel> + <bezel name="lamp3" element="Lamp_White"><bounds x="375" y="375" width="8" height="8" /></bezel> + <bezel name="lamp4" element="Lamp_White"><bounds x="390" y="375" width="8" height="8" /></bezel> + <bezel name="lamp5" element="Lamp_White"><bounds x="405" y="375" width="8" height="8" /></bezel> + <bezel name="lamp6" element="Lamp_White"><bounds x="420" y="375" width="8" height="8" /></bezel> + <bezel name="lamp7" element="Lamp_White"><bounds x="435" y="375" width="8" height="8" /></bezel> + <bezel name="lamp8" element="Lamp_White"><bounds x="450" y="375" width="8" height="8" /></bezel> + <bezel name="lamp9" element="Lamp_White"><bounds x="465" y="375" width="8" height="8" /></bezel> + <bezel name="lamp10" element="Lamp_White"><bounds x="480" y="375" width="8" height="8" /></bezel> + <bezel name="lamp11" element="Lamp_White"><bounds x="495" y="375" width="8" height="8" /></bezel> + <bezel name="lamp12" element="Lamp_White"><bounds x="510" y="375" width="8" height="8" /></bezel> + <bezel name="lamp13" element="Lamp_White"><bounds x="525" y="375" width="8" height="8" /></bezel> + <bezel name="lamp14" element="Lamp_White"><bounds x="540" y="375" width="8" height="8" /></bezel> + + <!-- Lamps controlled by U2 on Lamp Driver Board --> + <bezel name="lamp15" element="Lamp_White"><bounds x="330" y="390" width="8" height="8" /></bezel> + <bezel name="lamp16" element="Lamp_White"><bounds x="345" y="390" width="8" height="8" /></bezel> + <bezel name="lamp17" element="Lamp_White"><bounds x="360" y="390" width="8" height="8" /></bezel> + <bezel name="lamp18" element="Lamp_White"><bounds x="375" y="390" width="8" height="8" /></bezel> + <bezel name="lamp19" element="Lamp_White"><bounds x="390" y="390" width="8" height="8" /></bezel> + <bezel name="lamp20" element="Lamp_White"><bounds x="405" y="390" width="8" height="8" /></bezel> + <bezel name="lamp21" element="Lamp_White"><bounds x="420" y="390" width="8" height="8" /></bezel> + <bezel name="lamp22" element="Lamp_White"><bounds x="435" y="390" width="8" height="8" /></bezel> + <bezel name="lamp23" element="Lamp_White"><bounds x="450" y="390" width="8" height="8" /></bezel> + <bezel name="lamp24" element="Lamp_White"><bounds x="465" y="390" width="8" height="8" /></bezel> + <bezel name="lamp25" element="Lamp_White"><bounds x="480" y="390" width="8" height="8" /></bezel> + <bezel name="lamp26" element="Lamp_White"><bounds x="495" y="390" width="8" height="8" /></bezel> + <bezel name="lamp27" element="Lamp_White"><bounds x="510" y="390" width="8" height="8" /></bezel> + <bezel name="lamp28" element="Lamp_White"><bounds x="525" y="390" width="8" height="8" /></bezel> + <bezel name="lamp29" element="Lamp_White"><bounds x="540" y="390" width="8" height="8" /></bezel> + + <!-- Lamps controlled by U3 on Lamp Driver Board --> + <bezel name="lamp30" element="Lamp_White"><bounds x="330" y="405" width="8" height="8" /></bezel> + <bezel name="lamp31" element="Lamp_White"><bounds x="345" y="405" width="8" height="8" /></bezel> + <bezel name="lamp32" element="Lamp_White"><bounds x="360" y="405" width="8" height="8" /></bezel> + <bezel name="lamp33" element="Lamp_White"><bounds x="375" y="405" width="8" height="8" /></bezel> + <bezel name="lamp34" element="Lamp_White"><bounds x="390" y="405" width="8" height="8" /></bezel> + <bezel name="lamp35" element="Lamp_White"><bounds x="405" y="405" width="8" height="8" /></bezel> + <bezel name="lamp36" element="Lamp_White"><bounds x="420" y="405" width="8" height="8" /></bezel> + <bezel name="lamp37" element="Lamp_White"><bounds x="435" y="405" width="8" height="8" /></bezel> + <bezel name="lamp38" element="Lamp_White"><bounds x="450" y="405" width="8" height="8" /></bezel> + <bezel name="lamp39" element="Lamp_White"><bounds x="465" y="405" width="8" height="8" /></bezel> + <bezel name="lamp40" element="Lamp_White"><bounds x="480" y="405" width="8" height="8" /></bezel> + <bezel name="lamp41" element="Lamp_White"><bounds x="495" y="405" width="8" height="8" /></bezel> + <bezel name="lamp42" element="Lamp_White"><bounds x="510" y="405" width="8" height="8" /></bezel> + <bezel name="lamp43" element="Lamp_White"><bounds x="525" y="405" width="8" height="8" /></bezel> + <bezel name="lamp44" element="Lamp_White"><bounds x="540" y="405" width="8" height="8" /></bezel> + + <!-- Lamps controlled by U4 on Lamp Driver Board --> + <bezel name="lamp45" element="Lamp_White"><bounds x="330" y="420" width="8" height="8" /></bezel> + <bezel name="lamp46" element="Lamp_White"><bounds x="345" y="420" width="8" height="8" /></bezel> + <bezel name="lamp47" element="Lamp_White"><bounds x="360" y="420" width="8" height="8" /></bezel> + <bezel name="lamp48" element="Lamp_White"><bounds x="375" y="420" width="8" height="8" /></bezel> + <bezel name="lamp49" element="Lamp_White"><bounds x="390" y="420" width="8" height="8" /></bezel> + <bezel name="lamp50" element="Lamp_White"><bounds x="405" y="420" width="8" height="8" /></bezel> + <bezel name="lamp51" element="Lamp_White"><bounds x="420" y="420" width="8" height="8" /></bezel> + <bezel name="lamp52" element="Lamp_White"><bounds x="435" y="420" width="8" height="8" /></bezel> + <bezel name="lamp53" element="Lamp_White"><bounds x="450" y="420" width="8" height="8" /></bezel> + <bezel name="lamp54" element="Lamp_White"><bounds x="465" y="420" width="8" height="8" /></bezel> + <bezel name="lamp55" element="Lamp_White"><bounds x="480" y="420" width="8" height="8" /></bezel> + <bezel name="lamp56" element="Lamp_White"><bounds x="495" y="420" width="8" height="8" /></bezel> + <bezel name="lamp57" element="Lamp_White"><bounds x="510" y="420" width="8" height="8" /></bezel> + <bezel name="lamp58" element="Lamp_White"><bounds x="525" y="420" width="8" height="8" /></bezel> + <bezel name="lamp59" element="Lamp_White"><bounds x="540" y="420" width="8" height="8" /></bezel> + + + <bezel element="Text_Solenoids"><bounds x="382" y="437" width="100" height="11" /></bezel> + <bezel name="solenoid0" element="Solenoid_PullDown"><bounds x="330" y="452" width="9" height="19" /></bezel> + <bezel name="solenoid1" element="Solenoid_PullDown"><bounds x="345" y="452" width="9" height="19" /></bezel> + <bezel name="solenoid2" element="Solenoid_PullDown"><bounds x="360" y="452" width="9" height="19" /></bezel> + <bezel name="solenoid3" element="Solenoid_PullDown"><bounds x="375" y="452" width="9" height="19" /></bezel> + <bezel name="solenoid4" element="Solenoid_PullDown"><bounds x="390" y="452" width="9" height="19" /></bezel> + <bezel name="solenoid5" element="Solenoid_PullDown"><bounds x="405" y="452" width="9" height="19" /></bezel> + <bezel name="solenoid6" element="Solenoid_PullDown"><bounds x="420" y="452" width="9" height="19" /></bezel> + <bezel name="solenoid7" element="Solenoid_PullDown"><bounds x="435" y="452" width="9" height="19" /></bezel> + <bezel name="solenoid8" element="Solenoid_PullDown"><bounds x="450" y="452" width="9" height="19" /></bezel> + <bezel name="solenoid9" element="Solenoid_PullDown"><bounds x="465" y="452" width="9" height="19" /></bezel> + <bezel name="solenoid10" element="Solenoid_PullDown"><bounds x="480" y="452" width="9" height="19" /></bezel> + <bezel name="solenoid11" element="Solenoid_PullDown"><bounds x="495" y="452" width="9" height="19" /></bezel> + <bezel name="solenoid12" element="Solenoid_PullDown"><bounds x="510" y="452" width="9" height="19" /></bezel> + <bezel name="solenoid13" element="Solenoid_PullDown"><bounds x="525" y="452" width="9" height="19" /></bezel> + <bezel name="solenoid14" element="Solenoid_PullDown"><bounds x="540" y="452" width="9" height="19" /></bezel> + + <bezel element="Text_Coils"><bounds x="572" y="437" width="50" height="11" /></bezel> + <bezel name="solenoid16" element="Coil_PullDown"><bounds x="570" y="459" width="09" height="12" /></bezel> + <bezel name="solenoid17" element="Coil_PullDown"><bounds x="585" y="459" width="09" height="12" /></bezel> + <bezel name="solenoid18" element="Coil_PullDown"><bounds x="600" y="459" width="09" height="12" /></bezel> + <bezel name="solenoid19" element="Coil_PullDown"><bounds x="615" y="459" width="09" height="12" /></bezel> + + + + <!-- Cabinet Switches --> + <bezel element="Text_Service"> <bounds x="485" y="342" width="50" height="10" /></bezel> + <bezel element="Switch_Push-Button" inputtag="TEST" inputmask="0x01"><bounds x="495" y="331" width="20" height="10" /></bezel> + <bezel element="Key_9"> <bounds x="516" y="330" width="10" height="10" /></bezel> + + <bezel element="Text_Slam"> <bounds x="430" y="342" width="50" height="10" /></bezel> + <bezel element="Switch_SlamTilt" inputtag="X1" inputmask="0x80"><bounds x="434" y="331" width="25" height="08" /></bezel> + <bezel element="Key_Equals"> <bounds x="461" y="330" width="10" height="10" /></bezel> + + <bezel element="Text_Tilt"> <bounds x="380" y="342" width="50" height="10" /></bezel> + <bezel element="Switch_Tilt" inputtag="X0" inputmask="0x40"><bounds x="390" y="324" width="17" height="17" /></bezel> + <bezel element="Key_T"> <bounds x="411" y="330" width="10" height="10" /></bezel> + + + <!-- Misc Solenoids --> + <bezel name="solenoid5" element="Solenoid_Knocker"><bounds x="336" y="321" width="09" height="22" /></bezel> + <bezel element="Text_Knocker"> <!-- Knocker --> <bounds x="322" y="342" width="40" height="10" /></bezel> + + + <!-- Misc Lamps --> + <bezel name="lamp55" element="Credit_Indicator"><bounds x="23" y="456" width="70" height="21" /></bezel><!-- Credit Indicator --> + <bezel name="lamp40" element="Lamp_Amber"><bounds x="100" y="330" width="13" height="13" /></bezel> <!-- Extra Ball --> + <bezel name="lamp56" element="Lamp_Red"> <bounds x="009" y="318" width="09" height="09" /></bezel> <!-- Special Outlane Left --> + <bezel name="lamp41" element="Lamp_Red"> <bounds x="301" y="318" width="09" height="09" /></bezel> <!-- Special Outlane Right --> + <!-- Bonus End of Ball Lamps --> + <bezel name="lamp0" element="Lamp_White_1k"> <bounds x="126" y="298" width="09" height="09" /></bezel> <!-- Bonus 1000 --> + <bezel name="lamp15" element="Lamp_White_2k"> <bounds x="133" y="316" width="09" height="09" /></bezel> <!-- Bonus 2000 --> + <bezel name="lamp30" element="Lamp_White_3k"> <bounds x="140" y="334" width="09" height="09" /></bezel> <!-- Bonus 3000 --> + <bezel name="lamp45" element="Lamp_White_4k"> <bounds x="148" y="352" width="09" height="09" /></bezel> <!-- Bonus 4000 --> + <bezel name="lamp1" element="Lamp_White_5k"> <bounds x="155" y="370" width="09" height="09" /></bezel> <!-- Bonus 5000 --> + <bezel name="lamp16" element="Lamp_White_6k"> <bounds x="162" y="352" width="09" height="09" /></bezel> <!-- Bonus 6000 --> + <bezel name="lamp31" element="Lamp_White_7k"> <bounds x="170" y="334" width="09" height="09" /></bezel> <!-- Bonus 7000 --> + <bezel name="lamp46" element="Lamp_White_8k"> <bounds x="177" y="316" width="09" height="09" /></bezel> <!-- Bonus 8000 --> + <bezel name="lamp2" element="Lamp_White_9k"> <bounds x="184" y="298" width="09" height="09" /></bezel> <!-- Bonus 9000 --> + <bezel name="lamp17" element="Lamp_White_10k"><bounds x="154" y="320" width="12" height="12" /></bezel> <!-- Bonus 10000 --> + <bezel name="lamp32" element="Lamp_White_20k"><bounds x="154" y="296" width="12" height="12" /></bezel> <!-- Bonus 20000 --> + <!-- Bonus Multiplier Lamps --> + <bezel name="lamp53" element="Lamp_2x"><bounds x="135" y="392" width="10" height="10" /></bezel> <!-- 2X Bonus --> + <bezel name="lamp38" element="Lamp_3x"><bounds x="155" y="390" width="10" height="10" /></bezel> <!-- 3X Bonus --> + <bezel name="lamp23" element="Lamp_5x"><bounds x="175" y="392" width="10" height="10" /></bezel> <!-- 5X Bonus --> + <!-- Drop Target Lamps --> + <bezel name="lamp4" element="Lamp_2x"> <bounds x="125" y="198" width="10" height="10" /></bezel> <!-- 2X Bonus Potential --> + <bezel name="lamp19" element="Lamp_3x"> <bounds x="140" y="198" width="10" height="10" /></bezel> <!-- 3X Bonus Potential --> + <bezel name="lamp34" element="Lamp_5x"> <bounds x="155" y="198" width="10" height="10" /></bezel> <!-- 5X Bonus Potential --> + <bezel name="lamp49" element="Lamp_Amber"><bounds x="170" y="198" width="10" height="10" /></bezel> <!-- Extra Ball Potential --> + <bezel name="lamp5" element="Lamp_Red"> <bounds x="185" y="198" width="10" height="10" /></bezel> <!-- Special Potential --> + <!-- Saucer Lamps --> + <bezel name="lamp6" element="Lamp_White_3k"> <bounds x="128" y="30" width="9" height="9" /></bezel> <!-- Upper 3000 --> + <bezel name="lamp21" element="Lamp_White_6k"> <bounds x="142" y="42" width="9" height="9" /></bezel> <!-- Upper 6000 --> + <bezel name="lamp36" element="Lamp_White_9k"> <bounds x="156" y="54" width="9" height="9" /></bezel> <!-- Upper 9000 --> + <bezel name="lamp51" element="Lamp_White_12k"><bounds x="170" y="42" width="9" height="9" /></bezel> <!-- Upper 12000 --> + <bezel name="lamp7" element="Lamp_White_15k"><bounds x="184" y="30" width="9" height="9" /></bezel> <!-- Upper 15000 --> + + + + <!-- Outhole --> + <bezel name="solenoid6" element="Solenoid_Outhole"> <bounds x="150" y="455" width="58" height="22" /></bezel> + <bezel element="Switch_RollOn_WireForm_Left" inputtag="X0" inputmask="0x80"><bounds x="163" y="453" width="20" height="16" /></bezel> + <bezel element="Key_BSpace"> <bounds x="185" y="455" width="15" height="14" /></bezel> + + + <!-- Pop Bumper Left --> + <bezel name="solenoid8" element="Solenoid_Bumper_Red_Star"> <bounds x="064" y="090" width="80" height="80" /></bezel> + <bezel element="Switch_Bumper_Red_Star" inputtag="X4" inputmask="0x80"><bounds x="064" y="090" width="80" height="80" /></bezel> + <bezel name="lamp39" element="Lamp_Bumper_Red_1000"> <bounds x="064" y="090" width="80" height="80" /></bezel> + <bezel element="Key_Z"> <bounds x="121" y="116" width="09" height="09" /></bezel> + + <!-- Pop Bumper Right --> + <bezel name="solenoid9" element="Solenoid_Bumper_Red_Star"> <bounds x="177" y="090" width="80" height="80" /></bezel> + <bezel element="Switch_Bumper_Red_Star" inputtag="X4" inputmask="0x40"><bounds x="177" y="090" width="80" height="80" /></bezel> + <bezel name="lamp39" element="Lamp_Bumper_Red_1000"> <bounds x="177" y="090" width="80" height="80" /></bezel> + <bezel element="Key_X"> <bounds x="188" y="116" width="09" height="09" /></bezel> + + <!-- Pop Bumper Middle --> + <bezel name="solenoid10" element="Solenoid_Bumper_Red_Star"> <bounds x="121" y="123" width="80" height="80" /></bezel> + <bezel element="Switch_Bumper_Red_Star" inputtag="X4" inputmask="0x20"><bounds x="121" y="123" width="80" height="80" /></bezel> + <bezel name="lamp54" element="Lamp_Bumper_Red_1000"> <bounds x="121" y="123" width="80" height="80" /></bezel> + <bezel element="Key_C"> <bounds x="156" y="128" width="09" height="09" /></bezel> + + + <!-- Slingshot Left --> + <bezel name="solenoid11" element="Solenoid_SlingShot_Left"> <bounds x="035" y="320" width="69" height="80" /></bezel> + <bezel element="Switch_Leaf_Vertical" inputtag="X4" inputmask="0x10"><bounds x="060" y="384" width="08" height="09" /></bezel> + <bezel element="Key_V"> <bounds x="060" y="375" width="09" height="09" /></bezel> + + <!-- Slingshot Right --> + <bezel name="solenoid13" element="Solenoid_SlingShot_Right"> <bounds x="221" y="320" width="69" height="80" /></bezel> + <bezel element="Switch_Leaf_Vertical" inputtag="X4" inputmask="0x08"><bounds x="257" y="384" width="08" height="09" /></bezel> + <bezel element="Key_B"> <bounds x="257" y="375" width="09" height="09" /></bezel> + + + <!-- Saucer --> + <bezel name="solenoid7" element="Solenoid_Saucer"> <bounds x="149" y="67" width="23" height="23" /></bezel> + <bezel element="Switch_Saucer" inputtag="X3" inputmask="0x80"><bounds x="149" y="67" width="23" height="23" /></bezel> + <bezel element="Key_Q"> <bounds x="156" y="91" width="09" height="09" /></bezel> + + + <!-- Drop Targets Leftside --> + <bezel name="solenoid12" element="Solenoid_DropTarget_Tall"> <bounds x="090" y="166" width="07" height="15" /></bezel> + <bezel element="DropTarget_Tall" inputtag="X2" inputmask="0x80"><bounds x="090" y="166" width="07" height="15" /></bezel> + <bezel element="Key_A"> <bounds x="098" y="169" width="09" height="09" /></bezel> + <bezel name="solenoid12" element="Solenoid_DropTarget_Tall"> <bounds x="084" y="181" width="07" height="15" /></bezel> + <bezel element="DropTarget_Tall" inputtag="X2" inputmask="0x40"><bounds x="084" y="181" width="07" height="15" /></bezel> + <bezel element="Key_S"> <bounds x="092" y="184" width="09" height="09" /></bezel> + <bezel name="solenoid12" element="Solenoid_DropTarget_Tall"> <bounds x="078" y="196" width="07" height="15" /></bezel> + <bezel element="DropTarget_Tall" inputtag="X2" inputmask="0x20"><bounds x="078" y="196" width="07" height="15" /></bezel> + <bezel element="Key_D"> <bounds x="086" y="199" width="09" height="09" /></bezel> + <bezel name="solenoid12" element="Solenoid_DropTarget_Tall"> <bounds x="072" y="211" width="07" height="15" /></bezel> + <bezel element="DropTarget_Tall" inputtag="X2" inputmask="0x10"><bounds x="072" y="211" width="07" height="15" /></bezel> + <bezel element="Key_F"> <bounds x="080" y="214" width="09" height="09" /></bezel> + + <!-- Drop Targets Rightside --> + <bezel name="solenoid14" element="Solenoid_DropTarget_Tall"> <bounds x="222" y="166" width="07" height="15" /></bezel> + <bezel element="DropTarget_Tall" inputtag="X2" inputmask="0x08"><bounds x="222" y="166" width="07" height="15" /></bezel> + <bezel element="Key_G"> <bounds x="214" y="169" width="09" height="09" /></bezel> + <bezel name="solenoid14" element="Solenoid_DropTarget_Tall"> <bounds x="228" y="181" width="07" height="15" /></bezel> + <bezel element="DropTarget_Tall" inputtag="X2" inputmask="0x04"><bounds x="228" y="181" width="07" height="15" /></bezel> + <bezel element="Key_H"> <bounds x="220" y="184" width="09" height="09" /></bezel> + <bezel name="solenoid14" element="Solenoid_DropTarget_Tall"> <bounds x="234" y="196" width="07" height="15" /></bezel> + <bezel element="DropTarget_Tall" inputtag="X2" inputmask="0x02"><bounds x="234" y="196" width="07" height="15" /></bezel> + <bezel element="Key_J"> <bounds x="226" y="199" width="09" height="09" /></bezel> + <bezel name="solenoid14" element="Solenoid_DropTarget_Tall"> <bounds x="240" y="211" width="07" height="15" /></bezel> + <bezel element="DropTarget_Tall" inputtag="X2" inputmask="0x01"><bounds x="240" y="211" width="07" height="15" /></bezel> + <bezel element="Key_K"> <bounds x="232" y="214" width="09" height="09" /></bezel> + + <!-- Drop Target Area Rebound switches --> + <bezel element="Switch_Leaf_Vertical" inputtag="X0" inputmask="0x04"><bounds x="249" y="188" width="08" height="09" /></bezel> + <bezel element="Key_OBrkt"> <bounds x="247" y="174" width="10" height="10" /></bezel> + <bezel element="Switch_Leaf_Vertical" inputtag="X0" inputmask="0x04"><bounds x="062" y="188" width="08" height="09" /></bezel> + <bezel element="Key_OBrkt"> <bounds x="060" y="174" width="10" height="10" /></bezel> + + + <!-- Upper Rebound switch --> + <bezel element="Switch_Leaf_Vertical" inputtag="X0" inputmask="0x02"><bounds x="259" y="42" width="08" height="09" /></bezel> + <bezel element="Key_FSlash"> <bounds x="257" y="28" width="10" height="10" /></bezel> + + + <!-- Rollover Buttons Left Alley switches --> + <bezel name="lamp48" element="Lamp_RollOver_Button"> <!-- Upper --> <bounds x="17" y="105" width="15" height="15" /></bezel> + <bezel element="Switch_RollOver_Button" inputtag="X3" inputmask="0x10"><bounds x="07" y="099" width="35" height="35" /></bezel> + <bezel element="Key_R"> <bounds x="33" y="109" width="09" height="09" /></bezel> + <bezel name="lamp48" element="Lamp_RollOver_Button"> <!-- Middle --> <bounds x="12" y="135" width="15" height="15" /></bezel> + <bezel element="Switch_RollOver_Button" inputtag="X4" inputmask="0x02"><bounds x="02" y="129" width="35" height="35" /></bezel> + <bezel element="Key_M"> <bounds x="28" y="139" width="09" height="09" /></bezel> + <bezel name="lamp33" element="Lamp_RollOver_Button"> <!-- Lower --> <bounds x="12" y="165" width="15" height="15" /></bezel> + <bezel element="Switch_RollOver_Button" inputtag="X0" inputmask="0x08"><bounds x="02" y="159" width="35" height="35" /></bezel> + <bezel element="Key_CBrkt"> <bounds x="28" y="168" width="10" height="10" /></bezel> + + + <!-- Rollover Buttons Right Alley --> + <bezel name="lamp18" element="Lamp_RollOver_Button"> <!-- Upper --> <bounds x="290" y="105" width="15" height="15" /></bezel> + <bezel element="Switch_RollOver_Button" inputtag="X3" inputmask="0x20"><bounds x="280" y="099" width="35" height="35" /></bezel> + <bezel element="Key_E"> <bounds x="280" y="109" width="09" height="09" /></bezel> + <bezel name="lamp18" element="Lamp_RollOver_Button"> <!-- Middle --> <bounds x="295" y="135" width="15" height="15" /></bezel> + <bezel element="Switch_RollOver_Button" inputtag="X4" inputmask="0x04"><bounds x="285" y="129" width="35" height="35" /></bezel> + <bezel element="Key_N"> <bounds x="285" y="139" width="09" height="09" /></bezel> + <bezel name="lamp3" element="Lamp_RollOver_Button"> <!-- Lower --> <bounds x="295" y="165" width="15" height="15" /></bezel> + <bezel element="Switch_RollOver_Button" inputtag="X0" inputmask="0x10"><bounds x="285" y="159" width="35" height="35" /></bezel> + <bezel element="Key_BSlash"> <bounds x="285" y="169" width="10" height="10" /></bezel> + + + <!-- Rollover Button Centre switch --> + <bezel element="Lamp_RollOver_Button_On"> <bounds x="153" y="228" width="15" height="15" /></bezel> + <bezel element="Switch_RollOver_Button" inputtag="X3" inputmask="0x02"><bounds x="143" y="222" width="35" height="35" /></bezel> + <bezel element="Key_I"> <bounds x="156" y="245" width="09" height="09" /></bezel> + + + <!-- Post Between Flippers --> + <bezel name="lamp24" element="Lamp_Post"><bounds x="148" y="420" width="22" height="22" /></bezel> + + <!-- Post Up and Advance - Upper Rollover button and Middle Target switch --> + <bezel name="solenoid16" element="Coil_Post_Up"> <bounds x="148" y="420" width="22" height="22" /></bezel> + <bezel element="Lamp_RollOver_Button_On"> <bounds x="153" y="28" width="15" height="15" /></bezel> + <bezel element="Switch_RollOver_Button" inputtag="X4" inputmask="0x01"><bounds x="143" y="22" width="35" height="35" /></bezel> + <bezel element="Key_Comma"> <bounds x="153" y="12" width="14" height="14" /></bezel> + <bezel element="Switch_Target_Red_Forward" inputtag="X4" inputmask="0x01"><bounds x="153.5" y="172" width="12" height="08" /></bezel> + <bezel element="Key_Comma"> <bounds x="153" y="176" width="14" height="14" /></bezel> + + <!-- Post Down - Middle Left and Middle Right Rollover Button switches --> + <bezel name="solenoid0" element="Solenoid_Post_Down"> <bounds x="148" y="420" width="22" height="22" /></bezel> + <bezel element="Lamp_RollOver_Button_On"> <bounds x="126" y="254" width="15" height="15" /></bezel> + <bezel element="Switch_RollOver_Button" inputtag="X3" inputmask="0x01"><bounds x="116" y="248" width="35" height="35" /></bezel> + <bezel element="Key_O"> <bounds x="129" y="271" width="09" height="09" /></bezel> + <bezel element="Lamp_RollOver_Button_On"> <bounds x="180" y="254" width="15" height="15" /></bezel> + <bezel element="Switch_RollOver_Button" inputtag="X3" inputmask="0x01"><bounds x="170" y="248" width="35" height="35" /></bezel> + <bezel element="Key_O"> <bounds x="183" y="271" width="09" height="09" /></bezel> + + + <!-- Outlane switches / lamps --> + <bezel element="Switch_RollOver_WireForm_Vertical" inputtag="X3" inputmask="0x08"><bounds x="009" y="346" width="09" height="27" /></bezel> + <bezel element="Key_Y"> <bounds x="009" y="376" width="09" height="09" /></bezel> + <bezel element="Switch_RollOver_WireForm_Vertical" inputtag="X3" inputmask="0x04"><bounds x="301" y="346" width="09" height="27" /></bezel> + <bezel element="Key_U"> <bounds x="301" y="376" width="09" height="09" /></bezel> + + <!-- Flipper Return Lane switches --> + <bezel element="Switch_RollOver_WireForm_Vertical" inputtag="X0" inputmask="0x01"><bounds x="030" y="348" width="09" height="27" /></bezel> + <bezel element="Key_Dot"> <bounds x="028" y="374" width="14" height="14" /></bezel> + <bezel element="Switch_RollOver_WireForm_Vertical" inputtag="X0" inputmask="0x01"><bounds x="280" y="348" width="09" height="27" /></bezel> + <bezel element="Key_Dot"> <bounds x="278" y="374" width="14" height="14" /></bezel> + + </view> + +</mamelayout> diff --git a/src/mame/layout/by35.lay b/src/mame/layout/by35.lay index 5eb02bf924b..9a8a6398ab1 100644 --- a/src/mame/layout/by35.lay +++ b/src/mame/layout/by35.lay @@ -1,154 +1,1323 @@ -<!-- BY35 copied from by17.lay --> +<!-- Pinball Machine, Bally ~ Template -35 MPU board --> <!-- 2014-07-29: Initial version. [Robbbert] --> +<!-- 2015-August: Added Lamp states, Solenoid states, Switch Matrix and a kit of playfield objects. [Quench] --> + + +<!-- Any state="9" items are not displayed and are only used for object alignment --> <mamelayout version="2"> - <element name="digit" defstate="0"> - <led7seg> - <color red="1.0" green="0.75" blue="0.0" /> - </led7seg> + <element name="Title_Bally"> <text string="Bally"><color red="0.25" green="0.5" blue="1.0" /></text></element> + + <element name="Text_Playfield"><text string="See Playboy for a mockup Playfield layout"><color red="1.0" green="0.0" blue="1.0" /></text></element> + <element name="Text_Legend"> <text string="Consult game schematic for Switch, Lamp and Solenoid allocation"><color red="0.0" green="1.0" blue="0.0" /></text></element> + <element name="Text_Switch"> <text string="Switch Matrix"><color red="0.0" green="1.0" blue="1.0" /></text></element> + <element name="Text_Multiball"><text string="Some Multi-ball games require balls in all Outholes to complete startup"><color red="0.0" green="1.0" blue="0.0" /></text></element> + + + +<!-- Switches --> + + <element name="Switch_SlamTilt"> + <rect state="0"><color red="0.80" green="0.80" blue="0.80" /><bounds x="00" y="00" width="25" height="01" /></rect> + <rect state="0"><color red="0.80" green="0.80" blue="0.80" /><bounds x="00" y="08" width="13" height="01.5" /></rect> + <rect state="0"><color red="1.00" green="1.00" blue="0.00" /><bounds x="08" y="01" width="04" height="02" /></rect> + <rect state="0"><color red="1.00" green="1.00" blue="0.00" /><bounds x="08" y="06" width="04" height="02" /></rect> + + <rect state="0"><color red="0.70" green="0.70" blue="0.70" /><bounds x="19" y="01" width="06" height="04" /></rect> + <rect state="1"><color red="0.70" green="0.70" blue="0.70" /><bounds x="19" y="04" width="06" height="04" /></rect> + + <rect state="1"><color red="0.80" green="0.80" blue="0.80" /><bounds x="00" y="00" width="08" height="01" /></rect> + <rect state="1"><color red="0.80" green="0.80" blue="0.80" /><bounds x="08" y="01" width="08" height="01" /></rect> + <rect state="1"><color red="0.80" green="0.80" blue="0.80" /><bounds x="16" y="02" width="09" height="01" /></rect> + + + <rect state="1"><color red="0.80" green="0.80" blue="0.80" /><bounds x="00" y="08" width="13" height="01.5" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="0.00" /><bounds x="08" y="03" width="04" height="02" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="0.00" /><bounds x="08" y="06" width="04" height="02" /></rect> + </element> + + <element name="Switch_Tilt"> + <rect ><color red="0.80" green="0.80" blue="0.00" /><bounds x="00" y="00" width="17" height="17" /></rect> + <disk ><color red="0.00" green="0.00" blue="0.00" /><bounds x="01" y="01" width="15" height="15" /></disk> + <disk state="0"><color red="0.50" green="0.50" blue="0.50" /><bounds x="04" y="04" width="09" height="09" /></disk> + <disk state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="07" y="07" width="02" height="02" /></disk> + + <disk state="1"><color red="0.50" green="0.50" blue="0.50" /><bounds x="07" y="04" width="09" height="09" /></disk> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="11" y="07" width="02" height="02" /></disk> + </element> + + + <element name="Switch_Leaf_Vertical"> + <rect state="0"><color red="0.80" green="0.80" blue="0.80" /><bounds x="0" y="00" width="01" height="06" /></rect> + <rect state="0"><color red="0.80" green="0.80" blue="0.80" /><bounds x="8" y="00" width="01.5" height="06" /></rect> + <rect state="0"><color red="1.00" green="1.00" blue="0.00" /><bounds x="1" y="01" width="02" height="04" /></rect> + <rect state="0"><color red="1.00" green="1.00" blue="0.00" /><bounds x="6" y="01" width="02" height="04" /></rect> + + <rect state="1"><color red="0.80" green="0.80" blue="0.80" /><bounds x="1.5" y="00" width="01" height="06" /></rect> + <rect state="1"><color red="0.80" green="0.80" blue="0.80" /><bounds x="6.5" y="00" width="01" height="06" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="0.00" /><bounds x="2" y="01" width="02" height="04" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="0.00" /><bounds x="4.5" y="01" width="02" height="04" /></rect> + </element> + + <element name="Switch_RollOn_WireForm_Left"> + <text string=">" state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="8" y="0" width="11" height="11" /></text> + <rect state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="1" y="4" width="0.1" height="04" /></rect> + <rect state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="1" y="4" width="09" height="0.1" /></rect> + <rect state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="1" y="8" width="09" height="0.1" /></rect> + <rect state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="3" y="6" width="08" height="0.1" /></rect> + <text string=">" state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="8" y="0" width="11" height="11" /></text> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="1" y="4" width="0.1" height="04" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="1" y="4" width="09" height="0.1" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="1" y="8" width="09" height="0.1" /></rect> + </element> + + <element name="Switch_RollOn_WireForm_Down"> + <text string="/\" state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0" y="00" width="07" height="10" /></text> + <rect state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="1" y="17" width="04" height="0.1" /></rect> + <rect state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="1" y="09" width="0.1" height="09" /></rect> + <rect state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="5" y="09" width="0.1" height="09" /></rect> + <rect state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="3" y="07" width="0.1" height="08" /></rect> + <text string="/\" state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0" y="00" width="07" height="10" /></text> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="1" y="17" width="04" height="0.1" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="1" y="09" width="0.1" height="09" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="5" y="09" width="0.1" height="09" /></rect> + </element> + + <element name="Switch_RollOver_WireForm_Vertical"> + <text string="/\" state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0" y="00" width="07" height="10" /></text> + <text string="\/" state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0" y="17" width="07" height="10" /></text> + <rect state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="1" y="09" width="0.1" height="09" /></rect> + <rect state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="5" y="09" width="0.1" height="09" /></rect> + <rect state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="3" y="07" width="0.1" height="13" /></rect> + <text string="/\" state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0" y="00" width="07" height="10" /></text> + <text string="\/" state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0" y="17" width="07" height="10" /></text> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="1" y="09" width="0.1" height="09" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="5" y="09" width="0.1" height="09" /></rect> + </element> + + <element name="Switch_Target_Red_Forward" defstate="0"> + <rect ><color red="1.00" green="1.00" blue="1.00" /><bounds x="06" y="00" width="10" height="01" /></rect> + <rect ><color red="1.00" green="1.00" blue="1.00" /><bounds x="06" y="00" width="01" height="05" /></rect> + <rect ><color red="1.00" green="1.00" blue="1.00" /><bounds x="16" y="00" width="01" height="05" /></rect> + + <disk state="0"><color red="1.00" green="0.00" blue="0.00" /><bounds x="00" y="05" width="24" height="06" /></disk> + <disk state="1"><color red="1.00" green="0.00" blue="0.00" /><bounds x="00" y="02" width="24" height="06" /></disk> + </element> + + <element name="Target_White_Left" defstate="0"> + <rect ><color red="1.00" green="1.00" blue="1.00" /><bounds x="00" y="06" width="01" height="10" /></rect> + <rect ><color red="1.00" green="1.00" blue="1.00" /><bounds x="00" y="06" width="05" height="01" /></rect> + <rect ><color red="1.00" green="1.00" blue="1.00" /><bounds x="00" y="16" width="05" height="01" /></rect> + <disk state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="05" y="00" width="06" height="24" /></disk> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="02" y="00" width="06" height="24" /></disk> + </element> + + + <element name="Switch_RollOver_Button"> + <text string="*" state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="-10" y="-6" width="35" height="35" /></text> + <text string="*" state="1"><color red="0.00" green="0.00" blue="0.00" /><bounds x="-10" y="-6" width="35" height="35" /></text> + </element> + + <element name="Lamp_RollOver_Button" defstate="0"> + <disk state="0"><color red="0.15" green="0.04" blue="0.00" /><bounds x="0" y="0" width="15" height="15" /></disk> + <disk state="1"><color red="1.00" green="0.30" blue="0.00" /><bounds x="0" y="0" width="15" height="15" /></disk> + </element> + + <element name="Lamp_RollOver_Button_On"> + <disk><color red="1.00" green="0.30" blue="0.00" /><bounds x="0" y="0" width="15" height="15" /></disk> + </element> + + + <element name="Switch_Push-Button" defstate="0"> + <rect state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="07" y="04" width="16" height="01" /></rect> + <rect state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="12" y="00" width="01" height="04" /></rect> + <rect state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="17" y="00" width="01" height="04" /></rect> + <rect state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="12" y="00" width="05" height="01" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="07" y="08.5" width="16" height="01" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="12" y="04.5" width="01" height="04" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="17" y="04.5" width="01" height="04" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="12" y="04.5" width="05" height="01" /></rect> + <rect ><color red="1.00" green="1.00" blue="1.00" /><bounds x="00" y="12" width="09" height="01" /></rect> + <rect ><color red="1.00" green="1.00" blue="1.00" /><bounds x="21" y="12" width="09" height="01" /></rect> + <disk ><color red="1.00" green="1.00" blue="1.00" /><bounds x="07" y="10" width="06" height="06" /></disk> + <disk ><color red="1.00" green="1.00" blue="1.00" /><bounds x="18" y="10" width="06" height="06" /></disk> + </element> + + + + <element name="Key_Z"> <text string="Z"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_X"> <text string="X"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_C"> <text string="C"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_V"> <text string="V"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_B"> <text string="B"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_N"> <text string="N"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_M"> <text string="M"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_Comma"> <text string=","><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_Dot"> <text string="."><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_FSlash"><text string="/"><color red="1.00" green="0.66" blue="0.66" /></text></element> + + <element name="Key_A"> <text string="A"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_S"> <text string="S"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_D"> <text string="D"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_F"> <text string="F"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_G"> <text string="G"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_H"> <text string="H"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_J"> <text string="J"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_K"> <text string="K"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_L"> <text string="L"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_SColon"><text string=";"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_Quote"> <text string="'"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_Enter"> + <text string="<"><color red="1.00" green="0.66" blue="0.66" /><bounds x="00" y="00" width="07" height="10" /></text> + <text string="-"> <color red="1.00" green="0.66" blue="0.66" /><bounds x="00" y="00" width="07" height="10" /></text> + <text string="-"> <color red="1.00" green="0.66" blue="0.66" /><bounds x="02" y="00" width="07" height="10" /></text> + <text string="-"> <color red="1.00" green="0.66" blue="0.66" /><bounds x="04" y="00" width="07" height="10" /></text> + <text string="-"> <color red="1.00" green="0.66" blue="0.66" /><bounds x="06" y="00" width="07" height="10" /></text> + <disk > <color red="1.00" green="0.66" blue="0.66" /><bounds x="10" y="02" width="0.5" height="03" /></disk> + </element> + + <element name="Key_Q"> <text string="Q"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_W"> <text string="W"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_E"> <text string="E"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_R"> <text string="R"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_T"> <text string="T"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_Y"> <text string="Y"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_U"> <text string="U"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_I"> <text string="I"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_O"> <text string="O"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_P"> <text string="P"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_OBrkt"> <text string="["><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_CBrkt"> <text string="]"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_BSlash"><text string="\"><color red="1.00" green="0.66" blue="0.66" /></text></element> + + <element name="Key_1"> <text string="1"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_5"> <text string="5"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_6"> <text string="6"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_7"> <text string="7"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_9"> <text string="9"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_0"> <text string="0"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_BSpace"> + <text string="<"><color red="1.00" green="0.66" blue="0.66" /><bounds x="0" y="00" width="07" height="10" /></text> + <text string="-"> <color red="1.00" green="0.66" blue="0.66" /><bounds x="0" y="00" width="07" height="10" /></text> + <text string="-"> <color red="1.00" green="0.66" blue="0.66" /><bounds x="2" y="00" width="07" height="10" /></text> + <text string="-"> <color red="1.00" green="0.66" blue="0.66" /><bounds x="4" y="00" width="07" height="10" /></text> + <text string="-"> <color red="1.00" green="0.66" blue="0.66" /><bounds x="6" y="00" width="07" height="10" /></text> + </element> + <element name="Key_Equals"><text string="="><color red="1.00" green="0.66" blue="0.66" /></text></element> + + <element name="ST0"><text string="ST0"><color red="0.0" green="1.0" blue="1.0" /></text></element> + <element name="ST1"><text string="ST1"><color red="0.0" green="1.0" blue="1.0" /></text></element> + <element name="ST2"><text string="ST2"><color red="0.0" green="1.0" blue="1.0" /></text></element> + <element name="ST3"><text string="ST3"><color red="0.0" green="1.0" blue="1.0" /></text></element> + <element name="ST4"><text string="ST4"><color red="0.0" green="1.0" blue="1.0" /></text></element> + <element name="ST5"><text string="ST5"><color red="0.0" green="1.0" blue="1.0" /></text></element> + <element name="I0"> <text string="I0"> <color red="0.0" green="1.0" blue="1.0" /></text></element> + <element name="I1"> <text string="I1"> <color red="0.0" green="1.0" blue="1.0" /></text></element> + <element name="I2"> <text string="I2"> <color red="0.0" green="1.0" blue="1.0" /></text></element> + <element name="I3"> <text string="I3"> <color red="0.0" green="1.0" blue="1.0" /></text></element> + <element name="I4"> <text string="I4"> <color red="0.0" green="1.0" blue="1.0" /></text></element> + <element name="I5"> <text string="I5"> <color red="0.0" green="1.0" blue="1.0" /></text></element> + <element name="I6"> <text string="I6"> <color red="0.0" green="1.0" blue="1.0" /></text></element> + <element name="I7"> <text string="I7"> <color red="0.0" green="1.0" blue="1.0" /></text></element> + + + + + <element name="Solenoid_DropTarget_Tall" defstate="0"> + <rect state="1"><color red="1.00" green="0.00" blue="0.00" /><bounds x="00" y="00" width="07" height="15" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="01" y="01" width="04" height="12" /></rect> + </element> + <element name="DropTarget_Tall" defstate="0"> + <rect state="1"><color red="0.25" green="0.25" blue="0.25" /><bounds x="01" y="01" width="04" height="12" /></rect> + <rect state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="01" y="01" width="04" height="12" /></rect> + <rect state="9"><color red="0.00" green="1.00" blue="0.00" /><bounds x="00" y="00" width="07" height="15" /></rect> + </element> + + <element name="Solenoid_DropTarget_Wide" defstate="0"> + <rect state="1"><color red="1.00" green="0.00" blue="0.00" /><bounds x="00" y="00" width="15" height="07" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="01" y="01" width="12" height="04" /></rect> + </element> + <element name="DropTarget_Wide" defstate="0"> + <rect state="1"><color red="0.25" green="0.25" blue="0.25" /><bounds x="01" y="01" width="12" height="04" /></rect> + <rect state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="01" y="01" width="12" height="04" /></rect> + <rect state="9"><color red="0.00" green="1.00" blue="0.00" /><bounds x="00" y="00" width="15" height="07" /></rect> + </element> + + +<!-- Lamps --> + + <element name="Lamp_White" defstate="0"> + <disk state="0"><color red="0.15" green="0.15" blue="0.15" /></disk> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /></disk> + </element> + <element name="Lamp_Yellow" defstate="0"> + <disk state="0"><color red="0.15" green="0.15" blue="0.00" /></disk> + <disk state="1"><color red="1.00" green="1.00" blue="0.00" /></disk> + </element> + <element name="Lamp_Red" defstate="0"> <!-- Usually for Specials --> + <disk state="0"><color red="0.15" green="0.00" blue="0.00" /></disk> + <disk state="1"><color red="1.00" green="0.00" blue="0.00" /></disk> + </element> + <element name="Lamp_Amber" defstate="0"> <!-- Usually for Extra Ball--> + <disk state="0"><color red="0.15" green="0.06" blue="0.00" /></disk> + <disk state="1"><color red="1.00" green="0.40" blue="0.00" /></disk> + </element> + + + <element name="Lamp_P1"> + <rect><color red="0.10" green="0.10" blue="0.10" /></rect> + <text string="1" state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0" y="0" width="1" height="0.9" /></text> + <text string="1" state="0"><color red="0.25" green="0.25" blue="0.25" /><bounds x="0" y="0" width="1" height="0.9" /></text> + </element> + <element name="Lamp_P2"> + <rect><color red="0.10" green="0.10" blue="0.10" /></rect> + <text string="2" state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0" y="0" width="1" height="0.9" /></text> + <text string="2" state="0"><color red="0.25" green="0.25" blue="0.25" /><bounds x="0" y="0" width="1" height="0.9" /></text> + </element> + <element name="Lamp_P3"> + <rect><color red="0.10" green="0.10" blue="0.10" /></rect> + <text string="3" state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0.1" y="0" width="1" height="0.9" /></text> + <text string="3" state="0"><color red="0.25" green="0.25" blue="0.25" /><bounds x="0.1" y="0" width="1" height="0.9" /></text> + </element> + <element name="Lamp_P4"> + <rect><color red="0.10" green="0.10" blue="0.10" /></rect> + <text string="4" state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0" y="0" width="1" height="0.9" /></text> + <text string="4" state="0"><color red="0.25" green="0.25" blue="0.25" /><bounds x="0" y="0" width="1" height="0.9" /></text> + </element> + + <element name="Lamp_1P"> + <disk><color red="0.10" green="0.10" blue="0.10" /></disk> + <text string="1" state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0" y="0" width="1" height="0.9" /></text> + <text string="1" state="0"><color red="0.25" green="0.25" blue="0.25" /><bounds x="0" y="0" width="1" height="0.9" /></text> + </element> + <element name="Lamp_2P"> + <disk><color red="0.10" green="0.10" blue="0.10" /></disk> + <text string="2" state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0" y="0" width="1" height="0.9" /></text> + <text string="2" state="0"><color red="0.25" green="0.25" blue="0.25" /><bounds x="0" y="0" width="1" height="0.9" /></text> + </element> + <element name="Lamp_3P"> + <disk><color red="0.10" green="0.10" blue="0.10" /></disk> + <text string="3" state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0.1" y="0" width="1" height="0.9" /></text> + <text string="3" state="0"><color red="0.25" green="0.25" blue="0.25" /><bounds x="0.1" y="0" width="1" height="0.9" /></text> + </element> + <element name="Lamp_4P"> + <disk><color red="0.10" green="0.10" blue="0.10" /></disk> + <text string="4" state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0" y="0" width="1" height="0.9" /></text> + <text string="4" state="0"><color red="0.25" green="0.25" blue="0.25" /><bounds x="0" y="0" width="1" height="0.9" /></text> + </element> + + + <element name="Lamp_2x" defstate="0"> + <disk state="0"><color red="0.0" green="0.15" blue="0.0" /></disk> + <disk state="1"><color red="0.0" green="1.00" blue="0.0" /></disk> + <text string="2x"><color red="0.0" green="0.0" blue="0.0" /><bounds x="0" y="0.1" width="1" height="0.75" /></text> + </element> + <element name="Lamp_3x" defstate="0"> + <disk state="0"><color red="0.15" green="0.15" blue="0.0" /></disk> + <disk state="1"><color red="1.00" green="1.00" blue="0.0" /></disk> + <text string="3x"><color red="0.0" green="0.0" blue="0.0" /><bounds x="0" y="0.1" width="1" height="0.75" /></text> + </element> + <element name="Lamp_4x" defstate="0"> + <disk state="0"><color red="0.15" green="0.15" blue="0.0" /></disk> + <disk state="1"><color red="1.00" green="1.00" blue="0.0" /></disk> + <text string="4x"><color red="0.0" green="0.0" blue="0.0" /><bounds x="0" y="0.1" width="1" height="0.75" /></text> + </element> + <element name="Lamp_5x" defstate="0"> + <disk state="0"><color red="0.15" green="0.15" blue="0.15" /></disk> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /></disk> + <text string="5x"><color red="0.0" green="0.0" blue="0.0" /><bounds x="0" y="0.1" width="1" height="0.75" /></text> + </element> + + + <element name="Lamp_White_1k"> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /></disk> + <disk state="0"><color red="0.25" green="0.25" blue="0.25" /></disk> + <text string="1k"><color red="0.0" green="0.0" blue="0.0" /><bounds x="0" y="0.1" width="1" height="0.75" /></text> + </element> + <element name="Lamp_White_2k"> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /></disk> + <disk state="0"><color red="0.25" green="0.25" blue="0.25" /></disk> + <text string="2k"><color red="0.0" green="0.0" blue="0.0" /><bounds x="0" y="0.1" width="1" height="0.75" /></text> + </element> + <element name="Lamp_White_3k"> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /></disk> + <disk state="0"><color red="0.25" green="0.25" blue="0.25" /></disk> + <text string="3k"><color red="0.0" green="0.0" blue="0.0" /><bounds x="0" y="0.1" width="1" height="0.75" /></text> + </element> + <element name="Lamp_White_4k"> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /></disk> + <disk state="0"><color red="0.25" green="0.25" blue="0.25" /></disk> + <text string="4k"><color red="0.0" green="0.0" blue="0.0" /><bounds x="0" y="0.1" width="1" height="0.75" /></text> + </element> + <element name="Lamp_White_5k"> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /></disk> + <disk state="0"><color red="0.25" green="0.25" blue="0.25" /></disk> + <text string="5k"><color red="0.0" green="0.0" blue="0.0" /><bounds x="0" y="0.1" width="1" height="0.75" /></text> + </element> + <element name="Lamp_White_6k"> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /></disk> + <disk state="0"><color red="0.25" green="0.25" blue="0.25" /></disk> + <text string="6k"><color red="0.0" green="0.0" blue="0.0" /><bounds x="0" y="0.1" width="1" height="0.75" /></text> + </element> + <element name="Lamp_White_7k"> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /></disk> + <disk state="0"><color red="0.25" green="0.25" blue="0.25" /></disk> + <text string="7k"><color red="0.0" green="0.0" blue="0.0" /><bounds x="0" y="0.1" width="1" height="0.75" /></text> + </element> + <element name="Lamp_White_8k"> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /></disk> + <disk state="0"><color red="0.25" green="0.25" blue="0.25" /></disk> + <text string="8k"><color red="0.0" green="0.0" blue="0.0" /><bounds x="0" y="0.1" width="1" height="0.75" /></text> + </element> + <element name="Lamp_White_9k"> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /></disk> + <disk state="0"><color red="0.25" green="0.25" blue="0.25" /></disk> + <text string="9k"><color red="0.0" green="0.0" blue="0.0" /><bounds x="0" y="0.1" width="1" height="0.75" /></text> + </element> + <element name="Lamp_White_10k"> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /></disk> + <disk state="0"><color red="0.25" green="0.25" blue="0.25" /></disk> + <text string="10k"><color red="0.0" green="0.0" blue="0.0" /><bounds x="0.0" y="0.1" width="1.00" height="0.75" /></text> + </element> + <element name="Lamp_White_12k"> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0.0" y="0.0" width="1.10" height="1.00" /></disk> + <disk state="0"><color red="0.25" green="0.25" blue="0.25" /><bounds x="0.0" y="0.0" width="1.10" height="1.00" /></disk> + <text string="12k"><color red="0.0" green="0.0" blue="0.0" /><bounds x="0.1" y="0.1" width="1.00" height="0.75" /></text> + </element> + <element name="Lamp_White_15k"> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0.0" y="0.0" width="1.10" height="1.00" /></disk> + <disk state="0"><color red="0.25" green="0.25" blue="0.25" /><bounds x="0.0" y="0.0" width="1.10" height="1.00" /></disk> + <text string="15k"><color red="0.0" green="0.0" blue="0.0" /><bounds x="0.1" y="0.1" width="1.00" height="0.75" /></text> + </element> + <element name="Lamp_White_20k"> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0.0" y="0.0" width="1.10" height="1.00" /></disk> + <disk state="0"><color red="0.25" green="0.25" blue="0.25" /><bounds x="0.0" y="0.0" width="1.10" height="1.00" /></disk> + <text string="20k"><color red="0.0" green="0.0" blue="0.0" /><bounds x="0.1" y="0.1" width="1.00" height="0.75" /></text> + </element> + <element name="Lamp_White_25k"> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0.0" y="0.0" width="1.10" height="1.00" /></disk> + <disk state="0"><color red="0.25" green="0.25" blue="0.25" /><bounds x="0.0" y="0.0" width="1.10" height="1.00" /></disk> + <text string="25k"><color red="0.0" green="0.0" blue="0.0" /><bounds x="0.1" y="0.1" width="1.00" height="0.75" /></text> + </element> + <element name="Lamp_White_50k"> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0.0" y="0.0" width="1.10" height="1.00" /></disk> + <disk state="0"><color red="0.25" green="0.25" blue="0.25" /><bounds x="0.0" y="0.0" width="1.10" height="1.00" /></disk> + <text string="50k"><color red="0.0" green="0.0" blue="0.0" /><bounds x="0.1" y="0.1" width="1.00" height="0.75" /></text> + </element> + + + <element name="Lamp_White_1"> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /></disk> + <disk state="0"><color red="0.25" green="0.25" blue="0.25" /></disk> + <text string="1"><color red="0.0" green="0.0" blue="0.0" /><bounds x="0" y="0.1" width="1" height="0.75" /></text> + </element> + <element name="Lamp_White_2"> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /></disk> + <disk state="0"><color red="0.25" green="0.25" blue="0.25" /></disk> + <text string="2"><color red="0.0" green="0.0" blue="0.0" /><bounds x="0" y="0.1" width="1" height="0.75" /></text> + </element> + <element name="Lamp_White_3"> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /></disk> + <disk state="0"><color red="0.25" green="0.25" blue="0.25" /></disk> + <text string="3"><color red="0.0" green="0.0" blue="0.0" /><bounds x="0" y="0.1" width="1" height="0.75" /></text> + </element> + <element name="Lamp_White_4"> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /></disk> + <disk state="0"><color red="0.25" green="0.25" blue="0.25" /></disk> + <text string="4"><color red="0.0" green="0.0" blue="0.0" /><bounds x="0" y="0.1" width="1" height="0.75" /></text> + </element> + <element name="Lamp_White_5"> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /></disk> + <disk state="0"><color red="0.25" green="0.25" blue="0.25" /></disk> + <text string="5"><color red="0.0" green="0.0" blue="0.0" /><bounds x="0" y="0.1" width="1" height="0.75" /></text> + </element> + + <element name="Lamp_White_A"> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /></disk> + <disk state="0"><color red="0.25" green="0.25" blue="0.25" /></disk> + <text string="A"><color red="0.0" green="0.0" blue="0.0" /><bounds x="0" y="0.1" width="1" height="0.75" /></text> + </element> + <element name="Lamp_White_B"> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /></disk> + <disk state="0"><color red="0.25" green="0.25" blue="0.25" /></disk> + <text string="B"><color red="0.0" green="0.0" blue="0.0" /><bounds x="0" y="0.1" width="1" height="0.75" /></text> + </element> + + + <element name="Credit_Indicator"> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="2.5" y="0" width="1.0" height="1.0" /></disk> + <disk state="0"><color red="0.25" green="0.25" blue="0.25" /><bounds x="2.5" y="0" width="1.0" height="1.0" /></disk> + <text string="Credit Indicator"><color red="1.0" green="1.0" blue="1.0" /><bounds x="0" y="1.1" width="6.5" height="0.90" /></text> + </element> + + + <element name="Lamp_Green_Arrow_Up_2x" defstate="1"> + <rect state="1"><color red="0.00" green="1.00" blue="0.00" /><bounds x="10" y="00" width="02" height="03" /></rect> + <rect state="0"><color red="0.00" green="0.15" blue="0.00" /><bounds x="10" y="00" width="02" height="03" /></rect> + <rect state="1"><color red="0.00" green="1.00" blue="0.00" /><bounds x="08" y="03" width="06" height="03" /></rect> + <rect state="0"><color red="0.00" green="0.15" blue="0.00" /><bounds x="08" y="03" width="06" height="03" /></rect> + <rect state="1"><color red="0.00" green="1.00" blue="0.00" /><bounds x="06" y="06" width="10" height="03" /></rect> + <rect state="0"><color red="0.00" green="0.15" blue="0.00" /><bounds x="06" y="06" width="10" height="03" /></rect> + <rect state="1"><color red="0.00" green="1.00" blue="0.00" /><bounds x="04" y="09" width="14" height="03" /></rect> + <rect state="0"><color red="0.00" green="0.15" blue="0.00" /><bounds x="04" y="09" width="14" height="03" /></rect> + <rect state="1"><color red="0.00" green="1.00" blue="0.00" /><bounds x="02" y="12" width="18" height="03" /></rect> + <rect state="0"><color red="0.00" green="0.15" blue="0.00" /><bounds x="02" y="12" width="18" height="03" /></rect> + <rect state="1"><color red="0.00" green="1.00" blue="0.00" /><bounds x="00" y="15" width="22" height="03" /></rect> + <rect state="0"><color red="0.00" green="0.15" blue="0.00" /><bounds x="00" y="15" width="22" height="03" /></rect> + <rect state="1"><color red="0.00" green="1.00" blue="0.00" /><bounds x="09" y="06" width="04" height="30" /></rect> + <rect state="0"><color red="0.00" green="0.15" blue="0.00" /><bounds x="09" y="06" width="04" height="30" /></rect> + <text string="2x"><color red="0.0" green="0.0" blue="0.0" /><bounds x="06" y="08" width="12" height="12" /></text> + </element> + + <element name="Lamp_Yellow_Arrow_Up_3x" defstate="1"> + <rect state="1"><color red="1.00" green="1.00" blue="0.00" /><bounds x="10" y="00" width="02" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.00" /><bounds x="10" y="00" width="02" height="03" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="0.00" /><bounds x="08" y="03" width="06" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.00" /><bounds x="08" y="03" width="06" height="03" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="0.00" /><bounds x="06" y="06" width="10" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.00" /><bounds x="06" y="06" width="10" height="03" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="0.00" /><bounds x="04" y="09" width="14" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.00" /><bounds x="04" y="09" width="14" height="03" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="0.00" /><bounds x="02" y="12" width="18" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.00" /><bounds x="02" y="12" width="18" height="03" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="0.00" /><bounds x="00" y="15" width="22" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.00" /><bounds x="00" y="15" width="22" height="03" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="0.00" /><bounds x="09" y="06" width="04" height="30" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.00" /><bounds x="09" y="06" width="04" height="30" /></rect> + <text string="3x"><color red="0.0" green="0.0" blue="0.0" /><bounds x="06" y="08" width="12" height="12" /></text> + </element> + + <element name="Lamp_White_Arrow_Up_5x" defstate="1"> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="10" y="00" width="02" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="10" y="00" width="02" height="03" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="08" y="03" width="06" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="08" y="03" width="06" height="03" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="06" y="06" width="10" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="06" y="06" width="10" height="03" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="04" y="09" width="14" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="04" y="09" width="14" height="03" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="02" y="12" width="18" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="02" y="12" width="18" height="03" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="00" y="15" width="22" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="00" y="15" width="22" height="03" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="09" y="06" width="04" height="30" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="09" y="06" width="04" height="30" /></rect> + <text string="5x"><color red="0.0" green="0.0" blue="0.0" /><bounds x="06" y="08" width="12" height="12" /></text> + </element> + + <element name="Lamp_White_Arrow_Up_3k" defstate="0"> + <rect state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="10" y="00" width="02" height="03" /></rect> + <rect state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="08" y="03" width="06" height="03" /></rect> + <rect state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="06" y="06" width="10" height="03" /></rect> + <rect state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="04" y="09" width="14" height="03" /></rect> + <rect state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="02" y="12" width="18" height="03" /></rect> + <rect state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="00" y="15" width="22" height="03" /></rect> + <rect state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="09" y="06" width="04" height="30" /></rect> + <text string="3k"><color red="0.0" green="0.0" blue="0.0" /><bounds x="06" y="08" width="12" height="12" /></text> + </element> + + <element name="Lamp_Green_Arrow_04_2x" defstate="1"> <!-- Point at 4 o clock --> + <rect state="1"><color red="0.00" green="1.00" blue="0.00" /><bounds x="00" y="00" width="08" height="03" /></rect> + <rect state="0"><color red="0.00" green="0.15" blue="0.00" /><bounds x="00" y="00" width="08" height="03" /></rect> + <rect state="1"><color red="0.00" green="1.00" blue="0.00" /><bounds x="05" y="03" width="08" height="03" /></rect> + <rect state="0"><color red="0.00" green="0.15" blue="0.00" /><bounds x="05" y="03" width="08" height="03" /></rect> + <rect state="1"><color red="0.00" green="1.00" blue="0.00" /><bounds x="10" y="06" width="08" height="03" /></rect> + <rect state="0"><color red="0.00" green="0.15" blue="0.00" /><bounds x="10" y="06" width="08" height="03" /></rect> + <rect state="1"><color red="0.00" green="1.00" blue="0.00" /><bounds x="24" y="03" width="02" height="03" /></rect> + <rect state="0"><color red="0.00" green="0.15" blue="0.00" /><bounds x="24" y="03" width="02" height="03" /></rect> + <rect state="1"><color red="0.00" green="1.00" blue="0.00" /><bounds x="22" y="06" width="06" height="03" /></rect> + <rect state="0"><color red="0.00" green="0.15" blue="0.00" /><bounds x="22" y="06" width="06" height="03" /></rect> + <rect state="1"><color red="0.00" green="1.00" blue="0.00" /><bounds x="15" y="09" width="15" height="03" /></rect> + <rect state="0"><color red="0.00" green="0.15" blue="0.00" /><bounds x="15" y="09" width="15" height="03" /></rect> + <rect state="1"><color red="0.00" green="1.00" blue="0.00" /><bounds x="18" y="12" width="14" height="03" /></rect> + <rect state="0"><color red="0.00" green="0.15" blue="0.00" /><bounds x="18" y="12" width="14" height="03" /></rect> + <rect state="1"><color red="0.00" green="1.00" blue="0.00" /><bounds x="17" y="15" width="17" height="03" /></rect> + <rect state="0"><color red="0.00" green="0.15" blue="0.00" /><bounds x="17" y="15" width="17" height="03" /></rect> + <rect state="1"><color red="0.00" green="1.00" blue="0.00" /><bounds x="16" y="18" width="20" height="03" /></rect> + <rect state="0"><color red="0.00" green="0.15" blue="0.00" /><bounds x="16" y="18" width="20" height="03" /></rect> + <text string="2x"><color red="0.0" green="0.0" blue="0.0" /><bounds x="18" y="08" width="15" height="15" /></text> + </element> + + <element name="Lamp_Yellow_Arrow_04_3x" defstate="1"> <!-- Point at 4 o clock --> + <rect state="1"><color red="1.00" green="1.00" blue="0.00" /><bounds x="00" y="00" width="08" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.00" /><bounds x="00" y="00" width="08" height="03" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="0.00" /><bounds x="05" y="03" width="08" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.00" /><bounds x="05" y="03" width="08" height="03" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="0.00" /><bounds x="10" y="06" width="08" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.00" /><bounds x="10" y="06" width="08" height="03" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="0.00" /><bounds x="24" y="03" width="02" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.00" /><bounds x="24" y="03" width="02" height="03" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="0.00" /><bounds x="22" y="06" width="06" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.00" /><bounds x="22" y="06" width="06" height="03" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="0.00" /><bounds x="15" y="09" width="15" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.00" /><bounds x="15" y="09" width="15" height="03" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="0.00" /><bounds x="18" y="12" width="14" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.00" /><bounds x="18" y="12" width="14" height="03" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="0.00" /><bounds x="17" y="15" width="17" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.00" /><bounds x="17" y="15" width="17" height="03" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="0.00" /><bounds x="16" y="18" width="20" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.00" /><bounds x="16" y="18" width="20" height="03" /></rect> + <text string="3x"><color red="0.0" green="0.0" blue="0.0" /><bounds x="18" y="08" width="15" height="15" /></text> + </element> + + <element name="Lamp_White_Arrow_08_5x" defstate="1"> <!-- Point at 8 o clock --> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="28" y="00" width="08" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="28" y="00" width="08" height="03" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="23" y="03" width="08" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="23" y="03" width="08" height="03" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="18" y="06" width="08" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="18" y="06" width="08" height="03" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="10" y="03" width="02" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="10" y="03" width="02" height="03" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="08" y="06" width="06" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="08" y="06" width="06" height="03" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="06" y="09" width="15" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="06" y="09" width="15" height="03" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="04" y="12" width="14" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="04" y="12" width="14" height="03" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="02" y="15" width="17" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="02" y="15" width="17" height="03" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="00" y="18" width="20" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="00" y="18" width="20" height="03" /></rect> + <text string="5x"><color red="0.0" green="0.0" blue="0.0" /><bounds x="06" y="08" width="15" height="15" /></text> + </element> + + <element name="Lamp_White_Arrow_01" defstate="1"> <!-- Point at 1 o clock --> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="18" y="00" width="03" height="20" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="18" y="00" width="03" height="20" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="15" y="02" width="03" height="17" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="15" y="02" width="03" height="17" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="12" y="04" width="03" height="14" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="12" y="04" width="03" height="14" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="09" y="06" width="03" height="15" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="09" y="06" width="03" height="15" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="06" y="08" width="03" height="06" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="06" y="08" width="03" height="06" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="03" y="10" width="03" height="02" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="03" y="10" width="03" height="02" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="06" y="18" width="03" height="08" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="06" y="18" width="03" height="08" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="03" y="23" width="03" height="08" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="03" y="23" width="03" height="08" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="00" y="28" width="03" height="08" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="00" y="28" width="03" height="08" /></rect> + </element> + + <element name="Lamp_Amber_Arrow_08" defstate="1"> <!-- Point at 8 o clock --> + <rect state="1"><color red="1.00" green="0.40" blue="0.00" /><bounds x="28" y="00" width="08" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.06" blue="0.00" /><bounds x="28" y="00" width="08" height="03" /></rect> + <rect state="1"><color red="1.00" green="0.40" blue="0.00" /><bounds x="23" y="03" width="08" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.06" blue="0.00" /><bounds x="23" y="03" width="08" height="03" /></rect> + <rect state="1"><color red="1.00" green="0.40" blue="0.00" /><bounds x="18" y="06" width="08" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.06" blue="0.00" /><bounds x="18" y="06" width="08" height="03" /></rect> + <rect state="1"><color red="1.00" green="0.40" blue="0.00" /><bounds x="10" y="03" width="02" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.06" blue="0.00" /><bounds x="10" y="03" width="02" height="03" /></rect> + <rect state="1"><color red="1.00" green="0.40" blue="0.00" /><bounds x="08" y="06" width="06" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.06" blue="0.00" /><bounds x="08" y="06" width="06" height="03" /></rect> + <rect state="1"><color red="1.00" green="0.40" blue="0.00" /><bounds x="06" y="09" width="15" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.06" blue="0.00" /><bounds x="06" y="09" width="15" height="03" /></rect> + <rect state="1"><color red="1.00" green="0.40" blue="0.00" /><bounds x="04" y="12" width="14" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.06" blue="0.00" /><bounds x="04" y="12" width="14" height="03" /></rect> + <rect state="1"><color red="1.00" green="0.40" blue="0.00" /><bounds x="02" y="15" width="17" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.06" blue="0.00" /><bounds x="02" y="15" width="17" height="03" /></rect> + <rect state="1"><color red="1.00" green="0.40" blue="0.00" /><bounds x="00" y="18" width="20" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.06" blue="0.00" /><bounds x="00" y="18" width="20" height="03" /></rect> + </element> + + <element name="Lamp_Amber_Arrow_10" defstate="1"> <!-- Point at 10 o clock --> + <rect state="1"><color red="1.00" green="0.40" blue="0.00" /><bounds x="28" y="18" width="08" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.06" blue="0.00" /><bounds x="28" y="18" width="08" height="03" /></rect> + <rect state="1"><color red="1.00" green="0.40" blue="0.00" /><bounds x="23" y="15" width="08" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.06" blue="0.00" /><bounds x="23" y="15" width="08" height="03" /></rect> + <rect state="1"><color red="1.00" green="0.40" blue="0.00" /><bounds x="18" y="12" width="08" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.06" blue="0.00" /><bounds x="18" y="12" width="08" height="03" /></rect> + <rect state="1"><color red="1.00" green="0.40" blue="0.00" /><bounds x="10" y="15" width="02" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.06" blue="0.00" /><bounds x="10" y="15" width="02" height="03" /></rect> + <rect state="1"><color red="1.00" green="0.40" blue="0.00" /><bounds x="08" y="12" width="06" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.06" blue="0.00" /><bounds x="08" y="12" width="06" height="03" /></rect> + <rect state="1"><color red="1.00" green="0.40" blue="0.00" /><bounds x="06" y="09" width="15" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.06" blue="0.00" /><bounds x="06" y="09" width="15" height="03" /></rect> + <rect state="1"><color red="1.00" green="0.40" blue="0.00" /><bounds x="04" y="06" width="14" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.06" blue="0.00" /><bounds x="04" y="06" width="14" height="03" /></rect> + <rect state="1"><color red="1.00" green="0.40" blue="0.00" /><bounds x="02" y="03" width="17" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.06" blue="0.00" /><bounds x="02" y="03" width="17" height="03" /></rect> + <rect state="1"><color red="1.00" green="0.40" blue="0.00" /><bounds x="00" y="00" width="20" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.06" blue="0.00" /><bounds x="00" y="00" width="20" height="03" /></rect> </element> - <element name="red_led"> - <disk><color red="1.0" green="0.0" blue="0.0" /></disk> + + <element name="Lamp_Red_Arrow_08" defstate="1"> <!-- Point at 8 o clock --> + <rect state="1"><color red="1.00" green="0.00" blue="0.00" /><bounds x="28" y="00" width="08" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.00" blue="0.00" /><bounds x="28" y="00" width="08" height="03" /></rect> + <rect state="1"><color red="1.00" green="0.00" blue="0.00" /><bounds x="23" y="03" width="08" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.00" blue="0.00" /><bounds x="23" y="03" width="08" height="03" /></rect> + <rect state="1"><color red="1.00" green="0.00" blue="0.00" /><bounds x="18" y="06" width="08" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.00" blue="0.00" /><bounds x="18" y="06" width="08" height="03" /></rect> + <rect state="1"><color red="1.00" green="0.00" blue="0.00" /><bounds x="10" y="03" width="02" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.00" blue="0.00" /><bounds x="10" y="03" width="02" height="03" /></rect> + <rect state="1"><color red="1.00" green="0.00" blue="0.00" /><bounds x="08" y="06" width="06" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.00" blue="0.00" /><bounds x="08" y="06" width="06" height="03" /></rect> + <rect state="1"><color red="1.00" green="0.00" blue="0.00" /><bounds x="06" y="09" width="15" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.00" blue="0.00" /><bounds x="06" y="09" width="15" height="03" /></rect> + <rect state="1"><color red="1.00" green="0.00" blue="0.00" /><bounds x="04" y="12" width="14" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.00" blue="0.00" /><bounds x="04" y="12" width="14" height="03" /></rect> + <rect state="1"><color red="1.00" green="0.00" blue="0.00" /><bounds x="02" y="15" width="17" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.00" blue="0.00" /><bounds x="02" y="15" width="17" height="03" /></rect> + <rect state="1"><color red="1.00" green="0.00" blue="0.00" /><bounds x="00" y="18" width="20" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.00" blue="0.00" /><bounds x="00" y="18" width="20" height="03" /></rect> + </element> + + <element name="Lamp_White_Arrow_11_A" defstate="1"> <!-- Point at 11 o clock --> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="00" y="00" width="03" height="20" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="00" y="00" width="03" height="20" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="03" y="02" width="03" height="17" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="03" y="02" width="03" height="17" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="06" y="04" width="03" height="14" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="06" y="04" width="03" height="14" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="09" y="06" width="03" height="15" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="09" y="06" width="03" height="15" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="12" y="08" width="03" height="06" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="12" y="08" width="03" height="06" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="15" y="10" width="03" height="02" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="15" y="10" width="03" height="02" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="12" y="18" width="03" height="08" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="12" y="18" width="03" height="08" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="15" y="23" width="03" height="08" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="15" y="23" width="03" height="08" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="18" y="28" width="03" height="08" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="18" y="28" width="03" height="08" /></rect> + <text string="A"><color red="0.0" green="0.0" blue="0.0" /><bounds x="-2" y="03" width="18" height="18" /></text> + </element> + + <element name="Lamp_White_Arrow_01_B" defstate="1"> <!-- Point at 1 o clock --> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="18" y="00" width="03" height="20" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="18" y="00" width="03" height="20" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="15" y="02" width="03" height="17" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="15" y="02" width="03" height="17" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="12" y="04" width="03" height="14" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="12" y="04" width="03" height="14" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="09" y="06" width="03" height="15" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="09" y="06" width="03" height="15" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="06" y="08" width="03" height="06" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="06" y="08" width="03" height="06" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="03" y="10" width="03" height="02" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="03" y="10" width="03" height="02" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="06" y="18" width="03" height="08" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="06" y="18" width="03" height="08" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="03" y="23" width="03" height="08" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="03" y="23" width="03" height="08" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="00" y="28" width="03" height="08" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="00" y="28" width="03" height="08" /></rect> + <text string="B"><color red="0.0" green="0.0" blue="0.0" /><bounds x="06" y="03" width="18" height="18" /></text> + </element> + + +<!-- Backbox Indicators --> + + <element name="Text_Credit"><text string="CREDIT"><color red="1.0" green="1.0" blue="1.0" /></text></element> + <element name="Text_Lamps"><text string="Lamps"><color red="1.0" green="1.0" blue="1.0" /></text></element> + <element name="Text_15"><text string="U1 0-14"><color red="1.0" green="1.0" blue="1.0" /></text></element> + <element name="Text_30"><text string="U2 0-14"><color red="1.0" green="1.0" blue="1.0" /></text></element> + <element name="Text_45"><text string="U3 0-14"><color red="1.0" green="1.0" blue="1.0" /></text></element> + <element name="Text_60"><text string="U4 0-14"><color red="1.0" green="1.0" blue="1.0" /></text></element> + <element name="Text_Solenoids"><text string="Momentary Solenoids"><color red="1.0" green="1.0" blue="1.0" /></text></element> + <element name="Text_Coils"><text string="Coils"><color red="1.0" green="1.0" blue="1.0" /></text></element> + <element name="Text_MPU_LED"><text string="MPU LED"><color red="1.0" green="1.0" blue="1.0" /></text></element> + <element name="Text_Activity"><text string="Activity Switch"><color red="1.0" green="1.0" blue="1.0" /></text></element> + <element name="Text_Service"><text string="Service Switch"><color red="1.0" green="1.0" blue="1.0" /></text></element> + <element name="Text_Slam"><text string="Slam Switch"><color red="1.0" green="1.0" blue="1.0" /></text></element> + <element name="Text_Tilt"><text string="Tilt Switch"><color red="1.0" green="1.0" blue="1.0" /></text></element> + <element name="Text_Knocker"><text string="Knocker"><color red="1.0" green="1.0" blue="1.0" /></text></element> + + + <element name="High_Score_To_Date" defstate="0"> + <text string="HIGH SCORE TO DATE" state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0" y="0.1" width="1" height="1" /></text> + <text string="HIGH SCORE TO DATE" state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="0" y="0.1" width="1" height="1" /></text> + </element> + <element name="Ball_In_Play" defstate="0"> + <text string="BALL IN PLAY" state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0.1" y="0.1" width="1" height="0.8" /></text> + <text string="BALL IN PLAY" state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="0.1" y="0.1" width="1" height="0.8" /></text> + </element> + <element name="Match" defstate="0"> + <text string="MATCH" state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0" y="0.1" width="1" height="0.8" /></text> + <text string="MATCH" state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="0" y="0.1" width="1" height="0.8" /></text> + </element> + <element name="Game_Over" defstate="0"> + <text string="GAME OVER" state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0" y="0.1" width="1" height="0.8" /></text> + <text string="GAME OVER" state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="0" y="0.1" width="1" height="0.8" /></text> + </element> + <element name="Tilt" defstate="0"> + <text string="TILT" state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0" y="0.1" width="1" height="0.8" /></text> + <text string="TILT" state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="0" y="0.1" width="1" height="0.8" /></text> + </element> + <element name="Shoot_Again" defstate="0"> + <text string="SAME PLAYER" state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0" y="0.1" width="1" height="0.8" /></text> + <text string="SAME PLAYER" state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="0" y="0.1" width="1" height="0.8" /></text> + <text string="SHOOTS AGAIN" state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0" y="0.9" width="1" height="0.8" /></text> + <text string="SHOOTS AGAIN" state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="0" y="0.9" width="1" height="0.8" /></text> + </element> + + + <element name="Digit" defstate="0"> + <led7seg><color red="1.0" green="0.35" blue="0.0" /></led7seg> + </element> + + <element name="LED_Green" defstate="1"> + <disk state="0"><color red="0.0" green="0.25" blue="0.0" /></disk> + <disk state="1"><color red="0.0" green="1.00" blue="0.0" /></disk> + </element> + + <element name="LED_Red" defstate="1"> + <disk state="0"><color red="0.25" green="0.0" blue="0.0" /></disk> + <disk state="1"><color red="1.00" green="0.0" blue="0.0" /></disk> + </element> + + + +<!-- Solenoids --> + + <element name="Solenoid_PullDown"> + <rect state="0"><color red="1.0" green="1.0" blue="1.0" /><bounds x="3" y="0" width="03" height="09" /></rect> + <rect state="0"><color red="0.0" green="1.0" blue="1.0" /><bounds x="0" y="8" width="10" height="11" /></rect> + <rect state="1"><color red="1.0" green="1.0" blue="0.0" /><bounds x="0" y="8" width="10" height="11" /></rect> + </element> + + <element name="Coil_PullDown"> + <rect state="0"><color red="1.0" green="1.0" blue="1.0" /><bounds x="8" y="0" width="02" height="01" /></rect> + <rect state="0"><color red="1.0" green="1.0" blue="1.0" /><bounds x="6" y="1" width="02" height="01" /></rect> + <rect state="0"><color red="1.0" green="1.0" blue="1.0" /><bounds x="4" y="2" width="02" height="01" /></rect> + <rect state="0"><color red="1.0" green="1.0" blue="1.0" /><bounds x="2" y="3" width="02" height="01" /></rect> + <rect state="0"><color red="1.0" green="1.0" blue="1.0" /><bounds x="0" y="4" width="02" height="01" /></rect> + <rect ><color red="1.0" green="1.0" blue="1.0" /><bounds x="0" y="5" width="02" height="02" /></rect> + <rect state="1"><color red="1.0" green="1.0" blue="1.0" /><bounds x="0" y="4" width="10" height="01" /></rect> + + <rect state="0"><color red="0.0" green="1.0" blue="1.0" /><bounds x="0" y="8" width="10" height="11" /></rect> + <rect state="1"><color red="1.0" green="1.0" blue="0.0" /><bounds x="0" y="8" width="10" height="11" /></rect> + </element> + + + <element name="Solenoid_Knocker" defstate="0"> + <rect state="0"><color red="1.0" green="1.0" blue="1.0" /><bounds x="00" y="03" width="09" height="03" /></rect> + <rect state="1"><color red="1.0" green="0.0" blue="0.0" /><bounds x="18" y="03" width="05" height="03" /></rect> + <rect state="0"><color red="0.0" green="1.0" blue="1.0" /><bounds x="08" y="00" width="11" height="10" /></rect> + <rect state="1"><color red="1.0" green="1.0" blue="0.0" /><bounds x="08" y="00" width="11" height="10" /></rect> + </element> + + <element name="Solenoid_Outhole" defstate="0"> + <text string="\" state="1"><color red="1.0" green="0.0" blue="0.0" /><bounds x="17" y="00" width="05" height="16" /></text> + <text string="\" state="0"><color red="1.0" green="1.0" blue="1.0" /><bounds x="02" y="00" width="05" height="16" /></text> + <text string="\" state="1"><color red="1.0" green="0.0" blue="0.0" /><bounds x="18" y="00" width="05" height="16" /></text> + <text string="\" state="0"><color red="1.0" green="1.0" blue="1.0" /><bounds x="03" y="00" width="05" height="16" /></text> + <text string="\" state="1"><color red="1.0" green="0.0" blue="0.0" /><bounds x="19" y="00" width="05" height="16" /></text> + <text string="\" state="0"><color red="1.0" green="1.0" blue="1.0" /><bounds x="04" y="00" width="05" height="16" /></text> + <text string="\" state="1"><color red="1.0" green="0.0" blue="0.0" /><bounds x="20" y="00" width="05" height="16" /></text> + <text string="\" state="0"><color red="1.0" green="1.0" blue="1.0" /><bounds x="05" y="00" width="05" height="16" /></text> + <rect state="1"><color red="1.0" green="0.0" blue="0.0" /><bounds x="02" y="02" width="18" height="10" /></rect> + <rect ><color red="1.0" green="1.0" blue="1.0" /><bounds x="00" y="13" width="25" height="03" /></rect> + <text string="Outhole" ><color red="1.0" green="1.0" blue="1.0" /><bounds x="30" y="12" width="28" height="9.5" /></text> + </element> + + <element name="Solenoid_Kickback" defstate="0"> + <rect state="1"><color red="1.0" green="1.0" blue="1.0" /><bounds x="3" y="00" width="03" height="15" /></rect> + <rect state="0"><color red="1.0" green="1.0" blue="1.0" /><bounds x="3" y="07" width="03" height="08" /></rect> + <rect state="1"><color red="1.0" green="0.0" blue="0.0" /><bounds x="0" y="00" width="10" height="04" /></rect> + <rect state="0"><color red="1.0" green="1.0" blue="1.0" /><bounds x="0" y="07" width="10" height="04" /></rect> + </element> + + <element name="Solenoid_SlingShot_Left" defstate="0"> + <text string="\" state="1"><color red="1.0" green="0.0" blue="0.0" /><bounds x="05" y="00" width="65" height="80" /></text> + <text string="\" state="0"><color red="1.0" green="1.0" blue="1.0" /><bounds x="00" y="00" width="65" height="80" /></text> + <rect ><color red="1.0" green="1.0" blue="1.0" /><bounds x="20" y="16" width="04" height="60" /></rect> + <rect ><color red="1.0" green="1.0" blue="1.0" /><bounds x="20" y="76" width="24.5" height="04" /></rect> + </element> + <element name="Solenoid_SlingShot_Right" defstate="0"> + <text string="/" state="1"><color red="1.0" green="0.0" blue="0.0" /><bounds x="-5" y="00" width="65" height="80" /></text> + <text string="/" state="0"><color red="1.0" green="1.0" blue="1.0" /><bounds x="00" y="00" width="65" height="80" /></text> + <rect ><color red="1.0" green="1.0" blue="1.0" /><bounds x="40" y="16" width="04" height="60" /></rect> + <rect ><color red="1.0" green="1.0" blue="1.0" /><bounds x="19.5" y="76" width="24" height="04" /></rect> + </element> + + + <element name="Solenoid_Bumper_Black_Star" defstate="0"> + <disk state="0"> <color red="1.0" green="1.0" blue="1.0" /><bounds x="0" y="0" width="80" height="80" /></disk> + <disk state="1"> <color red="1.0" green="0.0" blue="0.0" /><bounds x="0" y="0" width="80" height="80" /></disk> + <text string="*"><color red="0.0" green="0.0" blue="0.0" /><bounds x="-61" y="-38.5" width="206" height="206" /></text> + <disk> <color red="1.0" green="1.0" blue="1.0" /><bounds x="18" y="18" width="44" height="44" /></disk> + </element> + <element name="Switch_Bumper_Black_Star" defstate="0"> + <text string="*" state="9"><color red="0.0" green="0.0" blue="0.0" /><bounds x="-61" y="-38.5" width="206" height="206" /></text> + <disk state="0"><color red="0.0" green="0.0" blue="0.0" /><bounds x="14" y="15" width="50" height="50" /></disk> + <disk state="1"><color red="0.5" green="0.5" blue="0.5" /><bounds x="14" y="15" width="50" height="50" /></disk> + </element> + <element name="Lamp_Bumper_GI"> + <text string="*" state="9"><color red="0.0" green="0.0" blue="0.0" /><bounds x="-61" y="-38.5" width="206" height="206" /></text> + <disk ><color red="1.0" green="1.0" blue="1.0" /><bounds x="18" y="18" width="44" height="44" /></disk> + </element> + + <element name="Solenoid_Bumper_Blue_Star" defstate="0"> + <disk state="0"> <color red="1.0" green="1.0" blue="1.0" /><bounds x="0" y="0" width="80" height="80" /></disk> + <disk state="1"> <color red="1.0" green="0.0" blue="0.0" /><bounds x="0" y="0" width="80" height="80" /></disk> + <text string="*"><color red="0.3" green="0.5" blue="1.0" /><bounds x="-61" y="-38.5" width="206" height="206" /></text> + <disk> <color red="1.0" green="1.0" blue="1.0" /><bounds x="18" y="18" width="44" height="44" /></disk> + </element> + <element name="Switch_Bumper_Blue_Star" defstate="0"> + <text string="*" state="9"><color red="0.3" green="0.5" blue="1.0" /><bounds x="-61" y="-38.5" width="206" height="206" /></text> + <disk state="0"><color red="0.3" green="0.3" blue="1.0" /><bounds x="14" y="15" width="50" height="50" /></disk> + <disk state="1"><color red="0.5" green="0.5" blue="0.5" /><bounds x="14" y="15" width="50" height="50" /></disk> + </element> + <element name="Lamp_Bumper_Blue_1000" defstate="1"> + <text string="*" state="9"><color red="0.3" green="0.5" blue="1.0" /><bounds x="-61" y="-38.5" width="206" height="206" /></text> + <disk state="0"><color red="0.7" green="0.7" blue="0.7" /><bounds x="18" y="18" width="44" height="44" /></disk> + <disk state="1"><color red="1.0" green="1.0" blue="1.0" /><bounds x="18" y="18" width="44" height="44" /></disk> + <text string="1000"> <color red="0.3" green="0.5" blue="1.0" /><bounds x="07" y="29" width="70" height="23" /></text> + </element> + + <element name="Solenoid_Bumper_Red_Star" defstate="0"> + <disk state="0"> <color red="1.0" green="1.0" blue="1.0" /><bounds x="0" y="0" width="80" height="80" /></disk> + <disk state="1"> <color red="1.0" green="0.0" blue="0.0" /><bounds x="0" y="0" width="80" height="80" /></disk> + <text string="*"><color red="1.0" green="0.0" blue="0.0" /><bounds x="-61" y="-38.5" width="206" height="206" /></text> + <disk> <color red="1.0" green="1.0" blue="1.0" /><bounds x="18" y="18" width="44" height="44" /></disk> + </element> + <element name="Switch_Bumper_Red_Star" defstate="0"> + <text string="*" state="9"><color red="1.0" green="0.0" blue="0.0" /><bounds x="-61" y="-38.5" width="206" height="206" /></text> + <disk state="0"><color red="1.0" green="0.0" blue="0.0" /><bounds x="14" y="15" width="50" height="50" /></disk> + <disk state="1"><color red="0.5" green="0.5" blue="0.5" /><bounds x="14" y="15" width="50" height="50" /></disk> + </element> + <element name="Lamp_Bumper_Red_1000" defstate="0"> + <text string="*" state="9"><color red="0.0" green="0.0" blue="0.0" /><bounds x="-61" y="-38.5" width="206" height="206" /></text> + <disk state="0"><color red="0.7" green="0.7" blue="0.7" /><bounds x="18" y="18" width="44" height="44" /></disk> + <disk state="1"><color red="1.0" green="1.0" blue="1.0" /><bounds x="18" y="18" width="44" height="44" /></disk> + <text string="1000"> <color red="1.0" green="0.0" blue="0.0" /><bounds x="07" y="29" width="70" height="23" /></text> + </element> + + <element name="Solenoid_Bumper_Yellow_Star" defstate="0"> + <disk state="0"> <color red="1.0" green="1.0" blue="1.0" /><bounds x="0" y="0" width="80" height="80" /></disk> + <disk state="1"> <color red="1.0" green="0.0" blue="0.0" /><bounds x="0" y="0" width="80" height="80" /></disk> + <text string="*"><color red="1.0" green="1.0" blue="0.0" /><bounds x="-61" y="-38.5" width="206" height="206" /></text> + <disk> <color red="1.0" green="1.0" blue="1.0" /><bounds x="18" y="18" width="44" height="44" /></disk> + </element> + <element name="Switch_Bumper_Yellow_Star" defstate="0"> + <text string="*" state="9"><color red="1.0" green="1.0" blue="0.0" /><bounds x="-61" y="-38.5" width="206" height="206" /></text> + <disk state="0"><color red="1.0" green="1.0" blue="0.0" /><bounds x="14" y="15" width="50" height="50" /></disk> + <disk state="1"><color red="0.5" green="0.5" blue="0.5" /><bounds x="14" y="15" width="50" height="50" /></disk> + </element> + + <element name="Solenoid_Bumper_Green_Star" defstate="0"> + <disk state="0"> <color red="1.0" green="1.0" blue="1.0" /><bounds x="0" y="0" width="80" height="80" /></disk> + <disk state="1"> <color red="1.0" green="0.0" blue="0.0" /><bounds x="0" y="0" width="80" height="80" /></disk> + <text string="*"><color red="0.0" green="1.0" blue="0.0" /><bounds x="-61" y="-38.5" width="206" height="206" /></text> + <disk> <color red="1.0" green="1.0" blue="1.0" /><bounds x="18" y="18" width="44" height="44" /></disk> + </element> + <element name="Switch_Bumper_Green_Star" defstate="0"> + <text string="*" state="9"><color red="0.0" green="1.0" blue="0.0" /><bounds x="-61" y="-38.5" width="206" height="206" /></text> + <disk state="0"><color red="0.0" green="1.0" blue="0.0" /><bounds x="14" y="15" width="50" height="50" /></disk> + <disk state="1"><color red="0.5" green="0.5" blue="0.5" /><bounds x="14" y="15" width="50" height="50" /></disk> + </element> + + <element name="Lamp_Bumper_Silver_100" defstate="1"> + <text string="*" state="9"><color red="0.5" green="0.5" blue="0.5" /><bounds x="-61" y="-38.5" width="206" height="206" /></text> + <disk state="0"><color red="0.7" green="0.7" blue="0.7" /><bounds x="18" y="18" width="44" height="44" /></disk> + <disk state="1"><color red="1.0" green="1.0" blue="1.0" /><bounds x="18" y="18" width="44" height="44" /></disk> + <text string="100"> <color red="0.5" green="0.5" blue="0.5" /><bounds x="07" y="29" width="66" height="23" /></text> + </element> + <element name="Lamp_Bumper_Silver_1000" defstate="1"> + <text string="*" state="9"><color red="0.5" green="0.5" blue="0.5" /><bounds x="-61" y="-38.5" width="206" height="206" /></text> + <disk state="0"><color red="0.7" green="0.7" blue="0.7" /><bounds x="18" y="18" width="44" height="44" /></disk> + <disk state="1"><color red="1.0" green="1.0" blue="1.0" /><bounds x="18" y="18" width="44" height="44" /></disk> + <text string="1000"> <color red="0.5" green="0.5" blue="0.5" /><bounds x="07" y="29" width="70" height="23" /></text> + </element> + + + <element name="Solenoid_Saucer" defstate="0"> + <disk> <color red="1.0" green="0.8" blue="0.5" /><bounds x="00" y="00" width="70" height="70" /></disk> <!-- 71 --> + <disk> <color red="0.7" green="0.7" blue="0.7" /><bounds x="10" y="10" width="49" height="49" /></disk> <!-- 51 --> + <rect state="0"><color red="0.3" green="0.3" blue="0.3" /><bounds x="31" y="07" width="07" height="25" /></rect> + <rect state="1"><color red="1.0" green="0.0" blue="0.0" /><bounds x="31" y="07" width="07" height="25" /></rect> + <disk> <color red="0.0" green="0.0" blue="0.0" /><bounds x="27" y="40" width="15" height="15" /></disk> </element> - <element name="background"> + <element name="Switch_Saucer" defstate="0"> + <disk state="9"><color red="1.0" green="0.8" blue="0.5" /><bounds x="00" y="00" width="70" height="70" /></disk> + <disk state="0"><color red="1.0" green="1.0" blue="1.0" /><bounds x="30" y="43" width="09" height="09" /></disk> + <disk state="1"><color red="0.0" green="0.0" blue="0.0" /><bounds x="30" y="43" width="09" height="09" /></disk> + </element> + + + <element name="Coil_Post_Up" defstate="0"> + <disk state="1"><color red="1.0" green="0.0" blue="0.0" /><bounds x="00" y="00" width="21" height="21" /></disk> + </element> + <element name="Solenoid_Post_Down" defstate="0"> + <disk state="9"><color red="1.00" green="0.00" blue="0.00" /><bounds x="00" y="00" width="21" height="21" /></disk> + <disk state="1"><color red="0.50" green="0.10" blue="0.00" /><bounds x="01" y="01" width="19" height="19" /></disk> + <disk state="1"><color red="0.15" green="0.06" blue="0.00" /><bounds x="02" y="02" width="17" height="17" /></disk> + <rect state="1"><color red="0.50" green="0.10" blue="0.00" /><bounds x="10" y="02" width="01" height="17" /></rect> + <rect state="1"><color red="0.50" green="0.10" blue="0.00" /><bounds x="02" y="10" width="17" height="01" /></rect> + <disk state="1"><color red="1.00" green="0.00" blue="0.00" /><bounds x="08" y="08" width="06" height="06" /></disk> + </element> + <element name="Lamp_Post" defstate="0"> + <disk state="9"><color red="1.00" green="0.00" blue="0.00" /><bounds x="00" y="00" width="21" height="21" /></disk> + <disk ><color red="0.50" green="0.10" blue="0.00" /><bounds x="01" y="01" width="19" height="19" /></disk> + <disk state="0"><color red="0.15" green="0.06" blue="0.00" /><bounds x="02" y="02" width="17" height="17" /></disk> + <disk state="1"><color red="0.80" green="0.20" blue="0.00" /><bounds x="02" y="02" width="17" height="17" /></disk> + <rect ><color red="0.50" green="0.10" blue="0.00" /><bounds x="10" y="02" width="01" height="17" /></rect> + <rect ><color red="0.50" green="0.10" blue="0.00" /><bounds x="02" y="10" width="17" height="01" /></rect> + </element> + + +<!-- Line colours --> + + <element name="Draw_White" defstate="1"> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds left="0" top="0" right="1" bottom="1" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds left="0" top="0" right="1" bottom="1" /></rect> + </element> + <element name="Draw_Red" defstate="1"> + <rect state="1"><color red="1.00" green="0.00" blue="0.00" /><bounds left="0" top="0" right="1" bottom="1" /></rect> + <rect state="0"><color red="0.15" green="0.00" blue="0.00" /><bounds left="0" top="0" right="1" bottom="1" /></rect> + </element> + <element name="Draw_Amber" defstate="1"> + <rect state="1"><color red="1.00" green="0.40" blue="0.00" /><bounds left="0" top="0" right="1" bottom="1" /></rect> + <rect state="0"><color red="0.15" green="0.06" blue="0.00" /><bounds left="0" top="0" right="1" bottom="1" /></rect> + </element> + + <element name="Canvas"> <rect> - <bounds left="0" top="0" right="1" bottom="1" /> <color red="0.0" green="0.0" blue="0.0" /> + <bounds left="0" top="0" right="1" bottom="1" /> </rect> </element> - <element name="P0"><text string="Ball / Match"><color red="1.0" green="1.0" blue="1.0" /></text></element> - <element name="P1"><text string="Credits"><color red="1.0" green="1.0" blue="1.0" /></text></element> - <element name="P2"><text string="Players"><color red="1.0" green="1.0" blue="1.0" /></text></element> - <element name="P3"><text string="Player 1"><color red="1.0" green="1.0" blue="1.0" /></text></element> - <element name="P4"><text string="Player 2"><color red="1.0" green="1.0" blue="1.0" /></text></element> - <element name="P5"><text string="Player 3"><color red="1.0" green="1.0" blue="1.0" /></text></element> - <element name="P6"><text string="Player 4"><color red="1.0" green="1.0" blue="1.0" /></text></element> - <view name="Default Layout"> + + + + + <view name="Blank Playfield"> <!-- Background --> - <backdrop element="background"> - <bounds left="0" top="20" right="318" bottom="394" /> - </backdrop> + <backdrop element="Canvas"><bounds x="000" y="000" width="640" height="480" /></backdrop> - <!-- LEDs --> + <bezel element="Draw_White"><bounds x="000" y="000" width="640" height="001" /></bezel> + <bezel element="Draw_White"><bounds x="000" y="000" width="001" height="480" /></bezel> + <bezel element="Draw_White"><bounds x="640" y="000" width="001" height="480" /></bezel> + <bezel element="Draw_White"><bounds x="000" y="480" width="640" height="001" /></bezel> + <bezel element="Draw_White"><bounds x="320" y="000" width="001" height="480" /></bezel> + <bezel element="Draw_White"><bounds x="320" y="320" width="320" height="001" /></bezel> + <!-- <bezel element="Draw_White"><bounds x="159" y="000" width="001" height="480" /></bezel> --> - <!-- Player 1 Score --> - <bezel name="digit6" element="digit"> - <bounds left="10" top="45" right="44" bottom="84" /> - </bezel> - <bezel name="digit5" element="digit"> - <bounds left="54" top="45" right="88" bottom="84" /> - </bezel> - <bezel name="digit4" element="digit"> - <bounds left="98" top="45" right="132" bottom="84" /> - </bezel> - <bezel name="digit3" element="digit"> - <bounds left="142" top="45" right="176" bottom="84" /> - </bezel> - <bezel name="digit2" element="digit"> - <bounds left="186" top="45" right="220" bottom="84" /> - </bezel> - <bezel name="digit1" element="digit"> - <bounds left="230" top="45" right="264" bottom="84" /> - </bezel> - <bezel name="digit0" element="digit"> - <bounds left="274" top="45" right="308" bottom="84" /> - </bezel> + <bezel element="Title_Bally"><bounds x="430" y="18" width="105" height="30" /></bezel> + + <bezel element="Text_Playfield"><bounds x="040" y="010" width="250" height="14" /></bezel> + <bezel element="Text_Legend"><bounds x="018" y="35" width="300" height="12" /></bezel> + <bezel element="Text_Multiball"><bounds x="013" y="350" width="314" height="12" /></bezel> + + + <!-- Backbox --> + + <!-- MPU Board Power On Self Test LED --> + <bezel element="Text_MPU_LED"> <bounds x="609" y="342" width="30" height="10" /></bezel> + <bezel name="led0" element="LED_Green"><bounds x="618" y="328" width="10" height="10" /></bezel> + + <!-- MPU Board Activity Switch --> + <bezel element="Text_Activity"> <bounds x="540" y="342" width="50" height="10" /></bezel> + <bezel element="Switch_Push-Button" inputtag="TEST" inputmask="0x02"><bounds x="550" y="331" width="20" height="10" /></bezel> + <bezel element="Key_0"> <bounds x="571" y="330" width="10" height="10" /></bezel> + + + <!-- Player 1 Score --> + <bezel name="lamp14" element="Lamp_P1"><bounds x="330" y="55" width="15" height="15" /></bezel> <!-- Backbox ~ 1st Player Up --> + <bezel name="digit17" element="Digit"><bounds x="360" y="55" width="10" height="15" /></bezel> + <bezel name="digit16" element="Digit"><bounds x="374" y="55" width="10" height="15" /></bezel> + <bezel name="digit15" element="Digit"><bounds x="388" y="55" width="10" height="15" /></bezel> + <bezel name="digit14" element="Digit"><bounds x="402" y="55" width="10" height="15" /></bezel> + <bezel name="digit13" element="Digit"><bounds x="416" y="55" width="10" height="15" /></bezel> + <bezel name="digit12" element="Digit"><bounds x="430" y="55" width="10" height="15" /></bezel> + <bezel name="digit11" element="Digit"><bounds x="444" y="55" width="10" height="15" /></bezel> <!-- Player 2 Score --> - <bezel name="digit16" element="digit"> - <bounds left="10" top="105" right="44" bottom="144" /> - </bezel> - <bezel name="digit15" element="digit"> - <bounds left="54" top="105" right="88" bottom="144" /> - </bezel> - <bezel name="digit14" element="digit"> - <bounds left="98" top="105" right="132" bottom="144" /> - </bezel> - <bezel name="digit13" element="digit"> - <bounds left="142" top="105" right="176" bottom="144" /> - </bezel> - <bezel name="digit12" element="digit"> - <bounds left="186" top="105" right="220" bottom="144" /> - </bezel> - <bezel name="digit11" element="digit"> - <bounds left="230" top="105" right="264" bottom="144" /> - </bezel> - <bezel name="digit10" element="digit"> - <bounds left="274" top="105" right="308" bottom="144" /> - </bezel> + <bezel name="lamp29" element="Lamp_P2"><bounds x="615" y="55" width="15" height="15" /></bezel> <!-- Backbox ~ 2nd Player Up --> + <bezel name="digit27" element="Digit"><bounds x="506" y="55" width="10" height="15" /></bezel> + <bezel name="digit26" element="Digit"><bounds x="520" y="55" width="10" height="15" /></bezel> + <bezel name="digit25" element="Digit"><bounds x="534" y="55" width="10" height="15" /></bezel> + <bezel name="digit24" element="Digit"><bounds x="548" y="55" width="10" height="15" /></bezel> + <bezel name="digit23" element="Digit"><bounds x="562" y="55" width="10" height="15" /></bezel> + <bezel name="digit22" element="Digit"><bounds x="576" y="55" width="10" height="15" /></bezel> + <bezel name="digit21" element="Digit"><bounds x="590" y="55" width="10" height="15" /></bezel> <!-- Player 3 Score --> - <bezel name="digit26" element="digit"> - <bounds left="10" top="165" right="44" bottom="204" /> - </bezel> - <bezel name="digit25" element="digit"> - <bounds left="54" top="165" right="88" bottom="204" /> - </bezel> - <bezel name="digit24" element="digit"> - <bounds left="98" top="165" right="132" bottom="204" /> - </bezel> - <bezel name="digit23" element="digit"> - <bounds left="142" top="165" right="176" bottom="204" /> - </bezel> - <bezel name="digit22" element="digit"> - <bounds left="186" top="165" right="220" bottom="204" /> - </bezel> - <bezel name="digit21" element="digit"> - <bounds left="230" top="165" right="264" bottom="204" /> - </bezel> - <bezel name="digit20" element="digit"> - <bounds left="274" top="165" right="308" bottom="204" /> - </bezel> + <bezel name="lamp44" element="Lamp_P3"><bounds x="330" y="250" width="15" height="15" /></bezel> <!-- Backbox ~ 3rd Player Up --> + <bezel name="digit37" element="Digit"><bounds x="360" y="250" width="10" height="15" /></bezel> + <bezel name="digit36" element="Digit"><bounds x="374" y="250" width="10" height="15" /></bezel> + <bezel name="digit35" element="Digit"><bounds x="388" y="250" width="10" height="15" /></bezel> + <bezel name="digit34" element="Digit"><bounds x="402" y="250" width="10" height="15" /></bezel> + <bezel name="digit33" element="Digit"><bounds x="416" y="250" width="10" height="15" /></bezel> + <bezel name="digit32" element="Digit"><bounds x="430" y="250" width="10" height="15" /></bezel> + <bezel name="digit31" element="Digit"><bounds x="444" y="250" width="10" height="15" /></bezel> <!-- Player 4 Score --> - <bezel name="digit36" element="digit"> - <bounds left="10" top="225" right="44" bottom="264" /> - </bezel> - <bezel name="digit35" element="digit"> - <bounds left="54" top="225" right="88" bottom="264" /> - </bezel> - <bezel name="digit34" element="digit"> - <bounds left="98" top="225" right="132" bottom="264" /> - </bezel> - <bezel name="digit33" element="digit"> - <bounds left="142" top="225" right="176" bottom="264" /> - </bezel> - <bezel name="digit32" element="digit"> - <bounds left="186" top="225" right="220" bottom="264" /> - </bezel> - <bezel name="digit31" element="digit"> - <bounds left="230" top="225" right="264" bottom="264" /> - </bezel> - <bezel name="digit30" element="digit"> - <bounds left="274" top="225" right="308" bottom="264" /> - </bezel> - - <!-- Credits and Balls --> - <bezel name="digit44" element="digit"> - <bounds left="10" top="345" right="44" bottom="384" /> - </bezel> - <bezel name="digit43" element="digit"> - <bounds left="54" top="345" right="88" bottom="384" /> - </bezel> - <bezel name="digit41" element="digit"> - <bounds left="186" top="345" right="220" bottom="384" /> - </bezel> - <bezel name="digit40" element="digit"> - <bounds left="230" top="345" right="264" bottom="384" /> - </bezel> - - <bezel element="P0"><bounds left="200" right="258" top="330" bottom="342" /></bezel> - <bezel element="P1"><bounds left="30" right="88" top="330" bottom="342" /></bezel> - <bezel name="text3" element="P3"><bounds left="100" right="180" top="30" bottom="42" /></bezel> - <bezel name="text2" element="P4"><bounds left="100" right="180" top="90" bottom="102" /></bezel> - <bezel name="text1" element="P5"><bounds left="100" right="180" top="150" bottom="162" /></bezel> - <bezel name="text0" element="P6"><bounds left="100" right="180" top="210" bottom="222" /></bezel> - <bezel name="led0" element="red_led"> - <bounds left="110" right="125" top="360" bottom="375" /></bezel> + <bezel name="lamp59" element="Lamp_P4"><bounds x="615" y="250" width="15" height="15" /></bezel> <!-- Backbox ~ 4th Player Up --> + <bezel name="digit47" element="Digit"><bounds x="506" y="250" width="10" height="15" /></bezel> + <bezel name="digit46" element="Digit"><bounds x="520" y="250" width="10" height="15" /></bezel> + <bezel name="digit45" element="Digit"><bounds x="534" y="250" width="10" height="15" /></bezel> + <bezel name="digit44" element="Digit"><bounds x="548" y="250" width="10" height="15" /></bezel> + <bezel name="digit43" element="Digit"><bounds x="562" y="250" width="10" height="15" /></bezel> + <bezel name="digit42" element="Digit"><bounds x="576" y="250" width="10" height="15" /></bezel> + <bezel name="digit41" element="Digit"><bounds x="590" y="250" width="10" height="15" /></bezel> + + <!-- Credits and Ball In Play / Match --> + <bezel element="Text_Credit"><bounds x="542" y="142" width="48" height="8" /></bezel> + <bezel name="lamp12" element="Ball_In_Play"><bounds x="586" y="105" width="50" height="11" /></bezel> <!-- Backbox ~ Ball In Play --> + <bezel name="lamp25" element="Match"><bounds x="596" y="152" width="25" height="11" /></bezel> <!-- Backbox ~ Match --> + <bezel name="digit55" element="Digit"><bounds x="554" y="125" width="10" height="15" /></bezel> + <bezel name="digit54" element="Digit"><bounds x="568" y="125" width="10" height="15" /></bezel> + <bezel name="digit52" element="Digit"><bounds x="596" y="125" width="10" height="15" /></bezel> + <bezel name="digit51" element="Digit"><bounds x="610" y="125" width="10" height="15" /></bezel> + + <bezel name="lamp10" element="Shoot_Again"><bounds x="420" y="295" width="60" height="19" /></bezel> <!-- Backbox ~ Same Player Shoots Again --> + <bezel name="lamp13" element="Lamp_1P"><bounds x="345" y="297" width="15" height="15" /></bezel> <!-- Backbox ~ 1 Player Game --> + <bezel name="lamp28" element="Lamp_2P"><bounds x="360" y="297" width="15" height="15" /></bezel> <!-- Backbox ~ 2 Player Game --> + <bezel name="lamp43" element="Lamp_3P"><bounds x="375" y="297" width="15" height="15" /></bezel> <!-- Backbox ~ 3 Player Game --> + <bezel name="lamp58" element="Lamp_4P"><bounds x="390" y="297" width="15" height="15" /></bezel> <!-- Backbox ~ 4 Player Game --> + <bezel name="lamp27" element="High_Score_To_Date"><bounds x="438" y="6" width="90" height="11" /></bezel> <!-- Backbox ~ High Score To Date --> + <bezel name="lamp42" element="Game_Over"><bounds x="580" y="300" width="45" height="11" /></bezel> <!-- Backbox ~ Game Over --> + <bezel name="lamp57" element="Tilt"><bounds x="480" y="297" width="50" height="16" /></bezel> <!-- Backbox ~ Tilt --> + + + + <bezel element="Text_Lamps"><bounds x="410" y="360" width="60" height="11" /></bezel> + <bezel element="Text_15"><bounds x="552" y="373" width="30" height="11" /></bezel> + <bezel element="Text_30"><bounds x="552" y="388" width="30" height="11" /></bezel> + <bezel element="Text_45"><bounds x="552" y="403" width="30" height="11" /></bezel> + <bezel element="Text_60"><bounds x="552" y="418" width="30" height="11" /></bezel> + + <!-- Lamps controlled by U1 on Lamp Driver Board --> + <bezel name="lamp0" element="Lamp_White"><bounds x="330" y="375" width="8" height="8" /></bezel> + <bezel name="lamp1" element="Lamp_White"><bounds x="345" y="375" width="8" height="8" /></bezel> + <bezel name="lamp2" element="Lamp_White"><bounds x="360" y="375" width="8" height="8" /></bezel> + <bezel name="lamp3" element="Lamp_White"><bounds x="375" y="375" width="8" height="8" /></bezel> + <bezel name="lamp4" element="Lamp_White"><bounds x="390" y="375" width="8" height="8" /></bezel> + <bezel name="lamp5" element="Lamp_White"><bounds x="405" y="375" width="8" height="8" /></bezel> + <bezel name="lamp6" element="Lamp_White"><bounds x="420" y="375" width="8" height="8" /></bezel> + <bezel name="lamp7" element="Lamp_White"><bounds x="435" y="375" width="8" height="8" /></bezel> + <bezel name="lamp8" element="Lamp_White"><bounds x="450" y="375" width="8" height="8" /></bezel> + <bezel name="lamp9" element="Lamp_White"><bounds x="465" y="375" width="8" height="8" /></bezel> + <bezel name="lamp10" element="Lamp_White"><bounds x="480" y="375" width="8" height="8" /></bezel> + <bezel name="lamp11" element="Lamp_White"><bounds x="495" y="375" width="8" height="8" /></bezel> + <bezel name="lamp12" element="Lamp_White"><bounds x="510" y="375" width="8" height="8" /></bezel> + <bezel name="lamp13" element="Lamp_White"><bounds x="525" y="375" width="8" height="8" /></bezel> + <bezel name="lamp14" element="Lamp_White"><bounds x="540" y="375" width="8" height="8" /></bezel> + + <!-- Lamps controlled by U2 on Lamp Driver Board --> + <bezel name="lamp15" element="Lamp_White"><bounds x="330" y="390" width="8" height="8" /></bezel> + <bezel name="lamp16" element="Lamp_White"><bounds x="345" y="390" width="8" height="8" /></bezel> + <bezel name="lamp17" element="Lamp_White"><bounds x="360" y="390" width="8" height="8" /></bezel> + <bezel name="lamp18" element="Lamp_White"><bounds x="375" y="390" width="8" height="8" /></bezel> + <bezel name="lamp19" element="Lamp_White"><bounds x="390" y="390" width="8" height="8" /></bezel> + <bezel name="lamp20" element="Lamp_White"><bounds x="405" y="390" width="8" height="8" /></bezel> + <bezel name="lamp21" element="Lamp_White"><bounds x="420" y="390" width="8" height="8" /></bezel> + <bezel name="lamp22" element="Lamp_White"><bounds x="435" y="390" width="8" height="8" /></bezel> + <bezel name="lamp23" element="Lamp_White"><bounds x="450" y="390" width="8" height="8" /></bezel> + <bezel name="lamp24" element="Lamp_White"><bounds x="465" y="390" width="8" height="8" /></bezel> + <bezel name="lamp25" element="Lamp_White"><bounds x="480" y="390" width="8" height="8" /></bezel> + <bezel name="lamp26" element="Lamp_White"><bounds x="495" y="390" width="8" height="8" /></bezel> + <bezel name="lamp27" element="Lamp_White"><bounds x="510" y="390" width="8" height="8" /></bezel> + <bezel name="lamp28" element="Lamp_White"><bounds x="525" y="390" width="8" height="8" /></bezel> + <bezel name="lamp29" element="Lamp_White"><bounds x="540" y="390" width="8" height="8" /></bezel> + + <!-- Lamps controlled by U3 on Lamp Driver Board --> + <bezel name="lamp30" element="Lamp_White"><bounds x="330" y="405" width="8" height="8" /></bezel> + <bezel name="lamp31" element="Lamp_White"><bounds x="345" y="405" width="8" height="8" /></bezel> + <bezel name="lamp32" element="Lamp_White"><bounds x="360" y="405" width="8" height="8" /></bezel> + <bezel name="lamp33" element="Lamp_White"><bounds x="375" y="405" width="8" height="8" /></bezel> + <bezel name="lamp34" element="Lamp_White"><bounds x="390" y="405" width="8" height="8" /></bezel> + <bezel name="lamp35" element="Lamp_White"><bounds x="405" y="405" width="8" height="8" /></bezel> + <bezel name="lamp36" element="Lamp_White"><bounds x="420" y="405" width="8" height="8" /></bezel> + <bezel name="lamp37" element="Lamp_White"><bounds x="435" y="405" width="8" height="8" /></bezel> + <bezel name="lamp38" element="Lamp_White"><bounds x="450" y="405" width="8" height="8" /></bezel> + <bezel name="lamp39" element="Lamp_White"><bounds x="465" y="405" width="8" height="8" /></bezel> + <bezel name="lamp40" element="Lamp_White"><bounds x="480" y="405" width="8" height="8" /></bezel> + <bezel name="lamp41" element="Lamp_White"><bounds x="495" y="405" width="8" height="8" /></bezel> + <bezel name="lamp42" element="Lamp_White"><bounds x="510" y="405" width="8" height="8" /></bezel> + <bezel name="lamp43" element="Lamp_White"><bounds x="525" y="405" width="8" height="8" /></bezel> + <bezel name="lamp44" element="Lamp_White"><bounds x="540" y="405" width="8" height="8" /></bezel> + + <!-- Lamps controlled by U4 on Lamp Driver Board --> + <bezel name="lamp45" element="Lamp_White"><bounds x="330" y="420" width="8" height="8" /></bezel> + <bezel name="lamp46" element="Lamp_White"><bounds x="345" y="420" width="8" height="8" /></bezel> + <bezel name="lamp47" element="Lamp_White"><bounds x="360" y="420" width="8" height="8" /></bezel> + <bezel name="lamp48" element="Lamp_White"><bounds x="375" y="420" width="8" height="8" /></bezel> + <bezel name="lamp49" element="Lamp_White"><bounds x="390" y="420" width="8" height="8" /></bezel> + <bezel name="lamp50" element="Lamp_White"><bounds x="405" y="420" width="8" height="8" /></bezel> + <bezel name="lamp51" element="Lamp_White"><bounds x="420" y="420" width="8" height="8" /></bezel> + <bezel name="lamp52" element="Lamp_White"><bounds x="435" y="420" width="8" height="8" /></bezel> + <bezel name="lamp53" element="Lamp_White"><bounds x="450" y="420" width="8" height="8" /></bezel> + <bezel name="lamp54" element="Lamp_White"><bounds x="465" y="420" width="8" height="8" /></bezel> + <bezel name="lamp55" element="Lamp_White"><bounds x="480" y="420" width="8" height="8" /></bezel> + <bezel name="lamp56" element="Lamp_White"><bounds x="495" y="420" width="8" height="8" /></bezel> + <bezel name="lamp57" element="Lamp_White"><bounds x="510" y="420" width="8" height="8" /></bezel> + <bezel name="lamp58" element="Lamp_White"><bounds x="525" y="420" width="8" height="8" /></bezel> + <bezel name="lamp59" element="Lamp_White"><bounds x="540" y="420" width="8" height="8" /></bezel> + + + + <bezel element="Text_Solenoids"><bounds x="382" y="437" width="100" height="11" /></bezel> + <bezel name="solenoid0" element="Solenoid_PullDown"><bounds x="330" y="452" width="9" height="19" /></bezel> + <bezel name="solenoid1" element="Solenoid_PullDown"><bounds x="345" y="452" width="9" height="19" /></bezel> + <bezel name="solenoid2" element="Solenoid_PullDown"><bounds x="360" y="452" width="9" height="19" /></bezel> + <bezel name="solenoid3" element="Solenoid_PullDown"><bounds x="375" y="452" width="9" height="19" /></bezel> + <bezel name="solenoid4" element="Solenoid_PullDown"><bounds x="390" y="452" width="9" height="19" /></bezel> + <bezel name="solenoid5" element="Solenoid_PullDown"><bounds x="405" y="452" width="9" height="19" /></bezel> + <bezel name="solenoid6" element="Solenoid_PullDown"><bounds x="420" y="452" width="9" height="19" /></bezel> + <bezel name="solenoid7" element="Solenoid_PullDown"><bounds x="435" y="452" width="9" height="19" /></bezel> + <bezel name="solenoid8" element="Solenoid_PullDown"><bounds x="450" y="452" width="9" height="19" /></bezel> + <bezel name="solenoid9" element="Solenoid_PullDown"><bounds x="465" y="452" width="9" height="19" /></bezel> + <bezel name="solenoid10" element="Solenoid_PullDown"><bounds x="480" y="452" width="9" height="19" /></bezel> + <bezel name="solenoid11" element="Solenoid_PullDown"><bounds x="495" y="452" width="9" height="19" /></bezel> + <bezel name="solenoid12" element="Solenoid_PullDown"><bounds x="510" y="452" width="9" height="19" /></bezel> + <bezel name="solenoid13" element="Solenoid_PullDown"><bounds x="525" y="452" width="9" height="19" /></bezel> + <bezel name="solenoid14" element="Solenoid_PullDown"><bounds x="540" y="452" width="9" height="19" /></bezel> + + <bezel element="Text_Coils"><bounds x="572" y="437" width="50" height="11" /></bezel> + <bezel name="solenoid16" element="Coil_PullDown"><bounds x="570" y="459" width="09" height="12" /></bezel> + <bezel name="solenoid17" element="Coil_PullDown"><bounds x="585" y="459" width="09" height="12" /></bezel> + <bezel name="solenoid18" element="Coil_PullDown"><bounds x="600" y="459" width="09" height="12" /></bezel> + <bezel name="solenoid19" element="Coil_PullDown"><bounds x="615" y="459" width="09" height="12" /></bezel> + + + + <!-- Cabinet Switches --> + <bezel element="Text_Service"> <bounds x="485" y="342" width="50" height="10" /></bezel> + <bezel element="Switch_Push-Button" inputtag="TEST" inputmask="0x01"><bounds x="495" y="331" width="20" height="10" /></bezel> + <bezel element="Key_9"> <bounds x="516" y="330" width="10" height="10" /></bezel> + + <bezel element="Text_Slam"> <bounds x="430" y="342" width="50" height="10" /></bezel> + <bezel element="Switch_SlamTilt" inputtag="X1" inputmask="0x80"><bounds x="434" y="331" width="25" height="08" /></bezel> + <bezel element="Key_Equals"> <bounds x="461" y="330" width="10" height="10" /></bezel> + + <bezel element="Text_Tilt"> <bounds x="380" y="342" width="50" height="10" /></bezel> + <bezel element="Switch_Tilt" inputtag="X0" inputmask="0x40"><bounds x="390" y="324" width="17" height="17" /></bezel> + <bezel element="Key_T"> <bounds x="411" y="330" width="10" height="10" /></bezel> + + + <!-- Misc Solenoids --> + <bezel name="solenoid5" element="Solenoid_Knocker"><bounds x="297" y="457" width="23" height="09" /></bezel> + <bezel element="Text_Knocker"> <!-- Knocker --> <bounds x="290" y="467" width="30" height="10" /></bezel> + + <!-- Misc Lamps --> + <bezel name="lamp55" element="Credit_Indicator"><bounds x="23" y="456" width="70" height="21" /></bezel><!-- Credit Indicator --> + + + <!-- Outhole --> + <bezel name="solenoid6" element="Solenoid_Outhole"> <bounds x="150" y="455" width="58" height="22" /></bezel> + <bezel element="Switch_RollOn_WireForm_Left" inputtag="X0" inputmask="0x80"><bounds x="163" y="453" width="20" height="16" /></bezel> + <bezel element="Key_BSpace"> <bounds x="185" y="455" width="15" height="14" /></bezel> + + + + <bezel element="Text_Switch"><bounds x="070" y="65" width="70" height="12" /></bezel> + <bezel element="ST0"> <bounds x="020" y="080" width="30" height="11" /></bezel> + <bezel element="ST1"> <bounds x="055" y="080" width="30" height="11" /></bezel> + <bezel element="ST2"> <bounds x="090" y="080" width="30" height="11" /></bezel> + <bezel element="ST3"> <bounds x="125" y="080" width="30" height="11" /></bezel> + <bezel element="ST4"> <bounds x="160" y="080" width="30" height="11" /></bezel> + <bezel element="I0"> <bounds x="001" y="100" width="20" height="11" /></bezel> + <bezel element="I1"> <bounds x="001" y="130" width="20" height="11" /></bezel> + <bezel element="I2"> <bounds x="001" y="160" width="20" height="11" /></bezel> + <bezel element="I3"> <bounds x="001" y="190" width="20" height="11" /></bezel> + <bezel element="I4"> <bounds x="001" y="220" width="20" height="11" /></bezel> + <bezel element="I5"> <bounds x="001" y="250" width="20" height="11" /></bezel> + <bezel element="I6"> <bounds x="001" y="280" width="20" height="11" /></bezel> + <bezel element="I7"> <bounds x="001" y="310" width="20" height="11" /></bezel> + + + <bezel element="Switch_Push-Button" inputtag="X0" inputmask="0x01"><bounds x="25" y="100" width="20" height="10" /></bezel> + <bezel element="Key_Dot"> <bounds x="28" y="107" width="14" height="14" /></bezel> + <bezel element="Switch_Push-Button" inputtag="X0" inputmask="0x02"><bounds x="25" y="130" width="20" height="10" /></bezel> + <bezel element="Key_FSlash"> <bounds x="31" y="141" width="10" height="10" /></bezel> + <bezel element="Switch_Push-Button" inputtag="X0" inputmask="0x04"><bounds x="25" y="160" width="20" height="10" /></bezel> + <bezel element="Key_OBrkt"> <bounds x="31" y="171" width="10" height="10" /></bezel> + <bezel element="Switch_Push-Button" inputtag="X0" inputmask="0x08"><bounds x="25" y="190" width="20" height="10" /></bezel> + <bezel element="Key_CBrkt"> <bounds x="31" y="201" width="10" height="10" /></bezel> + <bezel element="Switch_Push-Button" inputtag="X0" inputmask="0x10"><bounds x="25" y="220" width="20" height="10" /></bezel> + <bezel element="Key_BSlash"> <bounds x="31" y="231" width="10" height="10" /></bezel> + <bezel element="Switch_Push-Button" inputtag="X0" inputmask="0x20"><bounds x="25" y="250" width="20" height="10" /></bezel> + <bezel element="Key_1"> <bounds x="31" y="261" width="10" height="10" /></bezel> + <bezel element="Switch_Push-Button" inputtag="X0" inputmask="0x40"><bounds x="25" y="280" width="20" height="10" /></bezel> + <bezel element="Key_T"> <bounds x="31" y="291" width="10" height="10" /></bezel> + <bezel element="Switch_Push-Button" inputtag="X0" inputmask="0x80"><bounds x="25" y="310" width="20" height="10" /></bezel> + <bezel element="Key_BSpace"> <bounds x="28" y="320" width="15" height="14" /></bezel> + + + <bezel element="Switch_Push-Button" inputtag="X1" inputmask="0x01"><bounds x="60" y="100" width="20" height="10" /></bezel> + <bezel element="Key_7"> <bounds x="66" y="111" width="10" height="10" /></bezel> + <bezel element="Switch_Push-Button" inputtag="X1" inputmask="0x02"><bounds x="60" y="130" width="20" height="10" /></bezel> + <bezel element="Key_5"> <bounds x="66" y="141" width="10" height="10" /></bezel> + <bezel element="Switch_Push-Button" inputtag="X1" inputmask="0x04"><bounds x="60" y="160" width="20" height="10" /></bezel> + <bezel element="Key_6"> <bounds x="66" y="171" width="10" height="10" /></bezel> + <bezel element="Switch_Push-Button" inputtag="X1" inputmask="0x08"><bounds x="60" y="190" width="20" height="10" /></bezel> + <bezel element="Key_Enter"> <bounds x="63" y="199" width="15" height="14" /></bezel> + <bezel element="Switch_Push-Button" inputtag="X1" inputmask="0x10"><bounds x="60" y="220" width="20" height="10" /></bezel> + <bezel element="Key_Quote"> <bounds x="64" y="230" width="14" height="14" /></bezel> + <bezel element="Switch_Push-Button" inputtag="X1" inputmask="0x20"><bounds x="60" y="250" width="20" height="10" /></bezel> + <bezel element="Key_SColon"> <bounds x="65" y="259" width="11" height="11" /></bezel> + <bezel element="Switch_Push-Button" inputtag="X1" inputmask="0x40"><bounds x="60" y="280" width="20" height="10" /></bezel> + <bezel element="Key_L"> <bounds x="66" y="291" width="10" height="10" /></bezel> + <bezel element="Switch_Push-Button" inputtag="X1" inputmask="0x80"><bounds x="60" y="310" width="20" height="10" /></bezel> + <bezel element="Key_Equals"> <bounds x="66" y="321" width="10" height="10" /></bezel> + + + <bezel element="Switch_Push-Button" inputtag="X2" inputmask="0x01"><bounds x="095" y="100" width="20" height="10" /></bezel> + <bezel element="Key_K"> <bounds x="101" y="111" width="10" height="10" /></bezel> + <bezel element="Switch_Push-Button" inputtag="X2" inputmask="0x02"><bounds x="095" y="130" width="20" height="10" /></bezel> + <bezel element="Key_J"> <bounds x="101" y="141" width="10" height="10" /></bezel> + <bezel element="Switch_Push-Button" inputtag="X2" inputmask="0x04"><bounds x="095" y="160" width="20" height="10" /></bezel> + <bezel element="Key_H"> <bounds x="101" y="171" width="10" height="10" /></bezel> + <bezel element="Switch_Push-Button" inputtag="X2" inputmask="0x08"><bounds x="095" y="190" width="20" height="10" /></bezel> + <bezel element="Key_G"> <bounds x="101" y="201" width="10" height="10" /></bezel> + <bezel element="Switch_Push-Button" inputtag="X2" inputmask="0x10"><bounds x="095" y="220" width="20" height="10" /></bezel> + <bezel element="Key_F"> <bounds x="101" y="231" width="10" height="10" /></bezel> + <bezel element="Switch_Push-Button" inputtag="X2" inputmask="0x20"><bounds x="095" y="250" width="20" height="10" /></bezel> + <bezel element="Key_D"> <bounds x="101" y="261" width="10" height="10" /></bezel> + <bezel element="Switch_Push-Button" inputtag="X2" inputmask="0x40"><bounds x="095" y="280" width="20" height="10" /></bezel> + <bezel element="Key_S"> <bounds x="101" y="291" width="10" height="10" /></bezel> + <bezel element="Switch_Push-Button" inputtag="X2" inputmask="0x80"><bounds x="095" y="310" width="20" height="10" /></bezel> + <bezel element="Key_A"> <bounds x="101" y="321" width="10" height="10" /></bezel> + + + <bezel element="Switch_Push-Button" inputtag="X3" inputmask="0x01"><bounds x="130" y="100" width="20" height="10" /></bezel> + <bezel element="Key_O"> <bounds x="136" y="111" width="10" height="10" /></bezel> + <bezel element="Switch_Push-Button" inputtag="X3" inputmask="0x02"><bounds x="130" y="130" width="20" height="10" /></bezel> + <bezel element="Key_I"> <bounds x="136" y="141" width="10" height="10" /></bezel> + <bezel element="Switch_Push-Button" inputtag="X3" inputmask="0x04"><bounds x="130" y="160" width="20" height="10" /></bezel> + <bezel element="Key_U"> <bounds x="136" y="171" width="10" height="10" /></bezel> + <bezel element="Switch_Push-Button" inputtag="X3" inputmask="0x08"><bounds x="130" y="190" width="20" height="10" /></bezel> + <bezel element="Key_Y"> <bounds x="136" y="201" width="10" height="10" /></bezel> + <bezel element="Switch_Push-Button" inputtag="X3" inputmask="0x10"><bounds x="130" y="220" width="20" height="10" /></bezel> + <bezel element="Key_R"> <bounds x="136" y="231" width="10" height="10" /></bezel> + <bezel element="Switch_Push-Button" inputtag="X3" inputmask="0x20"><bounds x="130" y="250" width="20" height="10" /></bezel> + <bezel element="Key_E"> <bounds x="136" y="261" width="10" height="10" /></bezel> + <bezel element="Switch_Push-Button" inputtag="X3" inputmask="0x40"><bounds x="130" y="280" width="20" height="10" /></bezel> + <bezel element="Key_W"> <bounds x="136" y="291" width="10" height="10" /></bezel> + <bezel element="Switch_Push-Button" inputtag="X3" inputmask="0x80"><bounds x="130" y="310" width="20" height="10" /></bezel> + <bezel element="Key_Q"> <bounds x="136" y="321" width="10" height="10" /></bezel> + + + <bezel element="Switch_Push-Button" inputtag="X4" inputmask="0x01"><bounds x="165" y="100" width="20" height="10" /></bezel> + <bezel element="Key_Comma"> <bounds x="168" y="107" width="14" height="14" /></bezel> + <bezel element="Switch_Push-Button" inputtag="X4" inputmask="0x02"><bounds x="165" y="130" width="20" height="10" /></bezel> + <bezel element="Key_M"> <bounds x="171" y="141" width="10" height="10" /></bezel> + <bezel element="Switch_Push-Button" inputtag="X4" inputmask="0x04"><bounds x="165" y="160" width="20" height="10" /></bezel> + <bezel element="Key_N"> <bounds x="171" y="171" width="10" height="10" /></bezel> + <bezel element="Switch_Push-Button" inputtag="X4" inputmask="0x08"><bounds x="165" y="190" width="20" height="10" /></bezel> + <bezel element="Key_B"> <bounds x="171" y="201" width="10" height="10" /></bezel> + <bezel element="Switch_Push-Button" inputtag="X4" inputmask="0x10"><bounds x="165" y="220" width="20" height="10" /></bezel> + <bezel element="Key_V"> <bounds x="171" y="231" width="10" height="10" /></bezel> + <bezel element="Switch_Push-Button" inputtag="X4" inputmask="0x20"><bounds x="165" y="250" width="20" height="10" /></bezel> + <bezel element="Key_C"> <bounds x="171" y="261" width="10" height="10" /></bezel> + <bezel element="Switch_Push-Button" inputtag="X4" inputmask="0x40"><bounds x="165" y="280" width="20" height="10" /></bezel> + <bezel element="Key_X"> <bounds x="171" y="291" width="10" height="10" /></bezel> + <bezel element="Switch_Push-Button" inputtag="X4" inputmask="0x80"><bounds x="165" y="310" width="20" height="10" /></bezel> + <bezel element="Key_Z"> <bounds x="171" y="321" width="10" height="10" /></bezel> + </view> + </mamelayout> diff --git a/src/mame/layout/by35_playboy.lay b/src/mame/layout/by35_playboy.lay new file mode 100644 index 00000000000..51c544f2207 --- /dev/null +++ b/src/mame/layout/by35_playboy.lay @@ -0,0 +1,998 @@ +<!-- Pinball Machine, Bally ~ Playboy --> +<!-- [Quench] June 2015 --> + + +<!-- Any state="9" items are not displayed and are only used for object alignment --> + +<mamelayout version="2"> + + <element name="Title_Playboy"><text string="PLAYBOY"><color red="1.0" green="0.0" blue="1.0" /></text></element> + + + +<!-- Switches --> + + <element name="Switch_SlamTilt"> + <rect state="0"><color red="0.80" green="0.80" blue="0.80" /><bounds x="00" y="00" width="25" height="01" /></rect> + <rect state="0"><color red="0.80" green="0.80" blue="0.80" /><bounds x="00" y="08" width="13" height="01.5" /></rect> + <rect state="0"><color red="1.00" green="1.00" blue="0.00" /><bounds x="08" y="01" width="04" height="02" /></rect> + <rect state="0"><color red="1.00" green="1.00" blue="0.00" /><bounds x="08" y="06" width="04" height="02" /></rect> + + <rect state="0"><color red="0.70" green="0.70" blue="0.70" /><bounds x="19" y="01" width="06" height="04" /></rect> + <rect state="1"><color red="0.70" green="0.70" blue="0.70" /><bounds x="19" y="04" width="06" height="04" /></rect> + + <rect state="1"><color red="0.80" green="0.80" blue="0.80" /><bounds x="00" y="00" width="08" height="01" /></rect> + <rect state="1"><color red="0.80" green="0.80" blue="0.80" /><bounds x="08" y="01" width="08" height="01" /></rect> + <rect state="1"><color red="0.80" green="0.80" blue="0.80" /><bounds x="16" y="02" width="09" height="01" /></rect> + + + <rect state="1"><color red="0.80" green="0.80" blue="0.80" /><bounds x="00" y="08" width="13" height="01.5" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="0.00" /><bounds x="08" y="03" width="04" height="02" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="0.00" /><bounds x="08" y="06" width="04" height="02" /></rect> + </element> + + <element name="Switch_Tilt"> + <rect ><color red="0.80" green="0.80" blue="0.00" /><bounds x="00" y="00" width="17" height="17" /></rect> + <disk ><color red="0.00" green="0.00" blue="0.00" /><bounds x="01" y="01" width="15" height="15" /></disk> + <disk state="0"><color red="0.50" green="0.50" blue="0.50" /><bounds x="04" y="04" width="09" height="09" /></disk> + <disk state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="07" y="07" width="02" height="02" /></disk> + + <disk state="1"><color red="0.50" green="0.50" blue="0.50" /><bounds x="07" y="04" width="09" height="09" /></disk> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="11" y="07" width="02" height="02" /></disk> + </element> + + + <element name="Switch_Leaf_Vertical"> + <rect state="0"><color red="0.80" green="0.80" blue="0.80" /><bounds x="0" y="00" width="01" height="06" /></rect> + <rect state="0"><color red="0.80" green="0.80" blue="0.80" /><bounds x="8" y="00" width="01.5" height="06" /></rect> + <rect state="0"><color red="1.00" green="1.00" blue="0.00" /><bounds x="1" y="01" width="02" height="04" /></rect> + <rect state="0"><color red="1.00" green="1.00" blue="0.00" /><bounds x="6" y="01" width="02" height="04" /></rect> + + <rect state="1"><color red="0.80" green="0.80" blue="0.80" /><bounds x="1.5" y="00" width="01" height="06" /></rect> + <rect state="1"><color red="0.80" green="0.80" blue="0.80" /><bounds x="6.5" y="00" width="01" height="06" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="0.00" /><bounds x="2" y="01" width="02" height="04" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="0.00" /><bounds x="4.5" y="01" width="02" height="04" /></rect> + </element> + + <element name="Switch_RollOn_WireForm_Left"> + <text string=">" state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="8" y="0" width="11" height="11" /></text> + <rect state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="1" y="4" width="0.1" height="04" /></rect> + <rect state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="1" y="4" width="09" height="0.1" /></rect> + <rect state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="1" y="8" width="09" height="0.1" /></rect> + <rect state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="3" y="6" width="08" height="0.1" /></rect> + <text string=">" state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="8" y="0" width="11" height="11" /></text> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="1" y="4" width="0.1" height="04" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="1" y="4" width="09" height="0.1" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="1" y="8" width="09" height="0.1" /></rect> + </element> + + <element name="Switch_RollOn_WireForm_Down"> + <text string="/\" state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0" y="00" width="07" height="10" /></text> + <rect state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="1" y="17" width="04" height="0.1" /></rect> + <rect state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="1" y="09" width="0.1" height="09" /></rect> + <rect state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="5" y="09" width="0.1" height="09" /></rect> + <rect state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="3" y="07" width="0.1" height="08" /></rect> + <text string="/\" state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0" y="00" width="07" height="10" /></text> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="1" y="17" width="04" height="0.1" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="1" y="09" width="0.1" height="09" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="5" y="09" width="0.1" height="09" /></rect> + </element> + + <element name="Switch_RollOver_WireForm_Vertical"> + <text string="/\" state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0" y="00" width="07" height="10" /></text> + <text string="\/" state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0" y="17" width="07" height="10" /></text> + <rect state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="1" y="09" width="0.1" height="09" /></rect> + <rect state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="5" y="09" width="0.1" height="09" /></rect> + <rect state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="3" y="07" width="0.1" height="13" /></rect> + <text string="/\" state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0" y="00" width="07" height="10" /></text> + <text string="\/" state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0" y="17" width="07" height="10" /></text> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="1" y="09" width="0.1" height="09" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="5" y="09" width="0.1" height="09" /></rect> + </element> + + <element name="Switch_Target_Red_Forward" defstate="0"> + <rect ><color red="1.00" green="1.00" blue="1.00" /><bounds x="06" y="00" width="10" height="01" /></rect> + <rect ><color red="1.00" green="1.00" blue="1.00" /><bounds x="06" y="00" width="01" height="05" /></rect> + <rect ><color red="1.00" green="1.00" blue="1.00" /><bounds x="16" y="00" width="01" height="05" /></rect> + + <disk state="0"><color red="1.00" green="0.00" blue="0.00" /><bounds x="00" y="05" width="24" height="06" /></disk> + <disk state="1"><color red="1.00" green="0.00" blue="0.00" /><bounds x="00" y="02" width="24" height="06" /></disk> + </element> + + <element name="Target_White_Left" defstate="0"> + <rect ><color red="1.00" green="1.00" blue="1.00" /><bounds x="00" y="06" width="01" height="10" /></rect> + <rect ><color red="1.00" green="1.00" blue="1.00" /><bounds x="00" y="06" width="05" height="01" /></rect> + <rect ><color red="1.00" green="1.00" blue="1.00" /><bounds x="00" y="16" width="05" height="01" /></rect> + <disk state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="05" y="00" width="06" height="24" /></disk> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="02" y="00" width="06" height="24" /></disk> + </element> + + + <element name="Switch_RollOver_Button"> + <text string="*" state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="-10" y="-6" width="35" height="35" /></text> + <text string="*" state="1"><color red="0.00" green="0.00" blue="0.00" /><bounds x="-10" y="-6" width="35" height="35" /></text> + </element> + + <element name="Lamp_RollOver_Button" defstate="0"> + <disk state="0"><color red="0.15" green="0.04" blue="0.00" /><bounds x="0" y="0" width="15" height="15" /></disk> + <disk state="1"><color red="1.00" green="0.30" blue="0.00" /><bounds x="0" y="0" width="15" height="15" /></disk> + </element> + + + <element name="Switch_Push-Button" defstate="0"> + <rect state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="07" y="04" width="16" height="01" /></rect> + <rect state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="12" y="00" width="01" height="04" /></rect> + <rect state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="17" y="00" width="01" height="04" /></rect> + <rect state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="12" y="00" width="05" height="01" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="07" y="08.5" width="16" height="01" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="12" y="04.5" width="01" height="04" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="17" y="04.5" width="01" height="04" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="12" y="04.5" width="05" height="01" /></rect> + <rect ><color red="1.00" green="1.00" blue="1.00" /><bounds x="00" y="12" width="09" height="01" /></rect> + <rect ><color red="1.00" green="1.00" blue="1.00" /><bounds x="21" y="12" width="09" height="01" /></rect> + <disk ><color red="1.00" green="1.00" blue="1.00" /><bounds x="07" y="10" width="06" height="06" /></disk> + <disk ><color red="1.00" green="1.00" blue="1.00" /><bounds x="18" y="10" width="06" height="06" /></disk> + </element> + + + + <element name="Key_Z"> <text string="Z"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_X"> <text string="X"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_C"> <text string="C"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_V"> <text string="V"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_B"> <text string="B"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_N"> <text string="N"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_M"> <text string="M"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_Comma"> <text string=","><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_Dot"> <text string="."><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_FSlash"><text string="/"><color red="1.00" green="0.66" blue="0.66" /></text></element> + + <element name="Key_A"> <text string="A"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_S"> <text string="S"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_D"> <text string="D"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_F"> <text string="F"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_G"> <text string="G"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_H"> <text string="H"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_J"> <text string="J"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_K"> <text string="K"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_L"> <text string="L"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_SColon"><text string=";"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_Quote"> <text string="'"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_Enter"> + <text string="<"><color red="1.00" green="0.66" blue="0.66" /><bounds x="00" y="00" width="07" height="10" /></text> + <text string="-"> <color red="1.00" green="0.66" blue="0.66" /><bounds x="00" y="00" width="07" height="10" /></text> + <text string="-"> <color red="1.00" green="0.66" blue="0.66" /><bounds x="02" y="00" width="07" height="10" /></text> + <text string="-"> <color red="1.00" green="0.66" blue="0.66" /><bounds x="04" y="00" width="07" height="10" /></text> + <text string="-"> <color red="1.00" green="0.66" blue="0.66" /><bounds x="06" y="00" width="07" height="10" /></text> + <disk > <color red="1.00" green="0.66" blue="0.66" /><bounds x="10" y="02" width="0.5" height="03" /></disk> + </element> + + <element name="Key_Q"> <text string="Q"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_W"> <text string="W"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_E"> <text string="E"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_R"> <text string="R"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_T"> <text string="T"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_Y"> <text string="Y"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_U"> <text string="U"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_I"> <text string="I"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_O"> <text string="O"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_P"> <text string="P"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_OBrkt"> <text string="["><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_CBrkt"> <text string="]"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_BSlash"><text string="\"><color red="1.00" green="0.66" blue="0.66" /></text></element> + + <element name="Key_1"> <text string="1"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_5"> <text string="5"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_6"> <text string="6"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_7"> <text string="7"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_9"> <text string="9"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_0"> <text string="0"><color red="1.00" green="0.66" blue="0.66" /></text></element> + <element name="Key_BSpace"> + <text string="<"><color red="1.00" green="0.66" blue="0.66" /><bounds x="0" y="00" width="07" height="10" /></text> + <text string="-"> <color red="1.00" green="0.66" blue="0.66" /><bounds x="0" y="00" width="07" height="10" /></text> + <text string="-"> <color red="1.00" green="0.66" blue="0.66" /><bounds x="2" y="00" width="07" height="10" /></text> + <text string="-"> <color red="1.00" green="0.66" blue="0.66" /><bounds x="4" y="00" width="07" height="10" /></text> + <text string="-"> <color red="1.00" green="0.66" blue="0.66" /><bounds x="6" y="00" width="07" height="10" /></text> + </element> + <element name="Key_Equals"><text string="="><color red="1.00" green="0.66" blue="0.66" /></text></element> + + + + <element name="Solenoid_DropTarget_Tall" defstate="0"> + <rect state="1"><color red="1.00" green="0.00" blue="0.00" /><bounds x="00" y="00" width="07" height="15" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="01" y="01" width="04" height="12" /></rect> + </element> + <element name="DropTarget_Tall" defstate="0"> + <rect state="1"><color red="0.25" green="0.25" blue="0.25" /><bounds x="01" y="01" width="04" height="12" /></rect> + <rect state="0"><color red="1.00" green="1.00" blue="1.00" /><bounds x="01" y="01" width="04" height="12" /></rect> + <rect state="9"><color red="0.00" green="1.00" blue="0.00" /><bounds x="00" y="00" width="07" height="15" /></rect> + </element> + + + +<!-- Lamps --> + + <element name="Lamp_White" defstate="0"> + <disk state="0"><color red="0.15" green="0.15" blue="0.15" /></disk> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /></disk> + </element> + <element name="Lamp_Red" defstate="0"> <!-- Usually for Specials --> + <disk state="0"><color red="0.15" green="0.00" blue="0.00" /></disk> + <disk state="1"><color red="1.00" green="0.00" blue="0.00" /></disk> + </element> + <element name="Lamp_Amber" defstate="0"> <!-- Usually for Extra Ball--> + <disk state="0"><color red="0.15" green="0.06" blue="0.00" /></disk> + <disk state="1"><color red="1.00" green="0.40" blue="0.00" /></disk> + </element> + + + <element name="Lamp_P1"> + <rect><color red="0.10" green="0.10" blue="0.10" /></rect> + <text string="1" state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0" y="0" width="1" height="0.9" /></text> + <text string="1" state="0"><color red="0.25" green="0.25" blue="0.25" /><bounds x="0" y="0" width="1" height="0.9" /></text> + </element> + <element name="Lamp_P2"> + <rect><color red="0.10" green="0.10" blue="0.10" /></rect> + <text string="2" state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0" y="0" width="1" height="0.9" /></text> + <text string="2" state="0"><color red="0.25" green="0.25" blue="0.25" /><bounds x="0" y="0" width="1" height="0.9" /></text> + </element> + <element name="Lamp_P3"> + <rect><color red="0.10" green="0.10" blue="0.10" /></rect> + <text string="3" state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0.1" y="0" width="1" height="0.9" /></text> + <text string="3" state="0"><color red="0.25" green="0.25" blue="0.25" /><bounds x="0.1" y="0" width="1" height="0.9" /></text> + </element> + <element name="Lamp_P4"> + <rect><color red="0.10" green="0.10" blue="0.10" /></rect> + <text string="4" state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0" y="0" width="1" height="0.9" /></text> + <text string="4" state="0"><color red="0.25" green="0.25" blue="0.25" /><bounds x="0" y="0" width="1" height="0.9" /></text> + </element> + + <element name="Lamp_1P"> + <disk><color red="0.10" green="0.10" blue="0.10" /></disk> + <text string="1" state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0" y="0" width="1" height="0.9" /></text> + <text string="1" state="0"><color red="0.25" green="0.25" blue="0.25" /><bounds x="0" y="0" width="1" height="0.9" /></text> + </element> + <element name="Lamp_2P"> + <disk><color red="0.10" green="0.10" blue="0.10" /></disk> + <text string="2" state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0" y="0" width="1" height="0.9" /></text> + <text string="2" state="0"><color red="0.25" green="0.25" blue="0.25" /><bounds x="0" y="0" width="1" height="0.9" /></text> + </element> + <element name="Lamp_3P"> + <disk><color red="0.10" green="0.10" blue="0.10" /></disk> + <text string="3" state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0.1" y="0" width="1" height="0.9" /></text> + <text string="3" state="0"><color red="0.25" green="0.25" blue="0.25" /><bounds x="0.1" y="0" width="1" height="0.9" /></text> + </element> + <element name="Lamp_4P"> + <disk><color red="0.10" green="0.10" blue="0.10" /></disk> + <text string="4" state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0" y="0" width="1" height="0.9" /></text> + <text string="4" state="0"><color red="0.25" green="0.25" blue="0.25" /><bounds x="0" y="0" width="1" height="0.9" /></text> + </element> + + + <element name="Lamp_2x" defstate="0"> + <disk state="0"><color red="0.0" green="0.15" blue="0.0" /></disk> + <disk state="1"><color red="0.0" green="1.00" blue="0.0" /></disk> + <text string="2x"><color red="0.0" green="0.0" blue="0.0" /><bounds x="0" y="0.1" width="1" height="0.75" /></text> + </element> + <element name="Lamp_3x" defstate="0"> + <disk state="0"><color red="0.15" green="0.15" blue="0.0" /></disk> + <disk state="1"><color red="1.00" green="1.00" blue="0.0" /></disk> + <text string="3x"><color red="0.0" green="0.0" blue="0.0" /><bounds x="0" y="0.1" width="1" height="0.75" /></text> + </element> + <element name="Lamp_5x" defstate="0"> + <disk state="0"><color red="0.15" green="0.15" blue="0.15" /></disk> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /></disk> + <text string="5x"><color red="0.0" green="0.0" blue="0.0" /><bounds x="0" y="0.1" width="1" height="0.75" /></text> + </element> + + + <element name="Lamp_White_1k"> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /></disk> + <disk state="0"><color red="0.25" green="0.25" blue="0.25" /></disk> + <text string="1k"><color red="0.0" green="0.0" blue="0.0" /><bounds x="0" y="0.1" width="1" height="0.75" /></text> + </element> + <element name="Lamp_White_2k"> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /></disk> + <disk state="0"><color red="0.25" green="0.25" blue="0.25" /></disk> + <text string="2k"><color red="0.0" green="0.0" blue="0.0" /><bounds x="0" y="0.1" width="1" height="0.75" /></text> + </element> + <element name="Lamp_White_3k"> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /></disk> + <disk state="0"><color red="0.25" green="0.25" blue="0.25" /></disk> + <text string="3k"><color red="0.0" green="0.0" blue="0.0" /><bounds x="0" y="0.1" width="1" height="0.75" /></text> + </element> + <element name="Lamp_White_4k"> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /></disk> + <disk state="0"><color red="0.25" green="0.25" blue="0.25" /></disk> + <text string="4k"><color red="0.0" green="0.0" blue="0.0" /><bounds x="0" y="0.1" width="1" height="0.75" /></text> + </element> + <element name="Lamp_White_5k"> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /></disk> + <disk state="0"><color red="0.25" green="0.25" blue="0.25" /></disk> + <text string="5k"><color red="0.0" green="0.0" blue="0.0" /><bounds x="0" y="0.1" width="1" height="0.75" /></text> + </element> + <element name="Lamp_White_6k"> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /></disk> + <disk state="0"><color red="0.25" green="0.25" blue="0.25" /></disk> + <text string="6k"><color red="0.0" green="0.0" blue="0.0" /><bounds x="0" y="0.1" width="1" height="0.75" /></text> + </element> + <element name="Lamp_White_7k"> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /></disk> + <disk state="0"><color red="0.25" green="0.25" blue="0.25" /></disk> + <text string="7k"><color red="0.0" green="0.0" blue="0.0" /><bounds x="0" y="0.1" width="1" height="0.75" /></text> + </element> + <element name="Lamp_White_8k"> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /></disk> + <disk state="0"><color red="0.25" green="0.25" blue="0.25" /></disk> + <text string="8k"><color red="0.0" green="0.0" blue="0.0" /><bounds x="0" y="0.1" width="1" height="0.75" /></text> + </element> + <element name="Lamp_White_9k"> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /></disk> + <disk state="0"><color red="0.25" green="0.25" blue="0.25" /></disk> + <text string="9k"><color red="0.0" green="0.0" blue="0.0" /><bounds x="0" y="0.1" width="1" height="0.75" /></text> + </element> + <element name="Lamp_White_10k"> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /></disk> + <disk state="0"><color red="0.25" green="0.25" blue="0.25" /></disk> + <text string="10k"><color red="0.0" green="0.0" blue="0.0" /><bounds x="0.0" y="0.1" width="1.00" height="0.75" /></text> + </element> + <element name="Lamp_White_20k"> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0.0" y="0.0" width="1.10" height="1.00" /></disk> + <disk state="0"><color red="0.25" green="0.25" blue="0.25" /><bounds x="0.0" y="0.0" width="1.10" height="1.00" /></disk> + <text string="20k"><color red="0.0" green="0.0" blue="0.0" /><bounds x="0.1" y="0.1" width="1.00" height="0.75" /></text> + </element> + <element name="Lamp_White_25k"> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0.0" y="0.0" width="1.10" height="1.00" /></disk> + <disk state="0"><color red="0.25" green="0.25" blue="0.25" /><bounds x="0.0" y="0.0" width="1.10" height="1.00" /></disk> + <text string="25k"><color red="0.0" green="0.0" blue="0.0" /><bounds x="0.1" y="0.1" width="1.00" height="0.75" /></text> + </element> + + + <element name="Lamp_White_March"> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0" y="0" width="8.3" height="8.3" /></disk> + <disk state="0"><color red="0.25" green="0.25" blue="0.25" /><bounds x="0" y="0" width="8.3" height="8.3" /></disk> + <text string="MARCH"><color red="1.0" green="1.0" blue="1.0" /><bounds x="0" y="9" width="21" height="09" /></text> + </element> + <element name="Lamp_White_May"> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0" y="0" width="8.3" height="8.3" /></disk> + <disk state="0"><color red="0.25" green="0.25" blue="0.25" /><bounds x="0" y="0" width="8.3" height="8.3" /></disk> + <text string="MAY"><color red="1.0" green="1.0" blue="1.0" /><bounds x="0" y="9" width="13" height="09" /></text> + </element> + <element name="Lamp_White_January"> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0" y="0" width="8.3" height="8.3" /></disk> + <disk state="0"><color red="0.25" green="0.25" blue="0.25" /><bounds x="0" y="0" width="8.3" height="8.3" /></disk> + <text string="JANUARY"><color red="1.0" green="1.0" blue="1.0" /><bounds x="0" y="9" width="29" height="09" /></text> + </element> + <element name="Lamp_White_July"> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0" y="0" width="8.3" height="8.3" /></disk> + <disk state="0"><color red="0.25" green="0.25" blue="0.25" /><bounds x="0" y="0" width="8.3" height="8.3" /></disk> + <text string="JULY"><color red="1.0" green="1.0" blue="1.0" /><bounds x="0" y="9" width="16" height="09" /></text> + </element> + <element name="Lamp_White_September"> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0" y="0" width="8.3" height="8.3" /></disk> + <disk state="0"><color red="0.25" green="0.25" blue="0.25" /><bounds x="0" y="0" width="8.3" height="8.3" /></disk> + <text string="SEPTEMBER"><color red="1.0" green="1.0" blue="1.0" /><bounds x="0" y="9" width="37" height="09" /></text> + </element> + + + <element name="Lamp_White_1"> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /></disk> + <disk state="0"><color red="0.25" green="0.25" blue="0.25" /></disk> + <text string="1"><color red="0.0" green="0.0" blue="0.0" /><bounds x="0" y="0.1" width="1" height="0.75" /></text> + </element> + <element name="Lamp_White_2"> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /></disk> + <disk state="0"><color red="0.25" green="0.25" blue="0.25" /></disk> + <text string="2"><color red="0.0" green="0.0" blue="0.0" /><bounds x="0" y="0.1" width="1" height="0.75" /></text> + </element> + <element name="Lamp_White_3"> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /></disk> + <disk state="0"><color red="0.25" green="0.25" blue="0.25" /></disk> + <text string="3"><color red="0.0" green="0.0" blue="0.0" /><bounds x="0" y="0.1" width="1" height="0.75" /></text> + </element> + <element name="Lamp_White_4"> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /></disk> + <disk state="0"><color red="0.25" green="0.25" blue="0.25" /></disk> + <text string="4"><color red="0.0" green="0.0" blue="0.0" /><bounds x="0" y="0.1" width="1" height="0.75" /></text> + </element> + <element name="Lamp_White_5"> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /></disk> + <disk state="0"><color red="0.25" green="0.25" blue="0.25" /></disk> + <text string="5"><color red="0.0" green="0.0" blue="0.0" /><bounds x="0" y="0.1" width="1" height="0.75" /></text> + </element> + + + <element name="Credit_Indicator"> + <disk state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="2.5" y="0" width="1.0" height="1.0" /></disk> + <disk state="0"><color red="0.25" green="0.25" blue="0.25" /><bounds x="2.5" y="0" width="1.0" height="1.0" /></disk> + <text string="Credit Indicator"><color red="1.0" green="1.0" blue="1.0" /><bounds x="0" y="1.1" width="6.5" height="0.90" /></text> + </element> + + + <element name="Lamp_Red_Arrow_08" defstate="1"> <!-- Point at 8 o clock --> + <rect state="1"><color red="1.00" green="0.00" blue="0.00" /><bounds x="28" y="00" width="08" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.00" blue="0.00" /><bounds x="28" y="00" width="08" height="03" /></rect> + <rect state="1"><color red="1.00" green="0.00" blue="0.00" /><bounds x="23" y="03" width="08" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.00" blue="0.00" /><bounds x="23" y="03" width="08" height="03" /></rect> + <rect state="1"><color red="1.00" green="0.00" blue="0.00" /><bounds x="18" y="06" width="08" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.00" blue="0.00" /><bounds x="18" y="06" width="08" height="03" /></rect> + <rect state="1"><color red="1.00" green="0.00" blue="0.00" /><bounds x="10" y="03" width="02" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.00" blue="0.00" /><bounds x="10" y="03" width="02" height="03" /></rect> + <rect state="1"><color red="1.00" green="0.00" blue="0.00" /><bounds x="08" y="06" width="06" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.00" blue="0.00" /><bounds x="08" y="06" width="06" height="03" /></rect> + <rect state="1"><color red="1.00" green="0.00" blue="0.00" /><bounds x="06" y="09" width="15" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.00" blue="0.00" /><bounds x="06" y="09" width="15" height="03" /></rect> + <rect state="1"><color red="1.00" green="0.00" blue="0.00" /><bounds x="04" y="12" width="14" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.00" blue="0.00" /><bounds x="04" y="12" width="14" height="03" /></rect> + <rect state="1"><color red="1.00" green="0.00" blue="0.00" /><bounds x="02" y="15" width="17" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.00" blue="0.00" /><bounds x="02" y="15" width="17" height="03" /></rect> + <rect state="1"><color red="1.00" green="0.00" blue="0.00" /><bounds x="00" y="18" width="20" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.00" blue="0.00" /><bounds x="00" y="18" width="20" height="03" /></rect> + </element> + + <element name="Lamp_Amber_Arrow_10" defstate="1"> <!-- Point at 10 o clock --> + <rect state="1"><color red="1.00" green="0.40" blue="0.00" /><bounds x="28" y="18" width="08" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.06" blue="0.00" /><bounds x="28" y="18" width="08" height="03" /></rect> + <rect state="1"><color red="1.00" green="0.40" blue="0.00" /><bounds x="23" y="15" width="08" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.06" blue="0.00" /><bounds x="23" y="15" width="08" height="03" /></rect> + <rect state="1"><color red="1.00" green="0.40" blue="0.00" /><bounds x="18" y="12" width="08" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.06" blue="0.00" /><bounds x="18" y="12" width="08" height="03" /></rect> + <rect state="1"><color red="1.00" green="0.40" blue="0.00" /><bounds x="10" y="15" width="02" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.06" blue="0.00" /><bounds x="10" y="15" width="02" height="03" /></rect> + <rect state="1"><color red="1.00" green="0.40" blue="0.00" /><bounds x="08" y="12" width="06" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.06" blue="0.00" /><bounds x="08" y="12" width="06" height="03" /></rect> + <rect state="1"><color red="1.00" green="0.40" blue="0.00" /><bounds x="06" y="09" width="15" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.06" blue="0.00" /><bounds x="06" y="09" width="15" height="03" /></rect> + <rect state="1"><color red="1.00" green="0.40" blue="0.00" /><bounds x="04" y="06" width="14" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.06" blue="0.00" /><bounds x="04" y="06" width="14" height="03" /></rect> + <rect state="1"><color red="1.00" green="0.40" blue="0.00" /><bounds x="02" y="03" width="17" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.06" blue="0.00" /><bounds x="02" y="03" width="17" height="03" /></rect> + <rect state="1"><color red="1.00" green="0.40" blue="0.00" /><bounds x="00" y="00" width="20" height="03" /></rect> + <rect state="0"><color red="0.15" green="0.06" blue="0.00" /><bounds x="00" y="00" width="20" height="03" /></rect> + </element> + + <element name="Lamp_White_Arrow_01" defstate="1"> <!-- Point at 1 o clock --> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="18" y="00" width="03" height="20" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="18" y="00" width="03" height="20" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="15" y="02" width="03" height="17" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="15" y="02" width="03" height="17" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="12" y="04" width="03" height="14" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="12" y="04" width="03" height="14" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="09" y="06" width="03" height="15" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="09" y="06" width="03" height="15" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="06" y="08" width="03" height="06" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="06" y="08" width="03" height="06" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="03" y="10" width="03" height="02" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="03" y="10" width="03" height="02" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="06" y="18" width="03" height="08" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="06" y="18" width="03" height="08" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="03" y="23" width="03" height="08" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="03" y="23" width="03" height="08" /></rect> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="00" y="28" width="03" height="08" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="00" y="28" width="03" height="08" /></rect> + </element> + + +<!-- Backbox Indicators --> + + <element name="Text_Credit"><text string="CREDIT"><color red="1.0" green="1.0" blue="1.0" /></text></element> + <element name="Text_Lamps"><text string="Lamps"><color red="1.0" green="1.0" blue="1.0" /></text></element> + <element name="Text_15"><text string="U1 0-14"><color red="1.0" green="1.0" blue="1.0" /></text></element> + <element name="Text_30"><text string="U2 0-14"><color red="1.0" green="1.0" blue="1.0" /></text></element> + <element name="Text_45"><text string="U3 0-14"><color red="1.0" green="1.0" blue="1.0" /></text></element> + <element name="Text_60"><text string="U4 0-14"><color red="1.0" green="1.0" blue="1.0" /></text></element> + <element name="Text_Solenoids"><text string="Momentary Solenoids"><color red="1.0" green="1.0" blue="1.0" /></text></element> + <element name="Text_Coils"><text string="Coils"><color red="1.0" green="1.0" blue="1.0" /></text></element> + <element name="Text_MPU_LED"><text string="MPU LED"><color red="1.0" green="1.0" blue="1.0" /></text></element> + <element name="Text_Activity"><text string="Activity Switch"><color red="1.0" green="1.0" blue="1.0" /></text></element> + <element name="Text_Service"><text string="Service Switch"><color red="1.0" green="1.0" blue="1.0" /></text></element> + <element name="Text_Slam"><text string="Slam Switch"><color red="1.0" green="1.0" blue="1.0" /></text></element> + <element name="Text_Tilt"><text string="Tilt Switch"><color red="1.0" green="1.0" blue="1.0" /></text></element> + <element name="Text_Knocker"><text string="Knocker"><color red="1.0" green="1.0" blue="1.0" /></text></element> + + + <element name="High_Score_To_Date" defstate="0"> + <text string="HIGH SCORE TO DATE" state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0" y="0.1" width="1" height="1" /></text> + <text string="HIGH SCORE TO DATE" state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="0" y="0.1" width="1" height="1" /></text> + </element> + <element name="Ball_In_Play" defstate="0"> + <text string="BALL IN PLAY" state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0.1" y="0.1" width="1" height="0.8" /></text> + <text string="BALL IN PLAY" state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="0.1" y="0.1" width="1" height="0.8" /></text> + </element> + <element name="Match" defstate="0"> + <text string="MATCH" state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0" y="0.1" width="1" height="0.8" /></text> + <text string="MATCH" state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="0" y="0.1" width="1" height="0.8" /></text> + </element> + <element name="Game_Over" defstate="0"> + <text string="GAME OVER" state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0" y="0.1" width="1" height="0.8" /></text> + <text string="GAME OVER" state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="0" y="0.1" width="1" height="0.8" /></text> + </element> + <element name="Tilt" defstate="0"> + <text string="TILT" state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0" y="0.1" width="1" height="0.8" /></text> + <text string="TILT" state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="0" y="0.1" width="1" height="0.8" /></text> + </element> + <element name="Shoot_Again" defstate="0"> + <text string="SAME PLAYER" state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0" y="0.1" width="1" height="0.8" /></text> + <text string="SAME PLAYER" state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="0" y="0.1" width="1" height="0.8" /></text> + <text string="SHOOTS AGAIN" state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="0" y="0.9" width="1" height="0.8" /></text> + <text string="SHOOTS AGAIN" state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="0" y="0.9" width="1" height="0.8" /></text> + </element> + + + <element name="Digit" defstate="0"> + <led7seg><color red="1.0" green="0.35" blue="0.0" /></led7seg> + </element> + + <element name="LED_Green" defstate="1"> + <disk state="0"><color red="0.0" green="0.25" blue="0.0" /></disk> + <disk state="1"><color red="0.0" green="1.00" blue="0.0" /></disk> + </element> + + + +<!-- Solenoids --> + + <element name="Solenoid_PullDown"> + <rect state="0"><color red="1.0" green="1.0" blue="1.0" /><bounds x="3" y="0" width="03" height="09" /></rect> + <rect state="0"><color red="0.0" green="1.0" blue="1.0" /><bounds x="0" y="8" width="10" height="11" /></rect> + <rect state="1"><color red="1.0" green="1.0" blue="0.0" /><bounds x="0" y="8" width="10" height="11" /></rect> + </element> + + <element name="Coil_PullDown"> + <rect state="0"><color red="1.0" green="1.0" blue="1.0" /><bounds x="8" y="0" width="02" height="01" /></rect> + <rect state="0"><color red="1.0" green="1.0" blue="1.0" /><bounds x="6" y="1" width="02" height="01" /></rect> + <rect state="0"><color red="1.0" green="1.0" blue="1.0" /><bounds x="4" y="2" width="02" height="01" /></rect> + <rect state="0"><color red="1.0" green="1.0" blue="1.0" /><bounds x="2" y="3" width="02" height="01" /></rect> + <rect state="0"><color red="1.0" green="1.0" blue="1.0" /><bounds x="0" y="4" width="02" height="01" /></rect> + <rect ><color red="1.0" green="1.0" blue="1.0" /><bounds x="0" y="5" width="02" height="02" /></rect> + <rect state="1"><color red="1.0" green="1.0" blue="1.0" /><bounds x="0" y="4" width="10" height="01" /></rect> + + <rect state="0"><color red="0.0" green="1.0" blue="1.0" /><bounds x="0" y="8" width="10" height="11" /></rect> + <rect state="1"><color red="1.0" green="1.0" blue="0.0" /><bounds x="0" y="8" width="10" height="11" /></rect> + </element> + + + <element name="Solenoid_Knocker" defstate="0"> + <rect state="0"><color red="1.0" green="1.0" blue="1.0" /><bounds x="00" y="03" width="09" height="03" /></rect> + <rect state="1"><color red="1.0" green="0.0" blue="0.0" /><bounds x="18" y="03" width="05" height="03" /></rect> + <rect state="0"><color red="0.0" green="1.0" blue="1.0" /><bounds x="08" y="00" width="11" height="10" /></rect> + <rect state="1"><color red="1.0" green="1.0" blue="0.0" /><bounds x="08" y="00" width="11" height="10" /></rect> + </element> + + <element name="Solenoid_Outhole" defstate="0"> + <text string="\" state="1"><color red="1.0" green="0.0" blue="0.0" /><bounds x="17" y="00" width="05" height="16" /></text> + <text string="\" state="0"><color red="1.0" green="1.0" blue="1.0" /><bounds x="02" y="00" width="05" height="16" /></text> + <text string="\" state="1"><color red="1.0" green="0.0" blue="0.0" /><bounds x="18" y="00" width="05" height="16" /></text> + <text string="\" state="0"><color red="1.0" green="1.0" blue="1.0" /><bounds x="03" y="00" width="05" height="16" /></text> + <text string="\" state="1"><color red="1.0" green="0.0" blue="0.0" /><bounds x="19" y="00" width="05" height="16" /></text> + <text string="\" state="0"><color red="1.0" green="1.0" blue="1.0" /><bounds x="04" y="00" width="05" height="16" /></text> + <text string="\" state="1"><color red="1.0" green="0.0" blue="0.0" /><bounds x="20" y="00" width="05" height="16" /></text> + <text string="\" state="0"><color red="1.0" green="1.0" blue="1.0" /><bounds x="05" y="00" width="05" height="16" /></text> + <rect state="1"><color red="1.0" green="0.0" blue="0.0" /><bounds x="02" y="02" width="18" height="10" /></rect> + <rect ><color red="1.0" green="1.0" blue="1.0" /><bounds x="00" y="13" width="25" height="03" /></rect> + <text string="Outhole" ><color red="1.0" green="1.0" blue="1.0" /><bounds x="30" y="12" width="28" height="9.5" /></text> + </element> + + <element name="Solenoid_Kickback" defstate="0"> + <rect state="1"><color red="1.0" green="1.0" blue="1.0" /><bounds x="3" y="00" width="03" height="15" /></rect> + <rect state="0"><color red="1.0" green="1.0" blue="1.0" /><bounds x="3" y="07" width="03" height="08" /></rect> + <rect state="1"><color red="1.0" green="0.0" blue="0.0" /><bounds x="0" y="00" width="10" height="04" /></rect> + <rect state="0"><color red="1.0" green="1.0" blue="1.0" /><bounds x="0" y="07" width="10" height="04" /></rect> + </element> + + <element name="Solenoid_SlingShot_Left" defstate="0"> + <text string="\" state="1"><color red="1.0" green="0.0" blue="0.0" /><bounds x="05" y="00" width="65" height="80" /></text> + <text string="\" state="0"><color red="1.0" green="1.0" blue="1.0" /><bounds x="00" y="00" width="65" height="80" /></text> + <rect ><color red="1.0" green="1.0" blue="1.0" /><bounds x="20" y="16" width="04" height="60" /></rect> + <rect ><color red="1.0" green="1.0" blue="1.0" /><bounds x="20" y="76" width="24.5" height="04" /></rect> + </element> + <element name="Solenoid_SlingShot_Right" defstate="0"> + <text string="/" state="1"><color red="1.0" green="0.0" blue="0.0" /><bounds x="-5" y="00" width="65" height="80" /></text> + <text string="/" state="0"><color red="1.0" green="1.0" blue="1.0" /><bounds x="00" y="00" width="65" height="80" /></text> + <rect ><color red="1.0" green="1.0" blue="1.0" /><bounds x="40" y="16" width="04" height="60" /></rect> + <rect ><color red="1.0" green="1.0" blue="1.0" /><bounds x="19.5" y="76" width="24" height="04" /></rect> + </element> + + + <element name="Solenoid_Bumper_Black_Star" defstate="0"> + <disk state="0"> <color red="1.0" green="1.0" blue="1.0" /><bounds x="0" y="0" width="80" height="80" /></disk> + <disk state="1"> <color red="1.0" green="0.0" blue="0.0" /><bounds x="0" y="0" width="80" height="80" /></disk> + <text string="*"><color red="0.0" green="0.0" blue="0.0" /><bounds x="-61" y="-38.5" width="206" height="206" /></text> + <disk> <color red="1.0" green="1.0" blue="1.0" /><bounds x="18" y="18" width="44" height="44" /></disk> + </element> + <element name="Switch_Bumper_Black_Star" defstate="0"> + <text string="*" state="9"><color red="0.0" green="0.0" blue="0.0" /><bounds x="-61" y="-38.5" width="206" height="206" /></text> + <disk state="0"><color red="0.0" green="0.0" blue="0.0" /><bounds x="14" y="15" width="50" height="50" /></disk> + <disk state="1"><color red="0.5" green="0.5" blue="0.5" /><bounds x="14" y="15" width="50" height="50" /></disk> + </element> + <element name="Lamp_Bumper_GI"> + <text string="*" state="9"><color red="0.0" green="0.0" blue="0.0" /><bounds x="-61" y="-38.5" width="206" height="206" /></text> + <disk ><color red="1.0" green="1.0" blue="1.0" /><bounds x="18" y="18" width="44" height="44" /></disk> + </element> + + +<!-- Line colours --> + + <element name="Draw_White" defstate="1"> + <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds left="0" top="0" right="1" bottom="1" /></rect> + <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds left="0" top="0" right="1" bottom="1" /></rect> + </element> + + <element name="Canvas"> + <rect> + <color red="0.0" green="0.0" blue="0.0" /> + <bounds left="0" top="0" right="1" bottom="1" /> + </rect> + </element> + + + + + + <view name="Playboy Playfield"> + + <!-- Background --> + <backdrop element="Canvas"><bounds x="000" y="000" width="640" height="480" /></backdrop> + + <bezel element="Draw_White"><bounds x="000" y="000" width="640" height="001" /></bezel> + <bezel element="Draw_White"><bounds x="000" y="000" width="001" height="480" /></bezel> + <bezel element="Draw_White"><bounds x="640" y="000" width="001" height="480" /></bezel> + <bezel element="Draw_White"><bounds x="000" y="480" width="640" height="001" /></bezel> + <bezel element="Draw_White"><bounds x="320" y="000" width="001" height="480" /></bezel> + <bezel element="Draw_White"><bounds x="320" y="320" width="320" height="001" /></bezel> + <!-- <bezel element="Draw_White"><bounds x="159" y="000" width="001" height="480" /></bezel> --> + + <bezel element="Title_Playboy"><bounds x="430" y="18" width="105" height="30" /></bezel> + + + <!-- Backbox --> + + <!-- MPU Board Power On Self Test LED --> + <bezel element="Text_MPU_LED"> <bounds x="609" y="342" width="30" height="10" /></bezel> + <bezel name="led0" element="LED_Green"><bounds x="618" y="328" width="10" height="10" /></bezel> + + <!-- MPU Board Activity Switch --> + <bezel element="Text_Activity"> <bounds x="540" y="342" width="50" height="10" /></bezel> + <bezel element="Switch_Push-Button" inputtag="TEST" inputmask="0x02"><bounds x="550" y="331" width="20" height="10" /></bezel> + <bezel element="Key_0"> <bounds x="571" y="330" width="10" height="10" /></bezel> + + + <!-- Player 1 Score --> + <bezel name="lamp14" element="Lamp_P1"><bounds x="330" y="55" width="15" height="15" /></bezel> <!-- Backbox ~ 1st Player Up --> + <bezel name="digit17" element="Digit"><bounds x="360" y="55" width="10" height="15" /></bezel> + <bezel name="digit16" element="Digit"><bounds x="374" y="55" width="10" height="15" /></bezel> + <bezel name="digit15" element="Digit"><bounds x="388" y="55" width="10" height="15" /></bezel> + <bezel name="digit14" element="Digit"><bounds x="402" y="55" width="10" height="15" /></bezel> + <bezel name="digit13" element="Digit"><bounds x="416" y="55" width="10" height="15" /></bezel> + <bezel name="digit12" element="Digit"><bounds x="430" y="55" width="10" height="15" /></bezel> + <bezel name="digit11" element="Digit"><bounds x="444" y="55" width="10" height="15" /></bezel> + + <!-- Player 2 Score --> + <bezel name="lamp29" element="Lamp_P2"><bounds x="615" y="55" width="15" height="15" /></bezel> <!-- Backbox ~ 2nd Player Up --> + <bezel name="digit27" element="Digit"><bounds x="506" y="55" width="10" height="15" /></bezel> + <bezel name="digit26" element="Digit"><bounds x="520" y="55" width="10" height="15" /></bezel> + <bezel name="digit25" element="Digit"><bounds x="534" y="55" width="10" height="15" /></bezel> + <bezel name="digit24" element="Digit"><bounds x="548" y="55" width="10" height="15" /></bezel> + <bezel name="digit23" element="Digit"><bounds x="562" y="55" width="10" height="15" /></bezel> + <bezel name="digit22" element="Digit"><bounds x="576" y="55" width="10" height="15" /></bezel> + <bezel name="digit21" element="Digit"><bounds x="590" y="55" width="10" height="15" /></bezel> + + <!-- Player 3 Score --> + <bezel name="lamp44" element="Lamp_P3"><bounds x="330" y="250" width="15" height="15" /></bezel> <!-- Backbox ~ 3rd Player Up --> + <bezel name="digit37" element="Digit"><bounds x="360" y="250" width="10" height="15" /></bezel> + <bezel name="digit36" element="Digit"><bounds x="374" y="250" width="10" height="15" /></bezel> + <bezel name="digit35" element="Digit"><bounds x="388" y="250" width="10" height="15" /></bezel> + <bezel name="digit34" element="Digit"><bounds x="402" y="250" width="10" height="15" /></bezel> + <bezel name="digit33" element="Digit"><bounds x="416" y="250" width="10" height="15" /></bezel> + <bezel name="digit32" element="Digit"><bounds x="430" y="250" width="10" height="15" /></bezel> + <bezel name="digit31" element="Digit"><bounds x="444" y="250" width="10" height="15" /></bezel> + + <!-- Player 4 Score --> + <bezel name="lamp59" element="Lamp_P4"><bounds x="615" y="250" width="15" height="15" /></bezel> <!-- Backbox ~ 4th Player Up --> + <bezel name="digit47" element="Digit"><bounds x="506" y="250" width="10" height="15" /></bezel> + <bezel name="digit46" element="Digit"><bounds x="520" y="250" width="10" height="15" /></bezel> + <bezel name="digit45" element="Digit"><bounds x="534" y="250" width="10" height="15" /></bezel> + <bezel name="digit44" element="Digit"><bounds x="548" y="250" width="10" height="15" /></bezel> + <bezel name="digit43" element="Digit"><bounds x="562" y="250" width="10" height="15" /></bezel> + <bezel name="digit42" element="Digit"><bounds x="576" y="250" width="10" height="15" /></bezel> + <bezel name="digit41" element="Digit"><bounds x="590" y="250" width="10" height="15" /></bezel> + + <!-- Credits and Ball In Play / Match --> + <bezel element="Text_Credit"><bounds x="542" y="142" width="48" height="8" /></bezel> + <bezel name="lamp12" element="Ball_In_Play"><bounds x="586" y="105" width="50" height="11" /></bezel> <!-- Backbox ~ Ball In Play --> + <bezel name="lamp25" element="Match"><bounds x="596" y="152" width="25" height="11" /></bezel> <!-- Backbox ~ Match --> + <bezel name="digit55" element="Digit"><bounds x="554" y="125" width="10" height="15" /></bezel> + <bezel name="digit54" element="Digit"><bounds x="568" y="125" width="10" height="15" /></bezel> + <bezel name="digit52" element="Digit"><bounds x="596" y="125" width="10" height="15" /></bezel> + <bezel name="digit51" element="Digit"><bounds x="610" y="125" width="10" height="15" /></bezel> + + <bezel name="lamp10" element="Shoot_Again"><bounds x="420" y="295" width="60" height="19" /></bezel> <!-- Backbox ~ Same Player Shoots Again --> + <bezel name="lamp13" element="Lamp_1P"><bounds x="345" y="297" width="15" height="15" /></bezel> <!-- Backbox ~ 1 Player Game --> + <bezel name="lamp28" element="Lamp_2P"><bounds x="360" y="297" width="15" height="15" /></bezel> <!-- Backbox ~ 2 Player Game --> + <bezel name="lamp43" element="Lamp_3P"><bounds x="375" y="297" width="15" height="15" /></bezel> <!-- Backbox ~ 3 Player Game --> + <bezel name="lamp58" element="Lamp_4P"><bounds x="390" y="297" width="15" height="15" /></bezel> <!-- Backbox ~ 4 Player Game --> + <bezel name="lamp27" element="High_Score_To_Date"><bounds x="438" y="6" width="90" height="11" /></bezel> <!-- Backbox ~ High Score To Date --> + <bezel name="lamp42" element="Game_Over"><bounds x="580" y="300" width="45" height="11" /></bezel> <!-- Backbox ~ Game Over --> + <bezel name="lamp57" element="Tilt"><bounds x="480" y="297" width="50" height="16" /></bezel> <!-- Backbox ~ Tilt --> + + + + <bezel element="Text_Lamps"><bounds x="410" y="360" width="60" height="11" /></bezel> + <bezel element="Text_15"><bounds x="552" y="373" width="30" height="11" /></bezel> + <bezel element="Text_30"><bounds x="552" y="388" width="30" height="11" /></bezel> + <bezel element="Text_45"><bounds x="552" y="403" width="30" height="11" /></bezel> + <bezel element="Text_60"><bounds x="552" y="418" width="30" height="11" /></bezel> + + <!-- Lamps controlled by U1 on Lamp Driver Board --> + <bezel name="lamp0" element="Lamp_White"><bounds x="330" y="375" width="8" height="8" /></bezel> <!-- U1 00 --> + <bezel name="lamp1" element="Lamp_White"><bounds x="345" y="375" width="8" height="8" /></bezel> <!-- U1 01 --> + <bezel name="lamp2" element="Lamp_White"><bounds x="360" y="375" width="8" height="8" /></bezel> <!-- U1 02 --> + <bezel name="lamp3" element="Lamp_White"><bounds x="375" y="375" width="8" height="8" /></bezel> <!-- U1 03 --> + <bezel name="lamp4" element="Lamp_White"><bounds x="390" y="375" width="8" height="8" /></bezel> <!-- U1 04 --> + <bezel name="lamp5" element="Lamp_White"><bounds x="405" y="375" width="8" height="8" /></bezel> <!-- U1 05 --> + <bezel name="lamp6" element="Lamp_White"><bounds x="420" y="375" width="8" height="8" /></bezel> <!-- U1 06 --> + <bezel name="lamp7" element="Lamp_White"><bounds x="435" y="375" width="8" height="8" /></bezel> <!-- U1 07 --> + <bezel name="lamp8" element="Lamp_White"><bounds x="450" y="375" width="8" height="8" /></bezel> <!-- U1 08 --> + <bezel name="lamp9" element="Lamp_White"><bounds x="465" y="375" width="8" height="8" /></bezel> <!-- U1 09 --> + <bezel name="lamp10" element="Lamp_White"><bounds x="480" y="375" width="8" height="8" /></bezel> <!-- U1 10 --> + <bezel name="lamp11" element="Lamp_White"><bounds x="495" y="375" width="8" height="8" /></bezel> <!-- U1 11 --> + <bezel name="lamp12" element="Lamp_White"><bounds x="510" y="375" width="8" height="8" /></bezel> <!-- U1 12 --> + <bezel name="lamp13" element="Lamp_White"><bounds x="525" y="375" width="8" height="8" /></bezel> <!-- U1 13 --> + <bezel name="lamp14" element="Lamp_White"><bounds x="540" y="375" width="8" height="8" /></bezel> <!-- U1 14 --> + + <!-- Lamps controlled by U2 on Lamp Driver Board --> + <bezel name="lamp15" element="Lamp_White"><bounds x="330" y="390" width="8" height="8" /></bezel> <!-- U2 00 --> + <bezel name="lamp16" element="Lamp_White"><bounds x="345" y="390" width="8" height="8" /></bezel> <!-- U2 01 --> + <bezel name="lamp17" element="Lamp_White"><bounds x="360" y="390" width="8" height="8" /></bezel> <!-- U2 02 --> + <bezel name="lamp18" element="Lamp_White"><bounds x="375" y="390" width="8" height="8" /></bezel> <!-- U2 03 --> + <bezel name="lamp19" element="Lamp_White"><bounds x="390" y="390" width="8" height="8" /></bezel> <!-- U2 04 --> + <bezel name="lamp20" element="Lamp_White"><bounds x="405" y="390" width="8" height="8" /></bezel> <!-- U2 05 --> + <bezel name="lamp21" element="Lamp_White"><bounds x="420" y="390" width="8" height="8" /></bezel> <!-- U2 06 --> + <bezel name="lamp22" element="Lamp_White"><bounds x="435" y="390" width="8" height="8" /></bezel> <!-- U2 07 --> + <bezel name="lamp23" element="Lamp_White"><bounds x="450" y="390" width="8" height="8" /></bezel> <!-- U2 08 --> + <bezel name="lamp24" element="Lamp_White"><bounds x="465" y="390" width="8" height="8" /></bezel> <!-- U2 09 --> + <bezel name="lamp25" element="Lamp_White"><bounds x="480" y="390" width="8" height="8" /></bezel> <!-- U2 10 --> + <bezel name="lamp26" element="Lamp_White"><bounds x="495" y="390" width="8" height="8" /></bezel> <!-- U2 11 --> + <bezel name="lamp27" element="Lamp_White"><bounds x="510" y="390" width="8" height="8" /></bezel> <!-- U2 12 --> + <bezel name="lamp28" element="Lamp_White"><bounds x="525" y="390" width="8" height="8" /></bezel> <!-- U2 13 --> + <bezel name="lamp29" element="Lamp_White"><bounds x="540" y="390" width="8" height="8" /></bezel> <!-- U2 14 --> + + <!-- Lamps controlled by U3 on Lamp Driver Board --> + <bezel name="lamp30" element="Lamp_White"><bounds x="330" y="405" width="8" height="8" /></bezel> <!-- U3 00 --> + <bezel name="lamp31" element="Lamp_White"><bounds x="345" y="405" width="8" height="8" /></bezel> <!-- U3 01 --> + <bezel name="lamp32" element="Lamp_White"><bounds x="360" y="405" width="8" height="8" /></bezel> <!-- U3 02 --> + <bezel name="lamp33" element="Lamp_White"><bounds x="375" y="405" width="8" height="8" /></bezel> <!-- U3 03 --> + <bezel name="lamp34" element="Lamp_White"><bounds x="390" y="405" width="8" height="8" /></bezel> <!-- U3 04 --> + <bezel name="lamp35" element="Lamp_White"><bounds x="405" y="405" width="8" height="8" /></bezel> <!-- U3 05 --> + <bezel name="lamp36" element="Lamp_White"><bounds x="420" y="405" width="8" height="8" /></bezel> <!-- U3 06 --> + <bezel name="lamp37" element="Lamp_White"><bounds x="435" y="405" width="8" height="8" /></bezel> <!-- U3 07 --> + <bezel name="lamp38" element="Lamp_White"><bounds x="450" y="405" width="8" height="8" /></bezel> <!-- U3 08 --> + <bezel name="lamp39" element="Lamp_White"><bounds x="465" y="405" width="8" height="8" /></bezel> <!-- U3 09 --> + <bezel name="lamp40" element="Lamp_White"><bounds x="480" y="405" width="8" height="8" /></bezel> <!-- U3 10 --> + <bezel name="lamp41" element="Lamp_White"><bounds x="495" y="405" width="8" height="8" /></bezel> <!-- U3 11 --> + <bezel name="lamp42" element="Lamp_White"><bounds x="510" y="405" width="8" height="8" /></bezel> <!-- U3 12 --> + <bezel name="lamp43" element="Lamp_White"><bounds x="525" y="405" width="8" height="8" /></bezel> <!-- U3 13 --> + <bezel name="lamp44" element="Lamp_White"><bounds x="540" y="405" width="8" height="8" /></bezel> <!-- U3 14 --> + + <!-- Lamps controlled by U4 on Lamp Driver Board --> + <bezel name="lamp45" element="Lamp_White"><bounds x="330" y="420" width="8" height="8" /></bezel> <!-- U4 00 --> + <bezel name="lamp46" element="Lamp_White"><bounds x="345" y="420" width="8" height="8" /></bezel> <!-- U4 01 --> + <bezel name="lamp47" element="Lamp_White"><bounds x="360" y="420" width="8" height="8" /></bezel> <!-- U4 02 --> + <bezel name="lamp48" element="Lamp_White"><bounds x="375" y="420" width="8" height="8" /></bezel> <!-- U4 03 --> + <bezel name="lamp49" element="Lamp_White"><bounds x="390" y="420" width="8" height="8" /></bezel> <!-- U4 04 --> + <bezel name="lamp50" element="Lamp_White"><bounds x="405" y="420" width="8" height="8" /></bezel> <!-- U4 05 --> + <bezel name="lamp51" element="Lamp_White"><bounds x="420" y="420" width="8" height="8" /></bezel> <!-- U4 06 --> + <bezel name="lamp52" element="Lamp_White"><bounds x="435" y="420" width="8" height="8" /></bezel> <!-- U4 07 --> + <bezel name="lamp53" element="Lamp_White"><bounds x="450" y="420" width="8" height="8" /></bezel> <!-- U4 08 --> + <bezel name="lamp54" element="Lamp_White"><bounds x="465" y="420" width="8" height="8" /></bezel> <!-- U4 09 --> + <bezel name="lamp55" element="Lamp_White"><bounds x="480" y="420" width="8" height="8" /></bezel> <!-- U4 10 --> + <bezel name="lamp56" element="Lamp_White"><bounds x="495" y="420" width="8" height="8" /></bezel> <!-- U4 11 --> + <bezel name="lamp57" element="Lamp_White"><bounds x="510" y="420" width="8" height="8" /></bezel> <!-- U4 12 --> + <bezel name="lamp58" element="Lamp_White"><bounds x="525" y="420" width="8" height="8" /></bezel> <!-- U4 13 --> + <bezel name="lamp59" element="Lamp_White"><bounds x="540" y="420" width="8" height="8" /></bezel> <!-- U4 14 --> + + + <bezel element="Text_Solenoids"><bounds x="382" y="437" width="100" height="11" /></bezel> + <bezel name="solenoid0" element="Solenoid_PullDown"><bounds x="330" y="452" width="9" height="19" /></bezel> + <bezel name="solenoid1" element="Solenoid_PullDown"><bounds x="345" y="452" width="9" height="19" /></bezel> + <bezel name="solenoid2" element="Solenoid_PullDown"><bounds x="360" y="452" width="9" height="19" /></bezel> + <bezel name="solenoid3" element="Solenoid_PullDown"><bounds x="375" y="452" width="9" height="19" /></bezel> + <bezel name="solenoid4" element="Solenoid_PullDown"><bounds x="390" y="452" width="9" height="19" /></bezel> + <bezel name="solenoid5" element="Solenoid_PullDown"><bounds x="405" y="452" width="9" height="19" /></bezel> + <bezel name="solenoid6" element="Solenoid_PullDown"><bounds x="420" y="452" width="9" height="19" /></bezel> + <bezel name="solenoid7" element="Solenoid_PullDown"><bounds x="435" y="452" width="9" height="19" /></bezel> + <bezel name="solenoid8" element="Solenoid_PullDown"><bounds x="450" y="452" width="9" height="19" /></bezel> + <bezel name="solenoid9" element="Solenoid_PullDown"><bounds x="465" y="452" width="9" height="19" /></bezel> + <bezel name="solenoid10" element="Solenoid_PullDown"><bounds x="480" y="452" width="9" height="19" /></bezel> + <bezel name="solenoid11" element="Solenoid_PullDown"><bounds x="495" y="452" width="9" height="19" /></bezel> + <bezel name="solenoid12" element="Solenoid_PullDown"><bounds x="510" y="452" width="9" height="19" /></bezel> + <bezel name="solenoid13" element="Solenoid_PullDown"><bounds x="525" y="452" width="9" height="19" /></bezel> + <bezel name="solenoid14" element="Solenoid_PullDown"><bounds x="540" y="452" width="9" height="19" /></bezel> + + <bezel element="Text_Coils"><bounds x="572" y="437" width="50" height="11" /></bezel> + <bezel name="solenoid16" element="Coil_PullDown"><bounds x="570" y="459" width="09" height="12" /></bezel> + <bezel name="solenoid17" element="Coil_PullDown"><bounds x="585" y="459" width="09" height="12" /></bezel> + <bezel name="solenoid18" element="Coil_PullDown"><bounds x="600" y="459" width="09" height="12" /></bezel> + <bezel name="solenoid19" element="Coil_PullDown"><bounds x="615" y="459" width="09" height="12" /></bezel> + + + + <!-- Cabinet Switches --> + <bezel element="Text_Service"> <bounds x="485" y="342" width="50" height="10" /></bezel> + <bezel element="Switch_Push-Button" inputtag="TEST" inputmask="0x01"><bounds x="495" y="331" width="20" height="10" /></bezel> + <bezel element="Key_9"> <bounds x="516" y="330" width="10" height="10" /></bezel> + + <bezel element="Text_Slam"> <bounds x="430" y="342" width="50" height="10" /></bezel> + <bezel element="Switch_SlamTilt" inputtag="X1" inputmask="0x80"><bounds x="434" y="331" width="25" height="08" /></bezel> + <bezel element="Key_Equals"> <bounds x="461" y="330" width="10" height="10" /></bezel> + + <bezel element="Text_Tilt"> <bounds x="380" y="342" width="50" height="10" /></bezel> + <bezel element="Switch_Tilt" inputtag="X0" inputmask="0x40"><bounds x="390" y="324" width="17" height="17" /></bezel> + <bezel element="Key_T"> <bounds x="411" y="330" width="10" height="10" /></bezel> + + + <!-- Misc Solenoids --> + <bezel name="solenoid5" element="Solenoid_Knocker"><bounds x="297" y="457" width="23" height="09" /></bezel> + <bezel element="Text_Knocker"> <!-- Knocker --> <bounds x="290" y="467" width="30" height="10" /></bezel> + + + <!-- Misc Lamps --> + <bezel name="lamp55" element="Credit_Indicator"> <bounds x="023" y="456" width="70" height="21" /></bezel> <!-- Credit Indicator --> + <bezel name="lamp40" element="Lamp_Amber"> <bounds x="153.5" y="420" width="12" height="12" /></bezel> <!-- Extra Ball --> + <bezel name="lamp49" element="Lamp_Red"> <bounds x="209" y="192" width="14" height="14" /></bezel> <!-- Special Drop Targets --> + <bezel name="lamp47" element="Lamp_Red"> <bounds x="155" y="023" width="09" height="9" /></bezel> <!-- Special 1 - 5 Keys --> + <bezel name="lamp56" element="Lamp_White_25k"> <bounds x="009" y="333" width="09" height="9" /></bezel> <!-- 25,000 Outlane Left --> + <bezel name="lamp41" element="Lamp_White_25k"> <bounds x="301" y="333" width="09" height="9" /></bezel> <!-- 25,000 Outlane Right --> + <bezel name="lamp53" element="Lamp_Amber_Arrow_10"><bounds x="055" y="198" width="20" height="12.5" /></bezel> <!-- Extra Ball Potential Rollover Button --> + <bezel name="lamp38" element="Lamp_Red_Arrow_08"> <bounds x="055" y="148" width="20" height="12.5" /></bezel> <!-- Special Potential Rollover Button --> + <!-- Bonus End of Ball Lamps --> + <bezel name="lamp0" element="Lamp_White_1k"> <bounds x="126" y="395" width="09" height="09" /></bezel> + <bezel name="lamp15" element="Lamp_White_2k"> <bounds x="126" y="380" width="09" height="09" /></bezel> + <bezel name="lamp30" element="Lamp_White_3k"> <bounds x="126" y="355" width="09" height="09" /></bezel> + <bezel name="lamp45" element="Lamp_White_4k"> <bounds x="126" y="340" width="09" height="09" /></bezel> + <bezel name="lamp1" element="Lamp_White_5k"> <bounds x="141" y="340" width="09" height="09" /></bezel> + <bezel name="lamp16" element="Lamp_White_6k"> <bounds x="169" y="340" width="09" height="09" /></bezel> + <bezel name="lamp31" element="Lamp_White_7k"> <bounds x="184" y="340" width="09" height="09" /></bezel> + <bezel name="lamp46" element="Lamp_White_8k"> <bounds x="184" y="355" width="09" height="09" /></bezel> + <bezel name="lamp2" element="Lamp_White_9k"> <bounds x="184" y="380" width="09" height="09" /></bezel> + <bezel name="lamp17" element="Lamp_White_10k"><bounds x="184" y="395" width="09" height="09" /></bezel> + <bezel name="lamp32" element="Lamp_White_20k"><bounds x="154" y="330" width="12" height="12" /></bezel> + <!-- Bonus Multiplier Lamps --> + <bezel name="lamp51" element="Lamp_2x"><bounds x="134" y="318" width="14" height="14" /></bezel> <!-- 2X Bonus --> + <bezel name="lamp36" element="Lamp_3x"><bounds x="172" y="318" width="14" height="14" /></bezel> <!-- 3X Bonus --> + <bezel name="lamp21" element="Lamp_5x"><bounds x="153" y="310" width="14" height="14" /></bezel> <!-- 5X Bonus --> + <!-- Grotto Lamps --> + <bezel name="lamp19" element="Lamp_White_25k"><bounds x="17" y="090" width="12" height="12" /></bezel> <!-- 25,000 Grotto --> + <bezel name="lamp5" element="Lamp_White_1"> <bounds x="09" y="132" width="09" height="09" /></bezel> <!-- 1 --> + <bezel name="lamp20" element="Lamp_White_2"> <bounds x="09" y="147" width="09" height="09" /></bezel> <!-- 2 --> + <bezel name="lamp35" element="Lamp_White_3"> <bounds x="09" y="162" width="09" height="09" /></bezel> <!-- 3 --> + <bezel name="lamp50" element="Lamp_White_4"> <bounds x="09" y="177" width="09" height="09" /></bezel> <!-- 4 --> + <bezel name="lamp6" element="Lamp_White_5"> <bounds x="09" y="192" width="09" height="09" /></bezel> <!-- 5 --> + <!-- Playmate of the Month Lamps --> + <bezel name="lamp7" element="Lamp_White_March"> <bounds x="56" y="225" width="21" height="18" /></bezel> <!-- March --> + <bezel name="lamp22" element="Lamp_White_May"> <bounds x="50" y="244" width="13" height="18" /></bezel> <!-- May --> + <bezel name="lamp37" element="Lamp_White_January"> <bounds x="44" y="263" width="29" height="18" /></bezel> <!-- January --> + <bezel name="lamp52" element="Lamp_White_July"> <bounds x="38" y="282" width="16" height="18" /></bezel> <!-- July --> + <bezel name="lamp8" element="Lamp_White_September"><bounds x="32" y="301" width="37" height="18" /></bezel> <!-- September --> + + + + <!-- Outhole --> + <bezel name="solenoid6" element="Solenoid_Outhole"> <bounds x="150" y="455" width="58" height="22" /></bezel> + <bezel element="Switch_RollOn_WireForm_Left" inputtag="X0" inputmask="0x80"><bounds x="163" y="453" width="20" height="16" /></bezel> + <bezel element="Key_BSpace"> <bounds x="185" y="455" width="15" height="14" /></bezel> + + + <!-- Pop Bumper Left --> + <bezel name="solenoid8" element="Solenoid_Bumper_Black_Star"> <bounds x="084" y="100" width="80" height="80" /></bezel> + <bezel element="Switch_Bumper_Black_Star" inputtag="X4" inputmask="0x80"><bounds x="084" y="100" width="80" height="80" /></bezel> + <bezel element="Lamp_Bumper_GI"> <bounds x="084" y="100" width="80" height="80" /></bezel> + <bezel element="Key_Z"> <bounds x="141" y="126" width="09" height="09" /></bezel> + + <!-- Pop Bumper Right --> + <bezel name="solenoid9" element="Solenoid_Bumper_Black_Star"> <bounds x="157" y="100" width="80" height="80" /></bezel> + <bezel element="Switch_Bumper_Black_Star" inputtag="X4" inputmask="0x40"><bounds x="157" y="100" width="80" height="80" /></bezel> + <bezel element="Lamp_Bumper_GI"> <bounds x="157" y="100" width="80" height="80" /></bezel> + <bezel element="Key_X"> <bounds x="169" y="126" width="09" height="09" /></bezel> + + <!-- Pop Bumper Middle --> + <bezel name="solenoid10" element="Solenoid_Bumper_Black_Star"> <bounds x="121" y="153" width="80" height="80" /></bezel> + <bezel element="Switch_Bumper_Black_Star" inputtag="X4" inputmask="0x20"><bounds x="121" y="153" width="80" height="80" /></bezel> + <bezel element="Lamp_Bumper_GI"> <bounds x="121" y="153" width="80" height="80" /></bezel> + <bezel element="Key_C"> <bounds x="155" y="157" width="09" height="09" /></bezel> + + + <!-- Slingshot Left --> + <bezel name="solenoid13" element="Solenoid_SlingShot_Right"> <bounds x="221" y="335" width="69" height="80" /></bezel> + <bezel element="Switch_Leaf_Vertical" inputtag="X4" inputmask="0x10"><bounds x="060" y="399" width="08" height="09" /></bezel> + <bezel element="Key_V"> <bounds x="060" y="390" width="09" height="09" /></bezel> + + <!-- Slingshot Right --> + <bezel name="solenoid11" element="Solenoid_SlingShot_Left"> <bounds x="35" y="335" width="69" height="80" /></bezel> + <bezel element="Switch_Leaf_Vertical" inputtag="X4" inputmask="0x08"><bounds x="257" y="399" width="08" height="09" /></bezel> + <bezel element="Key_B"> <bounds x="257" y="390" width="09" height="09" /></bezel> + + + <!-- Kickback Grotto --> + <bezel name="solenoid7" element="Solenoid_Kickback"> <bounds x="008" y="230" width="10" height="15" /></bezel> + <bezel element="Switch_RollOn_WireForm_Down" inputtag="X3" inputmask="0x80"><bounds x="009" y="210" width="09" height="18" /></bezel> + <bezel element="Key_Q"> <bounds x="017" y="210" width="09" height="09" /></bezel> + + + <!-- Drop Targets Rightside --> + <bezel name="solenoid12" element="Solenoid_DropTarget_Tall"> <bounds x="222" y="156" width="07" height="15" /></bezel> + <bezel element="DropTarget_Tall" inputtag="X0" inputmask="0x10"><bounds x="222" y="156" width="07" height="15" /></bezel> + <bezel element="Key_BSlash"> <bounds x="230" y="156" width="10" height="10" /></bezel> + <bezel name="solenoid12" element="Solenoid_DropTarget_Tall"> <bounds x="228" y="171" width="07" height="15" /></bezel> + <bezel element="DropTarget_Tall" inputtag="X0" inputmask="0x08"><bounds x="228" y="171" width="07" height="15" /></bezel> + <bezel element="Key_CBrkt"> <bounds x="236" y="171" width="10" height="10" /></bezel> + <bezel name="solenoid12" element="Solenoid_DropTarget_Tall"> <bounds x="234" y="186" width="07" height="15" /></bezel> + <bezel element="DropTarget_Tall" inputtag="X0" inputmask="0x04"><bounds x="234" y="186" width="07" height="15" /></bezel> + <bezel element="Key_OBrkt"> <bounds x="240" y="186" width="10" height="10" /></bezel> + <bezel name="solenoid12" element="Solenoid_DropTarget_Tall"> <bounds x="240" y="201" width="07" height="15" /></bezel> + <bezel element="DropTarget_Tall" inputtag="X0" inputmask="0x02"><bounds x="240" y="201" width="07" height="15" /></bezel> + <bezel element="Key_FSlash"> <bounds x="248" y="201" width="10" height="10" /></bezel> + <bezel name="solenoid12" element="Solenoid_DropTarget_Tall"> <bounds x="246" y="216" width="07" height="15" /></bezel> + <bezel element="DropTarget_Tall" inputtag="X0" inputmask="0x01"><bounds x="246" y="216" width="07" height="15" /></bezel> + <bezel element="Key_Dot"> <bounds x="252" y="216" width="14" height="14" /></bezel> + + <!-- Drop Target Area Rebound Switch --> + <bezel element="Switch_Leaf_Vertical" inputtag="X4" inputmask="0x01"><bounds x="260" y="186" width="08" height="09" /></bezel> + <bezel element="Key_Comma"><bounds x="258" y="169" width="14" height="14" /></bezel> + + + <!-- 1 - 5 Key Lanes / Target --> + <bezel name="lamp3" element="Lamp_White_1"> <bounds x="098" y="037" width="14" height="14" /></bezel> + <bezel element="Switch_RollOver_WireForm_Vertical" inputtag="X2" inputmask="0x10"><bounds x="100" y="060" width="09" height="27" /></bezel> + <bezel element="Key_F"> <bounds x="100" y="090" width="09" height="09" /></bezel> + <bezel name="lamp18" element="Lamp_White_2"> <bounds x="134" y="037" width="14" height="14" /></bezel> + <bezel element="Switch_RollOver_WireForm_Vertical" inputtag="X2" inputmask="0x08"><bounds x="136" y="060" width="09" height="27" /></bezel> + <bezel element="Key_G"> <bounds x="136" y="090" width="09" height="09" /></bezel> + <bezel name="lamp33" element="Lamp_White_3"> <bounds x="171" y="037" width="14" height="14" /></bezel> + <bezel element="Switch_RollOver_WireForm_Vertical" inputtag="X2" inputmask="0x04"><bounds x="173" y="060" width="09" height="27" /></bezel> + <bezel element="Key_H"> <bounds x="173" y="090" width="09" height="09" /></bezel> + <bezel name="lamp48" element="Lamp_White_4"> <bounds x="206" y="037" width="14" height="14" /></bezel> + <bezel element="Switch_RollOver_WireForm_Vertical" inputtag="X2" inputmask="0x02"><bounds x="208" y="060" width="09" height="27" /></bezel> + <bezel element="Key_J"> <bounds x="208" y="090" width="09" height="09" /></bezel> + <bezel name="lamp4" element="Lamp_White_5"> <bounds x="153" y="225" width="14" height="14" /></bezel> + <bezel element="Switch_Target_Red_Forward" inputtag="X2" inputmask="0x01"><bounds x="153.5" y="212" width="12" height="08" /></bezel> + <bezel element="Key_K"> <bounds x="155" y="202" width="09" height="09" /></bezel> + + + <!-- Right Middle 500/5000 Lane --> + <bezel name="lamp34" element="Lamp_White_Arrow_01"> <bounds x="283" y="248" width="12.5" height="20" /></bezel> + <bezel element="Switch_RollOver_WireForm_Vertical" inputtag="X3" inputmask="0x40"><bounds x="301" y="155" width="09" height="27" /></bezel> + <bezel element="Key_W"> <bounds x="301" y="185" width="09" height="09" /></bezel> + + <!-- Outlane Switches --> + <bezel element="Switch_RollOver_WireForm_Vertical" inputtag="X2" inputmask="0x40"><bounds x="009" y="361" width="09" height="27" /></bezel> + <bezel element="Key_S"> <bounds x="009" y="391" width="09" height="09" /></bezel> + <bezel element="Switch_RollOver_WireForm_Vertical" inputtag="X2" inputmask="0x20"><bounds x="301" y="361" width="09" height="27" /></bezel> + <bezel element="Key_D"> <bounds x="301" y="391" width="09" height="09" /></bezel> + + <!-- Flipper Return Lane Switches --> + <bezel element="Switch_RollOver_WireForm_Vertical" inputtag="X2" inputmask="0x80"><bounds x="030" y="361" width="09" height="27" /></bezel> + <bezel element="Key_A"> <bounds x="030" y="391" width="09" height="09" /></bezel> + <bezel element="Switch_RollOver_WireForm_Vertical" inputtag="X2" inputmask="0x80"><bounds x="280" y="361" width="09" height="27" /></bezel> + <bezel element="Key_A"> <bounds x="280" y="391" width="09" height="09" /></bezel> + + <!-- Extra Ball / Special Rollover Button Switch --> + <bezel name="lamp23" element="Lamp_RollOver_Button"><bounds x="35" y="170" width="15" height="15" /></bezel> + <bezel element="Switch_RollOver_Button" inputtag="X3" inputmask="0x20"><bounds x="25" y="164" width="35" height="35" /></bezel> + <bezel element="Key_E"> <bounds x="50" y="173" width="09" height="09" /></bezel> + + <!-- Playmate Targets Leftside --> + <bezel element="Target_White_Left" inputtag="X3" inputmask="0x10"><bounds x="40" y="223" width="08" height="12" /></bezel> + <bezel element="Key_R"> <bounds x="30" y="223" width="09" height="09" /></bezel> + <bezel element="Target_White_Left" inputtag="X3" inputmask="0x08"><bounds x="34" y="242" width="08" height="12" /></bezel> + <bezel element="Key_Y"> <bounds x="24" y="242" width="09" height="09" /></bezel> + <bezel element="Target_White_Left" inputtag="X3" inputmask="0x04"><bounds x="28" y="261" width="08" height="12" /></bezel> + <bezel element="Key_U"> <bounds x="18" y="261" width="09" height="09" /></bezel> + <bezel element="Target_White_Left" inputtag="X3" inputmask="0x02"><bounds x="22" y="280" width="08" height="12" /></bezel> + <bezel element="Key_I"> <bounds x="12" y="280" width="09" height="09" /></bezel> + <bezel element="Target_White_Left" inputtag="X3" inputmask="0x01"><bounds x="16" y="299" width="08" height="12" /></bezel> + <bezel element="Key_O"> <bounds x="06" y="299" width="09" height="09" /></bezel> + + </view> + +</mamelayout> diff --git a/src/mame/layout/wackygtr.lay b/src/mame/layout/wackygtr.lay new file mode 100644 index 00000000000..5a67ac5abb0 --- /dev/null +++ b/src/mame/layout/wackygtr.lay @@ -0,0 +1,224 @@ +<?xml version="1.0"?> +<mamelayout version="2"> + <element name="digit" defstate="0"> + <led7seg> + <color red="1.0" green="0.0" blue="0.0" /> + </led7seg> + </element> + + <element name="lamp" defstate="0"> + <disk state="0"> + <color red="0.2" green="0.2" blue="0" /> + <bounds x="0" y="0" width="1" height="1" /> + </disk> + <disk state="1"> + <color red="1" green="1" blue="0" /> + <bounds x="0" y="0" width="1" height="1" /> + </disk> + </element> + + <element name="rect" defstate="0"> + <rect state="0"> + <color red="1" green="1" blue="0" /> + <bounds x="0" y="0" width="1" height="1" /> + </rect> + </element> + + <element name="alligator" defstate="0"> + <rect state="0"> + <color red="0" green="1" blue="0" /> + <bounds x="0" y="0" width="10" height="2" /> + </rect> + <disk state="0"> + <color red="0" green="1" blue="0" /> + <bounds x="0" y="0" width="10" height="4" /> + </disk> + + <rect state="1"> + <color red="0" green="1" blue="0" /> + <bounds x="0" y="0" width="10" height="5" /> + </rect> + <disk state="1"> + <color red="0" green="1" blue="0" /> + <bounds x="0" y="0" width="10" height="10" /> + </disk> + + <rect state="2"> + <color red="0" green="1" blue="0" /> + <bounds x="0" y="0" width="10" height="8" /> + </rect> + <disk state="2"> + <color red="0" green="1" blue="0" /> + <bounds x="0" y="0" width="10" height="16" /> + </disk> + + <rect state="3"> + <color red="0" green="1" blue="0" /> + <bounds x="0" y="0" width="10" height="13" /> + </rect> + <disk state="3"> + <color red="0" green="1" blue="0" /> + <bounds x="0" y="5" width="10" height="16" /> + </disk> + + <rect state="4"> + <color red="0" green="1" blue="0" /> + <bounds x="0" y="0" width="10" height="18" /> + </rect> + <disk state="4"> + <color red="0" green="1" blue="0" /> + <bounds x="0" y="10" width="10" height="16" /> + </disk> + + <rect state="5"> + <color red="0" green="1" blue="0" /> + <bounds x="0" y="0" width="10" height="23" /> + </rect> + <disk state="5"> + <color red="0" green="1" blue="0" /> + <bounds x="0" y="15" width="10" height="16" /> + </disk> + </element> + + <view name="Default Layout"> + + <!-- wacks --> + <bezel name="digit5" element="digit"> + <bounds x="25" y="10" width="8" height="10" /> + </bezel> + <bezel name="digit4" element="digit"> + <bounds x="35" y="10" width="8" height="10" /> + </bezel> + + <!-- bites --> + <bezel name="digit3" element="digit"> + <bounds x="25" y="25" width="8" height="10" /> + </bezel> + <bezel name="digit2" element="digit"> + <bounds x="35" y="25" width="8" height="10" /> + </bezel> + + <!-- score --> + <bezel name="digit1" element="digit"> + <bounds x="25" y="40" width="8" height="10" /> + </bezel> + <bezel name="digit0" element="digit"> + <bounds x="35" y="40" width="8" height="10" /> + </bezel> + + <!-- high score --> + <bezel name="digit7" element="digit"> + <bounds x="55" y="25" width="8" height="10" /> + </bezel> + <bezel name="digit6" element="digit"> + <bounds x="65" y="25" width="8" height="10" /> + </bezel> + + <!-- shadow box lamps --> + <bezel name="lamp4" element="lamp"> + <bounds x="10" y="10" width="10" height="4" /> + </bezel> + <bezel name="lamp3" element="lamp"> + <bounds x="10" y="18" width="10" height="4" /> + </bezel> + <bezel name="lamp2" element="lamp"> + <bounds x="10" y="26" width="10" height="4" /> + </bezel> + <bezel name="lamp1" element="lamp"> + <bounds x="10" y="34" width="10" height="4" /> + </bezel> + <bezel name="lamp0" element="lamp"> + <bounds x="10" y="42" width="10" height="4" /> + </bezel> + + <!-- game over lamp --> + <bezel name="lamp5" element="lamp"> + <bounds x="35" y="55" width="9" height="4" /> + </bezel> + + <!-- left timing lamps --> + <bezel name="lamp8" element="lamp"> + <bounds x="25" y="0" width="4" height="4" /> + </bezel> + <bezel name="lamp9" element="lamp"> + <bounds x="15" y="0" width="4" height="4" /> + </bezel> + <bezel name="lamp11" element="lamp"> + <bounds x="5" y="2" width="4" height="4" /> + </bezel> + <bezel name="lamp10" element="lamp"> + <bounds x="0" y="10" width="4" height="4" /> + </bezel> + <bezel name="lamp12" element="lamp"> + <bounds x="0" y="21" width="4" height="4" /> + </bezel> + <bezel name="lamp13" element="lamp"> + <bounds x="0" y="33" width="4" height="4" /> + </bezel> + <bezel name="lamp15" element="lamp"> + <bounds x="0" y="45" width="4" height="4" /> + </bezel> + <bezel name="lamp14" element="lamp"> + <bounds x="5" y="53" width="4" height="4" /> + </bezel> + <bezel name="lamp16" element="lamp"> + <bounds x="15" y="55" width="4" height="4" /> + </bezel> + <bezel name="lamp17" element="lamp"> + <bounds x="25" y="55" width="4" height="4" /> + </bezel> + + <!-- right timing lamps --> + <bezel name="lamp27" element="lamp"> + <bounds x="50" y="0" width="4" height="4" /> + </bezel> + <bezel name="lamp26" element="lamp"> + <bounds x="60" y="0" width="4" height="4" /> + </bezel> + <bezel name="lamp24" element="lamp"> + <bounds x="70" y="2" width="4" height="4" /> + </bezel> + <bezel name="lamp25" element="lamp"> + <bounds x="75" y="10" width="4" height="4" /> + </bezel> + <bezel name="lamp23" element="lamp"> + <bounds x="75" y="21" width="4" height="4" /> + </bezel> + <bezel name="lamp22" element="lamp"> + <bounds x="75" y="33" width="4" height="4" /> + </bezel> + <bezel name="lamp20" element="lamp"> + <bounds x="75" y="45" width="4" height="4" /> + </bezel> + <bezel name="lamp21" element="lamp"> + <bounds x="70" y="53" width="4" height="4" /> + </bezel> + <bezel name="lamp19" element="lamp"> + <bounds x="60" y="55" width="4" height="4" /> + </bezel> + <bezel name="lamp18" element="lamp"> + <bounds x="50" y="55" width="4" height="4" /> + </bezel> + + <!-- alligators --> + <bezel name="alligator0" element="alligator" inputtag="IN2" inputmask="0x01"> + <bounds x="5" y="65" width="10" height="40" /> + </bezel> + <bezel name="alligator1" element="alligator" inputtag="IN2" inputmask="0x02"> + <bounds x="20" y="65" width="10" height="40" /> + </bezel> + <bezel name="alligator2" element="alligator" inputtag="IN2" inputmask="0x04"> + <bounds x="35" y="65" width="10" height="40" /> + </bezel> + <bezel name="alligator3" element="alligator" inputtag="IN2" inputmask="0x08"> + <bounds x="50" y="65" width="10" height="40" /> + </bezel> + <bezel name="alligator4" element="alligator" inputtag="IN2" inputmask="0x10"> + <bounds x="65" y="65" width="10" height="40" /> + </bezel> + <bezel name="cave" element="rect"> + <bounds x="0" y="65" width="80" height="4" /> + </bezel> + + </view> +</mamelayout> diff --git a/src/mame/machine/315-5881_crypt.c b/src/mame/machine/315-5881_crypt.c index 7997000400d..ec07d1c8380 100644 --- a/src/mame/machine/315-5881_crypt.c +++ b/src/mame/machine/315-5881_crypt.c @@ -47,7 +47,7 @@ void sega_315_5881_crypt_device::device_start() save_item(NAME(line_buffer_pos)); save_item(NAME(line_buffer_size)); - std::string skey = parameter("key").c_str(); + std::string skey = parameter("key"); if(!skey.empty()) key = strtoll(skey.c_str(), 0, 16); else diff --git a/src/mame/machine/6883sam.c b/src/mame/machine/6883sam.c index cb5d0685fba..d47fe3efe78 100644 --- a/src/mame/machine/6883sam.c +++ b/src/mame/machine/6883sam.c @@ -483,7 +483,7 @@ void sam6883_device::sam_space<_addrstart, _addrend>::point(const sam_bank *bank { if (LOG_SAM) { - logerror("sam6883_device::sam_space::point(): addrstart=0x%04X addrend=0x%04X offset=0x%04X mask=0x%04X bank->m_memory=0x%p bank->m_memory_read_only=%s\n", + m_owner.logerror("sam6883_device::sam_space::point(): addrstart=0x%04X addrend=0x%04X offset=0x%04X mask=0x%04X bank->m_memory=0x%p bank->m_memory_read_only=%s\n", (unsigned) _addrstart, (unsigned) _addrend, (unsigned) offset, diff --git a/src/mame/machine/alpha8201.c b/src/mame/machine/alpha8201.c new file mode 100644 index 00000000000..4124344f45a --- /dev/null +++ b/src/mame/machine/alpha8201.c @@ -0,0 +1,429 @@ +// license:BSD-3-Clause +// copyright-holders:hap +/*************************************************************************** + + Alpha Denshi ALPHA-8201 family protection emulation + +---------------------------------------------------------------------------- + +The Alpha-8201/830x isn't a real CPU. It is a Hitachi HD44801 4-bit MCU, +programmed to interpret an external program using a custom instruction set. +Alpha-8301 has an expanded instruction set, backwards compatible with Alpha-8201. + + +Game Year MCU +------------------------ ---- --- +Shougi 1982? 8201 (pcb) +Shougi 2 1982? 8201 (pcb) +Talbot 1982 8201? +Champion Base Ball 1983 8201 (schematics) +Exciting Soccer 1983 8302 (pcb) +Champion Base Ball II 1983 8302 (pcb, unofficial schematics) +Exciting Soccer II 1984 8303 (uses 8303+ opcodes) +Equites 1984 8303 (post) +Bull Fighter 1984 8303 (post) +Splendor Blast 1985 8303 (post) +Gekisou 1985 8304 (post) +The Koukouyakyuh 1985 8304 (post) +High Voltage 1985 8404?(post says 8404, but readme says 8304) + +ALPHA-8201: "44801A75" -> HD44801, ROM code = A75 +ALPHA-8302: "44801B35" -> HD44801, ROM code = B35 +ALPHA-8303: "44801B42" -> HD44801, ROM code = B42 +ALPHA-8304: ? + + +package / pin assign +ALPHA 8201 DIP 42 + +pin HD44801 Alpha +--- ------- ----- +1 : D3 WR +2-4 : D4-D6 n.c. +5-7 : D7-D9 GND in shougi , n.c. in champbas +8-13 : D10-D15 n.c. +14 : n.c. n.c. +15 : RESET RESET +16 : GND GND +17 : OSC1 (champbas=384KHz) +18 : OSC2 n.c. +19 : !HLT Vcc +20 : !TEST Vcc +21 : Vcc Vcc +22-25: R00-R03 DB4-DB7 +26-29: R10-R13 DB0-DB3 +30 : INT0 GO (input) +31 : INT1 n.c. +32-35: R20-R23 A4-A7 +36-39: R30-R33 A0-A3 +40-41: D0-D1 A8-A9 +42 : D2 /RD + + +TODO: +- bus conflicts? +- support larger RAM size, if any game uses it + + +---------------------------------------------------------------------------- + +Interpreted CPU reverse engineered info by Tatsuyuki Satoh + + +----------------------- +Register Set +----------------------- + +PC : 10bit Program Pointer + A lower 8bits are loaded from the immediate. + A higher 2bits are loaded from the MB register. + +MB : 2bit memory bank register, load PC[9:8] after branch + load high to higher 2bit of PC after branch. + +RB : 3bit register bank select register + +R0-R7 : internal? RAM register 8bitx8 (x8 bank) + +A : 8bit + +IX0/1 : memory indirect 'read' access pointer + +IX2 : memory indirect 'write' access pointer + +RXB : unknown , looks index register + +LP0/1/2 : loop count register used by DJNZ operation + +cf : carry flag +zf : zero flag + + +----------------------- +Memory Space +----------------------- + +000 : unknown ... +001 : bit4..0 = pointer of current entry , bit7..6 = unknown +002-003 : entrypoint1 vector +004-005 : entrypoint2 vector +006-007 : entrypoint3 vector +008-009 : entrypoint4 vector +00A-00B : entrypoint5 vector +00C-00D : entrypoint6 vector +00E-00F : entrypoint7 vector +010-011 : entrypoint8 vector +012-013 : entrypoint9 vector +014-015 : entrypoint10 vector +016-017 : entrypoint11 vector +018-019 : entrypoint12 vector +01A-01B : entrypoint13 vector +01C-01D : entrypoint14 vector +01E-01F : entrypoint15 vector +020-0FF : bank 0, program / data memory +100-1FF : bank 1, program / data memory +200-2FF : bank 2, program / data memory +300-3FF : bank 3, program / data memory + +The even address is the lower byte of the entry address. +The odd-address of entry point is a MB and status. + Bit 0 and 1 are a memory bank. + Bit 2 is HALT.At the time of set, it doesn't execute entry address. + After EXIT operation, Bit2 is set. + + +8201 CONFIRMED OPCODES: +---------------------- +opcode mnemonic function flags +-------- ------------ ------------- ----- +00000000 NOP - -- +00000001 RORA ror A -C +00000010 ROLA rol A -C +00000011 INC RXB RXB+=2 ZC +00000100 DEC RXB RXB-=2 ZC (C=1 means No Borrow: RXB>=2) +00000101 INC A A++ ZC +00000110 DEC A A-- ZC (C=1 means No Borrow: A>=1) +00000110 CPL A A^=$FF -- +00001aaa LD A,(IX0+i) A=[IX0+i] -- +00010aaa LD A,(IX1+i) A=[IX1+i] -- +00011aaa LD (IX2+i),A [IX2+i]=A -- +00111aaa BIT R0.n ZF=R0 bit n Z- +0100aaa0 LD A,Rn A=Rn Z- [1] +0100aaa1 LD Rn,A Rn=A -- +0101aaa0 ADD A,Rn A+=Rn ZC +0101aaa1 SUB A,Rn A-=Rn ZC (C=1 means No Borrow: A>=Rn) +0110aaa0 AND A,Rn A&=Rn Z- +0110aaa1 OR A,Rn A|=Rn Z- +0111aaaa ADD IX0,i IX0+=i -- +1000aaaa ADD IX1,i IX1+=i -- +1001aaaa ADD IX2,i IX2+=i -- +1010aaaa LD RB,i RB=i -- Note: no bounds checking. Can set bank up to F. +1011-0aa LD MB,i set after-jump page +1011-1-- STOP +11000000 imm LD IX0,imm IX0=imm -- +11000001 imm LD IX1,imm IX1=imm -- +11000010 imm LD IX2,imm IX2=imm -- +11000011 imm LD A,imm A=imm -- +11000100 imm LD LP0,imm LP0=imm -- +11000101 imm LD LP1,imm LP1=imm -- +11000110 imm LD LP2,imm LP2=imm -- +11000111 imm LD RXB,imm RXB=imm -- +11001000 imm ADD A,imm A+=imm ZC +11001001 imm SUB A,imm A-=imm ZC (C=1 means No Borrow: A>=imm) +11001010 imm AND A,imm A&=imm Z- +11001011 imm OR A,imm A|=imm Z- +11001100 imm DJNZ LP0,imm LP0--,branch -- +11001101 imm DJNZ LP1,imm LP1--,branch -- +11001110 imm DJNZ LP2,imm LP2--,branch -- +11001111 imm JNZ imm branch if !Z -- +1101--00 imm JNC imm branch if !C -- +1101--01 imm JZ imm branch if Z -- +1101--1- imm J imm branch -- +1110--xx mirror for the above +1111--xx mirror for the above + +Notes: +[1] bug: the Z flag is not updated correctly after a LD A,Rn instruction. Fixed in 8302 (possibly 8301). + + +8302 CONFIRMED OPCODES: +---------------------- +all of the 8201 ones, with stricter decoding for the following: + +11010-00 imm JNC imm branch if !C -- +11010-01 imm JZ imm branch if Z -- +11010-1- imm J imm branch -- + +and these new opcodes: + +opcode mnemonic function flags +-------- ------------ --------------- ----- +11011000 imm LD A,(imm) A=MB:[imm] -- +11011001 imm LD (imm),A MB:[imm]=A -- +11011010 imm CMP A,imm temp=A-imm ZC +11011011 imm XOR A,imm A^=imm Z0 +11011100 imm LD A,R(imm) A=reg(imm) -- +11011101 imm LD R(imm),A reg(imm)=A -- +11011110 imm JC imm branch if C -- +11011111 imm CALL $xx save PC, branch -- + +11100000 EXG A,IX0 A<->IX0 -- +11100001 EXG A,IX1 A<->IX1 -- +11100010 EXG A,IX2 A<->IX2 -- +11100011 EXG A,LP1 A<->LP1 -- +11100100 EXG A,LP2 A<->LP2 -- +11100101 EXG A,RXB A<->RXB -- +11100110 EXG A,LP0 A<->LP0 -- +11100111 EXG A,RB A<->RB -- +11101000 LD IX0,A IX0=A -- +11101001 LD IX1,A IX1=A -- +11101010 LD IX2,A IX2=A -- +11101011 LD LP1,A LP1=A -- +11101100 LD LP2,A LP2=A -- +11101101 LD RXB,A RXB=A -- +11101110 LD LP0,A LP0=A -- +11101111 LD RB,A RB=A -- +11110000 EXG IX0,IX1 IX0<->IX1 -- +11110001 EXG IX0,IX2 IX0<->IX2 -- +11110010 REP LD (IX2),(RXB) equivalent to LD (IX2),(RXB); INC RXB; DJNZ LP0 +11110011 REP LD (RXB),(IX0) equivalent to LD (RXB),(IX0); INC RXB; DJNZ LP0 +11110100 SAVE ZC save ZC -- +11110101 REST ZC restore ZC ZC +11110110 LD (RXB),A reg(RXB)=A -- +11110111 LD A,(RXB) A=reg(RXB) -- +11111000 CMP A,(RXB) temp=A-reg(RXB) ZC +11111001 XOR A,(RXB) A^=reg(RXB) Z0 +11111010 ADD A,CF if (C) A++ ZC +11111011 SUB A,!CF if (!C) A-- ZC +11111100 TST A A==0? Z- +11111101 CLR A A=0 -- +11111110 LD A,(IX0+A) A=[IX0+A] -- +11111111 RET restore PC -- + + +8303 CONFIRMED OPCODES: +---------------------- +all of the 8302 ones, with stricter decoding for the following: + +11010000 imm JNC imm branch if !C -- +11010001 imm JZ imm branch if Z -- +1101001- imm J imm branch -- + +additionally, this opcode is modified to support 11-bit instead of 10-bit +external addressing, this wasn't used in games however. + +1011-0aa LD MB,i modified so that bit 3 is shifted to bit 2 before loading MB. + +and these new opcodes are added: + +110101-- +11010100 imm LD A,(R77:$%02X) +11010101 imm LD (R77:$%02X),A +11010110 imm LD PC,(R77:$%02X) [1] +11010111 imm LD (R77:$%02X),PC [2] + +Notes: +[1] appears to be LD PC,x in the disassembly, however it's LD LP0,x for kouyakyu + which uses a 8304, so the opcode was probably changed again. +[2] appears to be LD x,PC in the disassembly, however it's LD x,LP0 for hvoltage + which uses a 8304 (or 8404?), so the opcode was probably changed again. + + +***************************************************************************/ + +#include "cpu/hmcs40/hmcs40.h" +#include "alpha8201.h" + +/**************************************************************************/ + +const device_type ALPHA_8201 = &device_creator<alpha_8201_device>; + +//------------------------------------------------- +// alpha_8201_device - constructor +//------------------------------------------------- + +alpha_8201_device::alpha_8201_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) + : device_t(mconfig, ALPHA_8201, "ALPHA-8201", tag, owner, clock, "alpha8201", __FILE__), + m_mcu(*this, "mcu") +{ +} + + +//------------------------------------------------- +// device_start - device-specific startup +//------------------------------------------------- + +void alpha_8201_device::device_start() +{ + m_shared_ram = auto_alloc_array_clear(machine(), UINT8, 0x400); + + // zerofill + m_bus = 0; + m_mcu_address = 0; + m_mcu_d = 0; + memset(m_mcu_r, 0, sizeof(m_mcu_r)); + + // register for savestates + save_pointer(NAME(m_shared_ram), 0x400); + save_item(NAME(m_bus)); + save_item(NAME(m_mcu_address)); + save_item(NAME(m_mcu_d)); + save_item(NAME(m_mcu_r)); +} + +// machine config additions +static MACHINE_CONFIG_FRAGMENT(alpha8201) + + MCFG_CPU_ADD("mcu", HD44801, DERIVED_CLOCK(1,1)) // 8H + MCFG_HMCS40_READ_R_CB(0, READ8(alpha_8201_device, mcu_data_r)) + MCFG_HMCS40_READ_R_CB(1, READ8(alpha_8201_device, mcu_data_r)) + MCFG_HMCS40_WRITE_R_CB(0, WRITE8(alpha_8201_device, mcu_data_w)) + MCFG_HMCS40_WRITE_R_CB(1, WRITE8(alpha_8201_device, mcu_data_w)) + MCFG_HMCS40_WRITE_R_CB(2, WRITE8(alpha_8201_device, mcu_data_w)) + MCFG_HMCS40_WRITE_R_CB(3, WRITE8(alpha_8201_device, mcu_data_w)) + MCFG_HMCS40_WRITE_D_CB(WRITE16(alpha_8201_device, mcu_d_w)) +MACHINE_CONFIG_END + +machine_config_constructor alpha_8201_device::device_mconfig_additions() const +{ + return MACHINE_CONFIG_NAME(alpha8201); +} + + +//------------------------------------------------- +// device_reset - device-specific reset +//------------------------------------------------- + +void alpha_8201_device::device_reset() +{ + m_bus = 0; + m_mcu->set_input_line(0, CLEAR_LINE); +} + + + +/*************************************************************************** + + Internal I/O + +***************************************************************************/ + +void alpha_8201_device::mcu_writeram() +{ + // RAM WR is level-triggered + if (m_bus && (m_mcu_d & 0xc) == 0xc) + m_shared_ram[m_mcu_address] = m_mcu_r[0] << 4 | m_mcu_r[1]; +} + +void alpha_8201_device::mcu_update_address() +{ + m_mcu_address = (m_mcu_d << 8 & 0x300) | m_mcu_r[2] << 4 | m_mcu_r[3]; + mcu_writeram(); +} + + +READ8_MEMBER(alpha_8201_device::mcu_data_r) +{ + UINT8 ret = 0; + + if (m_bus && ~m_mcu_d & 4) + ret = m_shared_ram[m_mcu_address]; + else + logerror("%s: MCU side invalid read\n", tag()); + + if (offset == HMCS40_PORT_R0X) + ret >>= 4; + return ret & 0xf; +} + +WRITE8_MEMBER(alpha_8201_device::mcu_data_w) +{ + // R0,R1: RAM data + // R2,R3: RAM A0-A7 + m_mcu_r[offset] = data & 0xf; + mcu_update_address(); +} + +WRITE16_MEMBER(alpha_8201_device::mcu_d_w) +{ + // D0,D1: RAM A8,A9 + // D2: _RD + // D3: WR + m_mcu_d = data; + mcu_update_address(); +} + + + +/*************************************************************************** + + I/O for External Interface + +***************************************************************************/ + +WRITE_LINE_MEMBER(alpha_8201_device::bus_dir_w) +{ + // set RAM bus direction to 0: external, 1: MCU side + // selects one of two 74LS245 (octal bus transceiver) for databus, addressbus via + // a couple of 74LS157 (2-input multiplexer) + m_bus = (state) ? 1 : 0; + mcu_writeram(); +} + +WRITE_LINE_MEMBER(alpha_8201_device::mcu_start_w) +{ + // connected to MCU INT0 + m_mcu->set_input_line(0, (state) ? ASSERT_LINE : CLEAR_LINE); +} + +READ8_MEMBER(alpha_8201_device::ext_ram_r) +{ + // going by exctsccr, m_bus has no effect here + return m_shared_ram[offset & 0x3ff]; +} + +WRITE8_MEMBER(alpha_8201_device::ext_ram_w) +{ + // going by exctsccr, m_bus has no effect here + m_shared_ram[offset & 0x3ff] = data; +} diff --git a/src/mame/machine/alpha8201.h b/src/mame/machine/alpha8201.h new file mode 100644 index 00000000000..1fe5dccb9b2 --- /dev/null +++ b/src/mame/machine/alpha8201.h @@ -0,0 +1,55 @@ +// license:BSD-3-Clause +// copyright-holders:hap +/*************************************************************************** + + Alpha Denshi ALPHA-8201 family protection emulation + +***************************************************************************/ + +#ifndef _ALPHA8201_H_ +#define _ALPHA8201_H_ + +#include "emu.h" + +class alpha_8201_device : public device_t +{ +public: + alpha_8201_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + ~alpha_8201_device() {} + + DECLARE_READ8_MEMBER(mcu_data_r); + DECLARE_WRITE8_MEMBER(mcu_data_w); + DECLARE_WRITE16_MEMBER(mcu_d_w); + + // external I/O + DECLARE_WRITE_LINE_MEMBER(bus_dir_w); + DECLARE_WRITE_LINE_MEMBER(mcu_start_w); + DECLARE_READ8_MEMBER(ext_ram_r); + DECLARE_WRITE8_MEMBER(ext_ram_w); + +protected: + // device-level overrides + virtual void device_start(); + virtual void device_reset(); + virtual machine_config_constructor device_mconfig_additions() const; + +private: + // devices/pointers + required_device<cpu_device> m_mcu; + + // internal state + int m_bus; // shared RAM bus direction + UINT16 m_mcu_address; // MCU side RAM address + UINT16 m_mcu_d; // MCU D output data + UINT8 m_mcu_r[4]; // MCU R0-R3 output data + UINT8* m_shared_ram; // 1KB RAM + + void mcu_update_address(); + void mcu_writeram(); +}; + + +extern const device_type ALPHA_8201; + + +#endif /* _ALPHA8201_H_ */ diff --git a/src/mame/machine/amiga.c b/src/mame/machine/amiga.c index b69d4a96746..6d9fcf46844 100644 --- a/src/mame/machine/amiga.c +++ b/src/mame/machine/amiga.c @@ -739,9 +739,9 @@ static UINT32 blit_line(amiga_state *state) /* see if folks are breaking the rules */ if (CUSTOM_REG(REG_BLTSIZH) != 0x0002) - logerror("Blitter: Blit width != 2 in line mode!\n"); + state->logerror("Blitter: Blit width != 2 in line mode!\n"); if ((CUSTOM_REG(REG_BLTCON0) & 0x0a00) != 0x0a00) - logerror("Blitter: Channel selection incorrect in line mode!\n" ); + state->logerror("Blitter: Channel selection incorrect in line mode!\n" ); /* extract the length of the line */ height = CUSTOM_REG(REG_BLTSIZV); @@ -951,7 +951,7 @@ static void blitter_setup(address_space &space) /* is there another blitting in progress? */ if (CUSTOM_REG(REG_DMACON) & 0x4000) { - logerror("%s - This program is playing tricks with the blitter\n", space.machine().describe_context() ); + state->logerror("%s - This program is playing tricks with the blitter\n", space.machine().describe_context() ); return; } diff --git a/src/mame/machine/amstrad.c b/src/mame/machine/amstrad.c index 08534807f78..a59b7f8de56 100644 --- a/src/mame/machine/amstrad.c +++ b/src/mame/machine/amstrad.c @@ -1140,6 +1140,11 @@ void amstrad_state::amstrad_setLowerRom() } m_bank1->set_base(bank_base); m_bank2->set_base(bank_base+0x02000); + if ((m_gate_array.mrer & (1<<2)) == 0 && m_gate_array.romdis == 0) + { + if (m_exp) + m_exp->set_mapping(MAP_LOWER); + } } else // CPC+/GX4000 { @@ -1204,6 +1209,8 @@ void amstrad_state::amstrad_setLowerRom() { m_bank1->set_base(m_region_cart->base()); m_bank2->set_base(m_region_cart->base() + 0x2000); + if (m_exp) + m_exp->set_mapping(MAP_LOWER); } } } @@ -1235,6 +1242,12 @@ void amstrad_state::amstrad_setUpperRom() m_bank7->set_base(bank_base); m_bank8->set_base(bank_base+0x2000); } + if ( ! ( m_gate_array.mrer & 0x08 ) && m_gate_array.romdis == 0) + { + if (m_exp) + m_exp->set_mapping(MAP_UPPER); + } + } @@ -1660,12 +1673,11 @@ Bit 4 controls the interrupt generation. It can be used to delay interrupts.*/ /* b3b2 != 0 then change the state of upper or lower rom area and rethink memory */ if (m_exp) { - if((dataToGateArray & 0x0c) != 0) + if((dataToGateArray & 0x0c) != 0x0c) m_exp->romen_w(0); // active low else m_exp->romen_w(1); } - amstrad_setLowerRom(); amstrad_setUpperRom(); @@ -1824,7 +1836,7 @@ READ8_MEMBER(amstrad_state::amstrad_cpc_io_r) // m6845_personality_t crtc_type; int page; -// crtc_type = ioport("crtc"->read_safe(0)); +// crtc_type = read_safe(ioport("crtc"), 0); // m6845_set_personality(crtc_type); if(m_aleste_mode & 0x04) @@ -2396,7 +2408,7 @@ void amstrad_state::amstrad_rethinkMemory() /* mappings for other expansion devices */ if (m_exp) - m_exp->set_mapping(); + m_exp->set_mapping(MAP_OTHER); } @@ -2952,7 +2964,7 @@ void amstrad_state::amstrad_common_init() m_gate_array.hsync = 0; m_GateArray_RamConfiguration = 0; m_gate_array.hsync_counter = 2; - + AmstradCPC_GA_SetRamConfiguration(); /* space.install_read_bank(0x0000, 0x1fff, "bank1"); space.install_read_bank(0x2000, 0x3fff, "bank2"); diff --git a/src/mame/machine/apollo.c b/src/mame/machine/apollo.c index 568a9c08fc8..99fc8a454f9 100644 --- a/src/mame/machine/apollo.c +++ b/src/mame/machine/apollo.c @@ -95,11 +95,11 @@ INPUT_PORTS_START( apollo_config ) PORT_CONFNAME(APOLLO_CONF_25_YEARS_AGO, APOLLO_CONF_25_YEARS_AGO, "25 Years Ago ...") PORT_CONFSETTING(0x00, DEF_STR ( Off ) ) PORT_CONFSETTING(APOLLO_CONF_25_YEARS_AGO, DEF_STR ( On ) ) - -// PORT_CONFNAME(APOLLO_CONF_NODE_ID, APOLLO_CONF_NODE_ID, "Node ID from Disk") -// PORT_CONFSETTING(0x00, DEF_STR ( Off ) ) -// PORT_CONFSETTING(APOLLO_CONF_NODE_ID, DEF_STR ( On ) ) - +#ifdef APOLLO_XXL + PORT_CONFNAME(APOLLO_CONF_NODE_ID, APOLLO_CONF_NODE_ID, "Node ID from Disk") + PORT_CONFSETTING(0x00, DEF_STR ( Off ) ) + PORT_CONFSETTING(APOLLO_CONF_NODE_ID, DEF_STR ( On ) ) +#endif // PORT_CONFNAME(APOLLO_CONF_IDLE_SLEEP, 0x00, "Idle Sleep") // PORT_CONFSETTING(0x00, DEF_STR ( Off ) ) // PORT_CONFSETTING(APOLLO_CONF_IDLE_SLEEP, DEF_STR ( On ) ) @@ -111,15 +111,15 @@ INPUT_PORTS_START( apollo_config ) PORT_CONFNAME(APOLLO_CONF_FPU_TRACE, 0x00, "FPU Trace") PORT_CONFSETTING(0x00, DEF_STR ( Off ) ) PORT_CONFSETTING(APOLLO_CONF_FPU_TRACE, DEF_STR ( On ) ) +#ifdef APOLLO_XXL + PORT_CONFNAME(APOLLO_CONF_DISK_TRACE, 0x00, "Disk Trace") + PORT_CONFSETTING(0x00, DEF_STR ( Off ) ) + PORT_CONFSETTING(APOLLO_CONF_DISK_TRACE, DEF_STR ( On ) ) -// PORT_CONFNAME(APOLLO_CONF_DISK_TRACE, 0x00, "Disk Trace") -// PORT_CONFSETTING(0x00, DEF_STR ( Off ) ) -// PORT_CONFSETTING(APOLLO_CONF_DISK_TRACE, DEF_STR ( On ) ) - -// PORT_CONFNAME(APOLLO_CONF_NET_TRACE, 0x00, "Network Trace") -// PORT_CONFSETTING(0x00, DEF_STR ( Off ) ) -// PORT_CONFSETTING(APOLLO_CONF_NET_TRACE, DEF_STR ( On ) ) - + PORT_CONFNAME(APOLLO_CONF_NET_TRACE, 0x00, "Network Trace") + PORT_CONFSETTING(0x00, DEF_STR ( Off ) ) + PORT_CONFSETTING(APOLLO_CONF_NET_TRACE, DEF_STR ( On ) ) +#endif INPUT_PORTS_END class apollo_config_device : public device_t @@ -219,7 +219,7 @@ void apollo_csr_set_status_register(UINT16 mask, UINT16 data) if (new_value != cpu_status_register) { cpu_status_register = new_value; - LOG1(("#### setting CPU Status Register with data=%04x & %04x to %04x", data, mask, cpu_status_register)); + //LOG1(("#### setting CPU Status Register with data=%04x & %04x to %04x", data, mask, cpu_status_register)); } } @@ -590,7 +590,7 @@ IRQ_CALLBACK_MEMBER(apollo_state::apollo_pic_acknowledge) apollo_csr_set_status_register(APOLLO_CSR_SR_INTERRUPT_PENDING, 0); } else { // clear bit Interrupt Pending in Cache Status Register - apollo_set_cache_status_register(0x10, 0x00); + apollo_set_cache_status_register(this,0x10, 0x00); } return vector; } @@ -619,7 +619,7 @@ WRITE_LINE_MEMBER( apollo_state::apollo_pic8259_master_set_int_line ) { state ? APOLLO_CSR_SR_INTERRUPT_PENDING : 0); } else { // set bit Interrupt Pending in Cache Status Register - apollo_set_cache_status_register(0x10, state ? 0x10 : 0x00); + apollo_set_cache_status_register(this,0x10, state ? 0x10 : 0x00); } m_maincpu->set_input_line_and_vector(M68K_IRQ_6,state ? ASSERT_LINE : CLEAR_LINE, M68K_INT_ACK_AUTOVECTOR); @@ -857,6 +857,216 @@ WRITE_LINE_MEMBER(apollo_state::sio2_irq_handler) } //########################################################################## +// machine/apollo_ni.c - APOLLO DS3500 node ID +//########################################################################## + +#undef VERBOSE +#define VERBOSE 0 + +#define DEFAULT_NODE_ID 0x12345 + +/*************************************************************************** + IMPLEMENTATION + ***************************************************************************/ + +/*** Apollo Node ID device ***/ + +// device type definition +const device_type APOLLO_NI = &device_creator<apollo_ni> ; + +//------------------------------------------------- +// apollo_ni - constructor +//------------------------------------------------- + +apollo_ni::apollo_ni(const machine_config &mconfig, const char *tag, + device_t *owner, UINT32 clock) : + device_t(mconfig, APOLLO_NI, "Node ID", tag, owner, clock, "node_id", + __FILE__), device_image_interface(mconfig, *this) +{ +} + +//------------------------------------------------- +// apollo_ni - destructor +//------------------------------------------------- + +apollo_ni::~apollo_ni() +{ +} + +void apollo_ni::device_config_complete() +{ + update_names(APOLLO_NI, "node_id", "ni"); +} + +//------------------------------------------------- +// device_start - device-specific startup +//------------------------------------------------- + +void apollo_ni::device_start() +{ + CLOG1(("apollo_ni::device_start")); + set_node_id(DEFAULT_NODE_ID); +} + +//------------------------------------------------- +// device_reset - device-specific reset +//------------------------------------------------- + +void apollo_ni::device_reset() +{ + CLOG1(("apollo_ni::device_reset")); +} + +//------------------------------------------------- +// set node ID +//------------------------------------------------- + +void apollo_ni::set_node_id(UINT32 node_id) +{ + m_node_id = node_id; + CLOG1(("apollo_ni::set_node_id: node ID is %x", node_id)); +} + +//------------------------------------------------- +// read/write +//------------------------------------------------- + +WRITE16_MEMBER(apollo_ni::write) +{ + CLOG1(("Error: writing node id ROM at offset %02x = %04x & %04x", offset, data, mem_mask)); +} + +READ16_MEMBER(apollo_ni::read) +{ + UINT16 data = 0; + switch (offset & 0x0f) + { + case 1: // msb + data = (m_node_id >> 16) & 0xff; + break; + case 2: + data = (m_node_id >> 8) & 0xff; + break; + case 3: // lsb + data = m_node_id & 0xff; + break; + case 15: // checksum + data = ((m_node_id >> 16) + (m_node_id >> 8) + m_node_id) & 0xff; + break; + default: + data = 0; + break; + } + data <<= 8; + CLOG2(("reading node id ROM at offset %02x = %04x & %04x", offset, data, mem_mask)); + return data; +} + +/*------------------------------------------------- + DEVICE_IMAGE_LOAD( rom ) + -------------------------------------------------*/ +bool apollo_ni::call_load() +{ + CLOG1(("apollo_ni::call_load: %s", filename())); + + UINT64 size = length(); + if (size != 32) + { + CLOG(("apollo_ni::call_load: %s has unexpected file size %" I64FMT "d", filename(), size)); + } + else + { + UINT8 data[32]; + fread(data, sizeof(data)); + + UINT8 checksum = data[2] + data[4] + data[6]; + if (checksum != data[30]) + { + CLOG(("apollo_ni::call_load: checksum is %02x - should be %02x", checksum, data[30])); + } + else + { + m_node_id = (((data[2] << 8) | data[4]) << 8) | (data[6]); + CLOG1(("apollo_ni::call_load: node ID is %x", m_node_id)); + return IMAGE_INIT_PASS; + } + } + return IMAGE_INIT_FAIL; +} + +/*------------------------------------------------- + DEVICE_IMAGE_CREATE( rom ) + -------------------------------------------------*/ + +bool apollo_ni::call_create(int format_type, option_resolution *format_options) +{ + CLOG1(("apollo_ni::call_create:")); + + if (length() > 0) + { + CLOG(("apollo_ni::call_create: %s already exists", filename())); + } + else + { + UINT32 node_id = 0; + sscanf(basename_noext(), "%x", &node_id); + if (node_id == 0 || node_id > 0xfffff) + { + CLOG(("apollo_ni::call_create: filename %s is no valid node ID", basename())); + } + else + { + UINT8 data[32]; + memset(data, 0, sizeof(data)); + data[2] = node_id >> 16; + data[4] = node_id >> 8; + data[6] = node_id; + data[30] = data[2] + data[4] + data[6]; + fwrite(data, sizeof(data)); + CLOG(("apollo_ni::call_create: created %s with node ID %x", filename(), node_id)); + set_node_id(node_id); + return IMAGE_INIT_PASS; + } + } + return IMAGE_INIT_FAIL; +} + +/*------------------------------------------------- + DEVICE_IMAGE_UNLOAD( rom ) + -------------------------------------------------*/ +void apollo_ni::call_unload() +{ + CLOG1(("apollo_ni::call_unload:")); +} + +//------------------------------------------------- +// set node ID from disk +//------------------------------------------------- + +void apollo_ni::set_node_id_from_disk() +{ +#ifdef APOLLO_XXL + // set node ID from UID of logical volume 1 of logical unit 0 + UINT8 db[0x50]; + + // check label of physical volume and get sector data of logical volume 1 + // Note: sector data starts with 32 byte block header + if (omti8621_device::get_sector(0, db, sizeof(db), 0) == sizeof(db) + && memcmp(db + 0x22, "APOLLO", 6) == 0) + { + UINT16 sector1 = apollo_is_dn5500() ? 4 : 1; + + if (omti8621_device::get_sector(sector1, db, sizeof(db), 0) == sizeof(db)) + { + // set node_id from UID of logical volume 1 of logical unit 0 + m_node_id = (((db[0x49] << 8) | db[0x4a]) << 8) | db[0x4b]; + CLOG1(("apollo_ni::set_node_id_from_disk: node ID is %x", m_node_id)); + } + } +#endif +} + +//########################################################################## // machine/apollo.c - APOLLO DS3500 CPU Board //########################################################################## @@ -916,6 +1126,11 @@ MACHINE_CONFIG_FRAGMENT( common ) MCFG_MC146818_ADD( APOLLO_RTC_TAG, XTAL_32_768kHz ) MCFG_MC146818_UTC( true ) + MCFG_MC146818_BINARY( false ) + MCFG_MC146818_24_12( false ) + MCFG_MC146818_EPOCH( 0 ) + + MCFG_APOLLO_NI_ADD( APOLLO_NI_TAG, 0 ) MCFG_APOLLO_SIO_ADD( APOLLO_SIO2_TAG, XTAL_3_6864MHz ) MCFG_APOLLO_SIO_IRQ_CALLBACK(WRITELINE(apollo_state, sio2_irq_handler)) @@ -959,6 +1174,10 @@ MACHINE_CONFIG_FRAGMENT( apollo ) MCFG_APOLLO_SIO_IRQ_CALLBACK(WRITELINE(apollo_state, sio_irq_handler)) MCFG_APOLLO_SIO_OUTPORT_CALLBACK(WRITE8(apollo_state, sio_output)) MCFG_APOLLO_SIO_A_TX_CALLBACK(DEVWRITELINE(APOLLO_KBD_TAG, apollo_kbd_device, rx_w)) + +#ifdef APOLLO_XXL + MCFG_APOLLO_SIO_B_TX_CALLBACK(DEVWRITELINE(APOLLO_STDIO_TAG, apollo_stdio_device, rx_w)) +#endif MACHINE_CONFIG_END static DEVICE_INPUT_DEFAULTS_START( apollo_terminal ) @@ -1015,20 +1234,20 @@ MACHINE_RESET_MEMBER(apollo_state,apollo) apollo_csr_set_servicemode(apollo_config(APOLLO_CONF_SERVICE_MODE)); // change year according to configuration settings - if (year < 20 && apollo_config(APOLLO_CONF_20_YEARS_AGO)) + if (year < 25 && apollo_config(APOLLO_CONF_25_YEARS_AGO)) { - year+=80; + year += 75; apollo_rtc_w(space, 9, year); } - else if (year < 25 && apollo_config(APOLLO_CONF_25_YEARS_AGO)) + else if (year < 20 && apollo_config(APOLLO_CONF_20_YEARS_AGO)) { - year += 75; + year += 80; apollo_rtc_w(space, 9, year); } else if (year >= 80 && !apollo_config(APOLLO_CONF_20_YEARS_AGO) && !apollo_config(APOLLO_CONF_25_YEARS_AGO)) { - year -=80; + year -= 80; apollo_rtc_w(space, 9, year); } @@ -1040,3 +1259,154 @@ MACHINE_RESET_MEMBER(apollo_state,apollo) m_dn3000_timer->adjust(attotime::from_hz(2), 0, attotime::from_hz(2)); } } + +#ifdef APOLLO_XXL + +//########################################################################## +// machine/apollo_stdio.c - stdio terminal for mess +//########################################################################## + +#undef VERBOSE +#define VERBOSE 0 + +#if defined(__linux__) +#include <fcntl.h> +#include <unistd.h> +#endif + +/*************************************************************************** + IMPLEMENTATION + ***************************************************************************/ + +// device type definition +const device_type APOLLO_STDIO = &device_creator<apollo_stdio_device> ; + +//------------------------------------------------- +// apollo_stdio_device - constructor +//------------------------------------------------- + +apollo_stdio_device::apollo_stdio_device(const machine_config &mconfig, + const char *tag, device_t *owner, UINT32 clock) : + device_t(mconfig, APOLLO_STDIO, "Apollo STDIO", tag, owner, clock, + "apollo_stdio", __FILE__), device_serial_interface(mconfig, *this), + m_tx_w(*this) +{ +} + +//------------------------------------------------- +// device_start - device-specific startup +//------------------------------------------------- + +void apollo_stdio_device::device_start() +{ + CLOG1(("device_start")); + + m_tx_w.resolve_safe(); + + m_poll_timer = machine().scheduler().timer_alloc(timer_expired_delegate( + FUNC(apollo_stdio_device::poll_timer), this)); +} + +//------------------------------------------------- +// device_reset - device-specific reset +//------------------------------------------------- + +void apollo_stdio_device::device_reset() +{ + CLOG1(("device_reset")); + + // comms is at 8N1, 9600 baud + set_data_frame(1, 8, PARITY_NONE, STOP_BITS_1); + set_rcv_rate(9600); + set_tra_rate(9600); + + m_tx_busy = false; + m_xmit_read = m_xmit_write = 0; + +#if defined(__linux__) + // FIXME: unavailable in mingw + // set stdin to nonblocking to allow polling + fcntl(STDIN_FILENO, F_SETFL, fcntl(STDIN_FILENO, F_GETFL) | O_NONBLOCK); +#endif + + // start timer + m_poll_timer->adjust(attotime::zero, 0, attotime::from_msec(1)); // every 1ms +} + +void apollo_stdio_device::device_timer(emu_timer &timer, device_timer_id id, + int param, void *ptr) +{ + device_serial_interface::device_timer(timer, id, param, ptr); +} + +void apollo_stdio_device::rcv_complete() // Rx completed receiving byte +{ + receive_register_extract(); + UINT8 data = get_received_char(); + + // output data to stdout (FIXME: '\r' may confuse ceterm) + if (data != '\r') + { + ::putchar(data); + ::fflush(stdout); + } + CLOG1(("rcv_complete %02x - %c", data, data)); +} + +void apollo_stdio_device::tra_complete() // Tx completed sending byte +{ + // is there more waiting to send? + if (m_xmit_read != m_xmit_write) + { + transmit_register_setup(m_xmitring[m_xmit_read++]); + if (m_xmit_read >= XMIT_RING_SIZE) + { + m_xmit_read = 0; + } + } + else + { + m_tx_busy = false; + } +} + +void apollo_stdio_device::tra_callback() // Tx send bit +{ + int bit = transmit_register_get_data_bit(); + m_tx_w(bit); + + CLOG2(("tra_callback %02x", bit)); +} + +TIMER_CALLBACK_MEMBER(apollo_stdio_device::poll_timer) +{ +#if defined(__linux__) + UINT8 data; + while (::read(STDIN_FILENO, &data, 1) == 1) + { + xmit_char(data == '\n' ? '\r' : data); + } +#endif +} + +void apollo_stdio_device::xmit_char(UINT8 data) +{ + CLOG1(("xmit_char %02x - %c", data, data)); + + // if tx is busy it'll pick this up automatically when it completes + if (!m_tx_busy) + { + m_tx_busy = true; + transmit_register_setup(data); + } + else + { + // tx is busy, it'll pick this up next time + m_xmitring[m_xmit_write++] = data; + if (m_xmit_write >= XMIT_RING_SIZE) + { + m_xmit_write = 0; + } + } +} +#endif diff --git a/src/mame/machine/apollo_dbg.c b/src/mame/machine/apollo_dbg.c index 7111526c17e..be6b3811be7 100644 --- a/src/mame/machine/apollo_dbg.c +++ b/src/mame/machine/apollo_dbg.c @@ -1131,7 +1131,7 @@ int apollo_debug_instruction_hook(m68000_base_device *device, offs_t curpc) else if ((ir & 0xff00) == 0xf200 && (apollo_config( APOLLO_CONF_FPU_TRACE))) { char sb[256]; - LOG(("%s sp=%08x FPU: %x %s", apollo_cpu_context(device->machine().firstcpu), + DLOG(("%s sp=%08x FPU: %x %s", apollo_cpu_context(device->machine().firstcpu), REG_A(m68k)[7], ir, disassemble(m68k, REG_PC(m68k), sb))); } else if (!m68k->pmmu_enabled) @@ -1142,7 +1142,7 @@ int apollo_debug_instruction_hook(m68000_base_device *device, offs_t curpc) { const UINT16 *data = get_data(m68k, REG_A(m68k)[7]); if ( REG_USP(m68k) == 0 && (data[0] & 0x2000) == 0) { - LOG(("%s sp=%08x RTE: sr=%04x pc=%04x%04x v=%04x usp=%08x", + DLOG(("%s sp=%08x RTE: sr=%04x pc=%04x%04x v=%04x usp=%08x", apollo_cpu_context(device->machine().firstcpu), REG_A(m68k)[7], data[0], data[1], data[2], data[3], REG_USP(m68k))); } @@ -1156,7 +1156,7 @@ int apollo_debug_instruction_hook(m68000_base_device *device, offs_t curpc) trap.trap_code = REG_D(m68k)[0] & 0xffff; char sb[1000]; - LOG(("%s sp=%08x Domain/OS SVC: trap %x 0x%02x: %s", + DLOG(("%s sp=%08x Domain/OS SVC: trap %x 0x%02x: %s", apollo_cpu_context(device->machine().firstcpu), trap.sp, trap.trap_no, trap.trap_code, get_svc_call(m68k, trap.trap_no, trap.trap_code, sb))); @@ -1166,7 +1166,7 @@ int apollo_debug_instruction_hook(m68000_base_device *device, offs_t curpc) { // rte char sb[1000]; - LOG(("%s sp=%08x Domain/OS SVC: %s D0=0x%x", + DLOG(("%s sp=%08x Domain/OS SVC: %s D0=0x%x", apollo_cpu_context(device->machine().firstcpu), trap.sp, get_svc_call(m68k, trap.trap_no, trap.trap_code, sb), REG_D(m68k)[0])); diff --git a/src/mame/machine/apollo_kbd.c b/src/mame/machine/apollo_kbd.c index 79fc99c1ad3..6cb767bc67f 100644 --- a/src/mame/machine/apollo_kbd.c +++ b/src/mame/machine/apollo_kbd.c @@ -15,7 +15,7 @@ #include "machine/apollo_kbd.h" #include "sound/beep.h" -#define LOG(x) { logerror ("%s apollo_kbd: ", m_device->cpu_context()); logerror x; logerror ("\n"); } +#define LOG(x) { m_device->logerror ("%s apollo_kbd: ", m_device->cpu_context()); m_device->logerror x; m_device->logerror ("\n"); } #define LOG1(x) { if (VERBOSE > 0) LOG(x)} #define LOG2(x) { if (VERBOSE > 1) LOG(x)} diff --git a/src/mame/machine/atarifdc.c b/src/mame/machine/atarifdc.c index a440181468c..d3c70c12543 100644 --- a/src/mame/machine/atarifdc.c +++ b/src/mame/machine/atarifdc.c @@ -354,7 +354,7 @@ void atari_fdc_device::atari_load_proc(device_image_interface &image) * F->A 128/256 byte CKS bad sector table * *****************************************************************************/ -static void make_chksum(UINT8 * chksum, UINT8 data) +static void make_chksum(device_t *device,UINT8 * chksum, UINT8 data) { UINT8 newone; newone= *chksum + data; @@ -362,7 +362,7 @@ static void make_chksum(UINT8 * chksum, UINT8 data) newone++; if (VERBOSE_CHKSUM) - logerror("atari chksum old $%02x + data $%02x -> new $%02x\n", *chksum, data, newone); + device->logerror("atari chksum old $%02x + data $%02x -> new $%02x\n", *chksum, data, newone); *chksum = newone; } @@ -393,7 +393,7 @@ void atari_fdc_device::add_serin(UINT8 data, int with_checksum) { m_serin_buff[m_serin_count++] = data; if (with_checksum) - make_chksum(&m_serin_chksum, data); + make_chksum(this,&m_serin_chksum, data); } static void ATTR_PRINTF(1,2) atari_set_frame_message(const char *fmt, ...) @@ -712,7 +712,7 @@ WRITE8_MEMBER( atari_fdc_device::serout_w ) } else { - make_chksum(&m_serout_chksum, data); + make_chksum(this,&m_serout_chksum, data); } } } diff --git a/src/mame/machine/bbc.c b/src/mame/machine/bbc.c index 41aeb9ac627..d9aff723f59 100644 --- a/src/mame/machine/bbc.c +++ b/src/mame/machine/bbc.c @@ -115,7 +115,7 @@ WRITE8_MEMBER(bbc_state::bbc_page_selectbp_w) { if ((offset&0x04)==0) { - m_pagedRAM = (data >> 7) & 0x01; + m_pagedRAM = BIT(data,7); m_rombank = data & 0x0f; if (m_pagedRAM) @@ -135,8 +135,8 @@ WRITE8_MEMBER(bbc_state::bbc_page_selectbp_w) else { //the video display should now use this flag to display the shadow ram memory - m_vdusel=(data>>7)&0x01; - bbcbp_setvideoshadow(m_vdusel); + m_vdusel=BIT(data,7); + bbc_setvideoshadow(m_vdusel); //need to make the video display do a full screen refresh for the new memory area m_bank2->set_base(m_region_maincpu->base() + 0x3000); } @@ -291,7 +291,7 @@ b0 D 1=Display LYNNE as screen ACCCON is a read/write register -HAZEL is the 8K of RAM used by the MOS, filing system, and other Roms at &C000-&DFFF +HAZEL is the 8K of RAM used by the MOS, filing system, and other ROMs at &C000-&DFFF ANDY is the name of the 4K of RAM used by the MOS at &8000-&8FFF @@ -326,14 +326,14 @@ WRITE8_MEMBER(bbc_state::bbcm_ACCCON_write) tempIRR=m_ACCCON_IRR; - m_ACCCON_IRR=(data>>7)&1; - m_ACCCON_TST=(data>>6)&1; - m_ACCCON_IFJ=(data>>5)&1; - m_ACCCON_ITU=(data>>4)&1; - m_ACCCON_Y =(data>>3)&1; - m_ACCCON_X =(data>>2)&1; - m_ACCCON_E =(data>>1)&1; - m_ACCCON_D =(data>>0)&1; + m_ACCCON_IRR = BIT(data,7); + m_ACCCON_TST = BIT(data,6); + m_ACCCON_IFJ = BIT(data,5); + m_ACCCON_ITU = BIT(data,4); + m_ACCCON_Y = BIT(data,3); + m_ACCCON_X = BIT(data,2); + m_ACCCON_E = BIT(data,1); + m_ACCCON_D = BIT(data,0); if (tempIRR!=m_ACCCON_IRR) { @@ -349,7 +349,7 @@ WRITE8_MEMBER(bbc_state::bbcm_ACCCON_write) m_bank7->set_base(m_region_os->base()); } - bbcbp_setvideoshadow(m_ACCCON_D); + bbc_setvideoshadow(m_ACCCON_D); if (m_ACCCON_X) @@ -558,7 +558,7 @@ READ8_MEMBER(bbc_state::bbcm_r) if ((myo>=0x10) && (myo<=0x17)) return 0xfe; /* Serial System Chip */ if ((myo>=0x18) && (myo<=0x1f)) return m_upd7002 ? m_upd7002->read(space, myo-0x18) : 0xfe; /* A to D converter */ if ((myo>=0x20) && (myo<=0x23)) return 0xfe; /* VideoULA */ - if ((myo>=0x24) && (myo<=0x27)) return bbcm_wd177xl_read(space, myo - 0x24); /* 177x Control Latch */ + if ((myo>=0x24) && (myo<=0x27)) return bbcm_wd177xl_read(space, myo-0x24); /* 177x Control Latch */ if ((myo>=0x28) && (myo<=0x2f) && (m_wd1770)) return m_wd1770->read(space, myo-0x28); /* 1770 Controller */ if ((myo>=0x28) && (myo<=0x2f) && (m_wd1772)) return m_wd1772->read(space, myo-0x28); /* 1772 Controller */ if ((myo>=0x28) && (myo<=0x2f)) return 0xfe; /* No Controller */ @@ -726,6 +726,9 @@ INTERRUPT_GEN_MEMBER(bbc_state::bbcb_keyscan) /* keyboard not enabled so increment counter */ m_column = (m_column + 1) % 16; + /* OS 0.1 programs CA2 to interrupt on negative edge and expects the keyboard to still work */ + //int set = (m_os01 ? 0 : 1); + if (m_column < 13) { /* KBD IC4 8 input NAND gate */ @@ -779,6 +782,9 @@ int bbc_state::bbc_keyboard(address_space &space, int data) bit = 1; } + /* OS 0.1 programs CA2 to interrupt on negative edge and expects the keyboard to still work */ + //int set = (m_os01 ? 0 : 1); + if ((res | 1) != 0xff) { m_via6522_0->write_ca2(1); @@ -872,7 +878,7 @@ WRITE8_MEMBER(bbc_state::bbcb_via_system_write_portb) { int bit, value; bit = data & 0x07; - value = (data >> 3) & 0x01; + value = BIT(data,3); //logerror("SYSTEM write portb %d %d %d\n",data,bit,value); @@ -1048,16 +1054,16 @@ WRITE8_MEMBER(bbc_state::bbcb_via_system_write_portb) if (m_rtc) { //set the Address Select - if (m_MC146818_AS != ((data>>7)&1)) + if (m_MC146818_AS != BIT(data,7)) { - m_MC146818_AS=(data>>7)&1; + m_MC146818_AS = BIT(data,7); MC146818_set(space); } //if CE changes - if (m_MC146818_CE != ((data>>6)&1)) + if (m_MC146818_CE != BIT(data,6)) { - m_MC146818_CE=(data>>6)&1; + m_MC146818_CE = BIT(data,6); MC146818_set(space); } } @@ -1418,27 +1424,6 @@ WRITE_LINE_MEMBER(bbc_state::write_acia_clock) ***************************************/ -WRITE_LINE_MEMBER(bbc_state::bbc_i8271_interrupt) -{ - /* I'm assuming that the nmi is edge triggered */ - /* a interrupt from the fdc will cause a change in line state, and - the nmi will be triggered, but when the state changes because the int - is cleared this will not cause another nmi */ - /* I'll emulate it like this to be sure */ - - if (state!=m_previous_i8271_int_state) - { - if (state) - { - /* I'll pulse it because if I used hold-line I'm not sure - it would clear - to be checked */ - m_maincpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE); - } - } - - m_previous_i8271_int_state = state; -} - WRITE_LINE_MEMBER(bbc_state::motor_w) { m_i8271->subdevice<floppy_connector>("0")->get_device()->mon_w(!state); @@ -1451,32 +1436,12 @@ WRITE_LINE_MEMBER(bbc_state::side_w) m_i8271->subdevice<floppy_connector>("1")->get_device()->ss_w(state); } + /************************************** WD1770 disc control function ***************************************/ -/* - B/ B+ drive control: - - Bit Meaning - ----------------- - 7,6 Not used. - 5 Reset drive controller chip. (0 = reset controller, 1 = no reset) - 4 Interrupt Enable (0 = enable int, 1 = disable int) - 3 Double density select (0 = double, 1 = single). - 2 Side select (0 = side 0, 1 = side 1). - 1 Drive select 1. - 0 Drive select 0. -*/ - -/* -density select -single density is as the 8271 disc format -double density is as the 8271 disc format but with 16 sectors per track -*/ - - /* wd177x_IRQ_SET and latch bit 4 (nmi_enable) are NAND'ED together wd177x_DRQ_SET and latch bit 4 (nmi_enable) are NAND'ED together the output of the above two NAND gates are then OR'ED together and sent to the 6502 NMI line. @@ -1489,57 +1454,45 @@ double density is as the 8271 disc format but with 16 sectors per track The nmi is edge triggered, and triggers on a +ve edge. */ -void bbc_state::bbc_update_fdq_int(int state) -{ - int bbc_state; - - /* if drq or irq is set, and interrupt is enabled */ - if ((m_wd177x_irq_state || m_wd177x_drq_state) && (m_177x_IntEnabled)) - { - /* int trigger */ - bbc_state = 1; - } - else - { - /* do not trigger int */ - bbc_state = 0; - } - /* nmi is edge triggered, and triggers when the state goes from clear->set. - Here we are checking this transition before triggering the nmi */ - if (bbc_state != m_previous_wd177x_int_state) - { - if (bbc_state) - { - /* I'll pulse it because if I used hold-line I'm not sure - it would clear - to be checked */ - m_maincpu->set_input_line(INPUT_LINE_NMI,PULSE_LINE); - } - } - m_previous_wd177x_int_state = bbc_state; +void bbc_state::bbc_update_nmi() +{ + if (m_fdc_irq || m_fdc_drq) + m_maincpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE); } -WRITE_LINE_MEMBER(bbc_state::bbc_wd177x_intrq_w) +WRITE_LINE_MEMBER(bbc_state::fdc_intrq_w) { - m_wd177x_irq_state = state; - bbc_update_fdq_int(state); + m_fdc_irq = state; + bbc_update_nmi(); + } -WRITE_LINE_MEMBER(bbc_state::bbc_wd177x_drq_w) +WRITE_LINE_MEMBER(bbc_state::fdc_drq_w) { - m_wd177x_drq_state = state; - bbc_update_fdq_int(state); + m_fdc_drq = state; + bbc_update_nmi(); } +/* + B/ B+ drive control: + + Bit Meaning + ----------------- + 7,6 Not used. + 5 Reset drive controller chip. (0 = reset controller, 1 = no reset) + 4 Interrupt Enable (0 = enable int, 1 = disable int) + 3 Double density select (0 = double, 1 = single). + 2 Side select (0 = side 0, 1 = side 1). + 1 Drive select 1. + 0 Drive select 0. +*/ + WRITE8_MEMBER(bbc_state::bbc_wd1770_status_w) { floppy_image_device *floppy = NULL; m_drive_control = data; - logerror("Drive control %d \n", data); - - // bit 5: reset - if (!BIT(data, 5)) m_wd1770->reset(); // bit 0, 1: drive select if (BIT(data, 0)) floppy = m_wd1770->subdevice<floppy_connector>("0")->get_device(); @@ -1553,13 +1506,23 @@ WRITE8_MEMBER(bbc_state::bbc_wd1770_status_w) // bit 3: density m_wd1770->dden_w(BIT(data, 3)); - // bit 4: interrupt enable - m_177x_IntEnabled = !BIT(data, 4); + // bit 5: reset + if (!BIT(data, 5)) m_wd1770->soft_reset(); } -/*************************************** -BBC MASTER DISC SUPPORT -***************************************/ +/* + Master drive control: + + Bit Meaning + ----------------- + 7,6 Not used. + 5 Double density select (0 = double, 1 = single). + 4 Side select (0 = side 0, 1 = side 1). + 3 Drive select 2. + 2 Reset drive controller chip. (0 = reset controller, 1 = no reset) + 1 Drive select 1. + 0 Drive select 0. +*/ READ8_MEMBER(bbc_state::bbcm_wd177xl_read) { @@ -1571,10 +1534,6 @@ WRITE8_MEMBER(bbc_state::bbcm_wd1770l_write) floppy_image_device *floppy = NULL; m_drive_control = data; - //logerror("Drive control %d \n", data); - - // bit 2: reset - if (!BIT(data, 2)) m_wd1770->reset(); // bit 0, 1, 3: drive select if (BIT(data, 0)) floppy = m_wd1770->subdevice<floppy_connector>("0")->get_device(); @@ -1589,7 +1548,8 @@ WRITE8_MEMBER(bbc_state::bbcm_wd1770l_write) // bit 5: density m_wd1770->dden_w(BIT(data, 5)); - m_177x_IntEnabled = 1; + // bit 2: reset + if (!BIT(data, 2)) m_wd1770->soft_reset(); } WRITE8_MEMBER(bbc_state::bbcm_wd1772l_write) @@ -1597,10 +1557,6 @@ WRITE8_MEMBER(bbc_state::bbcm_wd1772l_write) floppy_image_device *floppy = NULL; m_drive_control = data; - //logerror("Drive control %d \n", data); - - // bit 2: reset - if (!BIT(data, 2)) m_wd1772->reset(); // bit 0, 1, 3: drive select if (BIT(data, 0)) floppy = m_wd1772->subdevice<floppy_connector>("0")->get_device(); @@ -1615,20 +1571,21 @@ WRITE8_MEMBER(bbc_state::bbcm_wd1772l_write) // bit 5: density m_wd1772->dden_w(BIT(data, 5)); - m_177x_IntEnabled = 1; + // bit 2: reset + if (!BIT(data, 2)) m_wd1772->soft_reset(); } /************************************** BBC B Rom loading functions ***************************************/ -int bbc_state::bbc_load_cart(device_image_interface &image, generic_slot_device *slot) +int bbc_state::bbc_load_rom(device_image_interface &image, generic_slot_device *slot) { UINT32 size = slot->common_get_size("rom"); if (size != 0x2000 && size != 0x4000) { - image.seterror(IMAGE_ERROR_UNSPECIFIED, "Unsupported cartridge size"); + image.seterror(IMAGE_ERROR_UNSPECIFIED, "Unsupported ROM size"); return IMAGE_INIT_FAIL; } @@ -1684,6 +1641,8 @@ int bbc_state::bbcm_load_cart(device_image_interface &image, generic_slot_device DRIVER_INIT_MEMBER(bbc_state,bbc) { + m_os01 = false; + m_rxd_cass = 0; m_nr_high_tones = 0; m_serproc_data = 0; @@ -1697,6 +1656,7 @@ DRIVER_INIT_MEMBER(bbc_state,bbc) m_via6522_0->write_cb2(1); } + // setup pointers for optional EPROMs void bbc_state::bbc_setup_banks(memory_bank *membank, int banks, UINT32 shift, UINT32 size) { @@ -1790,8 +1750,6 @@ MACHINE_RESET_MEMBER(bbc_state, bbca) MACHINE_START_MEMBER(bbc_state, bbcb) { m_mc6850_clock = 0; - m_previous_i8271_int_state=0; - m_previous_wd177x_int_state=1; bbc_setup_banks(m_bank4, 16, 0, 0x4000); } @@ -1826,14 +1784,12 @@ MACHINE_RESET_MEMBER(bbc_state, bbcbp) { m_Speech = 1; m_bank1->set_base(m_region_maincpu->base()); - m_bank2->set_base(m_region_maincpu->base() + 0x03000); /* bank 2 screen/shadow ram from 3000 to 7fff */ + m_bank2->set_base(m_region_maincpu->base() + 0x3000); /* bank 2 screen/shadow ram from 3000 to 7fff */ m_bank4->set_entry(0); m_bank6->set_entry(0); - m_bank7->set_base(m_region_os->base()); /* bank 7 points at the OS rom from c000 to ffff */ + m_bank7->set_base(m_region_os->base()); /* bank 7 points at the OS rom from c000 to ffff */ bbcb_IC32_initialise(this); - - m_previous_wd177x_int_state=1; } @@ -1861,6 +1817,4 @@ MACHINE_RESET_MEMBER(bbc_state, bbcm) m_bank7->set_base(m_region_os->base()); /* bank 6 OS rom of RAM from c000 to dfff */ bbcb_IC32_initialise(this); - - m_previous_wd177x_int_state=1; } diff --git a/src/mame/machine/docg3.c b/src/mame/machine/docg3.c index e0701987b7b..fbd3cb02515 100644 --- a/src/mame/machine/docg3.c +++ b/src/mame/machine/docg3.c @@ -13,7 +13,7 @@ #define VERBOSE_LEVEL ( 0 ) -INLINE void ATTR_PRINTF(3,4) verboselog( running_machine &machine, int n_level, const char *s_fmt, ... ) +INLINE void ATTR_PRINTF(3,4) verboselog( device_t &device, int n_level, const char *s_fmt, ... ) { if( VERBOSE_LEVEL >= n_level ) { @@ -22,7 +22,7 @@ INLINE void ATTR_PRINTF(3,4) verboselog( running_machine &machine, int n_level, va_start( v, s_fmt ); vsprintf( buf, s_fmt, v ); va_end( v ); - logerror( "%s: %s", machine.describe_context(), buf ); + device.logerror( "%s: %s", device.machine().describe_context(), buf ); } } @@ -115,7 +115,7 @@ READ16_MEMBER( diskonchip_g3_device::sec_1_r ) { data = (g3_read_data() << 0) | (g3_read_data() << 8); } - verboselog( machine(), 9, "(DOC) %08X -> %04X\n", 0x0800 + (offset << 1), data); + verboselog(*this, 9, "(DOC) %08X -> %04X\n", 0x0800 + (offset << 1), data); return data; } @@ -144,7 +144,7 @@ void diskonchip_g3_device::g3_write_data(UINT8 data) WRITE16_MEMBER( diskonchip_g3_device::sec_1_w ) { - verboselog( machine(), 9, "(DOC) %08X <- %04X\n", 0x0800 + (offset << 1), data); + verboselog(*this, 9, "(DOC) %08X <- %04X\n", 0x0800 + (offset << 1), data); if (m_sec_2[0x1B] & 0x40) { g3_write_data(data); @@ -399,7 +399,7 @@ UINT16 diskonchip_g3_device::sec_2_read16(UINT32 offset) // ? case 0x1074 : data = sec_2_read_1074(); break; } - verboselog( machine(), 9, "(DOC) %08X -> %04X\n", 0x1000 + offset, data); + verboselog(*this, 9, "(DOC) %08X -> %04X\n", 0x1000 + offset, data); return data; } @@ -430,7 +430,7 @@ UINT8 diskonchip_g3_device::sec_2_read8(UINT32 offset) case 0x104E : data = sec_2_read_104E(); break; case 0x104F : data = sec_2_read_104F(); break; } - verboselog( machine(), 9, "(DOC) %08X -> %02X\n", 0x1000 + offset, data); + verboselog(*this, 9, "(DOC) %08X -> %02X\n", 0x1000 + offset, data); return data; } @@ -438,7 +438,7 @@ void diskonchip_g3_device::sec_2_write_100C(UINT8 data) { const char *mode_name[] = { "reset", "normal", "deep power down" }; UINT32 mode = data & 3; - verboselog( machine(), 5, "mode %d (%s)\n", mode, mode_name[mode]); + verboselog(*this, 5, "mode %d (%s)\n", mode, mode_name[mode]); if (mode == 0) { m_sec_2[0x04] = 00; @@ -447,7 +447,7 @@ void diskonchip_g3_device::sec_2_write_100C(UINT8 data) void diskonchip_g3_device::sec_2_write_1032(UINT8 data) { - verboselog( machine(), 5, "flash select %02X\n", data); + verboselog(*this, 5, "flash select %02X\n", data); if ((data == 0x12) || (data == 0x27)) { m_transfer_offset = 0; @@ -462,7 +462,7 @@ void diskonchip_g3_device::g3_erase_block() UINT32 offset; int i, j; const UINT8 xxx[] = { 0x00, 0x00, 0x87, 0x00, 0x00, 0x00, 0xCE, 0x00, 0xCF, 0x72, 0xFC, 0x1B, 0xA9, 0xC7, 0xB9, 0x00 }; - verboselog( machine(), 5, "erase block %04X\n", m_block); + verboselog(*this, 5, "erase block %04X\n", m_block); for (i=0;i<m_pages;i++) { m_page = i; @@ -486,7 +486,7 @@ void diskonchip_g3_device::g3_erase_block() void diskonchip_g3_device::sec_2_write_1034(UINT8 data) { - verboselog( machine(), 5, "flash command %02X\n", data); + verboselog(*this, 5, "flash command %02X\n", data); if ((m_sec_2[0x32] == 0x0E) && (data == 0x00)) { m_test = 0; @@ -517,7 +517,7 @@ void diskonchip_g3_device::sec_2_write_1034(UINT8 data) } else { - verboselog( machine(), 0, "diskonchip_sec_2_write_1034: unknown value %02X/%02X\n", data, m_sec_2[0x32]); + verboselog(*this, 0, "diskonchip_sec_2_write_1034: unknown value %02X/%02X\n", data, m_sec_2[0x32]); } } else if (m_sec_2[0x32] == 0x12) @@ -542,7 +542,7 @@ void diskonchip_g3_device::sec_2_write_1034(UINT8 data) } else { - verboselog( machine(), 0, "diskonchip_sec_2_write_1034: unknown value %02X/%02X\n", data, m_sec_2[0x32]); + verboselog(*this, 0, "diskonchip_sec_2_write_1034: unknown value %02X/%02X\n", data, m_sec_2[0x32]); } } else if (m_sec_2[0x32] == 0x27) @@ -559,7 +559,7 @@ void diskonchip_g3_device::sec_2_write_1034(UINT8 data) } else { - verboselog( machine(), 0, "diskonchip_sec_2_write_1034: unknown value %02X/%02X\n", data, m_sec_2[0x32]); + verboselog(*this, 0, "diskonchip_sec_2_write_1034: unknown value %02X/%02X\n", data, m_sec_2[0x32]); } } else if ((m_sec_2[0x32] == 0x31) && (data == 0x71)) @@ -581,12 +581,12 @@ void diskonchip_g3_device::sec_2_write_1034(UINT8 data) } else { - verboselog( machine(), 0, "diskonchip_sec_2_write_1034: unknown value %02X/%02X\n", data, m_sec_2[0x32]); + verboselog(*this, 0, "diskonchip_sec_2_write_1034: unknown value %02X/%02X\n", data, m_sec_2[0x32]); } } else { - verboselog( machine(), 0, "diskonchip_sec_2_write_1034: unknown value %02X/%02X\n", data, m_sec_2[0x32]); + verboselog(*this, 0, "diskonchip_sec_2_write_1034: unknown value %02X/%02X\n", data, m_sec_2[0x32]); } } @@ -602,7 +602,7 @@ void diskonchip_g3_device::sec_2_write_1036(UINT8 data) if (block >= m_blocks) fatalerror( "DOCG3: invalid block (%d)\n", block); plane = (m_data_1036 >> 6) & 1; page = (m_data_1036 >> 0) & 0x3F; - verboselog( machine(), 5, "flash address %d - %06X (plane %d block %04X page %04X)\n", m_address_count, m_data_1036, plane, block, page); + verboselog(*this, 5, "flash address %d - %06X (plane %d block %04X page %04X)\n", m_address_count, m_data_1036, plane, block, page); if (m_address_count == 1) { m_plane = 0; @@ -621,7 +621,7 @@ void diskonchip_g3_device::sec_2_write_1036(UINT8 data) plane = (m_data_1036 >> 14) & 1; page = (m_data_1036 >> 8) & 0x3F; unk = (m_data_1036 >> 0) & 0xFF; - verboselog( machine(), 5, "flash address %d - %08X (plane %d block %04X page %04X unk %02X)\n", m_address_count, m_data_1036, plane, block, page, unk); + verboselog(*this, 5, "flash address %d - %08X (plane %d block %04X page %04X unk %02X)\n", m_address_count, m_data_1036, plane, block, page, unk); if (m_address_count == 1) { m_plane = 0; @@ -634,27 +634,27 @@ void diskonchip_g3_device::sec_2_write_1036(UINT8 data) else if (m_sec_2[0x34] == 0x05) { m_transfer_offset = data << 2; - verboselog( machine(), 5, "flash transfer offset %04X\n", m_transfer_offset); + verboselog(*this, 5, "flash transfer offset %04X\n", m_transfer_offset); } } void diskonchip_g3_device::sec_2_write_1040(UINT16 data) { m_transfersize = (data & 0x3FF); - verboselog( machine(), 5, "flash transfer size %04X\n", m_transfersize); + verboselog(*this, 5, "flash transfer size %04X\n", m_transfersize); } void diskonchip_g3_device::sec_2_write_100A(UINT8 data) { m_device = data & 3; - verboselog( machine(), 5, "select device %d\n", m_device); + verboselog(*this, 5, "select device %d\n", m_device); } void diskonchip_g3_device::sec_2_write16(UINT32 offset, UINT16 data) { m_sec_2[offset+0] = (data >> 0) & 0xFF; m_sec_2[offset+1] = (data >> 8) & 0xFF; - verboselog( machine(), 9, "(DOC) %08X <- %04X\n", 0x1000 + offset, data); + verboselog(*this, 9, "(DOC) %08X <- %04X\n", 0x1000 + offset, data); switch (0x1000 + offset) { // ? @@ -675,7 +675,7 @@ void diskonchip_g3_device::sec_2_write16(UINT32 offset, UINT16 data) void diskonchip_g3_device::sec_2_write8(UINT32 offset, UINT8 data) { m_sec_2[offset] = data; - verboselog( machine(), 9, "(DOC) %08X <- %02X\n", 0x1000 + offset, data); + verboselog(*this, 9, "(DOC) %08X <- %02X\n", 0x1000 + offset, data); switch (0x1000 + offset) { // ? @@ -707,7 +707,7 @@ READ16_MEMBER( diskonchip_g3_device::sec_2_r ) } else { - verboselog( machine(), 0, "diskonchip_g3_sec_2_r: unknown mem_mask %08X\n", mem_mask); + verboselog(*this, 0, "diskonchip_g3_sec_2_r: unknown mem_mask %08X\n", mem_mask); return 0; } } @@ -728,20 +728,20 @@ WRITE16_MEMBER( diskonchip_g3_device::sec_2_w ) } else { - verboselog( machine(), 0, "diskonchip_g3_sec_2_w: unknown mem_mask %08X\n", mem_mask); + verboselog(*this, 0, "diskonchip_g3_sec_2_w: unknown mem_mask %08X\n", mem_mask); } } READ16_MEMBER( diskonchip_g3_device::sec_3_r ) { UINT16 data = 0; - verboselog( machine(), 9, "(DOC) %08X -> %04X\n", 0x1800 + (offset << 1), data); + verboselog(*this, 9, "(DOC) %08X -> %04X\n", 0x1800 + (offset << 1), data); return data; } WRITE16_MEMBER( diskonchip_g3_device::sec_3_w ) { - verboselog( machine(), 9, "(DOC) %08X <- %02X\n", 0x1800 + (offset << 1), data); + verboselog(*this, 9, "(DOC) %08X <- %02X\n", 0x1800 + (offset << 1), data); } //------------------------------------------------- @@ -749,7 +749,7 @@ WRITE16_MEMBER( diskonchip_g3_device::sec_3_w ) //------------------------------------------------- void diskonchip_g3_device::device_start() { - verboselog( machine(), 9, "(DOC) device start\n"); + verboselog(*this, 9, "(DOC) device start\n"); switch (m_size) { @@ -802,7 +802,7 @@ void diskonchip_g3_device::device_start() void diskonchip_g3_device::device_reset() { - verboselog( machine(), 9, "(DOC) device reset\n"); + verboselog(*this, 9, "(DOC) device reset\n"); } //------------------------------------------------- diff --git a/src/mame/machine/electron.c b/src/mame/machine/electron.c index 225f4da5a7a..5ed4ca1e07a 100644 --- a/src/mame/machine/electron.c +++ b/src/mame/machine/electron.c @@ -249,7 +249,7 @@ WRITE8_MEMBER(electron_state::electron_ula_w) { /* GUESS * the Advanced Users manual says this is the correct algorithm - * but the divider is wrong(?), says 16 but results in high pitch, + * but the divider is wrong(?), says 16 but results in high pitch, * 32 is more close */ m_beeper->set_frequency( 1000000 / ( 32 * ( data + 1 ) ) ); diff --git a/src/mame/machine/genpin.h b/src/mame/machine/genpin.h index ca3084524b4..6dededf3b4b 100644 --- a/src/mame/machine/genpin.h +++ b/src/mame/machine/genpin.h @@ -21,6 +21,15 @@ const char *const genpin_sample_names[] = "knocker", "sling", "coinin", + "outhole", + "kickback", + "drop_target_reset", + "coil_coinlockout_engage", + "coil_coinlockout_release", + "relay_engage", + "relay_release", + "solenoid_engage", + "solenoid_release", 0 /* end of array */ }; diff --git a/src/mame/machine/mbc55x.c b/src/mame/machine/mbc55x.c index 18704e33f0a..5ef2d32a6ed 100644 --- a/src/mame/machine/mbc55x.c +++ b/src/mame/machine/mbc55x.c @@ -402,12 +402,12 @@ static void decode_dos21(device_t *device,offs_t pc) UINT16 di = state->m_maincpu->state_int(I8086_DI); UINT16 bp = state->m_maincpu->state_int(I8086_BP); - logerror("=======================================================================\n"); - logerror("DOS Int 0x21 call at %05X\n",pc); - logerror("AX=%04X, BX=%04X, CX=%04X, DX=%04X\n",ax,bx,cx,dx); - logerror("CS=%04X, DS=%04X, ES=%04X, SS=%04X\n",cs,ds,es,ss); - logerror("SI=%04X, DI=%04X, BP=%04X\n",si,di,bp); - logerror("=======================================================================\n"); + device->logerror("=======================================================================\n"); + device->logerror("DOS Int 0x21 call at %05X\n",pc); + device->logerror("AX=%04X, BX=%04X, CX=%04X, DX=%04X\n",ax,bx,cx,dx); + device->logerror("CS=%04X, DS=%04X, ES=%04X, SS=%04X\n",cs,ds,es,ss); + device->logerror("SI=%04X, DI=%04X, BP=%04X\n",si,di,bp); + device->logerror("=======================================================================\n"); if((ax & 0xff00)==0x0900) debugger_break(device->machine()); diff --git a/src/mame/machine/mm1kb.c b/src/mame/machine/mm1kb.c index eb951c0cee3..5097eb78225 100644 --- a/src/mame/machine/mm1kb.c +++ b/src/mame/machine/mm1kb.c @@ -43,7 +43,7 @@ const rom_entry *mm1_keyboard_t::device_rom_region() const static const char *const mm1_kb_sample_names[] = { "*MM1_keyboard", - "beep", // beep at 2.6 kHz + "beep", // beep at 2.6 kHz "power_switch", // not actually on the keyboard, but close enough :) 0 }; diff --git a/src/mame/machine/mm1kb.h b/src/mame/machine/mm1kb.h index 1b635810887..8ccd11d3249 100644 --- a/src/mame/machine/mm1kb.h +++ b/src/mame/machine/mm1kb.h @@ -87,8 +87,8 @@ private: int m_drive; UINT8 m_data; - static bool first_time; // for power switch sound - emu_timer *m_scan_timer; // scan timer + static bool first_time; // for power switch sound + emu_timer *m_scan_timer; // scan timer }; diff --git a/src/mame/machine/n64.c b/src/mame/machine/n64.c index fda94a7fde8..a57db69e0b6 100644 --- a/src/mame/machine/n64.c +++ b/src/mame/machine/n64.c @@ -1667,6 +1667,20 @@ WRITE32_MEMBER( n64_periphs::pi_reg_w ) READ32_MEMBER( n64_periphs::ri_reg_r ) { + if(offset == 0x0C/4) // RI_SELECT + { + /* This is to 'simulate' the time that RDRAM initialization + would take if the RI registers were not set to skip the RDRAM + testing during device reset. Proper simulation would require + emulating the RDRAM modules and bus stalls for the mips cpu. + The cycle amount chosen represents 1/2 second, which is not + necessarily the time for RDRAM initialization, but rather the + time recommended for letting the SI devices settle after startup. + This allows the initialization routines for the SI to see that a + proper amount of time has passed since system startup. */ + machine().device<mips3_device>("maincpu")->burn_cycles(93750000/2); + } + if(offset > 0x1c/4) { logerror("ri_reg_r: %08X, %08X at %08X\n", offset, mem_mask, maincpu->safe_pc()); diff --git a/src/mame/machine/naomi.c b/src/mame/machine/naomi.c index 4719a58db16..72a3a6338b9 100644 --- a/src/mame/machine/naomi.c +++ b/src/mame/machine/naomi.c @@ -219,7 +219,7 @@ CUSTOM_INPUT_MEMBER(naomi_state::naomi_mp_r) for (int i = 0x80; i >= 0x08; i >>= 1) { if (m_mp_mux & i) - retval |= ioport(tagptr)->read_safe(0); + retval |= read_safe(ioport(tagptr), 0); tagptr += strlen(tagptr) + 1; } return retval; diff --git a/src/mame/machine/naomim1.c b/src/mame/machine/naomim1.c index 86f0119f578..84d2db5ecef 100644 --- a/src/mame/machine/naomim1.c +++ b/src/mame/machine/naomim1.c @@ -32,7 +32,7 @@ void naomi_m1_board::device_start() { naomi_board::device_start(); - std::string skey = parameter("key").c_str(); + std::string skey = parameter("key"); if(!skey.empty()) key = strtoll(skey.c_str(), 0, 16); else diff --git a/src/mame/machine/osborne1.c b/src/mame/machine/osborne1.c index 84cf5f2db46..ed7a65b2686 100644 --- a/src/mame/machine/osborne1.c +++ b/src/mame/machine/osborne1.c @@ -1,211 +1,157 @@ // license:BSD-3-Clause -// copyright-holders:Wilbert Pol +// copyright-holders:Wilbert Pol,Vas Crabb /*************************************************************************** There are three IRQ sources: -- IRQ0 +- IRQ0 = IRQ from the serial ACIA - IRQ1 = IRQA from the video PIA - IRQ2 = IRQA from the IEEE488 PIA -Interrupt handling on the Osborne-1 is a bit awkward. When an interrupt is -taken by the Z80 the ROMMODE is enabled on each fetch of an instruction -byte. During execution of an instruction the previous ROMMODE setting seems -to be used. Side effect of this is that when an interrupt is taken and the -stack pointer is pointing to 0000-3FFF then the return address will still -be written to RAM if RAM was switched in. - ***************************************************************************/ #include "includes/osborne1.h" -#define RAMMODE (0x01) - -WRITE8_MEMBER( osborne1_state::osborne1_0000_w ) +WRITE8_MEMBER( osborne1_state::bank_0xxx_w ) { - /* Check whether regular RAM is enabled */ - if ( ! m_bank2_enabled || ( m_in_irq_handler && m_bankswitch == RAMMODE ) ) - { - m_ram->pointer()[ offset ] = data; - } + if (!m_rom_mode) + m_ram->pointer()[offset] = data; } - -WRITE8_MEMBER( osborne1_state::osborne1_1000_w ) +WRITE8_MEMBER( osborne1_state::bank_1xxx_w ) { - /* Check whether regular RAM is enabled */ - if ( ! m_bank2_enabled || ( m_in_irq_handler && m_bankswitch == RAMMODE ) ) - { - m_ram->pointer()[ 0x1000 + offset ] = data; - } + if (!m_rom_mode) + m_ram->pointer()[0x1000 + offset] = data; } - -READ8_MEMBER( osborne1_state::osborne1_2000_r ) +READ8_MEMBER( osborne1_state::bank_2xxx_3xxx_r ) { - UINT8 data = 0xFF; - - /* Check whether regular RAM is enabled */ - if ( ! m_bank2_enabled ) + if (!m_rom_mode) + return m_ram->pointer()[0x2000 + offset]; + + // Since each peripheral only checks two bits, many addresses will + // result in multiple peripherals attempting to drive the bus. This is + // simulated by ANDing all the values together. + UINT8 data = 0xFF; + if ((offset & 0x900) == 0x100) // Floppy + data &= m_fdc->read(space, offset & 0x03); + if ((offset & 0x900) == 0x900) // IEEE488 PIA + data &= m_pia0->read(space, offset & 0x03); + if ((offset & 0xA00) == 0x200) // Keyboard { - data = m_ram->pointer()[ 0x2000 + offset ]; + if (offset & 0x01) data &= m_keyb_row0->read(); + if (offset & 0x02) data &= m_keyb_row1->read(); + if (offset & 0x04) data &= m_keyb_row3->read(); + if (offset & 0x08) data &= m_keyb_row4->read(); + if (offset & 0x10) data &= m_keyb_row5->read(); + if (offset & 0x20) data &= m_keyb_row2->read(); + if (offset & 0x40) data &= m_keyb_row6->read(); + if (offset & 0x80) data &= m_keyb_row7->read(); } - else + if ((offset & 0xA00) == 0xA00) // Serial { - switch( offset & 0x0F00 ) - { - case 0x100: /* Floppy */ - data = m_fdc->read( space, offset & 0x03 ); - break; - case 0x200: /* Keyboard */ - /* Row 0 */ - if ( offset & 0x01 ) data &= m_row0->read(); - /* Row 1 */ - if ( offset & 0x02 ) data &= m_row1->read(); - /* Row 2 */ - if ( offset & 0x04 ) data &= m_row3->read(); - /* Row 3 */ - if ( offset & 0x08 ) data &= m_row4->read(); - /* Row 4 */ - if ( offset & 0x10 ) data &= m_row5->read(); - /* Row 5 */ - if ( offset & 0x20 ) data &= m_row2->read(); - /* Row 6 */ - if ( offset & 0x40 ) data &= m_row6->read(); - /* Row 7 */ - if ( offset & 0x80 ) data &= m_row7->read(); - break; - case 0x900: /* IEEE488 PIA */ - data = m_pia0->read(space, offset & 0x03 ); - break; - case 0xA00: /* Serial */ - break; - case 0xC00: /* Video PIA */ - data = m_pia1->read(space, offset & 0x03 ); - break; - } + if (offset & 0x01) data &= m_acia->data_r(space, 0); + else data &= m_acia->status_r(space, 0); } + if ((offset & 0xC00) == 0x400) // SCREEN-PAC + { + if (m_screen_pac) data &= 0xFB; + } + if ((offset & 0xC00) == 0xC00) // Video PIA + data &= m_pia1->read(space, offset & 0x03); return data; } - -WRITE8_MEMBER( osborne1_state::osborne1_2000_w ) +WRITE8_MEMBER( osborne1_state::bank_2xxx_3xxx_w ) { - /* Check whether regular RAM is enabled */ - if ( ! m_bank2_enabled ) + if (!m_rom_mode) { - m_ram->pointer()[ 0x2000 + offset ] = data; + m_ram->pointer()[0x2000 + offset] = data; } else { - if ( m_in_irq_handler && m_bankswitch == RAMMODE ) + // Handle writes to the I/O area + if ((offset & 0x900) == 0x100) // Floppy + m_fdc->write(space, offset & 0x03, data); + if ((offset & 0x900) == 0x900) // IEEE488 PIA + m_pia0->write(space, offset & 0x03, data); + if ((offset & 0xA00) == 0xA00) // Serial { - m_ram->pointer()[ 0x2000 + offset ] = data; + if (offset & 0x01) m_acia->data_w(space, 0, data); + else m_acia->control_w(space, 0, data); } - /* Handle writes to the I/O area */ - switch( offset & 0x0F00 ) + if ((offset & 0xC00) == 0x400) // SCREEN-PAC { - case 0x100: /* Floppy */ - m_fdc->write(space, offset & 0x03, data ); - break; - case 0x900: /* IEEE488 PIA */ - m_pia0->write(space, offset & 0x03, data ); - break; - case 0xA00: /* Serial */ - break; - case 0xC00: /* Video PIA */ - m_pia1->write(space, offset & 0x03, data ); - break; + m_resolution = data & 0x01; + m_hc_left = (data & 0x02) ? 0 : 1; } + if ((offset & 0xC00) == 0xC00) // Video PIA + m_pia1->write(space, offset & 0x03, data); } } - -WRITE8_MEMBER( osborne1_state::osborne1_3000_w ) +WRITE8_MEMBER( osborne1_state::videoram_w ) { - /* Check whether regular RAM is enabled */ - if ( ! m_bank2_enabled || ( m_in_irq_handler && m_bankswitch == RAMMODE ) ) - { - m_ram->pointer()[ 0x3000 + offset ] = data; - } + // Attribute RAM is only one bit wide - low seven bits are discarded and read back high + if (m_bit_9) + data |= 0x7F; + else + m_tilemap->mark_tile_dirty(offset); + reinterpret_cast<UINT8 *>(m_bank_fxxx->base())[offset] = data; } - -WRITE8_MEMBER( osborne1_state::osborne1_videoram_w ) +READ8_MEMBER( osborne1_state::opcode_r ) { - /* Check whether the video attribute section is enabled */ - if ( m_bank3_enabled ) - data |= 0x7F; + // Update the flipflops that control bank selection and NMI + UINT8 const new_ub6a_q = (m_btn_reset->read() & 0x80) ? 1 : 0; + if (!m_rom_mode) + { + set_rom_mode(m_ub4a_q ? 0 : 1); + m_ub4a_q = m_ub6a_q; + } + m_ub6a_q = new_ub6a_q; + m_maincpu->set_input_line(INPUT_LINE_NMI, m_ub6a_q ? CLEAR_LINE : ASSERT_LINE); - m_bank4_ptr[offset] = data; + // Now that's sorted out we can call the normal read handler + return m_maincpu->space(AS_PROGRAM).read_byte(offset); } - -WRITE8_MEMBER( osborne1_state::osborne1_bankswitch_w ) +WRITE8_MEMBER( osborne1_state::bankswitch_w ) { - switch( offset ) + switch (offset & 0x03) { case 0x00: - m_bank2_enabled = 1; - m_bank3_enabled = 0; + if (set_rom_mode(1)) + m_ub4a_q = m_ub6a_q; break; case 0x01: - m_bank2_enabled = 0; - m_bank3_enabled = 0; + m_ub4a_q = 1; + m_ub6a_q = 1; + set_rom_mode(0); + m_maincpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE); break; case 0x02: - m_bank2_enabled = 1; - m_bank3_enabled = 1; + set_bit_9(1); break; case 0x03: - m_bank2_enabled = 1; - m_bank3_enabled = 0; + set_bit_9(0); break; } - if ( m_bank2_enabled ) - { - m_bank1->set_base(m_region_maincpu->base() ); - m_bank2->set_base(m_empty_4K ); - m_bank3->set_base(m_empty_4K ); - } - else - { - m_bank1->set_base(m_ram->pointer() ); - m_bank2->set_base(m_ram->pointer() + 0x1000 ); - m_bank3->set_base(m_ram->pointer() + 0x3000 ); - } - m_bank4_ptr = m_ram->pointer() + ( ( m_bank3_enabled ) ? 0x10000 : 0xF000 ); - m_bank4->set_base(m_bank4_ptr ); - m_bankswitch = offset; - m_in_irq_handler = 0; } - -DIRECT_UPDATE_MEMBER(osborne1_state::osborne1_opbase) +WRITE_LINE_MEMBER( osborne1_state::irqack_w ) { - if ( ( address & 0xF000 ) == 0x2000 ) - { - if ( ! m_bank2_enabled ) - { - direct.explicit_configure(0x2000, 0x2fff, 0x0fff, m_ram->pointer() + 0x2000); - return ~0; - } - } - return address; -} - - -WRITE_LINE_MEMBER( osborne1_state::ieee_pia_irq_a_func ) -{ - m_pia_0_irq_state = state; - m_maincpu->set_input_line(0, ( m_pia_1_irq_state ) ? ASSERT_LINE : CLEAR_LINE); + // Update the flipflops that control bank selection and NMI + if (!m_rom_mode) set_rom_mode(m_ub4a_q ? 0 : 1); + m_ub4a_q = 0; + m_ub6a_q = (m_btn_reset->read() & 0x80) ? 1 : 0; + m_maincpu->set_input_line(INPUT_LINE_NMI, m_ub6a_q ? CLEAR_LINE : ASSERT_LINE); } READ8_MEMBER( osborne1_state::ieee_pia_pb_r ) { /* - bit description 0 @@ -216,9 +162,7 @@ READ8_MEMBER( osborne1_state::ieee_pia_pb_r ) 5 DAV 6 NDAC 7 NRFD - */ - UINT8 data = 0; data |= m_ieee->eoi_r() << 3; @@ -229,24 +173,20 @@ READ8_MEMBER( osborne1_state::ieee_pia_pb_r ) return data; } - WRITE8_MEMBER( osborne1_state::ieee_pia_pb_w ) { /* - bit description - 0 - 1 - 2 + 0 0 = DATAn as output, 1 = DATAn as input + 1 0 = NDAC/NRFD as output, 1 = NDAC/NRFD as input; also gates SRQ + 2 0 = EOI/DAV as output, 1 = EOI/DAV as input 3 EOI 4 ATN 5 DAV 6 NDAC 7 NRFD - */ - m_ieee->eoi_w(BIT(data, 3)); m_ieee->atn_w(BIT(data, 4)); m_ieee->dav_w(BIT(data, 5)); @@ -254,30 +194,22 @@ WRITE8_MEMBER( osborne1_state::ieee_pia_pb_w ) m_ieee->nrfd_w(BIT(data, 7)); } - -WRITE_LINE_MEMBER( osborne1_state::video_pia_out_cb2_dummy ) +WRITE_LINE_MEMBER( osborne1_state::ieee_pia_irq_a_func ) { + update_irq(); } WRITE8_MEMBER( osborne1_state::video_pia_port_a_w ) { - m_fdc->dden_w(BIT(data, 0)); + m_scroll_x = data >> 1; - data -= 0xea; // remove bias - - m_new_start_x = (data >> 1); - if (m_new_start_x) - m_new_start_x--; - - //logerror("Video pia port a write: %02X, density set to %s\n", data, data & 1 ? "FM" : "MFM" ); + m_fdc->dden_w(BIT(data, 0)); } - WRITE8_MEMBER( osborne1_state::video_pia_port_b_w ) { - m_new_start_y = data & 0x1F; - m_beep_state = BIT(data, 5); + m_speaker->level_w((BIT(data, 5) && m_beep_state) ? 1 : 0); if (BIT(data, 6)) { @@ -293,147 +225,116 @@ WRITE8_MEMBER( osborne1_state::video_pia_port_b_w ) { m_fdc->set_floppy(NULL); } - - //logerror("Video pia port b write: %02X\n", data ); } +WRITE_LINE_MEMBER( osborne1_state::video_pia_out_cb2_dummy ) +{ +} WRITE_LINE_MEMBER( osborne1_state::video_pia_irq_a_func ) { - m_pia_1_irq_state = state; - m_maincpu->set_input_line(0, ( m_pia_1_irq_state ) ? ASSERT_LINE : CLEAR_LINE); + update_irq(); } -//static const struct aica6850_interface osborne1_6850_config = -//{ -// 10, /* tx_clock */ -// 10, /* rx_clock */ -// NULL, /* rx_pin */ -// NULL, /* tx_pin */ -// NULL, /* cts_pin */ -// NULL, /* rts_pin */ -// NULL, /* dcd_pin */ -// NULL /* int_callback */ -//}; - - -void osborne1_state::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) +WRITE_LINE_MEMBER( osborne1_state::serial_acia_irq_func ) { - switch (id) - { - case TIMER_VIDEO: - osborne1_video_callback(ptr, param); - break; - case TIMER_SETUP: - setup_osborne1(ptr, param); - break; - default: - assert_always(FALSE, "Unknown id in osborne1_state::device_timer"); - } + m_acia_irq_state = state; + update_irq(); } -TIMER_CALLBACK_MEMBER(osborne1_state::osborne1_video_callback) +DRIVER_INIT_MEMBER( osborne1_state, osborne1 ) { - int y = machine().first_screen()->vpos(); - UINT8 ra=0,chr,gfx,dim; - UINT16 x,ma; + m_bank_0xxx->configure_entries(0, 1, m_ram->pointer(), 0); + m_bank_0xxx->configure_entries(1, 1, m_region_maincpu->base(), 0); + m_bank_1xxx->configure_entries(0, 1, m_ram->pointer() + 0x1000, 0); + m_bank_1xxx->configure_entries(1, 1, m_region_maincpu->base(), 0); + m_bank_fxxx->configure_entries(0, 1, m_ram->pointer() + 0xF000, 0); + m_bank_fxxx->configure_entries(1, 1, m_ram->pointer() + 0x10000, 0); + + m_p_chargen = memregion("chargen")->base(); + m_video_timer = timer_alloc(TIMER_VIDEO); + m_tilemap = &machine().tilemap().create( + m_gfxdecode, + tilemap_get_info_delegate(FUNC(osborne1_state::get_tile_info), this), TILEMAP_SCAN_ROWS, + 8, 10, 128, 32); - /* Check for start of frame */ - if ( y == 0 ) - { - /* Clear CA1 on video PIA */ - m_pia1->ca1_w(0); - } - if ( y == 240 ) - { - /* Set CA1 on video PIA */ - m_pia1->ca1_w(1); - } - if ( y < 240 ) - { - ra = y % 10; - /* Draw a line of the display */ - ma = (m_new_start_y + (y/10)) * 128 + m_new_start_x; - UINT16 *p = &m_bitmap.pix16(y); + m_acia_rxc_txc_timer = timer_alloc(TIMER_ACIA_RXC_TXC); - for ( x = 0; x < 52; x++ ) - { - chr = m_ram->pointer()[ 0xF000 + ( (ma+x) & 0xFFF ) ]; - dim = m_ram->pointer()[ 0x10000 + ( (ma+x) & 0xFFF ) ] & 0x80; - - if ( (chr & 0x80) && (ra == 9) ) - gfx = 0xFF; - else - gfx = m_p_chargen[ (ra << 7) | ( chr & 0x7F ) ]; - - /* Display a scanline of a character */ - *p++ = BIT(gfx, 7) ? ( dim ? 2 : 1 ) : 0; - *p++ = BIT(gfx, 6) ? ( dim ? 2 : 1 ) : 0; - *p++ = BIT(gfx, 5) ? ( dim ? 2 : 1 ) : 0; - *p++ = BIT(gfx, 4) ? ( dim ? 2 : 1 ) : 0; - *p++ = BIT(gfx, 3) ? ( dim ? 2 : 1 ) : 0; - *p++ = BIT(gfx, 2) ? ( dim ? 2 : 1 ) : 0; - *p++ = BIT(gfx, 1) ? ( dim ? 2 : 1 ) : 0; - *p++ = BIT(gfx, 0) ? ( dim ? 2 : 1 ) : 0; - } - } + save_item(NAME(m_screen_pac)); + save_item(NAME(m_acia_rxc_txc_div)); + save_item(NAME(m_acia_rxc_txc_p_low)); + save_item(NAME(m_acia_rxc_txc_p_high)); - if ( (ra==2) || (ra== 6) ) - { - m_beep->set_state( m_beep_state ); - } - else - { - m_beep->set_state( 0 ); - } + save_item(NAME(m_ub4a_q)); + save_item(NAME(m_ub6a_q)); + save_item(NAME(m_rom_mode)); + save_item(NAME(m_bit_9)); - m_video_timer->adjust(machine().first_screen()->time_until_pos(y + 1, 0 )); -} + save_item(NAME(m_scroll_x)); + save_item(NAME(m_scroll_y)); + save_item(NAME(m_beep_state)); -TIMER_CALLBACK_MEMBER(osborne1_state::setup_osborne1) -{ - m_beep->set_state( 0 ); - m_beep->set_frequency( 300 /* 60 * 240 / 2 */ ); - m_pia1->ca1_w(0); + save_item(NAME(m_resolution)); + save_item(NAME(m_hc_left)); + + save_item(NAME(m_acia_irq_state)); + save_item(NAME(m_acia_rxc_txc_state)); } void osborne1_state::machine_reset() { - address_space& space = m_maincpu->space(AS_PROGRAM); - /* Initialize memory configuration */ - osborne1_bankswitch_w( space, 0x00, 0 ); - - m_pia_0_irq_state = FALSE; - m_pia_1_irq_state = FALSE; - m_in_irq_handler = 0; - - m_p_chargen = memregion( "chargen" )->base(); - - memset( m_ram->pointer() + 0x10000, 0xFF, 0x1000 ); + // Refresh configuration + m_screen_pac = 0 != (m_cnf->read() & 0x01); + switch (m_cnf->read() & 0x06) + { + case 0x00: + m_acia_rxc_txc_div = 16; + m_acia_rxc_txc_p_low = 23; + m_acia_rxc_txc_p_high = 29; + break; + case 0x02: + m_acia_rxc_txc_div = 16; + m_acia_rxc_txc_p_low = 9; + m_acia_rxc_txc_p_high = 15; + break; + case 0x04: + m_acia_rxc_txc_div = 16; + m_acia_rxc_txc_p_low = 5; + m_acia_rxc_txc_p_high = 8; + break; + case 0x06: + m_acia_rxc_txc_div = 8; + m_acia_rxc_txc_p_low = 5; + m_acia_rxc_txc_p_high = 8; + break; + } - space.set_direct_update_handler(direct_update_delegate(FUNC(osborne1_state::osborne1_opbase), this)); -} + // Initialise memory configuration + m_rom_mode = 0; + m_bit_9 = 1; + set_rom_mode(1); + set_bit_9(0); + // Reset serial state + m_acia_irq_state = 0; + m_acia_rxc_txc_state = 0; + update_acia_rxc_txc(); -DRIVER_INIT_MEMBER(osborne1_state,osborne1) -{ - m_empty_4K = auto_alloc_array(machine(), UINT8, 0x1000 ); - memset( m_empty_4K, 0xFF, 0x1000 ); + // Reset video hardware + m_resolution = 0; + m_hc_left = 1; - /* Configure the 6850 ACIA */ -// acia6850_config( 0, &osborne1_6850_config ); - m_video_timer = timer_alloc(TIMER_VIDEO); - m_video_timer->adjust(machine().first_screen()->time_until_pos(1, 0 )); - - timer_set(attotime::zero, TIMER_SETUP); + // The low bits of attribute RAM are not physically present and hence always read high + for (unsigned i = 0; i < 0x1000; i++) + m_ram->pointer()[0x10000 + i] |= 0x7F; } - void osborne1_state::video_start() { machine().first_screen()->register_screen_bitmap(m_bitmap); + m_video_timer->adjust(machine().first_screen()->time_until_pos(1, 0)); } UINT32 osborne1_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) @@ -442,72 +343,159 @@ UINT32 osborne1_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap return 0; } -/**************************************************************** - Osborne1 specific daisy chain code -****************************************************************/ - -const device_type OSBORNE1_DAISY = &device_creator<osborne1_daisy_device>; - -//************************************************************************** -// LIVE DEVICE -//************************************************************************** -//------------------------------------------------- -// z80ctc_device - constructor -//------------------------------------------------- -osborne1_daisy_device::osborne1_daisy_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) - : device_t(mconfig, OSBORNE1_DAISY, "Osborne 1 daisy", tag, owner, clock, "osborne1_daisy", __FILE__), - device_z80daisy_interface(mconfig, *this) +void osborne1_state::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) { + switch (id) + { + case TIMER_VIDEO: + video_callback(ptr, param); + break; + case TIMER_ACIA_RXC_TXC: + m_acia_rxc_txc_state = m_acia_rxc_txc_state ? 0 : 1; + update_acia_rxc_txc(); + break; + default: + assert_always(FALSE, "Unknown id in osborne1_state::device_timer"); + } } -//------------------------------------------------- -// device_start - device-specific startup -//------------------------------------------------- - -void osborne1_daisy_device::device_start() +TIMER_CALLBACK_MEMBER(osborne1_state::video_callback) { -} + int const y = machine().first_screen()->vpos(); + UINT8 const ra = y % 10; + UINT8 const port_b = m_pia1->b_output(); + + // Check for start/end of visible area and clear/set CA1 on video PIA + if (y == 0) + { + m_scroll_y = port_b & 0x1F; + m_pia1->ca1_w(0); + } + else if (y == 240) + { + m_pia1->ca1_w(1); + } + + if (y < 240) + { + // Draw a line of the display + UINT16 *p = &m_bitmap.pix16(y); + bool const hires = m_screen_pac & m_resolution; + UINT16 const row = ((m_scroll_y + (y / 10)) << 7) & 0xF80; + + // The derivation of the initial column is not obvious. The 7-bit + // column counter is preloaded near the beginning of the horizontal + // blank period. The initial column is offset by the number of + // character clock periods in the horizontal blank period minus one + // because it latches the value before it's displayed. Using the + // standard video display, there are 12 character clock periods in + // the horizontal blank period, so subtracting 1 gives 0x0B. Using + // the SCREEN-PAC's high-resolution mode, the character clock is + // twice the frequency giving 24 character clock periods in the + // horizontal blanking period, so subtracting 1 gives 0x17. Using + // the standard video display, the column counter is preloaded with + // the high 7 bits of the value from PIA1 PORTB. The SCREEN-PAC + // takes the two high bits of this value, but sets the low five bits + // to a fixed value of 1 or 9 depending on the value of the HC-LEFT + // signal (set by bit 1 of the value written to 0x2400). Of course + // it depends on the value wrapping around to zero when it counts + // past 0x7F + UINT16 const col = hires ? ((m_scroll_x & 0x60) + (m_hc_left ? 0x09 : 0x01) + 0x17) : (m_scroll_x + 0x0B); + + for (UINT16 x = 0; x < (hires ? 104 : 52); x++) + { + UINT16 const offs = row | ((col + x) & 0x7F); + UINT8 const chr = m_ram->pointer()[0xF000 + offs]; + UINT8 const clr = (m_ram->pointer()[0x10000 + offs] & 0x80) ? 2 : 1; + + UINT8 const gfx = ((chr & 0x80) && (ra == 9)) ? 0xFF : m_p_chargen[(ra << 7) | (chr & 0x7F)]; + + // Display a scanline of a character + *p++ = BIT(gfx, 7) ? clr : 0; + if (!hires) { p[0] = p[-1]; p++; } + *p++ = BIT(gfx, 6) ? clr : 0; + if (!hires) { p[0] = p[-1]; p++; } + *p++ = BIT(gfx, 5) ? clr : 0; + if (!hires) { p[0] = p[-1]; p++; } + *p++ = BIT(gfx, 4) ? clr : 0; + if (!hires) { p[0] = p[-1]; p++; } + *p++ = BIT(gfx, 3) ? clr : 0; + if (!hires) { p[0] = p[-1]; p++; } + *p++ = BIT(gfx, 2) ? clr : 0; + if (!hires) { p[0] = p[-1]; p++; } + *p++ = BIT(gfx, 1) ? clr : 0; + if (!hires) { p[0] = p[-1]; p++; } + *p++ = BIT(gfx, 0) ? clr : 0; + if (!hires) { p[0] = p[-1]; p++; } + } + } + + // The beeper is gated so it's active four out of every ten scanlines + m_beep_state = (ra & 0x04) ? 1 : 0; + m_speaker->level_w((BIT(port_b, 5) && m_beep_state) ? 1 : 0); -//************************************************************************** -// DAISY CHAIN INTERFACE -//************************************************************************** + // Check reset key if necessary - it affects NMI + if (!m_ub6a_q) + m_maincpu->set_input_line(INPUT_LINE_NMI, (m_btn_reset->read() && 0x80) ? CLEAR_LINE : ASSERT_LINE); -//------------------------------------------------- -// z80daisy_irq_state - return the overall IRQ -// state for this device -//------------------------------------------------- + m_video_timer->adjust(machine().first_screen()->time_until_pos(y + 1, 0)); +} -int osborne1_daisy_device::z80daisy_irq_state() + +TILE_GET_INFO_MEMBER(osborne1_state::get_tile_info) { - osborne1_state *state = machine().driver_data<osborne1_state>(); - return ( state->m_pia_1_irq_state ? Z80_DAISY_INT : 0 ); + // The gfxdecode and tilemap aren't actually used for drawing, they just look nice in the F4 GFX viewer + tileinfo.set(0, m_ram->pointer()[0xF000 | tile_index] & 0x7F, 0, 0); } -//------------------------------------------------- -// z80daisy_irq_ack - acknowledge an IRQ and -// return the appropriate vector -//------------------------------------------------- +bool osborne1_state::set_rom_mode(UINT8 value) +{ + if (value != m_rom_mode) + { + m_rom_mode = value; + m_bank_0xxx->set_entry(m_rom_mode); + m_bank_1xxx->set_entry(m_rom_mode); + return true; + } + else + { + return false; + } +} -int osborne1_daisy_device::z80daisy_irq_ack() +bool osborne1_state::set_bit_9(UINT8 value) { - osborne1_state *state = machine().driver_data<osborne1_state>(); - /* Enable ROM and I/O when IRQ is acknowledged */ - UINT8 old_bankswitch = state->m_bankswitch; - address_space& space = state->m_maincpu->space(AS_PROGRAM); - - state->osborne1_bankswitch_w( space, 0, 0 ); - state->m_bankswitch = old_bankswitch; - state->m_in_irq_handler = 1; - return 0xF8; + if (value != m_bit_9) + { + m_bit_9 = value; + m_bank_fxxx->set_entry(m_bit_9); + return true; + } + else + { + return false; + } } -//------------------------------------------------- -// z80daisy_irq_reti - clear the interrupt -// pending state to allow other interrupts through -//------------------------------------------------- +void osborne1_state::update_irq() +{ + if (m_pia0->irq_a_state()) + m_maincpu->set_input_line_and_vector(INPUT_LINE_IRQ0, ASSERT_LINE, 0xF0); + else if (m_pia1->irq_a_state()) + m_maincpu->set_input_line_and_vector(INPUT_LINE_IRQ0, ASSERT_LINE, 0xF8); + else if (m_acia_irq_state) + m_maincpu->set_input_line_and_vector(INPUT_LINE_IRQ0, ASSERT_LINE, 0xFC); + else + m_maincpu->set_input_line_and_vector(INPUT_LINE_IRQ0, CLEAR_LINE, 0xFE); +} -void osborne1_daisy_device::z80daisy_irq_reti() +void osborne1_state::update_acia_rxc_txc() { + m_acia->write_rxc(m_acia_rxc_txc_state); + m_acia->write_txc(m_acia_rxc_txc_state); + attoseconds_t const dividend = (ATTOSECONDS_PER_SECOND / 100) * (m_acia_rxc_txc_state ? m_acia_rxc_txc_p_high : m_acia_rxc_txc_p_low); + attoseconds_t const divisor = (15974400 / 100) / m_acia_rxc_txc_div; + m_acia_rxc_txc_timer->adjust(attotime(0, dividend / divisor)); } diff --git a/src/mame/machine/psxcd.c b/src/mame/machine/psxcd.c index 6bcf6f04e6a..5ee9eaee9dd 100644 --- a/src/mame/machine/psxcd.c +++ b/src/mame/machine/psxcd.c @@ -6,7 +6,7 @@ #define VERBOSE_LEVEL ( 0 ) -INLINE void ATTR_PRINTF(3,4) verboselog( running_machine& machine, int n_level, const char *s_fmt, ... ) +INLINE void ATTR_PRINTF(3,4) verboselog( device_t& device, int n_level, const char *s_fmt, ... ) { if( VERBOSE_LEVEL >= n_level ) { @@ -15,7 +15,7 @@ INLINE void ATTR_PRINTF(3,4) verboselog( running_machine& machine, int n_level, va_start( v, s_fmt ); vsprintf( buf, s_fmt, v ); va_end( v ); - logerror( "%s: %s", machine.describe_context(), buf ); + device.logerror( "%s: %s", device.machine().describe_context(), buf ); } } @@ -262,14 +262,14 @@ READ8_MEMBER( psxcd_device::read ) break; } - verboselog(machine(), 2, "psxcd: read byte %08x = %02x\n",offset,ret); + verboselog(*this, 2, "psxcd: read byte %08x = %02x\n",offset,ret); return ret; } WRITE8_MEMBER( psxcd_device::write ) { - verboselog(machine(), 2, "psxcd: write byte %08x = %02x\n",offset,data); + verboselog(*this, 2, "psxcd: write byte %08x = %02x\n",offset,data); switch ((offset & 3) | ((m_regs.sr & 3) << 4)) { @@ -342,7 +342,7 @@ WRITE8_MEMBER( psxcd_device::write ) char str[1024]; for (int i=0; i<12; i++) sprintf(&str[i*4], "%02x ", m_transbuf[i+12]); - verboselog(machine(), 1, "psxcd: request data=%s\n",str); + verboselog(*this, 1, "psxcd: request data=%s\n",str); #endif } else if(!(data & 0x80)) @@ -372,7 +372,7 @@ WRITE8_MEMBER( psxcd_device::write ) m_regs.sr |= 0x20; m_regs.ir = res_queue->res; } - verboselog(machine(), 1, "psxcd: nextres\n"); + verboselog(*this, 1, "psxcd: nextres\n"); } } if(data & 0x40) @@ -434,7 +434,7 @@ void psxcd_device::write_command(UINT8 byte) void psxcd_device::cdcmd_sync() { - verboselog(machine(), 1, "psxcd: sync\n"); + verboselog(*this, 1, "psxcd: sync\n"); stop_read(); send_result(intr_acknowledge); @@ -442,7 +442,7 @@ void psxcd_device::cdcmd_sync() void psxcd_device::cdcmd_nop() { - verboselog(machine(), 1, "psxcd: nop\n"); + verboselog(*this, 1, "psxcd: nop\n"); if (!open) status &= ~status_shellopen; @@ -452,7 +452,7 @@ void psxcd_device::cdcmd_nop() void psxcd_device::cdcmd_setloc() { - verboselog(machine(), 1, "psxcd: setloc %08x:%08x:%08x\n", cmdbuf[0], cmdbuf[1], cmdbuf[2]); + verboselog(*this, 1, "psxcd: setloc %08x:%08x:%08x\n", cmdbuf[0], cmdbuf[1], cmdbuf[2]); stop_read(); @@ -465,7 +465,7 @@ void psxcd_device::cdcmd_setloc() if ((l.b[M]>0) || (l.b[S]>=2)) loc.w=l.w; else - verboselog(machine(), 0, "psxcd: setloc out of range: %02d:%02d:%02d\n",l.b[M],l.b[S],l.b[F]); + verboselog(*this, 0, "psxcd: setloc out of range: %02d:%02d:%02d\n",l.b[M],l.b[S],l.b[F]); send_result(intr_complete); } @@ -479,7 +479,7 @@ void psxcd_device::cdcmd_play() if (!curpos.w) curpos.b[S] = 2; - verboselog(machine(), 1, "psxcd: play %02x %02x %02x => %d\n", decimal_to_bcd(loc.b[M]), decimal_to_bcd(loc.b[S]), decimal_to_bcd(loc.b[F]), msf_to_lba_ps(loc.w)); + verboselog(*this, 1, "psxcd: play %02x %02x %02x => %d\n", decimal_to_bcd(loc.b[M]), decimal_to_bcd(loc.b[S]), decimal_to_bcd(loc.b[F]), msf_to_lba_ps(loc.w)); stop_read(); start_play(); @@ -488,19 +488,19 @@ void psxcd_device::cdcmd_play() void psxcd_device::cdcmd_forward() { - verboselog(machine(), 1, "psxcd: forward\n"); + verboselog(*this, 1, "psxcd: forward\n"); } void psxcd_device::cdcmd_backward() { - verboselog(machine(), 1, "psxcd: backward\n"); + verboselog(*this, 1, "psxcd: backward\n"); } void psxcd_device::cdcmd_readn() { if(!open) { - verboselog(machine(), 1, "psxcd: readn\n"); + verboselog(*this, 1, "psxcd: readn\n"); curpos.w=loc.w; @@ -514,7 +514,7 @@ void psxcd_device::cdcmd_readn() void psxcd_device::cdcmd_standby() { - verboselog(machine(), 1, "psxcd: standby\n"); + verboselog(*this, 1, "psxcd: standby\n"); stop_read(); send_result(intr_acknowledge); @@ -522,7 +522,7 @@ void psxcd_device::cdcmd_standby() void psxcd_device::cdcmd_stop() { - verboselog(machine(), 1, "psxcd: stop\n"); + verboselog(*this, 1, "psxcd: stop\n"); stop_read(); send_result(intr_acknowledge); @@ -530,7 +530,7 @@ void psxcd_device::cdcmd_stop() void psxcd_device::cdcmd_pause() { - verboselog(machine(), 1, "psxcd: pause\n"); + verboselog(*this, 1, "psxcd: pause\n"); stop_read(); @@ -539,7 +539,7 @@ void psxcd_device::cdcmd_pause() void psxcd_device::cdcmd_init() { - verboselog(machine(), 1, "psxcd: init\n"); + verboselog(*this, 1, "psxcd: init\n"); stop_read(); mode=0; @@ -550,7 +550,7 @@ void psxcd_device::cdcmd_init() void psxcd_device::cdcmd_mute() { - verboselog(machine(), 1, "psxcd: mute\n"); + verboselog(*this, 1, "psxcd: mute\n"); m_mute = true; send_result(intr_complete); @@ -558,7 +558,7 @@ void psxcd_device::cdcmd_mute() void psxcd_device::cdcmd_demute() { - verboselog(machine(), 1, "psxcd: demute\n"); + verboselog(*this, 1, "psxcd: demute\n"); m_mute = false; send_result(intr_complete); @@ -566,7 +566,7 @@ void psxcd_device::cdcmd_demute() void psxcd_device::cdcmd_setfilter() { - verboselog(machine(), 1, "psxcd: setfilter %08x,%08x\n",cmdbuf[0],cmdbuf[1]); + verboselog(*this, 1, "psxcd: setfilter %08x,%08x\n",cmdbuf[0],cmdbuf[1]); filter_file=cmdbuf[0]; filter_channel=cmdbuf[1]; @@ -576,7 +576,7 @@ void psxcd_device::cdcmd_setfilter() void psxcd_device::cdcmd_setmode() { - verboselog(machine(), 1, "psxcd: setmode %08x\n",cmdbuf[0]); + verboselog(*this, 1, "psxcd: setmode %08x\n",cmdbuf[0]); mode=cmdbuf[0]; send_result(intr_complete); @@ -594,7 +594,7 @@ void psxcd_device::cdcmd_getparam() 0 }; - verboselog(machine(), 1, "psxcd: getparam [%02x %02x %02x %02x %02x %02x]\n", + verboselog(*this, 1, "psxcd: getparam [%02x %02x %02x %02x %02x %02x]\n", data[0], data[1], data[2], data[3], data[4], data[5]); send_result(intr_complete,data,6); @@ -621,7 +621,7 @@ UINT32 psxcd_device::sub_loc(CDPOS src1, CDPOS src2) void psxcd_device::cdcmd_getlocl() { - verboselog(machine(), 1, "psxcd: getlocl [%02x %02x %02x %02x %02x %02x %02x %02x]\n", + verboselog(*this, 1, "psxcd: getlocl [%02x %02x %02x %02x %02x %02x %02x %02x]\n", lastsechdr[0], lastsechdr[1], lastsechdr[2], lastsechdr[3], lastsechdr[4], lastsechdr[5], lastsechdr[6], lastsechdr[7]); @@ -647,7 +647,7 @@ void psxcd_device::cdcmd_getlocp() decimal_to_bcd(loc.b[F]) // aframe }; - verboselog(machine(), 1, "psxcd: getlocp [%02x %02x %02x %02x %02x %02x %02x %02x]\n", + verboselog(*this, 1, "psxcd: getlocp [%02x %02x %02x %02x %02x %02x %02x %02x]\n", data[0], data[1], data[2], data[3], data[4], data[5], data[6], data[7]); send_result(intr_complete,data,8); @@ -655,7 +655,7 @@ void psxcd_device::cdcmd_getlocp() void psxcd_device::cdcmd_gettn() { - verboselog(machine(), 1, "psxcd: gettn\n"); + verboselog(*this, 1, "psxcd: gettn\n"); if(!open) @@ -694,7 +694,7 @@ void psxcd_device::cdcmd_gettd() decimal_to_bcd(trkstart.b[S]) }; - verboselog(machine(), 1, "psxcd: gettd %02x [%02x %02x %02x]\n", cmdbuf[0], data[0], data[1], data[2]); + verboselog(*this, 1, "psxcd: gettd %02x [%02x %02x %02x]\n", cmdbuf[0], data[0], data[1], data[2]); send_result(intr_acknowledge,data,3); } @@ -706,7 +706,7 @@ void psxcd_device::cdcmd_gettd() void psxcd_device::cdcmd_seekl() { - verboselog(machine(), 1, "psxcd: seekl [%02d:%02d:%02d]\n", loc.b[M], loc.b[S], loc.b[F]); + verboselog(*this, 1, "psxcd: seekl [%02d:%02d:%02d]\n", loc.b[M], loc.b[S], loc.b[F]); curpos.w=loc.w; @@ -715,7 +715,7 @@ void psxcd_device::cdcmd_seekl() void psxcd_device::cdcmd_seekp() { - verboselog(machine(), 1, "psxcd: seekp\n"); + verboselog(*this, 1, "psxcd: seekp\n"); curpos.w=loc.w; @@ -724,7 +724,7 @@ void psxcd_device::cdcmd_seekp() void psxcd_device::cdcmd_test() { - verboselog(machine(), 1, "psxcd: test %02x\n", cmdbuf[0]); + verboselog(*this, 1, "psxcd: test %02x\n", cmdbuf[0]); switch(cmdbuf[0]) { @@ -743,7 +743,7 @@ void psxcd_device::cdcmd_test() } default: - verboselog(machine(), 0, "psxcd: unimplemented test cmd %02x\n", cmdbuf[0]); + verboselog(*this, 0, "psxcd: unimplemented test cmd %02x\n", cmdbuf[0]); cmd_complete(prepare_result(intr_diskerror, NULL, 0, 0x10)); break; } @@ -751,7 +751,7 @@ void psxcd_device::cdcmd_test() void psxcd_device::cdcmd_id() { - verboselog(machine(), 1, "psxcd: id\n"); + verboselog(*this, 1, "psxcd: id\n"); if (!open) { @@ -787,7 +787,7 @@ void psxcd_device::cdcmd_reads() { if(!open) { - verboselog(machine(), 1, "psxcd: reads\n"); + verboselog(*this, 1, "psxcd: reads\n"); curpos.w=loc.w; @@ -801,12 +801,12 @@ void psxcd_device::cdcmd_reads() void psxcd_device::cdcmd_reset() { - verboselog(machine(), 1, "psxcd: reset\n"); + verboselog(*this, 1, "psxcd: reset\n"); } void psxcd_device::cdcmd_readtoc() { - verboselog(machine(), 1, "psxcd: readtoc\n"); + verboselog(*this, 1, "psxcd: readtoc\n"); send_result(intr_complete); send_result(intr_acknowledge, NULL, 0, default_irq_delay*3); // ? @@ -814,7 +814,7 @@ void psxcd_device::cdcmd_readtoc() void psxcd_device::cdcmd_unknown12() { - verboselog(machine(), 1, "psxcd: unknown 12\n"); + verboselog(*this, 1, "psxcd: unknown 12\n"); // set session? readt? if(cmdbuf[0] == 1) send_result(intr_complete); @@ -839,7 +839,7 @@ void psxcd_device::cdcmd_illegal1d() void psxcd_device::illegalcmd(UINT8 cmd) { - verboselog(machine(), 0, "psxcd: unimplemented cd command %02x\n", cmd); + verboselog(*this, 0, "psxcd: unimplemented cd command %02x\n", cmd); send_result(intr_diskerror, NULL, 0, 0x40); } @@ -848,7 +848,7 @@ void psxcd_device::cmd_complete(command_result *res) { command_result *rf; - verboselog(machine(), 1, "psxcd: irq [%d]\n", res->res); + verboselog(*this, 1, "psxcd: irq [%d]\n", res->res); if (res_queue) { @@ -913,7 +913,7 @@ void psxcd_device::send_result(UINT8 res, UINT8 *data, int sz, int delay, UINT8 void psxcd_device::start_dma(UINT8 *mainram, UINT32 size) { UINT32 sector_size; - verboselog(machine(), 1, "psxcd: start dma %d bytes at %d\n", size, m_transcurr); + verboselog(*this, 1, "psxcd: start dma %d bytes at %d\n", size, m_transcurr); if(!m_dmaload) return; @@ -959,7 +959,7 @@ void psxcd_device::read_sector() subheader *sub=(subheader *)(buf+16); memcpy(lastsechdr, buf+12, 8); - verboselog(machine(), 2, "psxcd: subheader file=%02x chan=%02x submode=%02x coding=%02x [%02x%02x%02x%02x]\n", + verboselog(*this, 2, "psxcd: subheader file=%02x chan=%02x submode=%02x coding=%02x [%02x%02x%02x%02x]\n", sub->file, sub->channel, sub->submode, sub->coding, buf[0xc], buf[0xd], buf[0xe], buf[0xf]); if ((mode & mode_adpcm) && (sub->submode & submode_audio)) @@ -1011,7 +1011,7 @@ void psxcd_device::read_sector() next_read_event = add_system_event(event_read_sector, cyc, NULL); } else { - verboselog(machine(), 1, "psxcd: autopause xa\n"); + verboselog(*this, 1, "psxcd: autopause xa\n"); cmd_complete(prepare_result(intr_dataend)); stop_read(); @@ -1063,7 +1063,7 @@ void psxcd_device::play_sector() { if (sector>=autopause_sector) { - verboselog(machine(), 1, "psxcd: autopause cdda\n"); + verboselog(*this, 1, "psxcd: autopause cdda\n"); stop_read(); cmd_complete(prepare_result(intr_dataend)); @@ -1142,7 +1142,7 @@ void psxcd_device::start_play() UINT8 track = cdrom_get_track(m_cdrom_handle, msf_to_lba_ps(curpos.w) + 150); if(cdrom_get_track_type(m_cdrom_handle, track) != CD_TRACK_AUDIO) - verboselog(machine(), 0, "psxcd: playing data track\n"); + verboselog(*this, 0, "psxcd: playing data track\n"); status|=status_playing; @@ -1166,7 +1166,7 @@ void psxcd_device::start_play() void psxcd_device::stop_read() { if (status & (status_reading|status_playing)) - verboselog(machine(), 1, "psxcd: stop read\n"); + verboselog(*this, 1, "psxcd: stop read\n"); status&=~(status_reading|status_playing); @@ -1186,7 +1186,7 @@ void psxcd_device::device_timer(emu_timer &timer, device_timer_id tid, int param { if (!m_timerinuse[tid]) { - verboselog(machine(), 0, "psxcd: timer fired for free event\n"); + verboselog(*this, 0, "psxcd: timer fired for free event\n"); return; } @@ -1195,7 +1195,7 @@ void psxcd_device::device_timer(emu_timer &timer, device_timer_id tid, int param { case event_cmd_complete: { - verboselog(machine(), 1, "psxcd: event cmd complete\n"); + verboselog(*this, 1, "psxcd: event cmd complete\n"); cmd_complete((command_result *)ptr); break; @@ -1232,3 +1232,97 @@ int psxcd_device::add_system_event(int type, UINT64 t, command_result *ptr) } fatalerror("psxcd: out of timers\n"); } + +/* + * TODO: + * Declare the MCU (Motorola 68HC05 [?] at 4MHz [?]) and hookup + * these ROM images so that we actually emulate the PSX CDROM unit + * + * More technical info is available at these links: + * http://www.psxdev.net/forum/viewtopic.php?f=60&t=573 + * http://www.psxdev.net/forum/viewtopic.php?f=70&t=557 + * + */ +ROM_START( psxcd ) + ROM_REGION( 0x10000, "cdrom_mcu", 0 ) + + /* Retail PlayStation CD-ROM Firmware: + * + * Still missing: + * SCPH-1001, 3000, 3500, 5003, 5502, 5503, 7000W, 7001, 7002, 7003, 7503, 9003, 100, 101, 102 and 103. + */ + + ROM_SYSTEM_BIOS( 0, "SCPH-1000-later", "SCPH-1000 NTSC:J (Later Ver.) [424660]" ) + ROMX_LOAD( "424660.bin", 0x0000, 0x4200, CRC(f82a2a46) SHA1(095434948d4c71cdfaa069e91053443887a6d139), ROM_BIOS(1) ) + + ROM_SYSTEM_BIOS( 1, "SCPH-1000-early", "SCPH-1000 NTSC:J (Early Ver.) [424666]" ) + ROMX_LOAD( "424666.bin", 0x0000, 0x4200, CRC(60bc954e) SHA1(80674353daf95ffb4bd15cc4bb8cfa713370dd45), ROM_BIOS(2) ) + + ROM_SYSTEM_BIOS( 2, "SCPH-1002-early", "SCPH-1002 PAL (Early PU-8) [424684]" ) + ROMX_LOAD( "424684.bin", 0x0000, 0x4200, CRC(84d46b2a) SHA1(9b06b1d407b784095ddbd45aeabafd689d2ee347), ROM_BIOS(3) ) + + /* Chip markings: C 1021 / SC430916PB / G63C 185 / JSAB9624F */ + ROM_SYSTEM_BIOS( 3, "SCPH-5000", "SCPH-5000 NTSC:J [SC430916]" ) + ROMX_LOAD( "sc430916.s19", 0x0000, 0xb195, CRC(487c8a40) SHA1(0ae8348fb43ab80845b0166494edc3e1565a3ef7), ROM_BIOS(4) ) + + /* Chip markings: C 1030 / SC430925PB / G63C 185 / JSBK9708C + Board Type: PU-18 / 1-664-537-11 */ + ROM_SYSTEM_BIOS( 4, "SCPH-5500", "SCPH-5500 NTSC:J [SC430925]" ) + ROMX_LOAD( "sc430925.s19", 0x0000, 0xb195, CRC(c09aa0c2) SHA1(b9ad66cc8ea4d6e2eb2709ffb77c9647f679097a), ROM_BIOS(5) ) + + /* Chip markings: C 2030 / SC430930PB / G63C 185 / SSJZ9748A + Board Type: PU-18 / 1-664-537-62 */ + ROM_SYSTEM_BIOS( 5, "SCPH-5501", "SCPH-5501 NTSC:U/C [SC430930]" ) + ROMX_LOAD( "sc430930.s19", 0x0000, 0xb195, CRC(587b84c2) SHA1(556c3adc37e4eb64fd463c54f7a310c483e0e835), ROM_BIOS(6) ) + + /* ROM dump is the same as SCPH-5552 */ + ROM_SYSTEM_BIOS( 6, "SCPH-5502", "SCPH-5502 PAL [SC430929]" ) + ROMX_LOAD( "sc430929.bin", 0x0000, 0x4200, CRC(ba87a3e0) SHA1(f23458d13a518616a8592b8ddd668c052bc9be5a), ROM_BIOS(7) ) + + ROM_SYSTEM_BIOS( 7, "SCPH-5903", "SCPH-5903 NTSC:J [SC430924PB]" ) + ROMX_LOAD( "sc430924.s19", 0x0000, 0xb195, CRC(dbe694b2) SHA1(ac72cb616b1449fe29e52faf6aad389118852d73), ROM_BIOS(8) ) + + /* Chip markings: C 1040 / SC430934PB / G63C 185 / SSDG9745D */ + ROM_SYSTEM_BIOS( 8, "SCPH-7000", "SCPH-7000 NTSC:J [SC430934]" ) + ROMX_LOAD( "sc430934.s19", 0x0000, 0xb195, CRC(6443740c) SHA1(d9734c7135c75dbe7733079a2d4244a28c9e966e), ROM_BIOS(9) ) + + /* Chip markings: C 1050 / SC430938PB / G63C 185 / SSAM9850C */ + ROM_SYSTEM_BIOS( 9, "SCPH-7500", "SCPH-7500 NTSC:J [SC430938]" ) + ROMX_LOAD( "sc430938.s19", 0x0000, 0xb195, CRC(9744977a) SHA1(f017d34a98a8a023f6752ba9ed749bb9e2b836d5), ROM_BIOS(10) ) + + /* Chip markings: C 2050 / SC430940PB / G63C 185 / SSDL9838A */ + ROM_SYSTEM_BIOS( 10, "SCPH-7501", "SCPH-7501 NTSC:U/C [SC430940]" ) + ROMX_LOAD( "sc430940.s19", 0x0000, 0xb195, CRC(fd1c6ee7) SHA1(e72b5093a3e25de1548be7668179ff3e001e3ec5), ROM_BIOS(11) ) + + ROM_SYSTEM_BIOS( 11, "SCPH-7502", "SCPH-7502 PAL [SC430939]" ) + ROMX_LOAD( "sc430939.bin", 0x0000, 0x4200, CRC(9eafb045) SHA1(25d98454e567e064c06f840d57f763fb7c8b7219), ROM_BIOS(12) ) + + ROM_SYSTEM_BIOS( 12, "SCPH-9000", "SCPH-9000 NTSC:J [SC430942]" ) + ROMX_LOAD( "sc430942.bin", 0x0000, 0x4200, NO_DUMP, ROM_BIOS(13) ) + + /* Chip markings: C 2060 / SC430944PB / G63C 185 / SSBR9924C */ + ROM_SYSTEM_BIOS( 13, "SCPH-9001", "SCPH-9001 NTSC:U/C [SC430944]" ) + ROMX_LOAD( "sc430944.s19", 0x0000, 0xb195, CRC(24011dfd) SHA1(db72ba02466942d1a1a07c4d855edd18f84de92e), ROM_BIOS(14) ) + + ROM_SYSTEM_BIOS( 14, "SCPH-9002", "SCPH-9002 PAL [SC430943]" ) + ROMX_LOAD( "sc430943.bin", 0x0000, 0x4200, CRC(2669a1a7) SHA1(62999e7f8429f381e19d44d2399b6017959f4f13), ROM_BIOS(15) ) + + /* Development PlayStation CD-ROM Firmware: + * + * Still missing: + * DTL-H1000, 1000H, 1001, 1001H, 1002, 1100, 1101, 1102, 1200, 1201, 2000, 2500, 2700, 3000, 3001 and 3002. + */ + + /* Chip markings: D 2021 / SC430920PB / G63C 185 / JSAA9810A + * Note: Although this is a PAL unit, the ID string in the + * code is "for US/AEP", so it may be the same for all the + * debug consoles. + */ + ROM_SYSTEM_BIOS( 15, "DTL-H1202", "DTL-H1202 PAL [SC430920]" ) + ROMX_LOAD( "sc430920.s19", 0x0000, 0xb195, CRC(8380a5a2) SHA1(6fe45fd6fb96b12a25a45f39b5efd0be5e3f3e86), ROM_BIOS(16) ) +ROM_END + +const rom_entry *psxcd_device::device_rom_region() const +{ + return ROM_NAME( psxcd ); +} diff --git a/src/mame/machine/psxcd.h b/src/mame/machine/psxcd.h index 3239ea8ef2c..be11fbdbdd6 100644 --- a/src/mame/machine/psxcd.h +++ b/src/mame/machine/psxcd.h @@ -38,6 +38,7 @@ protected: virtual void device_stop(); virtual void device_reset(); virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); + virtual const rom_entry *device_rom_region() const; private: void write_command(UINT8 byte); diff --git a/src/mame/machine/rmnimbus.c b/src/mame/machine/rmnimbus.c index b8b2d79218b..ef41cc828ec 100644 --- a/src/mame/machine/rmnimbus.c +++ b/src/mame/machine/rmnimbus.c @@ -116,7 +116,7 @@ enum #define LINEAR_ADDR(seg,ofs) ((seg<<4)+ofs) -#define OUTPUT_SEGOFS(mess,seg,ofs) logerror("%s=%04X:%04X [%08X]\n",mess,seg,ofs,((seg<<4)+ofs)) +#define OUTPUT_SEGOFS(mess,seg,ofs) device->logerror("%s=%04X:%04X [%08X]\n",mess,seg,ofs,((seg<<4)+ofs)) #define LOG_SIO 0 #define LOG_DISK_HDD 0 @@ -310,8 +310,8 @@ static void decode_subbios(device_t *device,offs_t pc, UINT8 raw_flag) if(!raw_flag) { - logerror("=======================================================================\n"); - logerror("Sub-bios call at %08X, AX=%04X, BX=%04X, CX=%04X, DS:SI=%04X:%04X\n",pc,ax,bx,cx,ds,si); + device->logerror("=======================================================================\n"); + device->logerror("Sub-bios call at %08X, AX=%04X, BX=%04X, CX=%04X, DS:SI=%04X:%04X\n",pc,ax,bx,cx,ds,si); } set_type("invalid"); @@ -619,11 +619,11 @@ static void decode_subbios(device_t *device,offs_t pc, UINT8 raw_flag) } else { - logerror("Type=%s, Driver=%s, Function=%s\n",type_str,drv_str,func_str); + device->logerror("Type=%s, Driver=%s, Function=%s\n",type_str,drv_str,func_str); if(dump_dssi!=NULL) dump_dssi(device,ds,si,raw_flag); - logerror("=======================================================================\n"); + device->logerror("=======================================================================\n"); } } @@ -650,9 +650,9 @@ static void decode_dssi_generic(device_t *device,UINT16 ds, UINT16 si, UINT8 ra params=(UINT16 *)get_dssi_ptr(space,ds,si); for(count=0; count<10; count++) - logerror("%04X ",params[count]); + device->logerror("%04X ",params[count]); - logerror("\n"); + device->logerror("\n"); } @@ -675,18 +675,18 @@ static void decode_dssi_f_fill_area(device_t *device,UINT16 ds, UINT16 si, UINT if(raw_flag) { - logerror("\tdw\t%04X, %04X, %04X, %04X, %04X, %04X, %04X, %04X, %04X, ", + device->logerror("\tdw\t%04X, %04X, %04X, %04X, %04X, %04X, %04X, %04X, %04X, ", brush->style,brush->style_index,brush->colour1,brush->colour2, brush->transparency,brush->boundary_spec,brush->boundary_colour,brush->save_colour, area_params->count); } else { - logerror("Brush params\n"); - logerror("Style=%04X, StyleIndex=%04X\n",brush->style,brush->style_index); - logerror("Colour1=%04X, Colour2=%04X\n",brush->colour1,brush->colour2); - logerror("transparency=%04X, boundry_spec=%04X\n",brush->transparency,brush->boundary_spec); - logerror("boundry colour=%04X, save colour=%04X\n",brush->boundary_colour,brush->save_colour); + device->logerror("Brush params\n"); + device->logerror("Style=%04X, StyleIndex=%04X\n",brush->style,brush->style_index); + device->logerror("Colour1=%04X, Colour2=%04X\n",brush->colour1,brush->colour2); + device->logerror("transparency=%04X, boundry_spec=%04X\n",brush->transparency,brush->boundary_spec); + device->logerror("boundry colour=%04X, save colour=%04X\n",brush->boundary_colour,brush->save_colour); OUTPUT_SEGOFS("SegData:OfsData",area_params->seg_data,area_params->ofs_data); @@ -698,16 +698,16 @@ static void decode_dssi_f_fill_area(device_t *device,UINT16 ds, UINT16 si, UINT if(raw_flag) { if(cocount!=(area_params->count-1)) - logerror("%04X, %04X, ",addr_ptr[cocount*2],addr_ptr[(cocount*2)+1]); + device->logerror("%04X, %04X, ",addr_ptr[cocount*2],addr_ptr[(cocount*2)+1]); else - logerror("%04X, %04X ",addr_ptr[cocount*2],addr_ptr[(cocount*2)+1]); + device->logerror("%04X, %04X ",addr_ptr[cocount*2],addr_ptr[(cocount*2)+1]); } else - logerror("x=%d y=%d\n",addr_ptr[cocount*2],addr_ptr[(cocount*2)+1]); + device->logerror("x=%d y=%d\n",addr_ptr[cocount*2],addr_ptr[(cocount*2)+1]); } if(raw_flag) - logerror("\n"); + device->logerror("\n"); } static void decode_dssi_f_plot_character_string(device_t *device,UINT16 ds, UINT16 si, UINT8 raw_flag) @@ -727,17 +727,17 @@ static void decode_dssi_f_plot_character_string(device_t *device,UINT16 ds, UIN OUTPUT_SEGOFS("SegFont:OfsFont",plot_string_params->seg_font,plot_string_params->ofs_font); OUTPUT_SEGOFS("SegData:OfsData",plot_string_params->seg_data,plot_string_params->ofs_data); - logerror("x=%d, y=%d, length=%d\n",plot_string_params->x,plot_string_params->y,plot_string_params->length); + device->logerror("x=%d, y=%d, length=%d\n",plot_string_params->x,plot_string_params->y,plot_string_params->length); char_ptr=(UINT8*)space.get_read_ptr(LINEAR_ADDR(plot_string_params->seg_data,plot_string_params->ofs_data)); if (plot_string_params->length==0xFFFF) - logerror("%s",char_ptr); + device->logerror("%s",char_ptr); else for(charno=0;charno<plot_string_params->length;charno++) - logerror("%c",char_ptr[charno]); + device->logerror("%c",char_ptr[charno]); - logerror("\n"); + device->logerror("\n"); } static void decode_dssi_f_set_new_clt(device_t *device,UINT16 ds, UINT16 si, UINT8 raw_flag) @@ -754,7 +754,7 @@ static void decode_dssi_f_set_new_clt(device_t *device,UINT16 ds, UINT16 si, UI OUTPUT_SEGOFS("SegColours:OfsColours",ds,si); for(colour=0;colour<16;colour++) - logerror("colour #%02X=%04X\n",colour,new_colours[colour]); + device->logerror("colour #%02X=%04X\n",colour,new_colours[colour]); } @@ -770,7 +770,7 @@ static void decode_dssi_f_plonk_char(device_t *device,UINT16 ds, UINT16 si, UIN OUTPUT_SEGOFS("SegParams:OfsParams",ds,si); - logerror("plonked_char=%c\n",params[0]); + device->logerror("plonked_char=%c\n",params[0]); } static void decode_dssi_f_rw_sectors(device_t *device,UINT16 ds, UINT16 si, UINT8 raw_flag) @@ -786,9 +786,9 @@ static void decode_dssi_f_rw_sectors(device_t *device,UINT16 ds, UINT16 si, UIN params=(UINT16 *)get_dssi_ptr(space,ds,si); for(param_no=0;param_no<16;param_no++) - logerror("%04X ",params[param_no]); + device->logerror("%04X ",params[param_no]); - logerror("\n"); + device->logerror("\n"); } static void decode_dos21(device_t *device,offs_t pc) @@ -808,12 +808,12 @@ static void decode_dos21(device_t *device,offs_t pc) UINT16 di = cpu->state().state_int(I8086_DI); UINT16 bp = cpu->state().state_int(I8086_BP); - logerror("=======================================================================\n"); - logerror("DOS Int 0x21 call at %05X\n",pc); - logerror("AX=%04X, BX=%04X, CX=%04X, DX=%04X\n",ax,bx,cx,dx); - logerror("CS=%04X, DS=%04X, ES=%04X, SS=%04X\n",cs,ds,es,ss); - logerror("SI=%04X, DI=%04X, BP=%04X\n",si,di,bp); - logerror("=======================================================================\n"); + device->logerror("=======================================================================\n"); + device->logerror("DOS Int 0x21 call at %05X\n",pc); + device->logerror("AX=%04X, BX=%04X, CX=%04X, DX=%04X\n",ax,bx,cx,dx); + device->logerror("CS=%04X, DS=%04X, ES=%04X, SS=%04X\n",cs,ds,es,ss); + device->logerror("SI=%04X, DI=%04X, BP=%04X\n",si,di,bp); + device->logerror("=======================================================================\n"); } diff --git a/src/mame/machine/sonydriv.c b/src/mame/machine/sonydriv.c index 31c88e4f988..f53fcb77e20 100644 --- a/src/mame/machine/sonydriv.c +++ b/src/mame/machine/sonydriv.c @@ -334,7 +334,7 @@ int sony_read_status(device_t *device) } break; case 0x0a: /* At track 0: 0=track zero 1=not track zero */ - logerror("%s sony.status(): reading Track 0\n", device->machine().describe_context()); + device->logerror("%s sony.status(): reading Track 0\n", device->machine().describe_context()); if (cur_image) result = cur_image->floppy_tk00_r(); else @@ -389,7 +389,7 @@ int sony_read_status(device_t *device) break; default: if (LOG_SONY) - logerror("sony_status(): unknown action\n"); + device->logerror("sony_status(): unknown action\n"); break; } } @@ -407,7 +407,7 @@ static void sony_doaction(device_t *device) if (LOG_SONY) { - logerror("%s sony_doaction(): action=%d %s\n", + device->logerror("%s sony_doaction(): action=%d %s\n", device->machine().describe_context(), action, (sony.floppy_enable) ? "" : " (MOTOR OFF)"); } @@ -456,7 +456,7 @@ static void sony_doaction(device_t *device) break; default: if (LOG_SONY) - logerror("sony_doaction(): unknown action %d\n", action); + device->logerror("sony_doaction(): unknown action %d\n", action); break; } } @@ -481,7 +481,7 @@ void sony_set_lines(device_t *device,UINT8 lines) } if (LOG_SONY_EXTRA) - logerror("sony.set_lines(): %d\n", lines); + device->logerror("sony.set_lines(): %d\n", lines); } void sony_set_enable_lines(device_t *device,int enable_mask) @@ -503,7 +503,7 @@ void sony_set_enable_lines(device_t *device,int enable_mask) } if (LOG_SONY_EXTRA) - logerror("sony.set_enable_lines(): %d\n", enable_mask); + device->logerror("sony.set_enable_lines(): %d\n", enable_mask); } void sony_set_sel_line(device_t *device,int sel) @@ -516,7 +516,7 @@ void sony_set_sel_line(device_t *device,int sel) } if (LOG_SONY_EXTRA) - logerror("sony.set_sel_line(): %s line IWM_SEL\n", sony.sel_line ? "setting" : "clearing"); + device->logerror("sony.set_sel_line(): %s line IWM_SEL\n", sony.sel_line ? "setting" : "clearing"); } void sony_set_speed(int speed) diff --git a/src/mame/machine/spec_snqk.c b/src/mame/machine/spec_snqk.c index 2bdbd725683..5af12945676 100644 --- a/src/mame/machine/spec_snqk.c +++ b/src/mame/machine/spec_snqk.c @@ -49,20 +49,21 @@ static void log_quickload(running_machine &machine, const char *type, UINT32 start, UINT32 length, UINT32 exec, const char *exec_format) { std::string tempstring; + spectrum_state *state = machine.driver_data<spectrum_state>(); - logerror("Loading %04X bytes of RAM at %04X\n", length, start); + state->logerror("Loading %04X bytes of RAM at %04X\n", length, start); strcatprintf(tempstring,"Quickload type: %s Length: %d bytes\n", type, length); strcatprintf(tempstring,"Start: 0x%04X End: 0x%04X Exec: ", start, start + length - 1); - logerror("Quickload loaded.\n"); + state->logerror("Quickload loaded.\n"); if (!core_stricmp(exec_format, EXEC_NA)) tempstring.append("N/A"); else { - logerror("Execution can resume with "); - logerror(exec_format, exec); - logerror("\n"); + state->logerror("Execution can resume with "); + state->logerror(exec_format, exec); + state->logerror("\n"); strcatprintf(tempstring,exec_format, exec); } @@ -406,10 +407,10 @@ void spectrum_setup_sp(running_machine &machine, UINT8 *snapdata, UINT32 snapsiz data = BIT(status, 5); state->m_flash_invert = data; - logerror("FLASH state: %s\n", data ? "PAPER on INK" : "INK on PAPER"); + state->logerror("FLASH state: %s\n", data ? "PAPER on INK" : "INK on PAPER"); /* Memory dump */ - logerror("Loading %04X bytes of RAM at %04X\n", size, start); + state->logerror("Loading %04X bytes of RAM at %04X\n", size, start); for (i = 0; i < size; i++) space.write_byte(start + i, snapdata[SP_OFFSET + SP_NEW_HDR + i]); @@ -417,11 +418,11 @@ void spectrum_setup_sp(running_machine &machine, UINT8 *snapdata, UINT32 snapsiz data = snapdata[SP_OFFSET + 34] & 0x07; state->m_port_fe_data = (state->m_port_fe_data & 0xf8) | data; spectrum_border_update(machine, data); - logerror("Border color:%02X\n", data); + state->logerror("Border color:%02X\n", data); spectrum_page_basicrom(machine); - //logerror("Snapshot loaded.\nExecution resuming at %s\n", cpu_get_reg_string(cpu, Z80_PC)); + //state->logerror("Snapshot loaded.\nExecution resuming at %s\n", cpu_get_reg_string(cpu, Z80_PC)); } /******************************************************************* @@ -520,7 +521,7 @@ void spectrum_setup_sna(running_machine &machine, UINT8 *snapdata, UINT32 snapsi if ((snapsize != SNA48_SIZE) && (state->m_port_7ffd_data == -1)) { - logerror("Can't load 128K .SNA file into 48K machine\n"); + state->logerror("Can't load 128K .SNA file into 48K machine\n"); return; } @@ -589,7 +590,7 @@ void spectrum_setup_sna(running_machine &machine, UINT8 *snapdata, UINT32 snapsi { /* 128K Snapshot */ state->m_port_7ffd_data = snapdata[SNA128_OFFSET + 2]; - logerror ("Port 7FFD:%02X\n", state->m_port_7ffd_data); + state->logerror ("Port 7FFD:%02X\n", state->m_port_7ffd_data); if (snapdata[SNA128_OFFSET + 3]) { /* TODO: page TR-DOS ROM when supported */ @@ -600,7 +601,7 @@ void spectrum_setup_sna(running_machine &machine, UINT8 *snapdata, UINT32 snapsi if (snapsize == SNA48_SIZE) { /* Memory dump */ - logerror("Loading %04X bytes of RAM at %04X\n", 3*SPECTRUM_BANK, BASE_RAM); + state->logerror("Loading %04X bytes of RAM at %04X\n", 3*SPECTRUM_BANK, BASE_RAM); for (i = 0; i < 3*SPECTRUM_BANK; i++) space.write_byte(BASE_RAM + i, snapdata[SNA48_HDR + i]); @@ -608,9 +609,9 @@ void spectrum_setup_sna(running_machine &machine, UINT8 *snapdata, UINT32 snapsi addr = cpu->state_int(Z80_SP); if (addr < BASE_RAM || addr > 4*SPECTRUM_BANK - 2) - logerror("Corrupted SP out of range:%04X", addr); + state->logerror("Corrupted SP out of range:%04X", addr); else - logerror("Fetching PC from the stack at SP:%04X\n", addr); + state->logerror("Fetching PC from the stack at SP:%04X\n", addr); data = (space.read_byte(addr + 1) << 8) | space.read_byte(addr + 0); LOAD_REG(cpu, Z80_PC, data); @@ -621,16 +622,16 @@ void spectrum_setup_sna(running_machine &machine, UINT8 *snapdata, UINT32 snapsi #endif addr += 2; - logerror("Fixing SP:%04X\n", addr); + state->logerror("Fixing SP:%04X\n", addr); cpu->set_state_int(Z80_SP, addr); /* Set border color */ data = snapdata[SNA48_OFFSET + 26] & 0x07; state->m_port_fe_data = (state->m_port_fe_data & 0xf8) | data; spectrum_border_update(machine, data); - logerror("Border color:%02X\n", data); + state->logerror("Border color:%02X\n", data); - //logerror("Snapshot loaded.\nExecution resuming at %s\n", cpu_get_reg_string(cpu, Z80_PC)); + //state->logerror("Snapshot loaded.\nExecution resuming at %s\n", cpu_get_reg_string(cpu, Z80_PC)); } else { @@ -642,10 +643,10 @@ void spectrum_setup_sna(running_machine &machine, UINT8 *snapdata, UINT32 snapsi usedbanks[2] = 1; /* 0x8000-0xbfff */ usedbanks[state->m_port_7ffd_data & 0x07] = 1; /* Banked memory */ - logerror("Loading %05X bytes of RAM at %04X\n", 8*SPECTRUM_BANK, BASE_RAM); - logerror("Loading bank 5 from offset:0001B\n"); - logerror("Loading bank 2 from offset:0401B\n"); - logerror("Loading bank %d from offset:0801B\n", snapdata[SNA128_OFFSET + 2] & 0x07); + state->logerror("Loading %05X bytes of RAM at %04X\n", 8*SPECTRUM_BANK, BASE_RAM); + state->logerror("Loading bank 5 from offset:0001B\n"); + state->logerror("Loading bank 2 from offset:0401B\n"); + state->logerror("Loading bank %d from offset:0801B\n", snapdata[SNA128_OFFSET + 2] & 0x07); for (i = 0; i < 3*SPECTRUM_BANK; i++) space.write_byte(BASE_RAM + i, snapdata[SNA48_HDR + i]); @@ -654,7 +655,7 @@ void spectrum_setup_sna(running_machine &machine, UINT8 *snapdata, UINT32 snapsi { if (!usedbanks[i]) { - logerror("Loading bank %d from offset:%05lX\n", i, bank_offset); + state->logerror("Loading bank %d from offset:%05lX\n", i, bank_offset); state->m_port_7ffd_data &= 0xf8; state->m_port_7ffd_data += i; spectrum_update_paging(machine); @@ -672,14 +673,14 @@ void spectrum_setup_sna(running_machine &machine, UINT8 *snapdata, UINT32 snapsi data = snapdata[SNA48_OFFSET + 26] & 0x07; state->m_port_fe_data = (state->m_port_fe_data & 0xf8) | data; spectrum_border_update(machine, data); - logerror("Border color:%02X\n", data); + state->logerror("Border color:%02X\n", data); data = state->m_port_7ffd_data & 0x07; /* Reset paging */ state->m_port_7ffd_data = snapdata[SNA128_OFFSET + 2]; spectrum_update_paging(machine); - //logerror("Snapshot loaded.\nExecution resuming at bank:%d %s\n", data, cpu_get_reg_string(cpu, Z80_PC)); + //state->logerror("Snapshot loaded.\nExecution resuming at bank:%d %s\n", data, cpu_get_reg_string(cpu, Z80_PC)); } } @@ -795,10 +796,10 @@ void spectrum_setup_ach(running_machine &machine, UINT8 *snapdata, UINT32 snapsi cpu->set_input_line(INPUT_LINE_IRQ0, intr); cpu->set_input_line(INPUT_LINE_HALT, CLEAR_LINE); - logerror("Skipping the 16K ROM dump at offset:%04X\n", ACH_OFFSET + 256); + state->logerror("Skipping the 16K ROM dump at offset:%04X\n", ACH_OFFSET + 256); /* Memory dump */ - logerror("Loading %04X bytes of RAM at %04X\n", 3*SPECTRUM_BANK, BASE_RAM); + state->logerror("Loading %04X bytes of RAM at %04X\n", 3*SPECTRUM_BANK, BASE_RAM); for (i = 0; i < 3*SPECTRUM_BANK; i++) space.write_byte(BASE_RAM + i, snapdata[ACH_HDR + SPECTRUM_BANK + i]); @@ -806,11 +807,11 @@ void spectrum_setup_ach(running_machine &machine, UINT8 *snapdata, UINT32 snapsi data = snapdata[ACH_OFFSET + 156] & 0x07; state->m_port_fe_data = (state->m_port_fe_data & 0xf8) | data; spectrum_border_update(machine, data); - logerror("Border color:%02X\n", data); + state->logerror("Border color:%02X\n", data); spectrum_page_basicrom(machine); - //logerror("Snapshot loaded.\nExecution resuming at %s\n", cpu_get_reg_string(cpu, Z80_PC)); + //state->logerror("Snapshot loaded.\nExecution resuming at %s\n", cpu_get_reg_string(cpu, Z80_PC)); } /******************************************************************* @@ -872,7 +873,7 @@ void spectrum_setup_prg(running_machine &machine, UINT8 *snapdata, UINT32 snapsi data = snapdata[PRG_OFFSET + 0]; if (data != 0x05) - logerror("Wrong DISCiPLE/+D file type: %02X instead of 05\n", data); + state->logerror("Wrong DISCiPLE/+D file type: %02X instead of 05\n", data); data = (snapdata[PRG_OFFSET + 235] << 8) | snapdata[PRG_OFFSET + 234]; LOAD_REG(cpu, Z80_BC, data); @@ -909,15 +910,15 @@ void spectrum_setup_prg(running_machine &machine, UINT8 *snapdata, UINT32 snapsi LOAD_REG(cpu, Z80_IM, (data == 0x00 || data == 0x3f) ? 1 : 2); /* Memory dump */ - logerror("Loading %04X bytes of RAM at %04X\n", 3*SPECTRUM_BANK, BASE_RAM); + state->logerror("Loading %04X bytes of RAM at %04X\n", 3*SPECTRUM_BANK, BASE_RAM); for (i = 0; i < 3*SPECTRUM_BANK; i++) space.write_byte(BASE_RAM + i, snapdata[PRG_HDR + i]); addr = (snapdata[PRG_OFFSET + 241] << 8) | snapdata[PRG_OFFSET + 240]; if (addr < BASE_RAM || addr > 4*SPECTRUM_BANK - 6) - logerror("Corrupted SP out of range:%04X", addr); + state->logerror("Corrupted SP out of range:%04X", addr); else - logerror("Fetching registers IFF1/2, R, AF and PC from the stack at SP:%04X\n", addr); + state->logerror("Fetching registers IFF1/2, R, AF and PC from the stack at SP:%04X\n", addr); data = space.read_byte(addr + 0); // IFF1/2: (bit 2, 0=DI/1=EI) LOAD_REG(cpu, Z80_IFF1, BIT(data, 2)); @@ -946,18 +947,18 @@ void spectrum_setup_prg(running_machine &machine, UINT8 *snapdata, UINT32 snapsi #endif addr += 6; - logerror("Fixing SP:%04X\n", addr); + state->logerror("Fixing SP:%04X\n", addr); cpu->set_state_int(Z80_SP, addr); /* Set border color */ data = (space.read_byte(0x5c48) >> 3) & 0x07; // Get the current border color from BORDCR system variable. state->m_port_fe_data = (state->m_port_fe_data & 0xf8) | data; spectrum_border_update(machine, data); - logerror("Border color:%02X\n", data); + state->logerror("Border color:%02X\n", data); spectrum_page_basicrom(machine); - //logerror("Snapshot loaded.\nExecution resuming at %s\n", cpu_get_reg_string(cpu, Z80_PC)); + //state->logerror("Snapshot loaded.\nExecution resuming at %s\n", cpu_get_reg_string(cpu, Z80_PC)); } /******************************************************************* @@ -1079,13 +1080,13 @@ void spectrum_setup_plusd(running_machine &machine, UINT8 *snapdata, UINT32 snap spectrum_page_basicrom(machine); /* Memory dump */ - logerror("Loading %04X bytes of RAM at %04X\n", 3*SPECTRUM_BANK, BASE_RAM); + state->logerror("Loading %04X bytes of RAM at %04X\n", 3*SPECTRUM_BANK, BASE_RAM); for (i = 0; i < 3*SPECTRUM_BANK; i++) space.write_byte(BASE_RAM + i, snapdata[PLUSD48_HDR + i]); } else { - logerror("Loading %05X bytes of RAM at %04X\n", 8*SPECTRUM_BANK, BASE_RAM); + state->logerror("Loading %05X bytes of RAM at %04X\n", 8*SPECTRUM_BANK, BASE_RAM); for (i = 0; i < 8; i++) { switch (i) @@ -1105,21 +1106,21 @@ void spectrum_setup_plusd(running_machine &machine, UINT8 *snapdata, UINT32 snap spectrum_update_paging(machine); break; }; - logerror("Loading bank %d from offset:%05X\n", i, PLUSD128_HDR + i*SPECTRUM_BANK); + state->logerror("Loading bank %d from offset:%05X\n", i, PLUSD128_HDR + i*SPECTRUM_BANK); for (j = 0; j < SPECTRUM_BANK; j++) space.write_byte(j + addr, snapdata[j + PLUSD128_HDR + i*SPECTRUM_BANK]); } state->m_port_7ffd_data = snapdata[PLUSD_OFFSET + 22]; - logerror ("Port 7FFD:%02X\n", state->m_port_7ffd_data); - logerror ("Paging bank:%d\n", state->m_port_7ffd_data & 0x07); + state->logerror ("Port 7FFD:%02X\n", state->m_port_7ffd_data); + state->logerror ("Paging bank:%d\n", state->m_port_7ffd_data & 0x07); spectrum_update_paging(machine); } addr = (snapdata[PLUSD_OFFSET + 21] << 8) | snapdata[PLUSD_OFFSET + 20]; if (addr < BASE_RAM || addr > 4*SPECTRUM_BANK - 6) - logerror("Corrupted SP out of range:%04X", addr); + state->logerror("Corrupted SP out of range:%04X", addr); else - logerror("Fetching registers IFF1/2, R, AF and PC from the stack at SP:%04X\n", addr); + state->logerror("Fetching registers IFF1/2, R, AF and PC from the stack at SP:%04X\n", addr); data = space.read_byte(addr + 0); // IFF1/2: (bit 2, 0=DI/1=EI) LOAD_REG(cpu, Z80_IFF1, BIT(data, 2)); @@ -1148,19 +1149,19 @@ void spectrum_setup_plusd(running_machine &machine, UINT8 *snapdata, UINT32 snap #endif addr += 6; - logerror("Fixing SP:%04X\n", addr); + state->logerror("Fixing SP:%04X\n", addr); cpu->set_state_int(Z80_SP, addr); /* Set border color */ data = (space.read_byte(0x5c48) >> 3) & 0x07; // Get the current border color from BORDCR system variable. state->m_port_fe_data = (state->m_port_fe_data & 0xf8) | data; spectrum_border_update(machine, data); - logerror("Border color:%02X\n", data); + state->logerror("Border color:%02X\n", data); //if (snapsize == PLUSD48_SIZE) - //logerror("Snapshot loaded.\nExecution resuming at %s\n", cpu_get_reg_string(cpu, Z80_PC)); + //state->logerror("Snapshot loaded.\nExecution resuming at %s\n", cpu_get_reg_string(cpu, Z80_PC)); //else - //logerror("Snapshot loaded.\nExecution resuming at bank:%d %s\n", state->m_port_7ffd_data & 0x07, cpu_get_reg_string(cpu, Z80_PC)); + //state->logerror("Snapshot loaded.\nExecution resuming at bank:%d %s\n", state->m_port_7ffd_data & 0x07, cpu_get_reg_string(cpu, Z80_PC)); } /******************************************************************* @@ -1267,7 +1268,7 @@ void spectrum_setup_sem(running_machine &machine, UINT8 *snapdata, UINT32 snapsi cpu->set_input_line(INPUT_LINE_HALT, CLEAR_LINE); /* Memory dump */ - logerror("Loading %04X bytes of RAM at %04X\n", 3*SPECTRUM_BANK, BASE_RAM); + state->logerror("Loading %04X bytes of RAM at %04X\n", 3*SPECTRUM_BANK, BASE_RAM); for (i = 0; i < 3*SPECTRUM_BANK; i++) space.write_byte(BASE_RAM + i, snapdata[SEM_SIGNATURE + i]); @@ -1275,11 +1276,11 @@ void spectrum_setup_sem(running_machine &machine, UINT8 *snapdata, UINT32 snapsi data = (space.read_byte(0x5c48) >> 3) & 0x07; // Get the current border color from BORDCR system variable. state->m_port_fe_data = (state->m_port_fe_data & 0xf8) | data; spectrum_border_update(machine, data); - logerror("Border color:%02X\n", data); + state->logerror("Border color:%02X\n", data); spectrum_page_basicrom(machine); - //logerror("Snapshot loaded.\nExecution resuming at %s\n", cpu_get_reg_string(cpu, Z80_PC)); + //state->logerror("Snapshot loaded.\nExecution resuming at %s\n", cpu_get_reg_string(cpu, Z80_PC)); /* TODO: Decode the optional POKE bank at the end of the image */ @@ -1385,8 +1386,8 @@ void spectrum_setup_sit(running_machine &machine, UINT8 *snapdata, UINT32 snapsi cpu->set_input_line(INPUT_LINE_HALT, CLEAR_LINE); /* Memory dump */ - logerror("Skipping the 16K ROM dump at offset:%04X\n", SIT_OFFSET + 28); - logerror("Loading %04X bytes of RAM at %04X\n", 3*SPECTRUM_BANK, BASE_RAM); + state->logerror("Skipping the 16K ROM dump at offset:%04X\n", SIT_OFFSET + 28); + state->logerror("Loading %04X bytes of RAM at %04X\n", 3*SPECTRUM_BANK, BASE_RAM); for (i = 0; i < 3*SPECTRUM_BANK; i++) space.write_byte(BASE_RAM + i, snapdata[SIT_HDR + SPECTRUM_BANK + i]); @@ -1394,11 +1395,11 @@ void spectrum_setup_sit(running_machine &machine, UINT8 *snapdata, UINT32 snapsi data = snapdata[SIT_OFFSET + 27] & 0x07; state->m_port_fe_data = (state->m_port_fe_data & 0xf8) | data; spectrum_border_update(machine, data); - logerror("Border color:%02X\n", data); + state->logerror("Border color:%02X\n", data); spectrum_page_basicrom(machine); - //logerror("Snapshot loaded.\nExecution resuming at %s\n", cpu_get_reg_string(cpu, Z80_PC)); + //state->logerror("Snapshot loaded.\nExecution resuming at %s\n", cpu_get_reg_string(cpu, Z80_PC)); } /******************************************************************* @@ -1457,7 +1458,7 @@ void spectrum_setup_zx(running_machine &machine, UINT8 *snapdata, UINT32 snapsiz cpu_device *cpu = state->m_maincpu; address_space &space = cpu->space(AS_PROGRAM); - logerror("Skipping last 132 bytes of the 16K ROM dump at offset:0000\n"); + state->logerror("Skipping last 132 bytes of the 16K ROM dump at offset:0000\n"); data = (snapdata[ZX_OFFSET + 173] << 8) | snapdata[ZX_OFFSET + 177]; LOAD_REG(cpu, Z80_AF, data); @@ -1518,7 +1519,7 @@ void spectrum_setup_zx(running_machine &machine, UINT8 *snapdata, UINT32 snapsiz LOAD_REG(cpu, Z80_IM, 2); break; default: - logerror("Invalid IM:%04X\n", mode); + state->logerror("Invalid IM:%04X\n", mode); } data = BIT(snapdata[ZX_OFFSET + 142], 0); @@ -1530,7 +1531,7 @@ void spectrum_setup_zx(running_machine &machine, UINT8 *snapdata, UINT32 snapsiz cpu->set_input_line(INPUT_LINE_HALT, CLEAR_LINE); /* Memory dump */ - logerror("Loading %04X bytes of RAM at %04X\n", 3*SPECTRUM_BANK, BASE_RAM); + state->logerror("Loading %04X bytes of RAM at %04X\n", 3*SPECTRUM_BANK, BASE_RAM); for (i = 0; i < 3*SPECTRUM_BANK; i++) space.write_byte(BASE_RAM + i, snapdata[132 + i]); @@ -1538,11 +1539,11 @@ void spectrum_setup_zx(running_machine &machine, UINT8 *snapdata, UINT32 snapsiz data = (space.read_byte(0x5c48) >> 3) & 0x07; // Get the current border color from BORDCR system variable. state->m_port_fe_data = (state->m_port_fe_data & 0xf8) | data; spectrum_border_update(machine, data); - logerror("Border color:%02X\n", data); + state->logerror("Border color:%02X\n", data); spectrum_page_basicrom(machine); - //logerror("Snapshot loaded.\nExecution resuming at %s\n", cpu_get_reg_string(cpu, Z80_PC)); + //state->logerror("Snapshot loaded.\nExecution resuming at %s\n", cpu_get_reg_string(cpu, Z80_PC)); } /******************************************************************* @@ -1648,7 +1649,7 @@ void spectrum_setup_snp(running_machine &machine, UINT8 *snapdata, UINT32 snapsi cpu->set_input_line(INPUT_LINE_HALT, CLEAR_LINE); /* Memory dump */ - logerror("Loading %04X bytes of RAM at %04X\n", 3*SPECTRUM_BANK, BASE_RAM); + state->logerror("Loading %04X bytes of RAM at %04X\n", 3*SPECTRUM_BANK, BASE_RAM); for (i = 0; i < 3*SPECTRUM_BANK; i++) space.write_byte(BASE_RAM + i, snapdata[i]); @@ -1656,11 +1657,11 @@ void spectrum_setup_snp(running_machine &machine, UINT8 *snapdata, UINT32 snapsi data = snapdata[SNP_OFFSET + 2] & 0x07; state->m_port_fe_data = (state->m_port_fe_data & 0xf8) | data; spectrum_border_update(machine, data); - logerror("Border color:%02X\n", data); + state->logerror("Border color:%02X\n", data); spectrum_page_basicrom(machine); - //logerror("Snapshot loaded.\nExecution resuming at %s\n", cpu_get_reg_string(cpu, Z80_PC)); + //state->logerror("Snapshot loaded.\nExecution resuming at %s\n", cpu_get_reg_string(cpu, Z80_PC)); } /******************************************************************* @@ -1764,7 +1765,7 @@ static void spectrum_snx_decompress_block(address_space &space, UINT8 *source, U { UINT8 counthi, countlo, compress, fill; UINT16 block = 0, count, i, j, numbytes; - + spectrum_state *state = space.machine().driver_data<spectrum_state>(); i = SNX_HDR - 1; numbytes = 0; @@ -1778,27 +1779,27 @@ static void spectrum_snx_decompress_block(address_space &space, UINT8 *source, U compress = SNX_COMPRESSED; else compress = SNX_UNCOMPRESSED; - logerror("Block:%05d Type:Short Compr:%s Offset:%04X Len:%04X ", block++, compress == SNX_COMPRESSED ? "Y" : "N", i-1, count); + state->logerror("Block:%05d Type:Short Compr:%s Offset:%04X Len:%04X ", block++, compress == SNX_COMPRESSED ? "Y" : "N", i-1, count); } else { countlo = source[++i]; count = (counthi << 8) | countlo; // Long block compress = source[++i]; - logerror("Block:%05d Type:Long Compr:%s Offset:%04X Len:%04X ", block++, compress == SNX_COMPRESSED ? "Y" : "N", i-3, count); + state->logerror("Block:%05d Type:Long Compr:%s Offset:%04X Len:%04X ", block++, compress == SNX_COMPRESSED ? "Y" : "N", i-3, count); } if (compress == SNX_COMPRESSED) { fill = source[++i]; - logerror("Dest:%04X Filler:%02X\n", BASE_RAM + numbytes, fill); + state->logerror("Dest:%04X Filler:%02X\n", BASE_RAM + numbytes, fill); for(j = 0; j < count; j++) space.write_byte(BASE_RAM + numbytes + j, fill); numbytes += count; } else { - logerror("Dest:%04X\n", BASE_RAM + numbytes); + state->logerror("Dest:%04X\n", BASE_RAM + numbytes); j = 0; while (j < count) space.write_byte(BASE_RAM + numbytes + j++, source[++i]); @@ -1817,7 +1818,7 @@ void spectrum_setup_snx(running_machine &machine, UINT8 *snapdata, UINT32 snapsi data = (snapdata[SNX_OFFSET + 4] << 8) | snapdata[SNX_OFFSET + 5]; if (data != 0x25) - logerror("Corrupted header length: %02X instead of 0x25\n", data); + state->logerror("Corrupted header length: %02X instead of 0x25\n", data); data = (snapdata[SNX_OFFSET + 28] << 8) | snapdata[SNX_OFFSET + 27]; LOAD_REG(cpu, Z80_AF, data); @@ -1877,16 +1878,16 @@ void spectrum_setup_snx(running_machine &machine, UINT8 *snapdata, UINT32 snapsi cpu->set_input_line(INPUT_LINE_HALT, CLEAR_LINE); /* Memory dump */ - logerror("Uncompressing %04X bytes of RAM at %04X\n", 3*SPECTRUM_BANK, BASE_RAM); + state->logerror("Uncompressing %04X bytes of RAM at %04X\n", 3*SPECTRUM_BANK, BASE_RAM); spectrum_snx_decompress_block(space, snapdata, BASE_RAM, 3*SPECTRUM_BANK); /* get pc from stack */ addr = cpu->state_int(Z80_SP); if (addr < BASE_RAM || addr > 4*SPECTRUM_BANK - 2) - logerror("Corrupted SP out of range:%04X", addr); + state->logerror("Corrupted SP out of range:%04X", addr); else - logerror("Fetching PC from the stack at SP:%04X\n", addr); + state->logerror("Fetching PC from the stack at SP:%04X\n", addr); LOAD_REG(cpu, Z80_PC, (space.read_byte(addr + 1) << 8) | space.read_byte(addr + 0)); @@ -1896,14 +1897,14 @@ void spectrum_setup_snx(running_machine &machine, UINT8 *snapdata, UINT32 snapsi #endif addr += 2; - logerror("Fixed the stack at SP:%04X\n", addr); + state->logerror("Fixed the stack at SP:%04X\n", addr); cpu->set_state_int(Z80_SP, addr); /* Set border color */ data = snapdata[SNX_OFFSET + 32] & 0x07; state->m_port_fe_data = (state->m_port_fe_data & 0xf8) | data; spectrum_border_update(machine, data); - logerror("Border color:%02X\n", data); + state->logerror("Border color:%02X\n", data); spectrum_page_basicrom(machine); @@ -1913,7 +1914,7 @@ void spectrum_setup_snx(running_machine &machine, UINT8 *snapdata, UINT32 snapsi /* TODO: Enable selection of Issue 2/3 config switch as per snapdata[SNX_OFFSET + 37] */ - //logerror("Snapshot loaded.\nExecution resuming at %s\n", cpu_get_reg_string(cpu, Z80_PC)); + //state->logerror("Snapshot loaded.\nExecution resuming at %s\n", cpu_get_reg_string(cpu, Z80_PC)); } /******************************************************************* @@ -1971,7 +1972,7 @@ void spectrum_setup_frz(running_machine &machine, UINT8 *snapdata, UINT32 snapsi if (state->m_port_7ffd_data == -1) { - logerror("Can't load 128K .FRZ file into 48K machine\n"); + state->logerror("Can't load 128K .FRZ file into 48K machine\n"); return; } @@ -2036,7 +2037,7 @@ void spectrum_setup_frz(running_machine &machine, UINT8 *snapdata, UINT32 snapsi /* Memory dump */ addr = 0; static const UINT8 banks[] = { 5, 2, 0, 1, 3, 4, 6, 7 }; - logerror("Loading %05X bytes of RAM at %04X\n", 8*SPECTRUM_BANK, BASE_RAM); + state->logerror("Loading %05X bytes of RAM at %04X\n", 8*SPECTRUM_BANK, BASE_RAM); for (i = 0; i < 8; i++) { switch (banks[i]) @@ -2056,22 +2057,22 @@ void spectrum_setup_frz(running_machine &machine, UINT8 *snapdata, UINT32 snapsi spectrum_update_paging(machine); break; }; - logerror("Loading bank %d from offset:%05X\n", banks[i], FRZ_HDR + i*SPECTRUM_BANK); + state->logerror("Loading bank %d from offset:%05X\n", banks[i], FRZ_HDR + i*SPECTRUM_BANK); for (j = 0; j < SPECTRUM_BANK; j++) space.write_byte(j + addr, snapdata[j + FRZ_HDR + i*SPECTRUM_BANK]); } state->m_port_7ffd_data = snapdata[FRZ_OFFSET + 1]; - logerror ("Port 7FFD:%02X\n", state->m_port_7ffd_data); - logerror ("Paging bank:%d\n", state->m_port_7ffd_data & 0x07); + state->logerror ("Port 7FFD:%02X\n", state->m_port_7ffd_data); + state->logerror ("Paging bank:%d\n", state->m_port_7ffd_data & 0x07); spectrum_update_paging(machine); /* Set border color */ data = (space.read_byte(0x5c48) >> 3) & 0x07; // Get the current border color from BORDCR system variable. state->m_port_fe_data = (state->m_port_fe_data & 0xf8) | data; spectrum_border_update(machine, data); - logerror("Border color:%02X\n", data); + state->logerror("Border color:%02X\n", data); - //logerror("Snapshot loaded.\nExecution resuming at bank:%d %s\n", state->m_port_7ffd_data & 0x07, cpu_get_reg_string(cpu, Z80_PC)); + //state->logerror("Snapshot loaded.\nExecution resuming at bank:%d %s\n", state->m_port_7ffd_data & 0x07, cpu_get_reg_string(cpu, Z80_PC)); } static void spectrum_z80_decompress_block(address_space &space, UINT8 *source, UINT16 dest, UINT16 size) @@ -2196,34 +2197,34 @@ void spectrum_setup_z80(running_machine &machine, UINT8 *snapdata, UINT32 snapsi switch (z80_type) { case SPECTRUM_Z80_SNAPSHOT_INVALID: - logerror("Invalid .Z80 file\n"); + state->logerror("Invalid .Z80 file\n"); return; case SPECTRUM_Z80_SNAPSHOT_48K_OLD: case SPECTRUM_Z80_SNAPSHOT_48K: - logerror("48K .Z80 file\n"); + state->logerror("48K .Z80 file\n"); if (!strcmp(machine.system().name,"ts2068")) - logerror("48K .Z80 file in TS2068\n"); + state->logerror("48K .Z80 file in TS2068\n"); break; case SPECTRUM_Z80_SNAPSHOT_128K: - logerror("128K .Z80 file\n"); + state->logerror("128K .Z80 file\n"); if (state->m_port_7ffd_data == -1) { - logerror("Not a 48K .Z80 file\n"); + state->logerror("Not a 48K .Z80 file\n"); return; } if (!strcmp(machine.system().name,"ts2068")) { - logerror("Not a TS2068 .Z80 file\n"); + state->logerror("Not a TS2068 .Z80 file\n"); return; } break; case SPECTRUM_Z80_SNAPSHOT_TS2068: - logerror("TS2068 .Z80 file\n"); + state->logerror("TS2068 .Z80 file\n"); if (strcmp(machine.system().name,"ts2068")) - logerror("Not a TS2068 machine\n"); + state->logerror("Not a TS2068 machine\n"); break; case SPECTRUM_Z80_SNAPSHOT_SAMRAM: - logerror("Hardware not supported - .Z80 file\n"); + state->logerror("Hardware not supported - .Z80 file\n"); return; } @@ -2324,13 +2325,13 @@ void spectrum_setup_z80(running_machine &machine, UINT8 *snapdata, UINT32 snapsi if ((snapdata[12] & 0x020) == 0) { - logerror("Not compressed\n"); /* not compressed */ + state->logerror("Not compressed\n"); /* not compressed */ for (i = 0; i < 49152; i++) space.write_byte(i + 16384, snapdata[30 + i]); } else { - logerror("Compressed\n"); /* compressed */ + state->logerror("Compressed\n"); /* compressed */ spectrum_z80_decompress_block(space, snapdata + 30, 16384, 49152); } } @@ -2403,7 +2404,7 @@ void spectrum_setup_z80(running_machine &machine, UINT8 *snapdata, UINT32 snapsi if (length == 0x0ffff) { /* block is uncompressed */ - logerror("Not compressed\n"); + state->logerror("Not compressed\n"); /* not compressed */ for (i = 0; i < 16384; i++) @@ -2411,7 +2412,7 @@ void spectrum_setup_z80(running_machine &machine, UINT8 *snapdata, UINT32 snapsi } else { - logerror("Compressed\n"); + state->logerror("Compressed\n"); /* block is compressed */ spectrum_z80_decompress_block(space, &pSource[3], Dest, 16384); @@ -2559,7 +2560,7 @@ void spectrum_setup_raw(running_machine &machine, UINT8 *quickdata, UINT32 quick data = (space.read_byte(0x5c48) >> 3) & 0x07; // Get the current border color from BORDCR system variable. state->m_port_fe_data = (state->m_port_fe_data & 0xf8) | data; spectrum_border_update(machine, data); - logerror("Border color:%02X\n", data); + state->logerror("Border color:%02X\n", data); log_quickload(machine, "BYTES", start, len, 0, EXEC_NA); } diff --git a/src/mame/machine/xbox.c b/src/mame/machine/xbox.c index b4baaae5961..ebb0d6fa631 100644 --- a/src/mame/machine/xbox.c +++ b/src/mame/machine/xbox.c @@ -1197,7 +1197,7 @@ static UINT32 hubintiasbridg_pci_r(device_t *busdevice, device_t *device, int fu static void hubintiasbridg_pci_w(device_t *busdevice, device_t *device, int function, int reg, UINT32 data, UINT32 mem_mask) { #ifdef LOG_PCI - if (reg >= 16) logerror(" bus:0 function:%d register:%d data:%08X mask:%08X\n", function, reg, data, mem_mask); + if (reg >= 16) device->logerror(" bus:0 function:%d register:%d data:%08X mask:%08X\n", function, reg, data, mem_mask); #endif } @@ -1216,7 +1216,7 @@ static UINT32 dummy_pci_r(device_t *busdevice, device_t *device, int function, i static void dummy_pci_w(device_t *busdevice, device_t *device, int function, int reg, UINT32 data, UINT32 mem_mask) { #ifdef LOG_PCI - if (reg >= 16) logerror(" bus:0 function:%d register:%d data:%08X mask:%08X\n", function, reg, data, mem_mask); + if (reg >= 16) device->logerror(" bus:0 function:%d register:%d data:%08X mask:%08X\n", function, reg, data, mem_mask); #endif } @@ -1412,8 +1412,8 @@ WRITE32_MEMBER(xbox_base_state::smbus_w) } ADDRESS_MAP_START(xbox_base_map, AS_PROGRAM, 32, xbox_base_state) - AM_RANGE(0x00000000, 0x07ffffff) AM_RAM // 128 megabytes - AM_RANGE(0xf0000000, 0xf0ffffff) AM_RAM + AM_RANGE(0x00000000, 0x07ffffff) AM_RAM AM_SHARE("nv2a_share") // 128 megabytes + AM_RANGE(0xf0000000, 0xf7ffffff) AM_RAM AM_SHARE("nv2a_share") // 3d accelerator wants this AM_RANGE(0xfd000000, 0xfdffffff) AM_RAM AM_READWRITE(geforce_r, geforce_w) AM_RANGE(0xfed00000, 0xfed003ff) AM_READWRITE(usbctrl_r, usbctrl_w) AM_RANGE(0xfe800000, 0xfe85ffff) AM_READWRITE(audio_apu_r, audio_apu_w) diff --git a/src/mame/machine/zx.c b/src/mame/machine/zx.c index be1e1ed246c..dec8d81ee8b 100644 --- a/src/mame/machine/zx.c +++ b/src/mame/machine/zx.c @@ -1,5 +1,5 @@ // license:GPL-2.0+ -// copyright-holders:Juergen Buchmueller, Krzysztof Strzecha, Robbbert +// copyright Olivier Galibert, Buchmueller, Krzysztof Strzecha, Robbbert /*************************************************************************** zx.c @@ -10,102 +10,112 @@ #include "includes/zx.h" -#define video_screen_get_refresh(screen) (((screen_config *)(screen)->inline_config)->refresh) - -#define DEBUG_ZX81_PORTS 1 -#define DEBUG_ZX81_VSYNC 1 - -#define LOG_ZX81_IOR(_comment) do { if (DEBUG_ZX81_PORTS) logerror("ZX81 IOR: %04x, Data: %02x, Scanline: %d (%s)\n", offset, data, space.machine().first_screen()->vpos(), _comment); } while (0) -#define LOG_ZX81_IOW(_comment) do { if (DEBUG_ZX81_PORTS) logerror("ZX81 IOW: %04x, Data: %02x, Scanline: %d (%s)\n", offset, data, space.machine().first_screen()->vpos(), _comment); } while (0) -#define LOG_ZX81_VSYNC do { if (DEBUG_ZX81_VSYNC) logerror("VSYNC starts in scanline: %d\n", space.machine().first_screen()->vpos()); } while (0) - - -WRITE8_MEMBER(zx_state::zx_ram_w) +DRIVER_INIT_MEMBER(zx_state,zx) { - UINT8 *RAM = m_region_maincpu->base(); - RAM[offset + 0x4000] = data; - - if (data & 0x40) - { - space.write_byte(offset | 0xc000, data); - RAM[offset | 0xc000] = data; - } - else - { - space.write_byte(offset | 0xc000, 0); - RAM[offset | 0xc000] = 0; - } + m_program = &m_maincpu->space(AS_PROGRAM); + m_tape_input = timer_alloc(TIMER_TAPE_INPUT); + + if(m_ram->size() == 32768) + m_program->unmap_readwrite(0x8000, 0xbfff); + else if(m_ram->size() == 16384) + m_program->unmap_readwrite(0x8000, 0xffff); + else if(m_ram->size() < 16384) + m_program->unmap_readwrite(0x4000 + m_ram->size(), 0xffff); } -/* I know this looks really pointless... but it has to be here */ -READ8_MEMBER( zx_state::zx_ram_r ) +void zx_state::machine_reset() { - UINT8 *RAM = m_region_maincpu->base(); - return RAM[offset | 0xc000]; -} + m_prev_refresh = 0xff; -DRIVER_INIT_MEMBER(zx_state,zx) -{ - address_space &space = m_maincpu->space(AS_PROGRAM); + m_vsync_active = false; + m_base_vsync_clock = 0; + m_ypos = 0; - space.install_read_bank(0x4000, 0x4000 + m_ram->size() - 1, "bank1"); - space.install_write_handler(0x4000, 0x4000 + m_ram->size() - 1, write8_delegate(FUNC(zx_state::zx_ram_w),this)); - membank("bank1")->set_base(m_region_maincpu->base() + 0x4000); -} + m_nmi_on = false; + m_nmi_generator_active = false; -DIRECT_UPDATE_MEMBER(zx_state::zx_setdirect) -{ - if (address & 0xc000) - zx_ula_r(address, m_region_maincpu, 0); - return address; -} + m_cassette_cur_level = 0; -DIRECT_UPDATE_MEMBER(zx_state::pc8300_setdirect) -{ - if (address & 0xc000) - zx_ula_r(address, m_region_gfx1, 0); - return address; + m_tape_input->adjust(attotime::from_hz(44100), 0, attotime::from_hz(44100)); } -DIRECT_UPDATE_MEMBER(zx_state::pow3000_setdirect) -{ - if (address & 0xc000) - zx_ula_r(address, m_region_gfx1, 1); - return address; -} - -void zx_state::machine_reset() +void zx_state::zx_tape_input() { - m_maincpu->space(AS_PROGRAM).set_direct_update_handler(direct_update_delegate(FUNC(zx_state::zx_setdirect), this)); - m_tape_bit = 0x80; + m_cassette_cur_level = m_cassette->input(); } -MACHINE_RESET_MEMBER(zx_state,pow3000) +void zx_state::drop_sync() { - m_maincpu->space(AS_PROGRAM).set_direct_update_handler(direct_update_delegate(FUNC(zx_state::pow3000_setdirect), this)); - m_tape_bit = 0x80; -} + if (m_vsync_active) { + UINT64 time = m_maincpu->total_cycles(); + m_vsync_active = false; + m_cassette->output(-1.0); -MACHINE_RESET_MEMBER(zx_state,pc8300) -{ - m_maincpu->space(AS_PROGRAM).set_direct_update_handler(direct_update_delegate(FUNC(zx_state::pc8300_setdirect), this)); - m_tape_bit = 0x80; -} + int xs = 2*((m_vsync_start_time - m_base_vsync_clock) % 207); + int ys = (m_vsync_start_time - m_base_vsync_clock) / 207; + int xe = 2*((time - m_base_vsync_clock) % 207); + int ye = (time - m_base_vsync_clock) / 207; + if(xs >= 384) { + xs = 0; + ys++; + } + if(xe >= 384) { + xe = 0; + ye++; + } + if(ys < 311) { + if(ye > 310) { + ye = 311; + xe = 0; + } + if(ys == ye) { + UINT16 *dest = &m_bitmap_render->pix16(ys, xs); + for(int x = xs; x < xe; x++) + *dest++ = 1; + } else { + UINT16 *dest = &m_bitmap_render->pix16(ys, xs); + for(int x = xs; x < 384; x++) + *dest++ = 1; + for(int y = ys+1; y < ye; y++) { + dest = &m_bitmap_render->pix16(y, 0); + for(int x = 0; x<384; x++) + *dest++ = 1; + } + dest = &m_bitmap_render->pix16(ye, 0); + for(int x = 0; x < xe; x++) + *dest++ = 1; + } + } -TIMER_CALLBACK_MEMBER(zx_state::zx_tape_pulse) -{ - m_tape_bit = 0x80; + // Short is hsync + if(time - m_vsync_start_time > 1000) { + // Ignore too short frame times, they're cassette output + if(time - m_base_vsync_clock > 52000) { + logerror("frame time %d\n", int(time - m_base_vsync_clock)); + + rectangle rect(0, 383, 0, 310); + copybitmap(*m_bitmap_buffer, *m_bitmap_render, 0, 0, 0, 0, rect); + m_bitmap_render->fill(0); + m_base_vsync_clock = time; + m_ypos = 0; + } + if(m_nmi_on) + m_maincpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE); + m_nmi_on = m_hsync_active = false; + recalc_hsync(); + } else + m_ypos = ((time-m_base_vsync_clock)%207) < 192 ? 0 : -1; + } } READ8_MEMBER( zx_state::zx80_io_r ) { -/* port FE = read keyboard, NTSC/PAL diode, and cass bit; turn off HSYNC-generator/cass-out - The upper 8 bits are used to select a keyboard scan line */ + /* port FE = read keyboard, NTSC/PAL diode, and cass bit; turn off HSYNC-generator/cass-out + The upper 8 bits are used to select a keyboard scan line */ UINT8 data = 0xff; - UINT8 offs = offset & 0xff; - if (offs == 0xfe) + if (!(offset & 0x01)) { if ((offset & 0x0100) == 0) data &= m_io_row0->read(); @@ -129,25 +139,13 @@ READ8_MEMBER( zx_state::zx80_io_r ) m_cassette->output(+1.0); - if (m_ula_irq_active) - { - zx_ula_bkgnd(0); - m_ula_irq_active = 0; + if (!m_vsync_active && !m_nmi_generator_active) { + m_vsync_active = true; + m_vsync_start_time = m_maincpu->total_cycles(); } -// else -// { - if ((m_cassette->input() < -0.75) && m_tape_bit) - { - m_tape_bit = 0x00; - timer_set(attotime::from_usec(362), TIMER_TAPE_PULSE); - } - data &= ~m_tape_bit; -// } - if (m_ula_frame_vsync == 3) - { - m_ula_frame_vsync = 2; - } + if(m_cassette_cur_level <= 0) + data &= 0x7f; } return data; @@ -160,9 +158,8 @@ READ8_MEMBER( zx_state::zx81_io_r ) The upper 8 bits are used to select a keyboard scan line */ UINT8 data = 0xff; - UINT8 offs = offset & 0xff; - if (offs == 0xfe) + if (!(offset & 0x01)) { if ((offset & 0x0100) == 0) data &= m_io_row0->read(); @@ -186,25 +183,13 @@ READ8_MEMBER( zx_state::zx81_io_r ) m_cassette->output(+1.0); - if (m_ula_irq_active) - { - zx_ula_bkgnd(0); - m_ula_irq_active = 0; + if (!m_vsync_active && !m_nmi_generator_active) { + m_vsync_active = true; + m_vsync_start_time = m_maincpu->total_cycles(); } - else - { - if ((m_cassette->input() < -0.75) && m_tape_bit) - { - m_tape_bit = 0x00; - timer_set(attotime::from_usec(362), TIMER_TAPE_PULSE); - } - data &= ~m_tape_bit; - } - if (m_ula_frame_vsync == 3) - { - m_ula_frame_vsync = 2; - } + if(m_cassette_cur_level <= 0) + data &= 0x7f; } return data; @@ -248,26 +233,8 @@ READ8_MEMBER( zx_state::pc8300_io_r ) data &= m_io_row7->read(); m_cassette->output(+1.0); - - if (m_ula_irq_active) - { - zx_ula_bkgnd(0); - m_ula_irq_active = 0; - } - else - { - if ((m_cassette->input() < -0.75) && m_tape_bit) - { - m_tape_bit = 0x00; - timer_set(attotime::from_usec(362), TIMER_TAPE_PULSE); - } - - data &= ~m_tape_bit; - } - if (m_ula_frame_vsync == 3) - { - m_ula_frame_vsync = 2; - } + if(m_cassette_cur_level <= 0) + data &= 0x7f; } return data; @@ -316,26 +283,8 @@ READ8_MEMBER( zx_state::pow3000_io_r ) data &= m_io_row7->read(); m_cassette->output(+1.0); - - if (m_ula_irq_active) - { - zx_ula_bkgnd(0); - m_ula_irq_active = 0; - } - else - { - if ((m_cassette->input() < -0.75) && m_tape_bit) - { - m_tape_bit = 0x00; - timer_set(attotime::from_usec(362), TIMER_TAPE_PULSE); - } - - data &= ~m_tape_bit; - } - if (m_ula_frame_vsync == 3) - { - m_ula_frame_vsync = 2; - } + if(m_cassette_cur_level <= 0) + data &= 0x7f; } return data; @@ -360,31 +309,20 @@ WRITE8_MEMBER( zx_state::zx81_io_w ) FE = turn on NMI generator FF = write HSYNC and cass data */ - int height = m_screen->height(); - UINT8 offs = offset & 0xff; - - if (offs == 0xfd) - { - m_ula_nmi->reset(); + if (!(offset & 0x01) && !m_nmi_generator_active) { + m_nmi_generator_active = true; + m_nmi_on = m_hsync_active; + m_maincpu->set_input_line(INPUT_LINE_NMI, m_nmi_on ? ASSERT_LINE : CLEAR_LINE); + recalc_hsync(); } - else - if (offs == 0xfe) - { - m_ula_nmi->adjust(attotime::zero, 0, m_maincpu->cycles_to_attotime(207)); - /* remove the IRQ */ - m_ula_irq_active = 0; - } - else - if (offs == 0xff) - { - m_cassette->output(-1.0); - zx_ula_bkgnd(1); - if (m_ula_frame_vsync == 2) - { - m_maincpu->spin_until_time(m_screen->time_until_pos(height - 1, 0)); - m_ula_scanline_count = height - 1; - logerror ("S: %d B: %d\n", m_screen->vpos(), m_screen->hpos()); + if (!(offset & 0x02) && m_nmi_generator_active) { + m_nmi_generator_active = false; + if(m_nmi_on) { + m_maincpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE); + m_nmi_on = false; } } + + drop_sync(); } diff --git a/src/mame/mess.lst b/src/mame/mess.lst index 147d2dd716c..59e2dfc09b6 100644 --- a/src/mame/mess.lst +++ b/src/mame/mess.lst @@ -81,6 +81,7 @@ pico // 1994 Sega Pico (Europe) picou // 1994 Sega Pico (USA) picoj // 1993 Sega Pico (Japan) copera // 1993 Sega / Yamaha +sawatte // segacd // 1992 Sega Sega CD (USA) megacd // 1993 Sega Mega-CD (Europe) megacda // 1993 Sega Mega-CD (Asia) @@ -100,6 +101,8 @@ multmega // 1994 Sega Multi-Mega (Europe) 32xe 32xj 32x_scd // 1994 Sega Sega CD (USA w/32X addon) +32x_mcd // 1995 Sega Mega-CD (Europe w/32X addon) +32x_mcdj // 1994 Sega Mega-CD (Japan w/32X addon) segapm // 1996 Sega Picture Magic (32x type hardware) saturnjp // 1994 Sega Saturn (Japan) @@ -344,14 +347,14 @@ atombb // 1979 Acorn Atom //prophet2 bbca // 1981 BBC Micro Model A bbcb // 1981 BBC Micro Model B w/8271 FDC -bbcb_de // 1981 BBC Micro Model B (German) +bbcb_de // 1982 BBC Micro Model B (German) bbcb_us // 1983 BBC Micro Model B (US) electron // 1983 Acorn Electron -bbcb1770 // 1985 BBC Micro Model B w/1770 FDC +bbcb1770 // 1984 BBC Micro Model B w/1770 FDC bbcbp // 1985 BBC Micro Model B+ 64K bbcbp128 // 1985 BBC Micro Model B+ 128K abc110 // 1985 ABC 110 -abc210 // 1985 ABC 210/Cambridge Workstation +acw443 // 1985 ABC 210/Cambridge Workstation abc310 // 1985 ABC 310 reutapm // 1985 Reuters APM Board bbcm // 1986 BBC Master 128 @@ -759,6 +762,8 @@ sx16 // Sanyo SX-16 mbc16 // Sanyo MBC-16 ataripc3 ssam88s +sicpc1605 +eagle1600 // Non-PC msdos pcd // Siemens PC-D @@ -1659,6 +1664,7 @@ hs // Exidy, Inc. sorcerer // Sorcerer +sorcerer2 // monitor 1.1 1979 sorcererd // Sorcerer with floppies // Galaksija @@ -2759,3 +2765,4 @@ squale micral rd100 proteus3 +unichamp diff --git a/src/mame/video/amiga.c b/src/mame/video/amiga.c index 95bbe40c078..1c488f939eb 100644 --- a/src/mame/video/amiga.c +++ b/src/mame/video/amiga.c @@ -189,7 +189,7 @@ void amiga_copper_setpc(running_machine &machine, UINT32 pc) amiga_state *state = machine.driver_data<amiga_state>(); if (LOG_COPPER) - logerror("copper_setpc(%06x)\n", pc); + state->logerror("copper_setpc(%06x)\n", pc); state->m_copper_pc = pc; state->m_copper_waiting = FALSE; @@ -210,7 +210,7 @@ int amiga_copper_execute_next(running_machine &machine, int xpos) if (state->m_copper_pending_offset) { if (LOG_COPPER) - logerror("%02X.%02X: Write to %s = %04x\n", state->m_last_scanline, xpos / 2, amiga_custom_names[state->m_copper_pending_offset & 0xff], state->m_copper_pending_data); + state->logerror("%02X.%02X: Write to %s = %04x\n", state->m_last_scanline, xpos / 2, amiga_custom_names[state->m_copper_pending_offset & 0xff], state->m_copper_pending_data); state->custom_chip_w(state->m_copper_pending_offset, state->m_copper_pending_data); state->m_copper_pending_offset = 0; } @@ -252,7 +252,7 @@ int amiga_copper_execute_next(running_machine &machine, int xpos) xpos += COPPER_CYCLES_TO_PIXELS(1); if (LOG_COPPER) - logerror("%02X.%02X: Copper inst @ %06x = %04x %04x\n", state->m_last_scanline, xpos / 2, state->m_copper_pc, word0, word1); + state->logerror("%02X.%02X: Copper inst @ %06x = %04x %04x\n", state->m_last_scanline, xpos / 2, state->m_copper_pc, word0, word1); /* handle a move */ if ((word0 & 1) == 0) @@ -266,7 +266,7 @@ int amiga_copper_execute_next(running_machine &machine, int xpos) if (delay[word0] == 0) { if (LOG_COPPER) - logerror("%02X.%02X: Write to %s = %04x\n", state->m_last_scanline, xpos / 2, amiga_custom_names[word0 & 0xff], word1); + state->logerror("%02X.%02X: Write to %s = %04x\n", state->m_last_scanline, xpos / 2, amiga_custom_names[word0 & 0xff], word1); state->custom_chip_w(word0, word1); } else // additional 2 cycles needed for non-Agnus registers @@ -280,7 +280,7 @@ int amiga_copper_execute_next(running_machine &machine, int xpos) else { if (LOG_COPPER) - logerror("%02X.%02X: Aborting copper on illegal write\n", state->m_last_scanline, xpos / 2); + state->logerror("%02X.%02X: Aborting copper on illegal write\n", state->m_last_scanline, xpos / 2); state->m_copper_waitval = 0xffff; state->m_copper_waitmask = 0xffff; @@ -307,7 +307,7 @@ int amiga_copper_execute_next(running_machine &machine, int xpos) if ((word1 & 1) == 0) { if (LOG_COPPER) - logerror(" Waiting for %04x & %04x (currently %04x)\n", state->m_copper_waitval, state->m_copper_waitmask, (state->m_last_scanline << 8) | (xpos >> 1)); + state->logerror(" Waiting for %04x & %04x (currently %04x)\n", state->m_copper_waitval, state->m_copper_waitmask, (state->m_last_scanline << 8) | (xpos >> 1)); state->m_copper_waiting = TRUE; } @@ -318,14 +318,14 @@ int amiga_copper_execute_next(running_machine &machine, int xpos) int curpos = (ypos << 8) | (xpos >> 1); if (LOG_COPPER) - logerror(" Skipping if %04x & %04x (currently %04x)\n", state->m_copper_waitval, state->m_copper_waitmask, (state->m_last_scanline << 8) | (xpos >> 1)); + state->logerror(" Skipping if %04x & %04x (currently %04x)\n", state->m_copper_waitval, state->m_copper_waitmask, (state->m_last_scanline << 8) | (xpos >> 1)); /* if we're past the wait time, stop it and hold up 2 cycles */ if ((curpos & state->m_copper_waitmask) >= (state->m_copper_waitval & state->m_copper_waitmask) && (!state->m_copper_waitblit || !(CUSTOM_REG(REG_DMACON) & DMACON_BBUSY))) { if (LOG_COPPER) - logerror(" Skipped\n"); + state->logerror(" Skipped\n"); /* count the cycles it out have taken to fetch the next instruction */ state->m_copper_pc += 4; @@ -350,7 +350,7 @@ void amiga_sprite_dma_reset(running_machine &machine, int which) { amiga_state *state = machine.driver_data<amiga_state>(); - if (LOG_SPRITE_DMA) logerror("sprite %d dma reset\n", which ); + if (LOG_SPRITE_DMA) state->logerror("sprite %d dma reset\n", which ); state->m_sprite_dma_reload_mask |= 1 << which; state->m_sprite_dma_live_mask |= 1 << which; } @@ -360,7 +360,7 @@ void amiga_sprite_enable_comparitor(running_machine &machine, int which, int ena { amiga_state *state = machine.driver_data<amiga_state>(); - if (LOG_SPRITE_DMA) logerror("sprite %d comparitor %sable\n", which, enable ? "en" : "dis" ); + if (LOG_SPRITE_DMA) state->logerror("sprite %d comparitor %sable\n", which, enable ? "en" : "dis" ); if (enable) { state->m_sprite_comparitor_enable_mask |= 1 << which; @@ -386,7 +386,7 @@ INLINE void fetch_sprite_data(amiga_state *state, int scanline, int sprite) CUSTOM_REG(REG_SPR0DATA + 4 * sprite) = state->chip_ram_r(CUSTOM_REG_LONG(REG_SPR0PTH + 2 * sprite) + 0); CUSTOM_REG(REG_SPR0DATB + 4 * sprite) = state->chip_ram_r(CUSTOM_REG_LONG(REG_SPR0PTH + 2 * sprite) + 2); CUSTOM_REG_LONG(REG_SPR0PTH + 2 * sprite) += 4; - if (LOG_SPRITE_DMA) logerror("%3d:sprite %d fetch: data=%04X-%04X\n", scanline, sprite, CUSTOM_REG(REG_SPR0DATA + 4 * sprite), CUSTOM_REG(REG_SPR0DATB + 4 * sprite)); + if (LOG_SPRITE_DMA) state->logerror("%3d:sprite %d fetch: data=%04X-%04X\n", scanline, sprite, CUSTOM_REG(REG_SPR0DATA + 4 * sprite), CUSTOM_REG(REG_SPR0DATB + 4 * sprite)); } static void update_sprite_dma(amiga_state *state, int scanline) @@ -416,7 +416,7 @@ static void update_sprite_dma(amiga_state *state, int scanline) CUSTOM_REG(REG_SPR0POS + 4 * num) = state->chip_ram_r(CUSTOM_REG_LONG(REG_SPR0PTH + 2 * num) + 0); CUSTOM_REG(REG_SPR0CTL + 4 * num) = state->chip_ram_r(CUSTOM_REG_LONG(REG_SPR0PTH + 2 * num) + 2); CUSTOM_REG_LONG(REG_SPR0PTH + 2 * num) += 4; - if (LOG_SPRITE_DMA) logerror("%3d:sprite %d fetch: pos=%04X ctl=%04X\n", scanline, num, CUSTOM_REG(REG_SPR0POS + 4 * num), CUSTOM_REG(REG_SPR0CTL + 4 * num)); + if (LOG_SPRITE_DMA) state->logerror("%3d:sprite %d fetch: pos=%04X ctl=%04X\n", scanline, num, CUSTOM_REG(REG_SPR0POS + 4 * num), CUSTOM_REG(REG_SPR0CTL + 4 * num)); } /* compute vstart/vstop */ @@ -427,7 +427,7 @@ static void update_sprite_dma(amiga_state *state, int scanline) if (scanline == vstart) { state->m_sprite_comparitor_enable_mask |= 1 << num; - if (LOG_SPRITE_DMA) logerror("%3d:sprite %d comparitor enable\n", scanline, num); + if (LOG_SPRITE_DMA) state->logerror("%3d:sprite %d comparitor enable\n", scanline, num); } /* if we hit vstop, disable the comparitor and trigger a reload for the next scanline */ @@ -438,7 +438,7 @@ static void update_sprite_dma(amiga_state *state, int scanline) state->m_sprite_dma_reload_mask |= 1 << num; CUSTOM_REG(REG_SPR0DATA + 4 * num) = 0; /* just a guess */ CUSTOM_REG(REG_SPR0DATB + 4 * num) = 0; - if (LOG_SPRITE_DMA) logerror("%3d:sprite %d comparitor disable, prepare for reload\n", scanline, num); + if (LOG_SPRITE_DMA) state->logerror("%3d:sprite %d comparitor disable, prepare for reload\n", scanline, num); } /* fetch data if this sprite is enabled */ diff --git a/src/mame/video/amigaaga.c b/src/mame/video/amigaaga.c index b9197ed2069..953f037fa6f 100644 --- a/src/mame/video/amigaaga.c +++ b/src/mame/video/amigaaga.c @@ -98,7 +98,7 @@ INLINE void fetch_sprite_data(amiga_state *state, int scanline, int sprite) state->m_aga_sprdatb[sprite][0] = state->chip_ram_r(CUSTOM_REG_LONG(REG_SPR0PTH + 2 * sprite) + 2); CUSTOM_REG_LONG(REG_SPR0PTH + 2 * sprite) += 4; state->m_aga_sprite_fetched_words = 1; - if (LOG_SPRITE_DMA) logerror("%3d:sprite %d fetch: data=%04X-%04X\n", scanline, sprite, state->m_aga_sprdata[sprite][0], state->m_aga_sprdatb[sprite][0]); + if (LOG_SPRITE_DMA) state->logerror("%3d:sprite %d fetch: data=%04X-%04X\n", scanline, sprite, state->m_aga_sprdata[sprite][0], state->m_aga_sprdatb[sprite][0]); break; case 1: case 2: @@ -109,7 +109,7 @@ INLINE void fetch_sprite_data(amiga_state *state, int scanline, int sprite) state->m_aga_sprdatb[sprite][1] = state->chip_ram_r(CUSTOM_REG_LONG(REG_SPR0PTH + 2 * sprite) + 2); CUSTOM_REG_LONG(REG_SPR0PTH + 2 * sprite) += 4; state->m_aga_sprite_fetched_words = 2; - if (LOG_SPRITE_DMA) logerror("%3d:sprite %d fetch: data=%04X-%04X %04X-%04X\n", scanline, sprite, state->m_aga_sprdata[sprite][0], state->m_aga_sprdatb[sprite][0], state->m_aga_sprdata[sprite][1], state->m_aga_sprdatb[sprite][1] ); + if (LOG_SPRITE_DMA) state->logerror("%3d:sprite %d fetch: data=%04X-%04X %04X-%04X\n", scanline, sprite, state->m_aga_sprdata[sprite][0], state->m_aga_sprdatb[sprite][0], state->m_aga_sprdata[sprite][1], state->m_aga_sprdatb[sprite][1] ); break; case 3: state->m_aga_sprdata[sprite][0] = state->chip_ram_r(CUSTOM_REG_LONG(REG_SPR0PTH + 2 * sprite) + 0); @@ -125,7 +125,7 @@ INLINE void fetch_sprite_data(amiga_state *state, int scanline, int sprite) state->m_aga_sprdatb[sprite][3] = state->chip_ram_r(CUSTOM_REG_LONG(REG_SPR0PTH + 2 * sprite) + 2); CUSTOM_REG_LONG(REG_SPR0PTH + 2 * sprite) += 4; state->m_aga_sprite_fetched_words = 4; - if (LOG_SPRITE_DMA) logerror("%3d:sprite %d fetch: data=%04X-%04X %04X-%04X %04X-%04X %04X-%04X\n", + if (LOG_SPRITE_DMA) state->logerror("%3d:sprite %d fetch: data=%04X-%04X %04X-%04X %04X-%04X %04X-%04X\n", scanline, sprite, state->m_aga_sprdata[sprite][0], state->m_aga_sprdatb[sprite][0], state->m_aga_sprdata[sprite][1], state->m_aga_sprdatb[sprite][1], @@ -176,7 +176,7 @@ static void update_sprite_dma(amiga_state *state, int scanline) CUSTOM_REG_LONG(REG_SPR0PTH + 2 * num) += 3*4; break; } - if (LOG_SPRITE_DMA) logerror("%3d:sprite %d fetch: pos=%04X ctl=%04X\n", scanline, num, CUSTOM_REG(REG_SPR0POS + 4 * num), CUSTOM_REG(REG_SPR0CTL + 4 * num)); + if (LOG_SPRITE_DMA) state->logerror("%3d:sprite %d fetch: pos=%04X ctl=%04X\n", scanline, num, CUSTOM_REG(REG_SPR0POS + 4 * num), CUSTOM_REG(REG_SPR0CTL + 4 * num)); } /* compute vstart/vstop */ @@ -187,7 +187,7 @@ static void update_sprite_dma(amiga_state *state, int scanline) if (scanline == vstart) { state->m_sprite_comparitor_enable_mask |= 1 << num; - if (LOG_SPRITE_DMA) logerror("%3d:sprite %d comparitor enable\n", scanline, num); + if (LOG_SPRITE_DMA) state->logerror("%3d:sprite %d comparitor enable\n", scanline, num); } /* if we hit vstop, disable the comparitor and trigger a reload for the next scanline */ @@ -198,7 +198,7 @@ static void update_sprite_dma(amiga_state *state, int scanline) state->m_sprite_dma_reload_mask |= 1 << num; CUSTOM_REG(REG_SPR0DATA + 4 * num) = 0; /* just a guess */ CUSTOM_REG(REG_SPR0DATB + 4 * num) = 0; - if (LOG_SPRITE_DMA) logerror("%3d:sprite %d comparitor disable, prepare for reload\n", scanline, num); + if (LOG_SPRITE_DMA) state->logerror("%3d:sprite %d comparitor disable, prepare for reload\n", scanline, num); } /* fetch data if this sprite is enabled */ diff --git a/src/mame/video/apple2.c b/src/mame/video/apple2.c index 195fed4ce8f..bdee351796a 100644 --- a/src/mame/video/apple2.c +++ b/src/mame/video/apple2.c @@ -1236,6 +1236,7 @@ void a2_video_device::hgr_update(screen_device &screen, bitmap_ind16 &bitmap, co UINT32 w; UINT16 *artifact_map_ptr; int mon_type = m_sysconfig & 0x03; + int begincol = 0, endcol = 40; /* sanity checks */ if (beginrow < cliprect.min_y) @@ -1245,6 +1246,18 @@ void a2_video_device::hgr_update(screen_device &screen, bitmap_ind16 &bitmap, co if (endrow < beginrow) return; + // we generate 2 pixels per "column" so adjust + if (begincol < (cliprect.min_x/14)) + begincol = (cliprect.min_x/14); + if (endcol > (cliprect.max_x/14)) + endcol = (cliprect.max_x/14); + if (cliprect.max_x > 39*14) + endcol = 40; + if (endcol < begincol) + return; + + //printf("HGR draw: page %c, rows %d-%d cols %d-%d\n", m_page2 ? '2' : '1', beginrow, endrow, begincol, endcol); + vram = &m_ram_ptr[(m_page2 ? 0x4000 : 0x2000)]; vram_row[0] = 0; @@ -1252,7 +1265,7 @@ void a2_video_device::hgr_update(screen_device &screen, bitmap_ind16 &bitmap, co for (row = beginrow; row <= endrow; row++) { - for (col = 0; col < 40; col++) + for (col = begincol; col < endcol; col++) { offset = ((((row/8) & 0x07) << 7) | (((row/8) & 0x18) * 5 + col)) | ((row & 7) << 10); vram_row[1+col] = vram[offset]; @@ -1266,18 +1279,20 @@ void a2_video_device::hgr_update(screen_device &screen, bitmap_ind16 &bitmap, co | (((UINT32) vram_row[col+1] & 0x7f) << 7) | (((UINT32) vram_row[col+2] & 0x7f) << 14); + + // verified on h/w: setting dhires w/o 80col emulates a rev. 0 Apple ][ with no orange/blue + if (m_dhires) + { + artifact_map_ptr = m_hires_artifact_map; + } + else + { + artifact_map_ptr = &m_hires_artifact_map[((vram_row[col + 1] & 0x80) >> 7) * 16]; + } + switch (mon_type) { case 0: - // verified on h/w: setting dhires w/o 80col emulates a rev. 0 Apple ][ with no orange/blue - if (m_dhires) - { - artifact_map_ptr = m_hires_artifact_map; - } - else - { - artifact_map_ptr = &m_hires_artifact_map[((vram_row[col + 1] & 0x80) >> 7) * 16]; - } for (b = 0; b < 7; b++) { v = artifact_map_ptr[((w >> (b + 7-1)) & 0x07) | (((b ^ col) & 0x01) << 3)]; diff --git a/src/mame/video/bbc.c b/src/mame/video/bbc.c index 5e059647705..5424db2c989 100644 --- a/src/mame/video/bbc.c +++ b/src/mame/video/bbc.c @@ -40,53 +40,74 @@ unsigned int bbc_state::calculate_video_address(int ma,int ra) { // ma = output from IC2 6845 MA address - int c0=m_b4_video0; // output from IC32 74LS259 bits 4 and 5 - int c1=m_b5_video1; + int c0 = m_b4_video0; // output from IC32 74LS259 bits 4 and 5 + int c1 = m_b5_video1; /* the 4 bit input port b on IC39 are produced by 4 NAND gates. these NAND gates take their inputs from c0 and c1 (from IC32) and ma12 (from the 6845) */ /* get bit m12 from the 6845 */ - int ma12=(ma>>12)&1; + int ma12 = BIT(ma,12); // 4 bit input B on IC39 74LS283 (4 bit adder) /* 3 input NAND part of IC 36 */ int b1=(~(c1 & c0 & ma12)) & 1; /* 2 input NAND part of IC40 (b3 is calculated before b2 and b4 because b3 feed back into b2 and b4) */ - int b3=(~(c0 & ma12)) & 1; + int b3 = (~(c0 & ma12)) & 1; /* 3 input NAND part of IC 36 */ - int b2=(~(c1 & b3 & ma12)) & 1; + int b2 = (~(c1 & b3 & ma12)) & 1; /* 2 input NAND part of IC 27 */ - int b4=(~(b3 & ma12)) & 1; + int b4 = (~(b3 & ma12)) & 1; /* inputs port b to IC39 are taken from the NAND gates b1 to b4 */ - int b=(b1<<0)|(b2<<1)|(b3<<2)|(b4<<3); + int b = (b1<<0) | (b2<<1) | (b3<<2) | (b4<<3); /* inputs port a to IC39 are MA8 to MA11 from the 6845 */ - int a=(ma>>8)&0xf; + int a = (ma>>8) & 0xf; /* IC39 performs the 4 bit add with the carry input set high */ - int s=(a+b+1)&0xf; + int s = (a+b+1) & 0xf; /* if MA13 (TTXVDU) is low then IC8 and IC9 are used to calculate the memory location required for the hi res video. - if MA13 is hight then IC10 and IC11 are used to calculate the memory location for the teletext chip*/ + if MA13 is high then IC10 and IC11 are used to calculate the memory location for the teletext chip */ unsigned int m; - if ((ma>>13)&1) + if (BIT(ma,13)) { // IC 10 and IC 11 - m=((ma&0x3ff)|0x3c00)|((s&0x8)<<11); + m = ((ma&0x3ff) | 0x3c00) | ((s&0x8)<<11); } else { // IC 8 and IC 9 - m=((ma&0xff)<<3)|(s<<11)|(ra&0x7); + m = ((ma&0xff)<<3) | (s<<11) | (ra&0x7); } - if (m_memorySize==16) + if (m_memorySize == 16) return m & 0x3fff; return m; } +/*************************************************************************** + * Palette + ***************************************************************************/ + +static const rgb_t bbc_palette[8] = +{ + rgb_t(0x0ff, 0x0ff, 0x0ff), + rgb_t(0x000, 0x0ff, 0x0ff), + rgb_t(0x0ff, 0x000, 0x0ff), + rgb_t(0x000, 0x000, 0x0ff), + rgb_t(0x0ff, 0x0ff, 0x000), + rgb_t(0x000, 0x0ff, 0x000), + rgb_t(0x0ff, 0x000, 0x000), + rgb_t(0x000, 0x000, 0x000) +}; + +PALETTE_INIT_MEMBER(bbc_state, bbc) +{ + palette.set_pen_colors(0, bbc_palette, ARRAY_LENGTH(bbc_palette)); +} + /************************************************************************ * VideoULA ************************************************************************/ @@ -101,7 +122,7 @@ void bbc_state::set_pixel_lookup() { for (int i=0; i<256; i++) { - m_pixel_bits[i] = (((i>>7)&1)<<3) | (((i>>5)&1)<<2) | (((i>>3)&1)<<1) | (((i>>1)&1)<<0); + m_pixel_bits[i] = (BIT(i,7)<<3) | (BIT(i,5)<<2) | (BIT(i,3)<<1) | (BIT(i,1)<<0); } } @@ -122,39 +143,36 @@ WRITE8_MEMBER(bbc_state::bbc_videoULA_w) { // Set the control register in the Video ULA case 0: - { - m_videoULA_Reg=data; - m_videoULA_master_cursor_size= (m_videoULA_Reg>>7)&0x01; - m_videoULA_width_of_cursor= (m_videoULA_Reg>>5)&0x03; - m_videoULA_6845_clock_rate= (m_videoULA_Reg>>4)&0x01; - m_videoULA_characters_per_line= (m_videoULA_Reg>>2)&0x03; - m_videoULA_teletext_normal_select=(m_videoULA_Reg>>1)&0x01; - m_videoULA_flash_colour_select= m_videoULA_Reg &0x01; + m_videoULA_Reg = data; + m_videoULA_master_cursor_size = (m_videoULA_Reg>>7)&0x01; + m_videoULA_width_of_cursor = (m_videoULA_Reg>>5)&0x03; + m_videoULA_6845_clock_rate = (m_videoULA_Reg>>4)&0x01; + m_videoULA_characters_per_line = (m_videoULA_Reg>>2)&0x03; + m_videoULA_teletext_normal_select = (m_videoULA_Reg>>1)&0x01; + m_videoULA_flash_colour_select = m_videoULA_Reg &0x01; - m_videoULA_pallet_lookup=m_videoULA_flash_colour_select?m_videoULA_pallet0:m_videoULA_pallet1; + m_videoULA_palette_lookup = m_videoULA_flash_colour_select ? m_videoULA_palette0 : m_videoULA_palette1; - m_emulation_cursor_size=width_of_cursor_set[m_videoULA_width_of_cursor|(m_videoULA_master_cursor_size<<2)]; + m_emulation_cursor_size = width_of_cursor_set[m_videoULA_width_of_cursor | (m_videoULA_master_cursor_size<<2)]; // this is the number of BBC pixels held in each byte if (m_videoULA_teletext_normal_select) - { - m_pixels_per_byte=6; - } else { - m_pixels_per_byte=pixels_per_byte_set[m_videoULA_characters_per_line|(m_videoULA_6845_clock_rate<<2)]; - } + m_pixels_per_byte = 12; + else + m_pixels_per_byte = pixels_per_byte_set[m_videoULA_characters_per_line | (m_videoULA_6845_clock_rate<<2)]; + m_mc6845->set_hpixels_per_column(m_pixels_per_byte); if (m_videoULA_6845_clock_rate) - m_mc6845->set_clock(2000000); + m_mc6845->set_clock(XTAL_16MHz/8); else - m_mc6845->set_clock(1000000); - } + m_mc6845->set_clock(XTAL_16MHz/16); break; - // Set a pallet register in the Video ULA + // Set a palette register in the Video ULA case 1: - int tpal=(data>>4)&0x0f; - int tcol=data&0x0f; - m_videoULA_pallet0[tpal]=tcol; - m_videoULA_pallet1[tpal]=tcol<8?tcol:tcol^7; + int tpal = (data >> 4)&0x0f; + int tcol = data&0x0f; + m_videoULA_palette0[tpal] = tcol; + m_videoULA_palette1[tpal] = tcol<8 ? tcol : tcol^7; break; } } @@ -178,21 +196,21 @@ MC6845_UPDATE_ROW( bbc_state::crtc_update_row ) //Teletext Latch bit 6 is only passed onto bits 6 on the Teletext chip if DE is true //Teletext Latch bit 7 goes to LOSE on the Teletext chip - if (((ma>>13)&1)==0) + if (BIT(ma,13) == 0) { - m_Teletext_Latch=0; + m_Teletext_Latch = 0; } else { - m_Teletext_Latch=(m_BBC_Video_RAM[calculate_video_address(ma+x_pos,ra)]); + m_Teletext_Latch = m_BBC_Video_RAM[calculate_video_address(ma+x_pos,ra)]; } - m_trom->write((m_Teletext_Latch&0x3f)|(m_Teletext_Latch&0x40)); + m_trom->write((m_Teletext_Latch&0x3f) | (m_Teletext_Latch&0x40)); m_trom->f1_w(1); m_trom->f1_w(0); - for(int pixelno=0;pixelno<6;pixelno++) + for(int pixelno=0; pixelno<12; pixelno++) { m_trom->tr6_w(1); m_trom->tr6_w(0); @@ -224,14 +242,14 @@ MC6845_UPDATE_ROW( bbc_state::crtc_update_row ) { for(int x_pos=0; x_pos<x_count; x_pos++) { - int vmem=calculate_video_address(ma+x_pos,ra); - unsigned char i=m_BBC_Video_RAM[vmem]; + int vmem = calculate_video_address(ma+x_pos,ra); + unsigned char i = m_BBC_Video_RAM[vmem]; - for(int pixelno=0;pixelno<m_pixels_per_byte;pixelno++) + for(int pixelno=0; pixelno<m_pixels_per_byte; pixelno++) { - int col=m_videoULA_pallet_lookup[m_pixel_bits[i]] ^ ((x_pos==cursor_x) ? 7 : 0); - bitmap.pix32(y, (x_pos*m_pixels_per_byte)+pixelno)=palette[col]; - i=(i<<1)|1; + int col = m_videoULA_palette_lookup[m_pixel_bits[i]] ^ ((x_pos==cursor_x) ? 7 : 0); + bitmap.pix32(y, (x_pos*m_pixels_per_byte)+pixelno) = palette[col]; + i = (i<<1) | 1; } } } @@ -239,9 +257,9 @@ MC6845_UPDATE_ROW( bbc_state::crtc_update_row ) { for(int x_pos=0; x_pos<x_count; x_pos++) { - for(int pixelno=0;pixelno<m_pixels_per_byte;pixelno++) + for(int pixelno=0; pixelno<m_pixels_per_byte; pixelno++) { - bitmap.pix32(y, (x_pos*m_pixels_per_byte)+pixelno)=palette[7]; + bitmap.pix32(y, (x_pos*m_pixels_per_byte)+pixelno) = palette[7]; } } } @@ -254,16 +272,17 @@ WRITE_LINE_MEMBER(bbc_state::bbc_vsync) } -/**** BBC B+ Shadow Ram change ****/ +/**** BBC B+/Master Shadow Ram change ****/ -void bbc_state::bbcbp_setvideoshadow(int vdusel) +void bbc_state::bbc_setvideoshadow(int vdusel) { + // LYNNE lives at 0xb000 in our map, but the offset we use here is 0x8000 + // as the video circuitry will already be looking at 0x3000 or so above + // the offset. if (vdusel) - { - m_BBC_Video_RAM= m_region_maincpu->base()+0x8000; - } else { - m_BBC_Video_RAM= m_region_maincpu->base(); - } + m_BBC_Video_RAM = m_region_maincpu->base()+0x8000; + else + m_BBC_Video_RAM = m_region_maincpu->base(); } /************************************************************************ @@ -275,13 +294,10 @@ void bbc_state::common_init(int memorySize) { m_emulation_cursor_size = 1; - m_VideoULA_CR = 7; - m_VideoULA_CR_counter = 0; - set_pixel_lookup(); m_BBC_Video_RAM = m_region_maincpu->base(); - m_memorySize=memorySize; + m_memorySize = memorySize; } diff --git a/src/mame/video/btoads.c b/src/mame/video/btoads.c index 8dbdec15400..4d55df20460 100644 --- a/src/mame/video/btoads.c +++ b/src/mame/video/btoads.c @@ -93,7 +93,8 @@ WRITE16_MEMBER( btoads_state::display_control_w ) WRITE16_MEMBER( btoads_state::scroll0_w ) { /* allow multiple changes during display */ - m_screen->update_now(); +// m_screen->update_now(); + m_screen->update_partial(m_screen->vpos()); /* upper bits are Y scroll, lower bits are X scroll */ if (ACCESSING_BITS_8_15) @@ -106,7 +107,8 @@ WRITE16_MEMBER( btoads_state::scroll0_w ) WRITE16_MEMBER( btoads_state::scroll1_w ) { /* allow multiple changes during display */ - m_screen->update_now(); +// m_screen->update_now(); + m_screen->update_partial(m_screen->vpos()); /* upper bits are Y scroll, lower bits are X scroll */ if (ACCESSING_BITS_8_15) diff --git a/src/mame/video/champbas.c b/src/mame/video/champbas.c index ac60f292273..1b23dd3ba1e 100644 --- a/src/mame/video/champbas.c +++ b/src/mame/video/champbas.c @@ -1,5 +1,11 @@ // license:BSD-3-Clause -// copyright-holders:Ernesto Corvi, Jarek Parchanski, Nicola Salmoria +// copyright-holders:Ernesto Corvi, Jarek Parchanski, Nicola Salmoria, hap +/************************************************************************* + + Talbot - Champion Base Ball - Exciting Soccer + +*************************************************************************/ + #include "emu.h" #include "video/resnet.h" #include "includes/champbas.h" @@ -28,7 +34,6 @@ PALETTE_INIT_MEMBER(champbas_state,champbas) static const int resistances_rg[3] = { 1000, 470, 220 }; static const int resistances_b [2] = { 470, 220 }; double rweights[3], gweights[3], bweights[2]; - int i; /* compute the color output resistor weights */ compute_resistor_weights(0, 255, -1.0, @@ -37,7 +42,7 @@ PALETTE_INIT_MEMBER(champbas_state,champbas) 2, &resistances_b[0], bweights, 0, 0); /* create a lookup table for the palette */ - for (i = 0; i < 0x20; i++) + for (int i = 0; i < 0x20; i++) { int bit0, bit1, bit2; int r, g, b; @@ -64,7 +69,7 @@ PALETTE_INIT_MEMBER(champbas_state,champbas) color_prom += 0x20; - for (i = 0; i < 0x200; i++) + for (int i = 0; i < 0x200; i++) { UINT8 ctabentry = (color_prom[i & 0xff] & 0x0f) | ((i & 0x100) >> 4); palette.set_pen_indirect(i, ctabentry); @@ -75,10 +80,9 @@ PALETTE_INIT_MEMBER(champbas_state,champbas) PALETTE_INIT_MEMBER(champbas_state,exctsccr) { const UINT8 *color_prom = memregion("proms")->base(); - int i; /* create a lookup table for the palette */ - for (i = 0; i < 0x20; i++) + for (int i = 0; i < 0x20; i++) { int bit0, bit1, bit2; int r, g, b; @@ -108,7 +112,7 @@ PALETTE_INIT_MEMBER(champbas_state,exctsccr) color_prom += 0x20; /* characters / sprites (3bpp) */ - for (i = 0; i < 0x100; i++) + for (int i = 0; i < 0x100; i++) { int swapped_i = BITSWAP8(i, 2, 7, 6, 5, 4, 3, 1, 0); UINT8 ctabentry = (color_prom[swapped_i] & 0x0f) | ((i & 0x80) >> 3); @@ -116,7 +120,7 @@ PALETTE_INIT_MEMBER(champbas_state,exctsccr) } /* sprites (4bpp) */ - for (i = 0; i < 0x100; i++) + for (int i = 0; i < 0x100; i++) { UINT8 ctabentry = (color_prom[0x100 + i] & 0x0f) | 0x10; palette.set_pen_indirect(i + 0x100, ctabentry); @@ -127,16 +131,16 @@ PALETTE_INIT_MEMBER(champbas_state,exctsccr) TILE_GET_INFO_MEMBER(champbas_state::champbas_get_bg_tile_info) { - int code = m_bg_videoram[tile_index] | (m_gfx_bank << 8); - int color = (m_bg_videoram[tile_index + 0x400] & 0x1f) | 0x20; + int code = m_vram[tile_index] | (m_gfx_bank << 8); + int color = (m_vram[tile_index + 0x400] & 0x1f) | 0x20; SET_TILE_INFO_MEMBER(0, code, color, 0); } TILE_GET_INFO_MEMBER(champbas_state::exctsccr_get_bg_tile_info) { - int code = m_bg_videoram[tile_index] | (m_gfx_bank << 8); - int color = m_bg_videoram[tile_index + 0x400] & 0x0f; + int code = m_vram[tile_index] | (m_gfx_bank << 8); + int color = m_vram[tile_index + 0x400] & 0x0f; SET_TILE_INFO_MEMBER(0, code, color, 0); } @@ -155,15 +159,16 @@ VIDEO_START_MEMBER(champbas_state,exctsccr) -WRITE8_MEMBER(champbas_state::champbas_bg_videoram_w) +WRITE8_MEMBER(champbas_state::tilemap_w) { - m_bg_videoram[offset] = data; + m_vram[offset] = data; m_bg_tilemap->mark_tile_dirty(offset & 0x3ff); } -WRITE8_MEMBER(champbas_state::champbas_gfxbank_w) +WRITE8_MEMBER(champbas_state::gfxbank_w) { data &= 1; + if (m_gfx_bank != data) { m_gfx_bank = data; @@ -171,101 +176,93 @@ WRITE8_MEMBER(champbas_state::champbas_gfxbank_w) } } -WRITE8_MEMBER(champbas_state::champbas_palette_bank_w) +WRITE8_MEMBER(champbas_state::palette_bank_w) { m_palette_bank = data & 1; m_bg_tilemap->set_palette_offset(m_palette_bank << 8); } -WRITE8_MEMBER(champbas_state::champbas_flipscreen_w) +WRITE8_MEMBER(champbas_state::flipscreen_w) { flip_screen_set(~data & 1); } -void champbas_state::champbas_draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect ) +void champbas_state::champbas_draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect) { - int offs; gfx_element* const gfx = m_gfxdecode->gfx(1); + assert (m_spriteram.bytes() == 0x10); - for (offs = m_spriteram.bytes() - 2; offs >= 0; offs -= 2) + for (int offs = 0x10-2; offs >= 0; offs -= 2) { - int code = (m_spriteram[offs] >> 2) | (m_gfx_bank << 6); - int color = (m_spriteram[offs + 1] & 0x1f) | (m_palette_bank << 6); - int flipx = ~m_spriteram[offs] & 0x01; - int flipy = ~m_spriteram[offs] & 0x02; - int sx = m_spriteram_2[offs + 1] - 16; - int sy = 255 - m_spriteram_2[offs]; - - - gfx->transmask(bitmap,cliprect, - code, color, - flipx, flipy, - sx, sy, - m_palette->transpen_mask(*gfx, color, 0)); + // spriteram holds x/y data + int sx = m_spriteram[offs + 1] - 16; + int sy = 255 - m_spriteram[offs]; + + // attribute data is from last section of mainram + UINT8 *attr = &(m_mainram[0x7f0]); + int code = (attr[offs] >> 2 & 0x3f) | (m_gfx_bank << 6); + int color = (attr[offs + 1] & 0x1f) | (m_palette_bank << 6); + int flipx = ~attr[offs] & 1; + int flipy = ~attr[offs] & 2; + + gfx->transmask(bitmap, cliprect, + code, color, + flipx, flipy, + sx, sy, + m_palette->transpen_mask(*gfx, color, 0)); // wraparound - - gfx->transmask(bitmap,cliprect, - code, color, - flipx, flipy, - sx + 256, sy, - m_palette->transpen_mask(*gfx, color, 0)); + gfx->transmask(bitmap, cliprect, + code, color, + flipx, flipy, + sx + 256, sy, + m_palette->transpen_mask(*gfx, color, 0)); } } -void champbas_state::exctsccr_draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect ) +void champbas_state::exctsccr_draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect) { - int offs; - UINT8 *obj1, *obj2; + gfx_element* const gfx1 = m_gfxdecode->gfx(1); + gfx_element* const gfx2 = m_gfxdecode->gfx(2); + assert (m_spriteram.bytes() == 0x10); - obj1 = m_bg_videoram; - obj2 = &(m_spriteram[0x20]); - - for (offs = 0x0e; offs >= 0; offs -= 2) + for (int offs = 0x10-2; offs >= 0; offs -= 2) { - int sx, sy, code, bank, flipx, flipy, color; - - sx = obj2[offs + 1] - 16; - sy = 255 - obj2[offs]; - - code = (obj1[offs] >> 2) & 0x3f; - flipx = (~obj1[offs]) & 0x01; - flipy = (~obj1[offs]) & 0x02; - color = (obj1[offs + 1]) & 0x0f; - bank = ((obj1[offs + 1] >> 4) & 1); - - - m_gfxdecode->gfx(1)->transpen(bitmap,cliprect, - code + (bank << 6), - color, - flipx, flipy, - sx,sy,0); + // spriteram holds x/y data + int sx = m_spriteram[offs + 1] - 16; + int sy = 255 - m_spriteram[offs]; + + // attribute data is from videoram + int code = (m_vram[offs] >> 2 & 0x3f) | (m_vram[offs + 1] << 2 & 0x40); + int flipx = ~m_vram[offs] & 1; + int flipy = ~m_vram[offs] & 2; + int color = m_vram[offs + 1] & 0xf; + + gfx1->transpen(bitmap, cliprect, + code, color, + flipx, flipy, + sx, sy, 0); } - obj1 = m_spriteram_2; - obj2 = m_spriteram; - - for (offs = 0x0e; offs >= 0; offs -= 2) + for (int offs = 0x10-2; offs >= 0; offs -= 2) { - int sx, sy, code, flipx, flipy, color; - - sx = obj2[offs + 1] - 16; - sy = 255 - obj2[offs]; - - code = (obj1[offs] >> 2) & 0x3f; - flipx = (~obj1[offs]) & 0x01; - flipy = (~obj1[offs]) & 0x02; - color = (obj1[offs + 1]) & 0x0f; - - - m_gfxdecode->gfx(2)->transmask(bitmap,cliprect, - code, - color, - flipx, flipy, - sx,sy, - m_palette->transpen_mask(*m_gfxdecode->gfx(2), color, 0x10)); + // spriteram2 holds x/y data + int sx = m_spriteram2[offs + 1] - 16; + int sy = 255 - m_spriteram2[offs]; + + // attribute data is from mainram + int code = m_mainram[offs] >> 2 & 0x3f; + int flipx = ~m_mainram[offs] & 1; + int flipy = ~m_mainram[offs] & 2; + int color = m_mainram[offs + 1] & 0xf; + + gfx2->transmask(bitmap, cliprect, + code, color, + flipx, flipy, + sx, sy, + m_palette->transpen_mask(*gfx2, color, 0x10)); } } diff --git a/src/mame/video/chihiro.c b/src/mame/video/chihiro.c index 2619558adf8..732d5b86d21 100644 --- a/src/mame/video/chihiro.c +++ b/src/mame/video/chihiro.c @@ -6,7 +6,7 @@ #include "machine/pic8259.h" #include "includes/chihiro.h" -//#define LOG_NV2A +// #define LOG_NV2A const char *vertex_program_disassembler::srctypes[] = { "??", "Rn", "Vn", "Cn" }; const char *vertex_program_disassembler::scaops[] = { "NOP", "IMV", "RCP", "RCC", "RSQ", "EXP", "LOG", "LIT", "???", "???", "???", "???", "???", "???", "???", "???", "???" }; @@ -2335,6 +2335,8 @@ void nv2a_renderer::clear_depth_buffer(int what, UINT32 value) { int m; + if (what == 0) + return; m = antialias_control; if (antialiasing_rendertarget != 0) m = 2; @@ -2487,7 +2489,7 @@ int nv2a_renderer::geforce_exec_method(address_space & space, UINT32 chanel, UIN } } else { - logerror("Unsupported primitive %d for method 0x1810\n", type); + machine().logerror("Unsupported primitive %d for method 0x1810\n", type); } countlen--; } @@ -2608,7 +2610,7 @@ int nv2a_renderer::geforce_exec_method(address_space & space, UINT32 chanel, UIN } } else { - logerror("Unsupported primitive %d for method 0x1800/8\n", type); + machine().logerror("Unsupported primitive %d for method 0x1800/8\n", type); countlen = 0; } while (countlen > 0) { @@ -2656,7 +2658,7 @@ int nv2a_renderer::geforce_exec_method(address_space & space, UINT32 chanel, UIN convert_vertices_poly(vert, xy, 2); countlen = countlen - c; if (countlen < 0) { - logerror("Method 0x1818 missing %d words to draw a complete primitive\n", -countlen); + machine().logerror("Method 0x1818 missing %d words to draw a complete primitive\n", -countlen); countlen = 0; return 0; } @@ -2665,7 +2667,7 @@ int nv2a_renderer::geforce_exec_method(address_space & space, UINT32 chanel, UIN c = read_vertices_0x1818(space, vert + ((n & 1) + 1), address, 1); countlen = countlen - c; if (countlen < 0) { - logerror("Method 0x1818 missing %d words to draw a complete primitive\n", -countlen); + machine().logerror("Method 0x1818 missing %d words to draw a complete primitive\n", -countlen); countlen = 0; break; } @@ -2685,7 +2687,7 @@ int nv2a_renderer::geforce_exec_method(address_space & space, UINT32 chanel, UIN convert_vertices_poly(vert, xy, 3); countlen = countlen - c; if (countlen < 0) { - logerror("Method 0x1818 missing %d words to draw a complete primitive\n", -countlen); + machine().logerror("Method 0x1818 missing %d words to draw a complete primitive\n", -countlen); countlen = 0; break; } @@ -2703,7 +2705,7 @@ int nv2a_renderer::geforce_exec_method(address_space & space, UINT32 chanel, UIN convert_vertices_poly(vert, xy, 2); countlen = countlen - c; if (countlen < 0) { - logerror("Method 0x1818 missing %d words to draw a complete primitive\n", -countlen); + machine().logerror("Method 0x1818 missing %d words to draw a complete primitive\n", -countlen); countlen = 0; return 0; } @@ -2713,7 +2715,7 @@ int nv2a_renderer::geforce_exec_method(address_space & space, UINT32 chanel, UIN convert_vertices_poly(vert + ((n + 2) & 3), xy + ((n + 2) & 3), 1); countlen = countlen - c; if (countlen < 0) { - logerror("Method 0x1818 missing %d words to draw a complete primitive\n", -countlen); + machine().logerror("Method 0x1818 missing %d words to draw a complete primitive\n", -countlen); countlen = 0; break; } @@ -2732,7 +2734,7 @@ int nv2a_renderer::geforce_exec_method(address_space & space, UINT32 chanel, UIN convert_vertices_poly(vert, xy, 4); countlen = countlen - c; if (countlen < 0) { - logerror("Method 0x1818 missing %d words to draw a complete primitive\n", -countlen); + machine().logerror("Method 0x1818 missing %d words to draw a complete primitive\n", -countlen); countlen = 0; break; } @@ -2750,7 +2752,7 @@ int nv2a_renderer::geforce_exec_method(address_space & space, UINT32 chanel, UIN convert_vertices_poly(vert, xy, 2); countlen = countlen - c; if (countlen < 0) { - logerror("Method 0x1818 missing %d words to draw a complete primitive\n", -countlen); + machine().logerror("Method 0x1818 missing %d words to draw a complete primitive\n", -countlen); countlen = 0; return 0; } @@ -2760,7 +2762,7 @@ int nv2a_renderer::geforce_exec_method(address_space & space, UINT32 chanel, UIN convert_vertices_poly(vert + ((n + 2) & 3), xy + ((n + 2) & 3), 2); countlen = countlen - c; if (countlen < 0) { - logerror("Method 0x1818 missing %d words to draw a complete primitive\n", -countlen); + machine().logerror("Method 0x1818 missing %d words to draw a complete primitive\n", -countlen); countlen = 0; return 0; } @@ -2771,7 +2773,7 @@ int nv2a_renderer::geforce_exec_method(address_space & space, UINT32 chanel, UIN } } else { - logerror("Unsupported primitive %d for method 0x1818\n", type); + machine().logerror("Unsupported primitive %d for method 0x1818\n", type); countlen = 0; } } @@ -2920,7 +2922,7 @@ int nv2a_renderer::geforce_exec_method(address_space & space, UINT32 chanel, UIN bytespixel_rendertarget = 1; break; default: - logerror("Unknown render target color format %d\n\r", colorformat_rendertarget); + machine().logerror("Unknown render target color format %d\n\r", colorformat_rendertarget); bytespixel_rendertarget = 4; break; } @@ -3124,10 +3126,10 @@ int nv2a_renderer::geforce_exec_method(address_space & space, UINT32 chanel, UIN if (f) { written = (int)fwrite(texture[unit].buffer, texture[unit].sizeu*texture[unit].sizev * 4, 1, f); fclose(f); - logerror("Written %d bytes of texture to specified file\n", written); + machine().logerror("Written %d bytes of texture to specified file\n", written); } else - logerror("Unable to save texture to specified file\n"); + machine().logerror("Unable to save texture to specified file\n"); } } if (maddress == 0x1b0c) { @@ -3179,42 +3181,42 @@ int nv2a_renderer::geforce_exec_method(address_space & space, UINT32 chanel, UIN // Vertex program (shader) if (maddress == 0x1e94) { /*if (data == 2) - logerror("Enabled vertex program\n"); + machine().logerror("Enabled vertex program\n"); else if (data == 4) - logerror("Enabled fixed function pipeline\n"); + machine().logerror("Enabled fixed function pipeline\n"); else if (data == 6) - logerror("Enabled both fixed function pipeline and vertex program ?\n"); + machine().logerror("Enabled both fixed function pipeline and vertex program ?\n"); else - logerror("Unknown value %d to method 0x1e94\n",data);*/ + machine().logerror("Unknown value %d to method 0x1e94\n",data);*/ vertex_pipeline = data & 6; countlen--; } if (maddress == 0x1e9c) { - //logerror("VP_UPLOAD_FROM_ID %d\n",data); + //machine().logerror("VP_UPLOAD_FROM_ID %d\n",data); vertexprogram.upload_instruction_index = data; vertexprogram.upload_instruction_component = 0; countlen--; } if (maddress == 0x1ea0) { - //logerror("VP_START_FROM_ID %d\n",data); + //machine().logerror("VP_START_FROM_ID %d\n",data); vertexprogram.instructions = vertexprogram.upload_instruction_index; vertexprogram.start_instruction = data; countlen--; } if (maddress == 0x1ea4) { - //logerror("VP_UPLOAD_CONST_ID %d\n",data); + //machine().logerror("VP_UPLOAD_CONST_ID %d\n",data); vertexprogram.upload_parameter_index = data; vertexprogram.upload_parameter_component = 0; countlen--; } if ((maddress >= 0x0b00) && (maddress < 0x0b80)) { - //logerror("VP_UPLOAD_INST\n"); + //machine().logerror("VP_UPLOAD_INST\n"); if (vertexprogram.upload_instruction_index < 192) { vertexprogram.exec.op[vertexprogram.upload_instruction_index].i[vertexprogram.upload_instruction_component] = data; vertexprogram.exec.op[vertexprogram.upload_instruction_index].modified |= (1 << vertexprogram.upload_instruction_component); } else - logerror("Need to increase size of vertexprogram.instruction to %d\n\r", vertexprogram.upload_instruction_index); + machine().logerror("Need to increase size of vertexprogram.instruction to %d\n\r", vertexprogram.upload_instruction_index); if (vertexprogram.exec.op[vertexprogram.upload_instruction_index].modified == 15) { vertexprogram.exec.op[vertexprogram.upload_instruction_index].modified = 0; vertexprogram.exec.decode_instruction(vertexprogram.upload_instruction_index); @@ -3226,11 +3228,11 @@ int nv2a_renderer::geforce_exec_method(address_space & space, UINT32 chanel, UIN } } if ((maddress >= 0x0b80) && (maddress < 0x0c00)) { - //logerror("VP_UPLOAD_CONST\n"); + //machine().logerror("VP_UPLOAD_CONST\n"); if (vertexprogram.upload_parameter_index < 256) vertexprogram.exec.c_constant[vertexprogram.upload_parameter_index].iv[vertexprogram.upload_parameter_component] = data; else - logerror("Need to increase size of vertexprogram.parameter to %d\n\r", vertexprogram.upload_parameter_index); + machine().logerror("Need to increase size of vertexprogram.parameter to %d\n\r", vertexprogram.upload_parameter_index); vertexprogram.upload_parameter_component++; if (vertexprogram.upload_parameter_component >= 4) { vertexprogram.upload_parameter_component = 0; @@ -4025,16 +4027,12 @@ TIMER_CALLBACK_MEMBER(nv2a_renderer::puller_timer_work) int countlen; int ret; address_space *space = puller_space; -#ifdef LOG_NV2A UINT32 subch; -#endif chanel = puller_channel; subchannel = puller_subchannel; dmaput = &channel[chanel][subchannel].regs[0x40 / 4]; dmaget = &channel[chanel][subchannel].regs[0x44 / 4]; - chanel = puller_channel; - subchannel = puller_subchannel; while (*dmaget != *dmaput) { cmd = space->read_dword(*dmaget); *dmaget += 4; @@ -4052,30 +4050,31 @@ TIMER_CALLBACK_MEMBER(nv2a_renderer::puller_timer_work) break; case 0: // increasing method method = (cmd >> 2) & 2047; // method*4 is address // if method >= 0x40 send it to assigned object -#ifdef LOG_NV2A subch = (cmd >> 13) & 7; -#endif count = (cmd >> 18) & 2047; if ((method == 0) && (count == 1)) { handle = space->read_dword(*dmaget); handle = geforce_object_offset(handle); #ifdef LOG_NV2A - logerror(" assign to subchannel %d object at %d\n", subch, handle); + machine().logerror(" assign to subchannel %d object at %d", subch, handle); #endif - channel[chanel][subchannel].object.objhandle = handle; + channel[chanel][subch].object.objhandle = handle; handle = ramin[handle / 4]; objclass = handle & 0xff; - channel[chanel][subchannel].object.objclass = objclass; +#ifdef LOG_NV2A + machine().logerror(" class %03X\n", objclass); +#endif + channel[chanel][subch].object.objclass = objclass; *dmaget += 4; } else { #ifdef LOG_NV2A - logerror(" subch. %d method %04x offset %04x count %d\n", subch, method, method * 4, count); + machine().logerror(" subch. %d method %04x offset %04x count %d\n", subch, method, method * 4, count); #endif ret = 0; while (count > 0) { countlen = 1; - ret=geforce_exec_method(*space, chanel, subchannel, method, *dmaget, countlen); + ret=geforce_exec_method(*space, chanel, subch, method, *dmaget, countlen); count--; method++; *dmaget += 4; @@ -4091,32 +4090,30 @@ TIMER_CALLBACK_MEMBER(nv2a_renderer::puller_timer_work) break; case 5: // non-increasing method method = (cmd >> 2) & 2047; -#ifdef LOG_NV2A subch = (cmd >> 13) & 7; -#endif count = (cmd >> 18) & 2047; if ((method == 0) && (count == 1)) { -#ifdef LOG_NV2A - logerror(" assign channel %d\n", subch); -#endif handle = space->read_dword(*dmaget); handle = geforce_object_offset(handle); #ifdef LOG_NV2A - logerror(" assign to subchannel %d object at %d\n", subch, handle); + machine().logerror(" assign to subchannel %d object at %d", subch, handle); #endif - channel[chanel][subchannel].object.objhandle = handle; + channel[chanel][subch].object.objhandle = handle; handle = ramin[handle / 4]; objclass = handle & 0xff; - channel[chanel][subchannel].object.objclass = objclass; +#ifdef LOG_NV2A + machine().logerror(" class %03X\n", objclass); +#endif + channel[chanel][subch].object.objclass = objclass; *dmaget += 4; } else { #ifdef LOG_NV2A - logerror(" subch. %d method %04x offset %04x count %d\n", subch, method, method * 4, count); + machine().logerror(" subch. %d method %04x offset %04x count %d\n", subch, method, method * 4, count); #endif while (count > 0) { countlen = count; - ret=geforce_exec_method(*space, chanel, subchannel, method, *dmaget, countlen); + ret=geforce_exec_method(*space, chanel, subch, method, *dmaget, countlen); *dmaget += 4 * (count - countlen); count = countlen; } @@ -4124,37 +4121,38 @@ TIMER_CALLBACK_MEMBER(nv2a_renderer::puller_timer_work) break; case 3: // long non-increasing method method = (cmd >> 2) & 2047; -#ifdef LOG_NV2A subch = (cmd >> 13) & 7; -#endif count = space->read_dword(*dmaget); *dmaget += 4; if ((method == 0) && (count == 1)) { handle = space->read_dword(*dmaget); handle = geforce_object_offset(handle); #ifdef LOG_NV2A - logerror(" assign to subchannel %d object at %d\n", subch, handle); + machine().logerror(" assign to subchannel %d object at %d", subch, handle); #endif - channel[chanel][subchannel].object.objhandle = handle; + channel[chanel][subch].object.objhandle = handle; handle = ramin[handle / 4]; objclass = handle & 0xff; - channel[chanel][subchannel].object.objclass = objclass; +#ifdef LOG_NV2A + machine().logerror(" class %03X\n", objclass); +#endif + channel[chanel][subch].object.objclass = objclass; *dmaget += 4; } else { #ifdef LOG_NV2A - logerror(" subch. %d method %04x offset %04x count %d\n", subch, method, method * 4, count); + machine().logerror(" subch. %d method %04x offset %04x count %d\n", subch, method, method * 4, count); #endif while (count > 0) { countlen = count; - ret=geforce_exec_method(*space, chanel, subchannel, method, *dmaget, countlen); + ret=geforce_exec_method(*space, chanel, subch, method, *dmaget, countlen); *dmaget += 4 * (count - countlen); count = countlen; } } break; default: - logerror(" unimplemented command %08X\n", cmd); + machine().logerror(" unimplemented command %08X\n", cmd); } } } @@ -4169,30 +4167,30 @@ READ32_MEMBER(nv2a_renderer::geforce_r) ret = x; } if ((offset >= 0x00101000 / 4) && (offset < 0x00102000 / 4)) { - //logerror("NV_2A: read STRAPS[%06X] mask %08X value %08X\n",offset*4-0x00101000,mem_mask,ret); + //machine().logerror("NV_2A: read STRAPS[%06X] mask %08X value %08X\n",offset*4-0x00101000,mem_mask,ret); } else if ((offset >= 0x00002000 / 4) && (offset < 0x00004000 / 4)) { ret = pfifo[offset - 0x00002000 / 4]; // PFIFO.CACHE1.STATUS or PFIFO.RUNOUT_STATUS if ((offset == 0x3214 / 4) || (offset == 0x2400 / 4)) ret = 0x10; - //logerror("NV_2A: read PFIFO[%06X] value %08X\n",offset*4-0x00002000,ret); + //machine().logerror("NV_2A: read PFIFO[%06X] value %08X\n",offset*4-0x00002000,ret); } else if ((offset >= 0x00700000 / 4) && (offset < 0x00800000 / 4)) { ret = ramin[offset - 0x00700000 / 4]; - //logerror("NV_2A: read PRAMIN[%06X] value %08X\n",offset*4-0x00700000,ret); + //machine().logerror("NV_2A: read PRAMIN[%06X] value %08X\n",offset*4-0x00700000,ret); } else if ((offset >= 0x00400000 / 4) && (offset < 0x00402000 / 4)) { ret = pgraph[offset - 0x00400000 / 4]; - //logerror("NV_2A: read PGRAPH[%06X] value %08X\n",offset*4-0x00400000,ret); + //machine().logerror("NV_2A: read PGRAPH[%06X] value %08X\n",offset*4-0x00400000,ret); } else if ((offset >= 0x00600000 / 4) && (offset < 0x00601000 / 4)) { ret = pcrtc[offset - 0x00600000 / 4]; - //logerror("NV_2A: read PCRTC[%06X] value %08X\n",offset*4-0x00600000,ret); + //machine().logerror("NV_2A: read PCRTC[%06X] value %08X\n",offset*4-0x00600000,ret); } else if ((offset >= 0x00000000 / 4) && (offset < 0x00001000 / 4)) { ret = pmc[offset - 0x00000000 / 4]; - //logerror("NV_2A: read PMC[%06X] value %08X\n",offset*4-0x00000000,ret); + //machine().logerror("NV_2A: read PMC[%06X] value %08X\n",offset*4-0x00000000,ret); } else if ((offset >= 0x00800000 / 4) && (offset < 0x00900000 / 4)) { // 32 channels size 0x10000 each, 8 subchannels per channel size 0x2000 each @@ -4204,10 +4202,10 @@ READ32_MEMBER(nv2a_renderer::geforce_r) suboffset = suboffset & 0x7ff; if (suboffset < 0x80 / 4) ret = channel[chanel][subchannel].regs[suboffset]; - //logerror("NV_2A: read channel[%02X,%d,%04X]=%08X\n",chanel,subchannel,suboffset*4,ret); + //machine().logerror("NV_2A: read channel[%02X,%d,%04X]=%08X\n",chanel,subchannel,suboffset*4,ret); return ret; } - //logerror("NV_2A: read at %08X mask %08X value %08X\n",0xfd000000+offset*4,mem_mask,ret); + //machine().logerror("NV_2A: read at %08X mask %08X value %08X\n",0xfd000000+offset*4,mem_mask,ret); return ret; } @@ -4218,21 +4216,21 @@ WRITE32_MEMBER(nv2a_renderer::geforce_w) update_int = false; if ((offset >= 0x00101000 / 4) && (offset < 0x00102000 / 4)) { - //logerror("NV_2A: write STRAPS[%06X] mask %08X value %08X\n",offset*4-0x00101000,mem_mask,data); + //machine().logerror("NV_2A: write STRAPS[%06X] mask %08X value %08X\n",offset*4-0x00101000,mem_mask,data); } else if ((offset >= 0x00002000 / 4) && (offset < 0x00004000 / 4)) { int e = offset - 0x00002000 / 4; if (e >= (sizeof(pfifo) / sizeof(UINT32))) return; COMBINE_DATA(pfifo + e); - //logerror("NV_2A: read PFIFO[%06X]=%08X\n",offset*4-0x00002000,data & mem_mask); // 2210 pfifo ramht & 1f0 << 12 + //machine().logerror("NV_2A: read PFIFO[%06X]=%08X\n",offset*4-0x00002000,data & mem_mask); // 2210 pfifo ramht & 1f0 << 12 } else if ((offset >= 0x00700000 / 4) && (offset < 0x00800000 / 4)) { int e = offset - 0x00700000 / 4; if (e >= (sizeof(ramin) / sizeof(UINT32))) return; COMBINE_DATA(ramin + e); - //logerror("NV_2A: write PRAMIN[%06X]=%08X\n",offset*4-0x00700000,data & mem_mask); + //machine().logerror("NV_2A: write PRAMIN[%06X]=%08X\n",offset*4-0x00700000,data & mem_mask); } else if ((offset >= 0x00400000 / 4) && (offset < 0x00402000 / 4)) { int e = offset - 0x00400000 / 4; @@ -4257,7 +4255,7 @@ WRITE32_MEMBER(nv2a_renderer::geforce_w) } if ((e >= 0x900 / 4) && (e < 0xa00 / 4)) pgraph[e] = 0; - //logerror("NV_2A: write PGRAPH[%06X]=%08X\n",offset*4-0x00400000,data & mem_mask); + //machine().logerror("NV_2A: write PGRAPH[%06X]=%08X\n",offset*4-0x00400000,data & mem_mask); } else if ((offset >= 0x00600000 / 4) && (offset < 0x00601000 / 4)) { int e = offset - 0x00600000 / 4; @@ -4277,14 +4275,14 @@ WRITE32_MEMBER(nv2a_renderer::geforce_w) printf("crtc buffer %08X\n\r", data); #endif } - //logerror("NV_2A: write PCRTC[%06X]=%08X\n",offset*4-0x00600000,data & mem_mask); + //machine().logerror("NV_2A: write PCRTC[%06X]=%08X\n",offset*4-0x00600000,data & mem_mask); } else if ((offset >= 0x00000000 / 4) && (offset < 0x00001000 / 4)) { int e = offset - 0x00000000 / 4; if (e >= (sizeof(pmc) / sizeof(UINT32))) return; COMBINE_DATA(pmc + e); - //logerror("NV_2A: write PMC[%06X]=%08X\n",offset*4-0x00000000,data & mem_mask); + //machine().logerror("NV_2A: write PMC[%06X]=%08X\n",offset*4-0x00000000,data & mem_mask); } else if ((offset >= 0x00800000 / 4) && (offset < 0x00900000 / 4)) { // 32 channels size 0x10000 each, 8 subchannels per channel size 0x2000 each @@ -4295,7 +4293,7 @@ WRITE32_MEMBER(nv2a_renderer::geforce_w) chanel = (suboffset >> (16 - 2)) & 31; subchannel = (suboffset >> (13 - 2)) & 7; suboffset = suboffset & 0x7ff; - //logerror("NV_2A: write channel[%02X,%d,%04X]=%08X\n",chanel,subchannel,suboffset*4,data & mem_mask); + //machine().logerror("NV_2A: write channel[%02X,%d,%04X]=%08X\n",chanel,subchannel,suboffset*4,data & mem_mask); if (suboffset >= 0x80 / 4) return; COMBINE_DATA(&channel[chanel][subchannel].regs[suboffset]); @@ -4323,7 +4321,7 @@ WRITE32_MEMBER(nv2a_renderer::geforce_w) } } //else - // logerror("NV_2A: write at %08X mask %08X value %08X\n",0xfd000000+offset*4,mem_mask,data); + // machine().logerror("NV_2A: write at %08X mask %08X value %08X\n",0xfd000000+offset*4,mem_mask,data); if (update_int == true) { if (update_interrupts() == true) interruptdevice->ir3_w(1); // IRQ 3 diff --git a/src/mame/video/cloak.c b/src/mame/video/cloak.c index f9138f25970..7b06f7d9efe 100644 --- a/src/mame/video/cloak.c +++ b/src/mame/video/cloak.c @@ -92,7 +92,9 @@ void cloak_state::set_current_bitmap_videoram_pointer() WRITE8_MEMBER(cloak_state::cloak_clearbmp_w) { - m_screen->update_now(); +// m_screen->update_now(); + m_screen->update_partial(m_screen->vpos()); + m_bitmap_videoram_selected = data & 0x01; set_current_bitmap_videoram_pointer(); diff --git a/src/mame/video/cps1.c b/src/mame/video/cps1.c index 7c00601d2bf..5cdce079979 100644 --- a/src/mame/video/cps1.c +++ b/src/mame/video/cps1.c @@ -22,7 +22,8 @@ Known A-board revisions: Game Year B-board # B-board PALs C-board # CPS-B # C-board PALs ----------------------------------------------------------- ---- --------- --------------------- ----------- ----------------------- ------------ -Forgotten Worlds (World) 1988 88621B-2 LW621 LWIO None CPS-B-01 DL-0411-10001 N/A +Forgotten Worlds (World, newer) 1988 88621B-2 LW621 LWIO None CPS-B-01 DL-0411-10001 N/A +Forgotten Worlds (World) 88621B-2 LW621 LWIO None CPS-B-01 DL-0411-10001 N/A Forgotten Worlds (USA, B-Board 88618B-2, Rev. A) 88618B-2 LWCHR LWIO None CPS-B-01 DL-0411-10001 N/A Forgotten Worlds (USA, B-Board 88618B-2, Rev. AA) 88618B-2 LWCHR LWIO None CPS-B-01 DL-0411-10001 N/A Forgotten Worlds (USA, B-Board 88618B-2, Rev. C) 88618B-2 LWCHR LWIO None CPS-B-01 DL-0411-10001 N/A @@ -1388,6 +1389,7 @@ static const struct CPS1config cps1_config_table[]= { /* name CPSB gfx mapper in2 in3 out2 kludge */ {"forgottn", CPS_B_01, mapper_LW621 }, + {"forgottna", CPS_B_01, mapper_LW621 }, {"forgottnu", CPS_B_01, mapper_LW621 }, {"forgottnu1", CPS_B_01, mapper_LWCHR }, {"forgottnua", CPS_B_01, mapper_LWCHR }, diff --git a/src/mame/video/decbac06.c b/src/mame/video/decbac06.c index 8f2d6647e67..3bbd98b9002 100644 --- a/src/mame/video/decbac06.c +++ b/src/mame/video/decbac06.c @@ -72,7 +72,11 @@ deco_bac06_device::deco_bac06_device(const machine_config &mconfig, const char * m_pf_data(NULL), m_pf_rowscroll(NULL), m_pf_colscroll(NULL), - m_tile_region(0), + m_tile_region_8(0), + m_tile_region_16(0), + m_supports_8x8(true), + m_supports_16x16(true), + m_supports_rc_scroll(true), m_gfxcolmask(0), m_rambank(0), m_gfxregion8x8(0), @@ -171,7 +175,7 @@ TILE_GET_INFO_MEMBER(deco_bac06_device::get_pf8x8_tile_info) if (m_rambank&1) tile_index+=0x1000; int tile=m_pf_data[tile_index]; int colourpri=(tile>>12); - SET_TILE_INFO_MEMBER(m_tile_region,tile&0xfff,0,0); + SET_TILE_INFO_MEMBER(m_tile_region_8,tile&0xfff,0,0); tileinfo.category = colourpri; } @@ -180,19 +184,19 @@ TILE_GET_INFO_MEMBER(deco_bac06_device::get_pf16x16_tile_info) if (m_rambank&1) tile_index+=0x1000; int tile=m_pf_data[tile_index]; int colourpri=(tile>>12); - SET_TILE_INFO_MEMBER(m_tile_region,tile&0xfff,0,0); + SET_TILE_INFO_MEMBER(m_tile_region_16,tile&0xfff,0,0); tileinfo.category = colourpri; } void deco_bac06_device::create_tilemaps(int region8x8, int region16x16) { - m_tile_region = region8x8; + m_tile_region_8 = region8x8; + m_tile_region_16 = region16x16; m_pf8x8_tilemap[0] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(deco_bac06_device::get_pf8x8_tile_info),this),tilemap_mapper_delegate(FUNC(deco_bac06_device::tile_shape0_8x8_scan),this), 8, 8,128, 32); m_pf8x8_tilemap[1] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(deco_bac06_device::get_pf8x8_tile_info),this),tilemap_mapper_delegate(FUNC(deco_bac06_device::tile_shape1_8x8_scan),this), 8, 8, 64, 64); m_pf8x8_tilemap[2] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(deco_bac06_device::get_pf8x8_tile_info),this),tilemap_mapper_delegate(FUNC(deco_bac06_device::tile_shape2_8x8_scan),this), 8, 8, 32,128); - m_tile_region = region16x16; if (m_wide==2) { @@ -246,10 +250,13 @@ void deco_bac06_device::custom_tilemap_draw(bitmap_ind16 &bitmap, int row_scroll_enabled = 0; int col_scroll_enabled = 0; - if (control0) + if (m_supports_rc_scroll) { - row_scroll_enabled = (rowscroll_ptr && (control0[0]&0x4)); - col_scroll_enabled = (colscroll_ptr && (control0[0]&0x8)); + if (control0) + { + row_scroll_enabled = (rowscroll_ptr && (control0[0] & 0x4)); + col_scroll_enabled = (colscroll_ptr && (control0[0] & 0x8)); + } } width_mask = src_bitmap.width() - 1; @@ -310,29 +317,31 @@ void deco_bac06_device::deco_bac06_pf_draw(bitmap_ind16 &bitmap,const rectangle { tilemap_t* tm = 0; - switch (m_pf_control_0[3]&0x3) { - case 0: /* 4x1 */ - if (m_pf_control_0[0]&0x1) - tm = m_pf8x8_tilemap[0]; - else - tm = m_pf16x16_tilemap[0]; - break; - - case 1: /* 2x2 */ - default: - if (m_pf_control_0[0]&0x1) - tm = m_pf8x8_tilemap[1]; - else - tm = m_pf16x16_tilemap[1]; - break; - - case 2: /* 1x4 */ - if (m_pf_control_0[0]&0x1) - tm = m_pf8x8_tilemap[2]; - else - tm = m_pf16x16_tilemap[2]; - break; - }; + int tm_dimensions = m_pf_control_0[3] & 0x3; + if (tm_dimensions == 3) tm_dimensions = 1; // 3 is invalid / the same as 1? + + if (m_pf_control_0[0]&0x1) // is 8x8 tiles mode selected? + { + if (m_supports_8x8) + { + tm = m_pf8x8_tilemap[tm_dimensions]; + } + else if (m_supports_16x16) + { + tm = m_pf16x16_tilemap[tm_dimensions]; + } + } + else // 16x16 tiles mode is selected + { + if (m_supports_16x16) + { + tm = m_pf16x16_tilemap[tm_dimensions]; + } + else if (m_supports_8x8) + { + tm = m_pf8x8_tilemap[tm_dimensions]; + } + } if (tm) custom_tilemap_draw(bitmap,cliprect,tm,m_pf_rowscroll,m_pf_colscroll,m_pf_control_0,m_pf_control_1,flags, penmask, pencondition, colprimask, colpricondition); diff --git a/src/mame/video/decbac06.h b/src/mame/video/decbac06.h index ceeef4891aa..853079b64cc 100644 --- a/src/mame/video/decbac06.h +++ b/src/mame/video/decbac06.h @@ -2,6 +2,15 @@ // copyright-holders:Bryan McPhail, David Haywood /* BAC06 */ +#define MCFG_BAC06_BOOTLEG_DISABLE_8x8 \ + deco_bac06_device::disable_8x8(*device); + +#define MCFG_BAC06_BOOTLEG_DISABLE_16x16 \ + deco_bac06_device::disable_16x16(*device); + +#define MCFG_BAC06_BOOTLEG_DISABLE_RC_SCROLL \ + deco_bac06_device::disable_rc_scroll(*device); + class deco_bac06_device : public device_t { @@ -17,7 +26,32 @@ public: tilemap_t* m_pf8x8_tilemap[3]; tilemap_t* m_pf16x16_tilemap[3]; - int m_tile_region; + int m_tile_region_8; + int m_tile_region_16; + + // some bootlegs (eg midresb / midresbj) don't appear to actually support the alt modes, they set them and end up with broken gfx on later levels. + bool m_supports_8x8; + bool m_supports_16x16; + bool m_supports_rc_scroll; + + static void disable_8x8(device_t &device) + { + deco_bac06_device &dev = downcast<deco_bac06_device &>(device); + dev.m_supports_8x8 = false; + } + + static void disable_16x16(device_t &device) + { + deco_bac06_device &dev = downcast<deco_bac06_device &>(device); + dev.m_supports_16x16 = false; + } + + static void disable_rc_scroll(device_t &device) + { + deco_bac06_device &dev = downcast<deco_bac06_device &>(device); + dev.m_supports_rc_scroll = false; + } + void create_tilemaps(int region8x8,int region16x16); UINT16 m_pf_control_0[8]; UINT16 m_pf_control_1[8]; diff --git a/src/mame/video/dkong.c b/src/mame/video/dkong.c index 1f8e700a2f1..a17b45b527a 100644 --- a/src/mame/video/dkong.c +++ b/src/mame/video/dkong.c @@ -876,7 +876,8 @@ TIMER_CALLBACK_MEMBER(dkong_state::scanline_callback) radarscp_scanline(scanline); /* update any video up to the current scanline */ - m_screen->update_now(); +// m_screen->update_now(); + m_screen->update_partial(m_screen->vpos()); scanline = (scanline+1) % VTOTAL; /* come back at the next appropriate scanline */ diff --git a/src/mame/video/dvi.c b/src/mame/video/dvi.c index a2397953afe..72ed02c62c7 100644 --- a/src/mame/video/dvi.c +++ b/src/mame/video/dvi.c @@ -11,7 +11,7 @@ //#define dviprintf printf -#define dviprintf logerror +#define dviprintf device->logerror struct DVI_Header @@ -169,7 +169,7 @@ static UINT8 R8(UINT8 **currptr) return ret; } -void process_dvi_data(UINT8* dvi_data, int baseoffset, int regionsize) +void process_dvi_data(device_t *device,UINT8* dvi_data, int baseoffset, int regionsize) { DVI_Header DVI; diff --git a/src/mame/video/gaelco3d.c b/src/mame/video/gaelco3d.c index f0b45a94ee9..43041d2fa0e 100644 --- a/src/mame/video/gaelco3d.c +++ b/src/mame/video/gaelco3d.c @@ -133,7 +133,7 @@ void gaelco3d_renderer::render_poly(screen_device &screen, UINT32 *polydata) if (LOG_POLYGONS) { int t; - logerror("poly: %12.2f %12.2f %12.2f %12.2f %12.2f %12.2f %12.2f %12.2f %12.2f %12.2f %08X %08X (%4d,%4d) %08X", + m_state.logerror("poly: %12.2f %12.2f %12.2f %12.2f %12.2f %12.2f %12.2f %12.2f %12.2f %12.2f %08X %08X (%4d,%4d) %08X", (double)tms3203x_device::fp_to_float(polydata[0]), (double)tms3203x_device::fp_to_float(polydata[1]), (double)tms3203x_device::fp_to_float(polydata[2]), @@ -148,10 +148,10 @@ void gaelco3d_renderer::render_poly(screen_device &screen, UINT32 *polydata) polydata[11], (INT16)(polydata[12] >> 16), (INT16)(polydata[12] << 2) >> 2, polydata[12]); - logerror(" (%4d,%4d) %08X %08X", (INT16)(polydata[13] >> 16), (INT16)(polydata[13] << 2) >> 2, polydata[13], polydata[14]); + m_state.logerror(" (%4d,%4d) %08X %08X", (INT16)(polydata[13] >> 16), (INT16)(polydata[13] << 2) >> 2, polydata[13], polydata[14]); for (t = 15; !IS_POLYEND(polydata[t - 2]); t += 2) - logerror(" (%4d,%4d) %08X %08X", (INT16)(polydata[t] >> 16), (INT16)(polydata[t] << 2) >> 2, polydata[t], polydata[t+1]); - logerror("\n"); + m_state.logerror(" (%4d,%4d) %08X %08X", (INT16)(polydata[t] >> 16), (INT16)(polydata[t] << 2) >> 2, polydata[t], polydata[t+1]); + m_state.logerror("\n"); } /* fill in object data */ diff --git a/src/mame/video/galaxian.c b/src/mame/video/galaxian.c index ce800e92a83..e3beb486c6a 100644 --- a/src/mame/video/galaxian.c +++ b/src/mame/video/galaxian.c @@ -480,7 +480,8 @@ WRITE8_MEMBER(galaxian_state::galaxian_videoram_w) { UINT8 *videoram = m_videoram; /* update any video up to the current scanline */ - m_screen->update_now(); +// m_screen->update_now(); + m_screen->update_partial(m_screen->vpos()); /* store the data and mark the corresponding tile dirty */ videoram[offset] = data; @@ -491,7 +492,8 @@ WRITE8_MEMBER(galaxian_state::galaxian_videoram_w) WRITE8_MEMBER(galaxian_state::galaxian_objram_w) { /* update any video up to the current scanline */ - m_screen->update_now(); +// m_screen->update_now(); + m_screen->update_partial(m_screen->vpos()); /* store the data */ m_spriteram[offset] = data; @@ -641,7 +643,8 @@ WRITE8_MEMBER(galaxian_state::galaxian_flip_screen_x_w) { if (m_flipscreen_x != (data & 0x01)) { - m_screen->update_now(); +// m_screen->update_now(); + m_screen->update_partial(m_screen->vpos()); /* when the direction changes, we count a different number of clocks */ /* per frame, so we need to reset the origin of the stars to the current */ @@ -657,7 +660,9 @@ WRITE8_MEMBER(galaxian_state::galaxian_flip_screen_y_w) { if (m_flipscreen_y != (data & 0x01)) { - m_screen->update_now(); +// m_screen->update_now(); + m_screen->update_partial(m_screen->vpos()); + m_flipscreen_y = data & 0x01; m_bg_tilemap->set_flip((m_flipscreen_x ? TILEMAP_FLIPX : 0) | (m_flipscreen_y ? TILEMAP_FLIPY : 0)); } @@ -680,7 +685,10 @@ WRITE8_MEMBER(galaxian_state::galaxian_flip_screen_xy_w) WRITE8_MEMBER(galaxian_state::galaxian_stars_enable_w) { if ((m_stars_enabled ^ data) & 0x01) - m_screen->update_now(); + { +// m_screen->update_now(); + m_screen->update_partial(m_screen->vpos()); + } if (!m_stars_enabled && (data & 0x01)) { @@ -697,7 +705,10 @@ WRITE8_MEMBER(galaxian_state::galaxian_stars_enable_w) WRITE8_MEMBER(galaxian_state::scramble_background_enable_w) { if ((m_background_enable ^ data) & 0x01) - m_screen->update_now(); + { + // m_screen->update_now(); + m_screen->update_partial(m_screen->vpos()); + } m_background_enable = data & 0x01; } @@ -706,7 +717,10 @@ WRITE8_MEMBER(galaxian_state::scramble_background_enable_w) WRITE8_MEMBER(galaxian_state::scramble_background_red_w) { if ((m_background_red ^ data) & 0x01) - m_screen->update_now(); + { + // m_screen->update_now(); + m_screen->update_partial(m_screen->vpos()); + } m_background_red = data & 0x01; } @@ -715,7 +729,10 @@ WRITE8_MEMBER(galaxian_state::scramble_background_red_w) WRITE8_MEMBER(galaxian_state::scramble_background_green_w) { if ((m_background_green ^ data) & 0x01) - m_screen->update_now(); + { + // m_screen->update_now(); + m_screen->update_partial(m_screen->vpos()); + } m_background_green = data & 0x01; } @@ -724,7 +741,10 @@ WRITE8_MEMBER(galaxian_state::scramble_background_green_w) WRITE8_MEMBER(galaxian_state::scramble_background_blue_w) { if ((m_background_blue ^ data) & 0x01) - m_screen->update_now(); + { + // m_screen->update_now(); + m_screen->update_partial(m_screen->vpos()); + } m_background_blue = data & 0x01; } @@ -741,7 +761,8 @@ WRITE8_MEMBER(galaxian_state::galaxian_gfxbank_w) { if (m_gfxbank[offset] != data) { - m_screen->update_now(); + //m_screen->update_now(); + m_screen->update_partial(m_screen->vpos()); m_gfxbank[offset] = data; m_bg_tilemap->mark_all_dirty(); } diff --git a/src/mame/video/gba.c b/src/mame/video/gba.c index 0f0800e89de..e0883eafee1 100644 --- a/src/mame/video/gba.c +++ b/src/mame/video/gba.c @@ -15,7 +15,7 @@ #define VERBOSE_LEVEL (0) -INLINE void ATTR_PRINTF(3,4) verboselog(running_machine &machine, int n_level, const char *s_fmt, ...) +INLINE void ATTR_PRINTF(3,4) verboselog(device_t &device, int n_level, const char *s_fmt, ...) { if( VERBOSE_LEVEL >= n_level ) { @@ -24,7 +24,7 @@ INLINE void ATTR_PRINTF(3,4) verboselog(running_machine &machine, int n_level, c va_start( v, s_fmt ); vsprintf( buf, s_fmt, v ); va_end( v ); - logerror( "%08x: %s", machine.driver_data<gba_state>()->m_maincpu->pc(), buf ); + device.logerror( "%08x: %s", device.machine().driver_data<gba_state>()->m_maincpu->pc(), buf ); } } @@ -820,7 +820,7 @@ void gba_state::draw_gba_oam_window(UINT32 *scanline, int y) default: width = 0; height = 0; - verboselog(machine(), 0, "OAM error: Trying to draw OBJ with OBJ_SHAPE = 3!\n" ); + verboselog(*this, 0, "OAM error: Trying to draw OBJ with OBJ_SHAPE = 3!\n" ); break; } @@ -1259,7 +1259,7 @@ void gba_state::draw_gba_oam(UINT32 *scanline, int y) default: width = 0; height = 0; - verboselog(machine(), 0, "OAM error: Trying to draw OBJ with OBJ_SHAPE = 3!\n" ); + verboselog(*this, 0, "OAM error: Trying to draw OBJ with OBJ_SHAPE = 3!\n" ); break; } diff --git a/src/mame/video/gic.c b/src/mame/video/gic.c new file mode 100644 index 00000000000..994e97e16f8 --- /dev/null +++ b/src/mame/video/gic.c @@ -0,0 +1,333 @@ +// license:BSD-3-Clause +// copyright-holders:David Viens +/*************************************************************************** + + gic.c + + GI AY-3-8800-1 (Datasheet exists as AY-3-8500-1 Graphics Interface Chip) + For the GIMINI "Challenger" programmable game system. + + Really only ever used in the Unisonic Champion 2711 + + More LA tests made by plgDavid on hardware pretty much confirmed what is found + in the AY-3-8950-1 datasheet, but with more fine grained detail. + + the GIC does not have internal ram of any sort apart from shift registers, + instead it relies on the external shared ram, (see page 7-85) Appendix AY-3-8950-1 + + Unverified on LA (since the video pins are all connected into a composite mix): + at line 46 it lowers GIC_BUSY, until line 240 + + Verified using LA: + It will read the external ram areas continuously while GIC_BUSY is low (for 12.36ms) + + (NOTE: OCTAL) + + 000,001,002,003,004,005, 110,111,112,113,114,115,116,117,120,121,122,123,124,125 (15 times - No first bg line?) + 006,007,010,011,012,013, 110,111,112,113,114,115,116,117,120,121,122,123,124,125 (16 times) + + 014,015,016,017,020,021, 125,126,127,130,131,132,133,134,135,136,137,140,141,142 (16 times) + 022,023,024,025,026,027, 125,126,127,130,131,132,133,134,135,136,137,140,141,142 (16 times) + + 030,031,032,033,034,035, 142,143,144,145,146,147,150,151,152,153,154,155,156,157 (16 times) + 036,037,040,041,042,043, 142,143,144,145,146,147,150,151,152,153,154,155,156,157 (16 times) + + 044,045,046,047,050,051, 157,160,161,162,163,164,165,166,167,170,171,172,173,174 (16 times) + 052,053,054,055,056,057, 157,160,161,162,163,164,165,166,167,170,171,172,173,174 (16 times) + + 060,061,062,063,064,065, 174,175,176,177,200,201,202,203,204,205,206,207,210,211 (16 times) + 066,067,070,071,072,073, 174,175,176,177,200,201,202,203,204,205,206,207,210,211 (16 times) + + 074,075,076,077,100,101, 211,212,213,214,215,216,217,220,221,222,223,224,225,226 (16 times) + 102,103,104,105,106,107, 211,212,213,214,215,216,217,220,221,222,223,224,225,226 (16 times) + + 000,001,002,003,004,005, 000,001,002,003,004,005,006,007,010,011,012,013,014,015 (once! padding?) + + for a total of (12*20*16) = 3840 RAM reads (3 clocks per read at 1.79MHz) + + Then it relingishes control to the CPU by raising BUSREQ. + + Cloking in more detail: (in 1.79MHz clocks) + boot: + busy:1 5360 clocks + busy:0 22116 clocks + busy:1 7752 clocks + busy:0 22116 clocks + busy:1 7752 clocks + (...) + + There are NO IRQ handshakes, just BUSREQ sync shared RAM + +***************************************************************************/ + +#include "emu.h" +#include "gic.h" + +// device type definition +const device_type GIC = &device_creator<gic_device>; + + +//Font data taken from Paul Robson's simulator +//http://worstconsole.blogspot.ca/2012/12/the-worstconsoleever.html +//A real AY-3-8800-1 (dead) is going to decap for a good dump +ROM_START( gic_font ) + ROM_REGION( 0x200, "cgrom", 0 ) + ROM_LOAD( "ay-3-8800-1.bin", 0x0000, 0x200, BAD_DUMP CRC(d9f11d2b) SHA1(60ef45d51d102cd3af78787008d9aed848137bee)) +ROM_END + + +//------------------------------------------------- +// gic_device - constructor +//------------------------------------------------- + +gic_device::gic_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) + : device_t(mconfig, GIC, "GIC", tag, owner, clock, "gic", __FILE__) + , device_sound_interface(mconfig, *this) + , device_video_interface(mconfig, *this) + , m_cgrom(0) + , m_audiocnt(0) + , m_audioval(0) + , m_audioreset(0) + , m_ram(0) +{ +} + + +gic_device::gic_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, int lines, const char *shortname, const char *source) + : device_t(mconfig, type, name, tag, owner, clock, shortname, source) + , device_sound_interface(mconfig, *this) + , device_video_interface(mconfig, *this) + , m_cgrom(0) + , m_audiocnt(0) + , m_audioval(0) + , m_audioreset(0) + , m_ram(0) +{ +} + +const rom_entry *gic_device::device_rom_region() const +{ + //there is only one... how do I get rid of this? + return ROM_NAME( gic_font ); +} + +//------------------------------------------------- +// device_start - device-specific startup +//------------------------------------------------- + +void gic_device::device_start() +{ + m_cgrom = memregion("cgrom")->base(); + + // Let the screen create our temporary bitmap with the screen's dimensions + m_screen->register_screen_bitmap(m_bitmap); + + m_vblank_timer = timer_alloc(TIMER_VBLANK); + m_vblank_timer->adjust( m_screen->time_until_pos(1, END_ACTIVE_SCAN + 18 ), 0, m_screen->scan_period() ); + + // allocate the audio stream + m_stream = stream_alloc( 0, 1, clock()/(2*228) ); +} + + +//------------------------------------------------- +// device_reset - device-specific reset +//------------------------------------------------- + +void gic_device::device_reset() +{ + m_audiocnt=0; + m_audioval=0; + m_audioreset=0; +} + +#define GIC_CLUB 28 +#define GIC_SPACE 0 + +void gic_device::draw_char_left(int startx, int starty, UINT8 code, bitmap_ind16 &bitmap){ + UINT8*ptr = &m_cgrom[code*GIC_CHAR_H]; + + for (size_t y=0;y<GIC_CHAR_H;y++){ + UINT8 current = *ptr++; + UINT8 nextx=0; + UINT8 curry= starty+y; + for(UINT8 x=0x20;x!=0;x=x/2){ + if (current&x) + m_bitmap.pix16(curry,startx+nextx) = GIC_WHITE; + nextx++; + } + } +} + +void gic_device::draw_char_right(int startx, int starty, UINT8 code, bitmap_ind16 &bitmap, int bg_col){ + UINT8*ptr = &m_cgrom[code*GIC_CHAR_H]; + + for (size_t y=0;y<GIC_CHAR_H;y++){ + UINT8 current = *ptr++; + UINT8 nextx=0; + UINT8 curry= starty+y; + + m_bitmap.pix16(curry,startx+nextx) = bg_col; + nextx++; + for(UINT8 x=0x20;x!=0;x=x/2){ + m_bitmap.pix16(curry,startx+nextx) = (current&x)?GIC_WHITE:bg_col; + nextx++; + } + m_bitmap.pix16(curry,startx+nextx) = bg_col; + nextx++; + m_bitmap.pix16(curry,startx+nextx) = bg_col; + } +} + +UINT32 gic_device::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) +{ + m_bitmap.fill(GIC_GREEN); + + size_t XSTART = BORDER_SIZE; + size_t YSTART = START_ACTIVE_SCAN; + + //left hand side first + UINT8 current=0; + for(UINT8 cy=0;cy<GIC_LEFT_H;cy++){ + for(UINT8 cx=0;cx<GIC_LEFT_W;cx++){ + draw_char_left(XSTART+(cx*GIC_CHAR_W), + YSTART+(cy*GIC_CHAR_H), + m_ram[current], + m_bitmap); + current++; + } + } + + //right hand side is next + current=0x48;//110 octal + XSTART+=(GIC_LEFT_W*GIC_CHAR_W)+1; + + for(UINT8 cy=0;cy<GIC_RIGHT_H;cy++){ + for(UINT8 cx=0;cx<GIC_RIGHT_W;cx++){ + //complex case + UINT8 data = m_ram[current++]; + + size_t currX = (XSTART+ (cx*(3+GIC_CHAR_W))); + size_t currUP = (YSTART+ (cy*(2*GIC_CHAR_H))); + size_t currLOW = (YSTART+GIC_CHAR_H+(cy*(2*GIC_CHAR_H))); + + switch(data&0xC0){ + case 0x00:{ + //lower rectangle only, normal char + draw_char_right(currX,currLOW,data,m_bitmap,GIC_GREEN); + }break; + + //White block + case 0xC0:{ + //upper rectangle + draw_char_right(currX,currUP, GIC_SPACE,m_bitmap,GIC_WHITE); + //lower rectangle + draw_char_right(currX,currLOW,GIC_SPACE,m_bitmap,GIC_WHITE); + }break; + + //Draw a card + case 0x40:{ + int bgColor = (data&0x10)?GIC_RED:GIC_BLACK; + //upper rectangle + draw_char_right(currX,currUP, (data&0xF)+0x30,m_bitmap,bgColor); + //lower rectangle + draw_char_right(currX,currLOW,GIC_CLUB+((data&0x30)>>4),m_bitmap,bgColor); + }break; + + default:printf("gic unknown char! %02X\n",data); break; + } + } + } + + copybitmap( bitmap, m_bitmap, 0, 0, 0, 0, cliprect ); + return 0; +} + +/* AUDIO SECTION */ + +void gic_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) +{ + switch ( id ) + { + case TIMER_VBLANK: + //flag the audio to reset + m_audioreset = 1;//phase need to reset! on next clock/228 + break; + } +} + +#define GIC_AUDIO_BYTE 0x96 + +void gic_device::sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples) +{ + stream_sample_t *buffer = outputs[0]; + + //Audio is basic and badly implemented (doubt that was the intent) + //The datasheet list the 3 different frequencies the GIC can generate: 500,1000 and 2000Hz + //but it is clear (for an audio guy at least) that the resulting spectrum + //is not a pure square wav. In fact, the counter is reset on vertical sync! + //http://twitter.com/plgDavid/status/527269086016077825 + //...thus creating a buzzing sound. + + //Dumping the audio pin value each time + // either (PHI2 made a 0->1 transition (1.789MHz) + // or (PHI1 made a 1->1 transition (1.789MHz) + //I found that the granularity of audio transitions + //(including phase resets and silences) was 228 clocks + //The audio subsystem thus runs at 1.789MHz/228 = 7849.88Hz + + //when 1 + //normal period:912 clocks (228*4) + //hi for 456 clocks + //lo for 456 clocks + //reset period: (each frame) + //hi for 228 clocks + //lo for 456 clocks + //when 2 + //normal period lasts 1824 clocks (228*8) + //hi for 912 clocks + //lo for 912 clocks + //reset period: (each frame) + //hi for 912 (228*4) + //lo for 1596 (228*7) + //hi for 912 (228*4) + //when 4 + //normal period lasts 3648 clocks (228*16) + //hi for 1824(228*8) + //lo for 1824(228*8) + //Reset period: + //lo for 1824(228*8) + //hi for 2508(228*11) + //lo for 1824(228*8) + //hi for 1824(228*8) + + if(!m_ram) return; + + UINT8 audioByte = m_ram[GIC_AUDIO_BYTE]*2; + + if(!audioByte){ + for(size_t i = 0; i < samples; i++) + *buffer++ = 0; + + m_audioval = 0; + m_audiocnt = 0; + m_audioreset = 0; + return;//early + } + + //forced resynch @ 59.95Hz + if(m_audioreset){ + m_audioval = 0;//forced low + m_audiocnt = 0; + m_audioreset = 0; + } + + for(size_t i=0; i < samples; i++){ + m_audiocnt++; + if(m_audiocnt >= audioByte){ + m_audioval = !m_audioval; + m_audiocnt=0; + } + *buffer++ = m_audioval<<13; + } +} diff --git a/src/mame/video/gic.h b/src/mame/video/gic.h new file mode 100644 index 00000000000..50715c61b0b --- /dev/null +++ b/src/mame/video/gic.h @@ -0,0 +1,114 @@ +// license:BSD-3-Clause +// copyright-holders:David Viens +/*************************************************************************** + + gic.h + + GI AY-3-8800-1 (Datasheet exists as AY-3-8500-1 Graphics Interface Chip) + For the GIMINI "Challenger" programmable game system. + + Really only ever used in the Unisonic Champion 2711 + +***************************************************************************/ + +#pragma once + +#ifndef __GIC_H__ +#define __GIC_H__ + +#include "emu.h" + + +/*************************************************************************** + DEVICE CONFIGURATION MACROS +***************************************************************************/ + +#define MCFG_GIC_ADD(_tag, _clock, _screen_tag) \ + MCFG_DEVICE_ADD(_tag, GIC, _clock) \ + MCFG_VIDEO_SET_SCREEN(_screen_tag) + +/*************************************************************************** + TYPE DEFINITIONS +***************************************************************************/ + +// ======================> gic_device + +//Palette entries +#define GIC_BLACK 0 +#define GIC_RED 1 +#define GIC_GREEN 2 +#define GIC_WHITE 3 + +#define GIC_CHAR_W 6 +#define GIC_CHAR_H 8 + +#define GIC_LEFT_H 12 +#define GIC_LEFT_W 6 + +#define GIC_RIGHT_H 6 +#define GIC_RIGHT_W 13 + +class gic_device : public device_t + , public device_sound_interface + , public device_video_interface +{ +public: + // construction/destruction + gic_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + gic_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, int lines, const char *shortname, const char *source); + + // static configuration helpers + static void set_screen_tag(device_t &device, const char *screen_tag) { downcast<gic_device &>(device).m_screen_tag = screen_tag; } + + DECLARE_PALETTE_INIT(gic); + + UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + + inline bitmap_ind16 *get_bitmap() { return &m_bitmap; } + + //plgDavid please change this to a MESS friendly handshake + void set_shared_memory(const UINT8*m){ m_ram = m;}; + + // Global constants (non mesured figures) + static const int START_ACTIVE_SCAN = 10; + static const int BORDER_SIZE = GIC_CHAR_W*3; + static const int END_ACTIVE_SCAN = 10 + GIC_CHAR_W*2 + 150 + GIC_CHAR_W*2; + static const int START_Y = 1; + static const int SCREEN_HEIGHT = GIC_CHAR_H*(GIC_LEFT_H+2); + static const int LINE_CLOCKS = 455; + static const int LINES = 262; + +protected: + // device-level overrides + virtual void device_start(); + virtual void device_reset(); + virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); + + // optional information overrides + virtual const rom_entry *device_rom_region() const; + + // device_sound_interface overrides + virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples); + + /* timers */ + static const device_timer_id TIMER_VBLANK = 0; + + void draw_char_left (int x, int y, UINT8 code, bitmap_ind16 &bitmap); + void draw_char_right(int x, int y, UINT8 code, bitmap_ind16 &bitmap,int bg_col); + + bitmap_ind16 m_bitmap; + UINT8 * m_cgrom; // internal chargen ROM + + emu_timer *m_vblank_timer; + sound_stream *m_stream; + + int m_audiocnt; + int m_audioval; + int m_audioreset; + const UINT8* m_ram; +}; + +// device type definition +extern const device_type GIC; + +#endif /* __GIC_H__ */ diff --git a/src/mame/video/gyruss.c b/src/mame/video/gyruss.c index 316a748a971..3f0a77465a9 100644 --- a/src/mame/video/gyruss.c +++ b/src/mame/video/gyruss.c @@ -93,7 +93,8 @@ PALETTE_INIT_MEMBER(gyruss_state, gyruss) WRITE8_MEMBER(gyruss_state::gyruss_spriteram_w) { - m_screen->update_now(); +// m_screen->update_now(); + m_screen->update_partial(m_screen->vpos()); m_spriteram[offset] = data; } diff --git a/src/mame/video/hng64.c b/src/mame/video/hng64.c index fe9bfcd8d9b..63bbff6e2f6 100644 --- a/src/mame/video/hng64.c +++ b/src/mame/video/hng64.c @@ -168,8 +168,8 @@ WRITE32_MEMBER(hng64_state::hng64_videoram_w) { hng64_mark_tile_dirty(3, offset&0x3fff); } - // Offsets 0x40000 - 0x58000 are for "floor" scanline control - + // Offsets 0x40000 - 0x58000 are for "floor" scanline control + /* 400000 - 7fffff is scroll regs etc. */ } @@ -435,9 +435,9 @@ void hng64_state::hng64_tilemap_draw_roz_primask(screen_device &screen, bitmap_r { blit_parameters blit; - // notes: - // - startx and starty MUST be UINT32 for calculations to work correctly - // - srcbitmap->width and height are assumed to be a power of 2 to speed up wraparound + // notes: + // - startx and starty MUST be UINT32 for calculations to work correctly + // - srcbitmap->width and height are assumed to be a power of 2 to speed up wraparound // skip if disabled //if (!tmap->enable) @@ -474,7 +474,7 @@ inline void hng64_state::hng64_tilemap_draw_roz(screen_device &screen, bitmap_rg * -------+-1098-7654-3210-9876-5432-1098-7654-3210-+---------------- * 0 | ---- -Cdd ---- -??Z ---- ---- ---- ---- | C = global complex zoom | 0000 0011 - road edge alt 1 | dd = global tilemap dimension selector - | 0000 0111 - road edge alt 2 | ? = Always Set? + | 0000 0111 - road edge alt 2 | ? = Always Set? | | Z = Global Zoom Disable? * 1 | oooo oooo oooo oooo ---- ---- ---- ---- | unknown - 0001 is a popular value. Explore. * 1 | ---- ---- ---- ---- oooo oooo oooo oooo | unknown - untouched in sams64 games, initialized elsewhere @@ -514,21 +514,21 @@ inline void hng64_state::hng64_tilemap_draw_roz(screen_device &screen, bitmap_rg // b = 4bpp/8bpp (seems correct) (beast busters, samsh64, sasm64 2, xrally switch it for some screens) // r = tile size (seems correct) // e = tilemap enable bit according to sams64_2 - // z = z depth/priority? tilemaps might also be affected by min / max clip values somewhere? + // z = z depth/priority? tilemaps might also be affected by min / max clip values somewhere? // (debug layer on buriki has priority 0x020, which would be highest) */ void hng64_state::hng64_drawtilemap(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect, int tm) { - // Useful bits from the global tilemap flags - const UINT32& global_tileregs = m_videoregs[0x00]; + // Useful bits from the global tilemap flags + const UINT32& global_tileregs = m_videoregs[0x00]; const int global_dimensions = (global_tileregs & 0x03000000) >> 24; - const int global_alt_scroll_register_format = global_tileregs & 0x04000000; - const int global_zoom_disable = global_tileregs & 0x00010000; - - // Debug blending on/off based on m_additive_tilemap_debug - int debug_blend_enabled = 0; + const int global_alt_scroll_register_format = global_tileregs & 0x04000000; + const int global_zoom_disable = global_tileregs & 0x00010000; + + // Debug blending on/off based on m_additive_tilemap_debug + int debug_blend_enabled = 0; if ((m_additive_tilemap_debug&(1 << tm))) debug_blend_enabled = 1; @@ -537,9 +537,9 @@ void hng64_state::hng64_drawtilemap(screen_device &screen, bitmap_rgb32 &bitmap, popmessage("unsupported global_dimensions on tilemaps"); #endif - // Determine which tilemap registers and scroll base this tilemap uses - UINT16 tileregs = 0; - UINT16 scrollbase = 0; + // Determine which tilemap registers and scroll base this tilemap uses + UINT16 tileregs = 0; + UINT16 scrollbase = 0; if (tm==0) { scrollbase = (m_videoregs[0x04]&0x3fff0000)>>16; @@ -561,21 +561,21 @@ void hng64_state::hng64_drawtilemap(screen_device &screen, bitmap_rgb32 &bitmap, tileregs = (m_videoregs[0x03]&0x0000ffff)>>0; } - // Useful bits from the tilemap registers - const UINT8 mosaicValueBits = (tileregs & 0xf000) >> 12; (void)mosaicValueBits; - const UINT8 floorModeBit = (tileregs & 0x0800) >> 11; - const UINT8 bppBit = (tileregs & 0x0400) >> 10; - const UINT8 bigTilemapBit = (tileregs & 0x0200) >> 9; - const UINT8 tilemapEnableBit = (tileregs & 0x0040) >> 6; (void)tilemapEnableBit; - - // Tilemap drawing enable (sams64_2 demo mode says this is legit) - //if (!tilemapEnableBit) - //{ - // return; - //} - - // Select the proper tilemap size - tilemap_t* tilemap = NULL; + // Useful bits from the tilemap registers + const UINT8 mosaicValueBits = (tileregs & 0xf000) >> 12; (void)mosaicValueBits; + const UINT8 floorModeBit = (tileregs & 0x0800) >> 11; + const UINT8 bppBit = (tileregs & 0x0400) >> 10; + const UINT8 bigTilemapBit = (tileregs & 0x0200) >> 9; + const UINT8 tilemapEnableBit = (tileregs & 0x0040) >> 6; (void)tilemapEnableBit; + + // Tilemap drawing enable (sams64_2 demo mode says this is legit) + //if (!tilemapEnableBit) + //{ + // return; + //} + + // Select the proper tilemap size + tilemap_t* tilemap = NULL; if (global_dimensions==0) { if (bigTilemapBit) tilemap = m_tilemap[tm].m_tilemap_16x16; @@ -588,7 +588,7 @@ void hng64_state::hng64_drawtilemap(screen_device &screen, bitmap_rgb32 &bitmap, } // Set the transmask so our manual copy is correct - int transmask = 0x00; + int transmask = 0x00; if (bppBit) transmask = 0xff; else @@ -596,53 +596,53 @@ void hng64_state::hng64_drawtilemap(screen_device &screen, bitmap_rgb32 &bitmap, if (floorModeBit == 0x0000) { - // floor mode - // life would be easier if the roz we're talking about for complex zoom wasn't setting this as well - - // fprintf(stderr, "Tilemap %d is a floor using :\n", tm); - const UINT32 floorAddress = 0x40000 + (scrollbase << 4); - - // TODO: The row count is correct, but how is this layer clipped? m_tcram? - - // See how many lines we have in the data region - // DEBUG: Change this to a loop that goes over each line and draws them - it's just for visualization now - //int lineCount = 0; - //for (int ii = 0; ii < 0x2000/4; ii += 4) - //{ - // const int realAddress = floorAddress/4; - // if (m_videoram[realAddress+ii] == 0xffffff00 && m_videoram[realAddress+ii+1] == 0xffffff00) - // continue; - // if (m_videoram[realAddress+ii] == 0x00000000 && m_videoram[realAddress+ii+1] == 0x00000000) - // continue; - // - // lineCount++; - //} - //printf("lines %d\n", lineCount); - - // Buriki uses a 2x mosaic effect on its floor, so its line count is half - // (but so does fatfurwa - maybe it overdraws a bunch of pixels?) - //if (m_mcu_type == BURIKI_MCU) - // lineCount *= 2; - - // DEBUG - draw a horizontal green line where the uppermost line of the floor is drawn - const rectangle &visarea = screen.visible_area(); - //if (lineCount < visarea.height()) - //{ - // for (int ii = 0; ii < visarea.width(); ii++) - // bitmap.pix32((visarea.height()-lineCount), ii) = 0xff00ff00; - //} - - // HACK : Clear RAM - this is "needed" in fatfurwa since it doesn't clear its own ram (buriki does) - // Figure out what the difference between the two programs is. It's possible writing to - // the linescroll ram fills a buffer and it's cleared automatically between frames? - for (int ii = 0; ii < 0x2000/4; ii++) - { - const int realAddress = floorAddress/4; - m_videoram[realAddress+ii] = 0x00000000; - } - - - // Floor mode - per pixel simple / complex modes? -- every other line? + // floor mode + // life would be easier if the roz we're talking about for complex zoom wasn't setting this as well + + // fprintf(stderr, "Tilemap %d is a floor using :\n", tm); + const UINT32 floorAddress = 0x40000 + (scrollbase << 4); + + // TODO: The row count is correct, but how is this layer clipped? m_tcram? + + // See how many lines we have in the data region + // DEBUG: Change this to a loop that goes over each line and draws them - it's just for visualization now + //int lineCount = 0; + //for (int ii = 0; ii < 0x2000/4; ii += 4) + //{ + // const int realAddress = floorAddress/4; + // if (m_videoram[realAddress+ii] == 0xffffff00 && m_videoram[realAddress+ii+1] == 0xffffff00) + // continue; + // if (m_videoram[realAddress+ii] == 0x00000000 && m_videoram[realAddress+ii+1] == 0x00000000) + // continue; + // + // lineCount++; + //} + //printf("lines %d\n", lineCount); + + // Buriki uses a 2x mosaic effect on its floor, so its line count is half + // (but so does fatfurwa - maybe it overdraws a bunch of pixels?) + //if (m_mcu_type == BURIKI_MCU) + // lineCount *= 2; + + // DEBUG - draw a horizontal green line where the uppermost line of the floor is drawn + const rectangle &visarea = screen.visible_area(); + //if (lineCount < visarea.height()) + //{ + // for (int ii = 0; ii < visarea.width(); ii++) + // bitmap.pix32((visarea.height()-lineCount), ii) = 0xff00ff00; + //} + + // HACK : Clear RAM - this is "needed" in fatfurwa since it doesn't clear its own ram (buriki does) + // Figure out what the difference between the two programs is. It's possible writing to + // the linescroll ram fills a buffer and it's cleared automatically between frames? + for (int ii = 0; ii < 0x2000/4; ii++) + { + const int realAddress = floorAddress/4; + m_videoram[realAddress+ii] = 0x00000000; + } + + + // Floor mode - per pixel simple / complex modes? -- every other line? // (there doesn't seem to be enough data in Buriki for every line at least) rectangle clip = visarea; @@ -650,16 +650,16 @@ void hng64_state::hng64_drawtilemap(screen_device &screen, bitmap_rgb32 &bitmap, { // Logic would dictate that this should be the 'complex' scroll register layout, // but per-line. That doesn't work however. - // + // // You only have line data for the number of lines on the screen, not enough for // the complex register layout - // + // // HOWEVER, using the code below doesn't work either. This might be because // they have mosaic turned on, and it adopts a new meaning in linescroll modes? - // + // // The code below could also be wrong, and rowscroll simply acts the same in all // modes, this is hard to know because ss64_2 barely uses it. - // + // // buriki line data is at 20146000 (physical) #if HNG64_VIDEO_DEBUG @@ -668,9 +668,9 @@ void hng64_state::hng64_drawtilemap(screen_device &screen, bitmap_rgb32 &bitmap, } else // 'simple' mode with linescroll, used in some ss64_2 levels (assumed to be correct, but doesn't do much with it.. so could be wrong) { - INT32 xtopleft, xmiddle; - INT32 ytopleft, ymiddle; - + INT32 xtopleft, xmiddle; + INT32 ytopleft, ymiddle; + for (int line=0; line < 448; line++) { clip.min_y = clip.max_y = line; @@ -913,7 +913,6 @@ void hng64_state::hng64_drawtilemap(screen_device &screen, bitmap_rgb32 &bitmap, UINT32 hng64_state::screen_update_hng64(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) { - #if 1 // press in sams64_2 attract mode for a nice debug screen from the game // not sure how functional it is, and it doesn't appear to test everything (rowscroll modes etc.) @@ -939,16 +938,16 @@ UINT32 hng64_state::screen_update_hng64(screen_device &screen, bitmap_rgb32 &bit #endif - // Initialize some buffers + // Initialize some buffers bitmap.fill(m_tcram[0x50/4] & 0x10000 ? m_palette->black_pen() : m_palette->pen(0), cliprect); //FIXME: Is the register correct? check with HW tests screen.priority().fill(0x00, cliprect); - // If the screen is disabled, don't draw anything (m_screen_dis is a shady variable at best) + // If the screen is disabled, don't draw anything (m_screen_dis is a shady variable at best) if (m_screen_dis) return 0; // If the auto-animation mask or bits have changed search for tiles using them and mark as dirty - const UINT32 animmask = m_videoregs[0x0b]; + const UINT32 animmask = m_videoregs[0x0b]; const UINT32 animbits = m_videoregs[0x0c]; if ((m_old_animmask != animmask) || (m_old_animbits != animbits)) { @@ -977,13 +976,13 @@ UINT32 hng64_state::screen_update_hng64(screen_device &screen, bitmap_rgb32 &bit m_old_animbits = animbits; } - // If any magic bits have been touched, mark every tilemap dirty - UINT16 tileflags[4]; - tileflags[0] = m_videoregs[0x02] >> 16; + // If any magic bits have been touched, mark every tilemap dirty + UINT16 tileflags[4]; + tileflags[0] = m_videoregs[0x02] >> 16; tileflags[1] = m_videoregs[0x02] & 0xffff; tileflags[2] = m_videoregs[0x03] >> 16; tileflags[3] = m_videoregs[0x03] & 0xffff; - const UINT16 IMPORTANT_DIRTY_TILEFLAG_MASK = 0x0600; + const UINT16 IMPORTANT_DIRTY_TILEFLAG_MASK = 0x0600; for (int i = 0; i < 4; i++) { if ((m_old_tileflags[i] & IMPORTANT_DIRTY_TILEFLAG_MASK) != (tileflags[i] & IMPORTANT_DIRTY_TILEFLAG_MASK)) @@ -993,7 +992,7 @@ UINT32 hng64_state::screen_update_hng64(screen_device &screen, bitmap_rgb32 &bit } } - // Draw the four tilemaps + // Draw the four tilemaps hng64_drawtilemap(screen,bitmap,cliprect, 3); hng64_drawtilemap(screen,bitmap,cliprect, 2); hng64_drawtilemap(screen,bitmap,cliprect, 1); @@ -1021,13 +1020,13 @@ UINT32 hng64_state::screen_update_hng64(screen_device &screen, bitmap_rgb32 &bit } } - // Draw the sprites on top of everything + // Draw the sprites on top of everything draw_sprites(screen, bitmap, cliprect); - // Layer the global frame buffer operations on top of everything - // transition_control(bitmap, cliprect); + // Layer the global frame buffer operations on top of everything + // transition_control(bitmap, cliprect); + - #if HNG64_VIDEO_DEBUG if (0) popmessage("%08x %08x %08x %08x %08x", m_spriteregs[0], m_spriteregs[1], m_spriteregs[2], m_spriteregs[3], m_spriteregs[4]); @@ -1036,14 +1035,14 @@ UINT32 hng64_state::screen_update_hng64(screen_device &screen, bitmap_rgb32 &bit popmessage("%08x %08x TR(%04x %04x %04x %04x) SB(%04x %04x %04x %04x) %08x %08x %08x %08x %08x AA(%08x %08x) %08x", m_videoregs[0x00], m_videoregs[0x01], - (m_videoregs[0x02]>>16)&0xffff, - (m_videoregs[0x02]>>0)&0xffff, // ss64_2 debug mode indicates that 0x0040 is enable! - (m_videoregs[0x03]>>16)&0xffff, // buriki agrees (debug data on text layer) xrally agress (pink layer) - (m_videoregs[0x03]>>0)&0xffff, // fatal fury doesn't (all backgrounds have it set) joy - (m_videoregs[0x04]>>16)&0xffff, - (m_videoregs[0x04]>>0)&0xffff, - (m_videoregs[0x05]>>16)&0xffff, - (m_videoregs[0x05]>>0)&0xffff, + (m_videoregs[0x02]>>16)&0xffff, + (m_videoregs[0x02]>>0)&0xffff, // ss64_2 debug mode indicates that 0x0040 is enable! + (m_videoregs[0x03]>>16)&0xffff, // buriki agrees (debug data on text layer) xrally agress (pink layer) + (m_videoregs[0x03]>>0)&0xffff, // fatal fury doesn't (all backgrounds have it set) joy + (m_videoregs[0x04]>>16)&0xffff, + (m_videoregs[0x04]>>0)&0xffff, + (m_videoregs[0x05]>>16)&0xffff, + (m_videoregs[0x05]>>0)&0xffff, m_videoregs[0x06], m_videoregs[0x07], m_videoregs[0x08], @@ -1107,7 +1106,7 @@ UINT32 hng64_state::screen_update_hng64(screen_device &screen, bitmap_rgb32 &bit popmessage("blend changed %02x", m_additive_tilemap_debug); } #endif - + return 0; } diff --git a/src/mame/video/hng64_3d.c b/src/mame/video/hng64_3d.c index 92aad5cbc5f..868f871fcf8 100644 --- a/src/mame/video/hng64_3d.c +++ b/src/mame/video/hng64_3d.c @@ -58,11 +58,11 @@ WRITE16_MEMBER(hng64_state::dl_w) WRITE32_MEMBER(hng64_state::dl_upload_w) { - // Data is: - // 00000b50 for the sams64 games - // 00000f00 for everything else - // TODO: different param for the two sams64 games, less FIFO to process? - + // Data is: + // 00000b50 for the sams64 games + // 00000f00 for everything else + // TODO: different param for the two sams64 games, less FIFO to process? + // This is written after the game uploads 16 packets, each 16 words long // We're assuming it to be a 'send to 3d hardware' trigger. // This can be called multiple times per frame (at least 2, as long as it gets the expected interrupt / status flags) @@ -73,7 +73,7 @@ g_profiler.start(PROFILER_USER1); hng64_command3d(&m_dl[packetStart]); } - // Schedule a small amount of time to let the 3d hardware rasterize the display buffer + // Schedule a small amount of time to let the 3d hardware rasterize the display buffer machine().scheduler().timer_set(m_maincpu->cycles_to_attotime(0x200*8), timer_expired_delegate(FUNC(hng64_state::hng64_3dfifo_processed), this)); g_profiler.stop(); } @@ -85,14 +85,14 @@ TIMER_CALLBACK_MEMBER(hng64_state::hng64_3dfifo_processed) WRITE32_MEMBER(hng64_state::dl_control_w) { - // This could be a multiple display list thing, but the palette seems to be lost between lists? - // Many games briefly set this to 0x4 on startup. Maybe there are 3 display lists? - // The sams64 games briefly set this value to 0x0c00 on boot. Maybe there are 4 lists and they can be combined? - if (data & 0x01) - m_activeDisplayList = 0; - else if (data & 0x02) - m_activeDisplayList = 1; - + // This could be a multiple display list thing, but the palette seems to be lost between lists? + // Many games briefly set this to 0x4 on startup. Maybe there are 3 display lists? + // The sams64 games briefly set this value to 0x0c00 on boot. Maybe there are 4 lists and they can be combined? + if (data & 0x01) + m_activeDisplayList = 0; + else if (data & 0x02) + m_activeDisplayList = 1; + // printf("dl_control_w %08x %08x\n", data, mem_mask); // // if(data & 2) // swap buffers @@ -274,8 +274,8 @@ void hng64_state::setCameraProjectionMatrix(const UINT16* packet) const float top = uToF(packet[12]); const float bottom = uToF(packet[13]); - // TODO: It's unclear how the 3 values combine to make a near clipping plane - const float near_ = uToF(packet[6]) + (uToF(packet[6]) * uToF(packet[4])); + // TODO: It's unclear how the 3 values combine to make a near clipping plane + const float near_ = uToF(packet[6]) + (uToF(packet[6]) * uToF(packet[4])); const float far_ = 0.9f; // uToF(packet[9]) + (uToF(packet[9]) * uToF(packet[7])); m_projectionMatrix[0] = (2.0f*near_)/(right-left); @@ -303,8 +303,8 @@ void hng64_state::setCameraProjectionMatrix(const UINT16* packet) // Polygon rasterization. void hng64_state::recoverPolygonBlock(const UINT16* packet, int& numPolys) { - //printPacket(packet, 1); - + //printPacket(packet, 1); + /*////////////// // PACKET FORMAT // [0] - 0100 ... ID @@ -369,7 +369,7 @@ void hng64_state::recoverPolygonBlock(const UINT16* packet, int& numPolys) UINT32 size[4]; UINT32 address[4]; UINT32 megaOffset; - polygon lastPoly = { 0 }; + polygon lastPoly = { 0 }; ////////////////////////////////////////////////////////// @@ -493,9 +493,9 @@ void hng64_state::recoverPolygonBlock(const UINT16* packet, int& numPolys) continue; } - // Syntactical simplification - polygon& currentPoly = m_polys[numPolys]; - + // Syntactical simplification + polygon& currentPoly = m_polys[numPolys]; + // Debug - Colors polygons with certain flags bright blue! ajg currentPoly.debugColor = 0; //currentPoly.debugColor = tdColor; @@ -743,7 +743,7 @@ void hng64_state::recoverPolygonBlock(const UINT16* packet, int& numPolys) //////////////////////////////////// // Perform the world transformations... // TODO: We can eliminate this step with a matrix stack (maybe necessary?) - // Note: fatfurwa's helicopter tracking in scene 3 of its intro shows one of these matrices isn't quite correct + // Note: fatfurwa's helicopter tracking in scene 3 of its intro shows one of these matrices isn't quite correct setIdentity(m_modelViewMatrix); if (m_mcu_type != SAMSHO_MCU) { @@ -798,11 +798,11 @@ void hng64_state::recoverPolygonBlock(const UINT16* packet, int& numPolys) // Cast a ray out of the camera towards the polygon's point in eyespace. vecmatmul4(cullRay, modelViewMatrix, currentPoly.vert[0].worldCoords); normalize(cullRay); - + // Dot product that with the normal to see if you're negative... vecmatmul4(cullNorm, modelViewMatrix, currentPoly.faceNormal); - - const float backfaceCullResult = vecDotProduct(cullRay, cullNorm); + + const float backfaceCullResult = vecDotProduct(cullRay, cullNorm); if (backfaceCullResult < 0.0f) currentPoly.visible = 1; else @@ -811,7 +811,7 @@ void hng64_state::recoverPolygonBlock(const UINT16* packet, int& numPolys) // BEHIND-THE-CAMERA CULL // - float cullRay[4]; + float cullRay[4]; vecmatmul4(cullRay, m_modelViewMatrix, currentPoly.vert[0].worldCoords); if (cullRay[2] > 0.0f) // Camera is pointing down -Z { @@ -822,63 +822,63 @@ void hng64_state::recoverPolygonBlock(const UINT16* packet, int& numPolys) // TRANSFORM THE TRIANGLE INTO HOMOGENEOUS SCREEN SPACE // if (currentPoly.visible) { - hng64_clip_vertex clipVerts[10]; - - // Transform and project each vertex into pre-divided homogeneous coordinates + hng64_clip_vertex clipVerts[10]; + + // Transform and project each vertex into pre-divided homogeneous coordinates for (int m = 0; m < currentPoly.n; m++) { - float eyeCoords[4]; // World coordinates transformed by the modelViewMatrix + float eyeCoords[4]; // World coordinates transformed by the modelViewMatrix vecmatmul4(eyeCoords, m_modelViewMatrix, currentPoly.vert[m].worldCoords); vecmatmul4(currentPoly.vert[m].clipCoords, m_projectionMatrix, eyeCoords); - - clipVerts[m].x = currentPoly.vert[m].clipCoords[0]; - clipVerts[m].y = currentPoly.vert[m].clipCoords[1]; - clipVerts[m].z = currentPoly.vert[m].clipCoords[2]; - clipVerts[m].w = currentPoly.vert[m].clipCoords[3]; - clipVerts[m].p[0] = currentPoly.vert[m].texCoords[0]; - clipVerts[m].p[1] = currentPoly.vert[m].texCoords[1]; - clipVerts[m].p[2] = currentPoly.vert[m].light[0]; - clipVerts[m].p[3] = currentPoly.vert[m].light[1]; - clipVerts[m].p[4] = currentPoly.vert[m].light[2]; + + clipVerts[m].x = currentPoly.vert[m].clipCoords[0]; + clipVerts[m].y = currentPoly.vert[m].clipCoords[1]; + clipVerts[m].z = currentPoly.vert[m].clipCoords[2]; + clipVerts[m].w = currentPoly.vert[m].clipCoords[3]; + clipVerts[m].p[0] = currentPoly.vert[m].texCoords[0]; + clipVerts[m].p[1] = currentPoly.vert[m].texCoords[1]; + clipVerts[m].p[2] = currentPoly.vert[m].light[0]; + clipVerts[m].p[3] = currentPoly.vert[m].light[1]; + clipVerts[m].p[4] = currentPoly.vert[m].light[2]; } if (currentPoly.visible) { - // Clip against all edges of the view frustum - int num_vertices = frustum_clip_all<float, 5>(clipVerts, currentPoly.n, clipVerts); - - // Copy the results of - currentPoly.n = num_vertices; - for (int m = 0; m < num_vertices; m++) - { - currentPoly.vert[m].clipCoords[0] = clipVerts[m].x; - currentPoly.vert[m].clipCoords[1] = clipVerts[m].y; - currentPoly.vert[m].clipCoords[2] = clipVerts[m].z; - currentPoly.vert[m].clipCoords[3] = clipVerts[m].w; - currentPoly.vert[m].texCoords[0] = clipVerts[m].p[0]; - currentPoly.vert[m].texCoords[1] = clipVerts[m].p[1]; - currentPoly.vert[m].light[0] = clipVerts[m].p[2]; - currentPoly.vert[m].light[1] = clipVerts[m].p[3]; - currentPoly.vert[m].light[2] = clipVerts[m].p[4]; - } - - const rectangle& visarea = m_screen->visible_area(); + // Clip against all edges of the view frustum + int num_vertices = frustum_clip_all<float, 5>(clipVerts, currentPoly.n, clipVerts); + + // Copy the results of + currentPoly.n = num_vertices; + for (int m = 0; m < num_vertices; m++) + { + currentPoly.vert[m].clipCoords[0] = clipVerts[m].x; + currentPoly.vert[m].clipCoords[1] = clipVerts[m].y; + currentPoly.vert[m].clipCoords[2] = clipVerts[m].z; + currentPoly.vert[m].clipCoords[3] = clipVerts[m].w; + currentPoly.vert[m].texCoords[0] = clipVerts[m].p[0]; + currentPoly.vert[m].texCoords[1] = clipVerts[m].p[1]; + currentPoly.vert[m].light[0] = clipVerts[m].p[2]; + currentPoly.vert[m].light[1] = clipVerts[m].p[3]; + currentPoly.vert[m].light[2] = clipVerts[m].p[4]; + } + + const rectangle& visarea = m_screen->visible_area(); for (int m = 0; m < currentPoly.n; m++) { // Convert into normalized device coordinates... - float ndCoords[4]; // Normalized device coordinates/clipCoordinates (x/w, y/w, z/w) + float ndCoords[4]; // Normalized device coordinates/clipCoordinates (x/w, y/w, z/w) ndCoords[0] = currentPoly.vert[m].clipCoords[0] / currentPoly.vert[m].clipCoords[3]; ndCoords[1] = currentPoly.vert[m].clipCoords[1] / currentPoly.vert[m].clipCoords[3]; ndCoords[2] = currentPoly.vert[m].clipCoords[2] / currentPoly.vert[m].clipCoords[3]; ndCoords[3] = currentPoly.vert[m].clipCoords[3]; // Final pixel values are garnered here : - float windowCoords[4]; // Mapped ndCoordinates to screen space + float windowCoords[4]; // Mapped ndCoordinates to screen space windowCoords[0] = (ndCoords[0]+1.0f) * ((float)(visarea.max_x) / 2.0f) + 0.0f; windowCoords[1] = (ndCoords[1]+1.0f) * ((float)(visarea.max_y) / 2.0f) + 0.0f; windowCoords[2] = (ndCoords[2]+1.0f) * 0.5f; - // Flip Y + // Flip Y windowCoords[1] = (float)visarea.max_y - windowCoords[1]; // Store the points in a list for later use... @@ -899,9 +899,9 @@ void hng64_state::recoverPolygonBlock(const UINT16* packet, int& numPolys) } // note 0x0102 packets are only 8 words, it appears they can be in either the upper or lower half of the 16 word packet. -// We currently only draw 0x0102 packets where both halves contain 0x0102 (2 calls), but this causes graphics to vanish in +// We currently only draw 0x0102 packets where both halves contain 0x0102 (2 calls), but this causes graphics to vanish in // xrally because in some cases the 0x0102 packet only exists in the upper or lower half with another value (often 0x0000 - NOP) in the other. -// If we also treat (0x0000 - NOP) as 8 word instead of 16 so that we can access a 0x0102 in the 2nd half of the 16 word packet +// If we also treat (0x0000 - NOP) as 8 word instead of 16 so that we can access a 0x0102 in the 2nd half of the 16 word packet // then we end up with other invalid packets in the 2nd half which should be ignored. // This would suggest our processing if flawed in other ways, or there is something else to indicate packet length. @@ -991,7 +991,7 @@ void hng64_state::hng64_command3d(const UINT16* packet) void hng64_state::clear3d() { // Reset the buffers... - const rectangle& visarea = m_screen->visible_area(); + const rectangle& visarea = m_screen->visible_area(); for (int i = 0; i < (visarea.max_x)*(visarea.max_y); i++) { m_poly_renderer->depthBuffer3d()[i] = 100.0f; diff --git a/src/mame/video/itech8.c b/src/mame/video/itech8.c index 42a80eb9291..8920c8c423f 100644 --- a/src/mame/video/itech8.c +++ b/src/mame/video/itech8.c @@ -537,7 +537,8 @@ WRITE8_MEMBER(itech8_state::grmatch_palette_w) WRITE8_MEMBER(itech8_state::grmatch_xscroll_w) { /* update the X scroll value */ - m_screen->update_now(); + //m_screen->update_now(); + m_screen->update_partial(m_screen->vpos()); m_grmatch_xscroll = data; } diff --git a/src/mame/video/m72.c b/src/mame/video/m72.c index b215759473a..61d03d3857c 100644 --- a/src/mame/video/m72.c +++ b/src/mame/video/m72.c @@ -12,7 +12,7 @@ inline void m72_state::m72_m81_get_tile_info(tile_data &tileinfo,int tile_index,const UINT16 *vram,int gfxnum) { int code,attr,color,pri; - + // word 0 word 1 // fftt tttt tttt tttt ---- ---- zz-? pppp @@ -149,7 +149,7 @@ VIDEO_START_MEMBER(m72_state,xmultipl) m_fg_tilemap->set_scrolldx(4,64); m_fg_tilemap->set_scrolldy(-128, 0); - + m_bg_tilemap->set_scrolldx(6,0); m_bg_tilemap->set_scrolldy(-128,-128); @@ -202,7 +202,7 @@ VIDEO_START_MEMBER(m72_state,m82) m_fg_tilemap->set_scrolldx(4,0); m_fg_tilemap->set_scrolldy(-128,-128); - + m_bg_tilemap->set_scrolldx(6-256,0); m_bg_tilemap->set_scrolldy(-128,-128); @@ -345,7 +345,7 @@ WRITE16_MEMBER(m72_state::videoram2_w) WRITE16_MEMBER(m72_state::irq_line_w) { COMBINE_DATA(&m_raster_irq_position); -// printf("m_raster_irq_position %04x\n", m_raster_irq_position); +// printf("m_raster_irq_position %04x\n", m_raster_irq_position); } WRITE16_MEMBER(m72_state::scrollx1_w) @@ -435,14 +435,14 @@ WRITE16_MEMBER(m72_state::m82_gfx_ctrl_w) if (data & 0xff00) m_m82_rowscroll = 1; else m_m82_rowscroll = 0; } -// printf("m82_gfx_ctrl_w %04x\n", data); +// printf("m82_gfx_ctrl_w %04x\n", data); } WRITE16_MEMBER(m72_state::m82_tm_ctrl_w) { COMBINE_DATA(&m_m82_tmcontrol); -// printf("tmcontrol %04x\n", m_m82_tmcontrol); +// printf("tmcontrol %04x\n", m_m82_tmcontrol); } diff --git a/src/mame/video/meadows.c b/src/mame/video/meadows.c index 45d2cedfd3a..e4c920c58d3 100644 --- a/src/mame/video/meadows.c +++ b/src/mame/video/meadows.c @@ -64,7 +64,8 @@ WRITE8_MEMBER(meadows_state::meadows_videoram_w) WRITE8_MEMBER(meadows_state::meadows_spriteram_w) { - m_screen->update_now(); +// m_screen->update_now(); + m_screen->update_partial(m_screen->vpos()); m_spriteram[offset] = data; } diff --git a/src/mame/video/midzeus.c b/src/mame/video/midzeus.c index db6ce855784..d0f7330a8d4 100644 --- a/src/mame/video/midzeus.c +++ b/src/mame/video/midzeus.c @@ -1193,7 +1193,7 @@ void midzeus_renderer::zeus_draw_quad(int long_fmt, const UINT32 *databuffer, UI if (logit) { - logerror("\t\t(%f,%f,%f) UV:(%02X,%02X) UV_SCALE:(%02X,%02X) (%03X,%03X,%03X) dot=%08X\n", + m_state.logerror("\t\t(%f,%f,%f) UV:(%02X,%02X) UV_SCALE:(%02X,%02X) (%03X,%03X,%03X) dot=%08X\n", (double) vert[i].x * (1.0 / 65536.0), (double) vert[i].y * (1.0 / 65536.0), (double) vert[i].p[0] * (1.0 / 65536.0), (iuvz >> 16) & 0xff, (iuvz >> 24) & 0xff, (int)(vert[i].p[1] / 256.0f), (int)(vert[i].p[2] / 256.0f), @@ -1220,7 +1220,7 @@ void midzeus_renderer::zeus_draw_quad(int long_fmt, const UINT32 *databuffer, UI maxy = MAX(maxy, clipvert[i].y); if (logit) - logerror("\t\t\tTranslated=(%f,%f,%f)\n", (double) clipvert[i].x, (double) clipvert[i].y, (double) clipvert[i].p[0]); + m_state.logerror("\t\t\tTranslated=(%f,%f,%f)\n", (double) clipvert[i].x, (double) clipvert[i].y, (double) clipvert[i].p[0]); } for (UINT32 i = 0; i < numverts; i++) { diff --git a/src/mame/video/midzeus2.c b/src/mame/video/midzeus2.c index 65d2b349ca8..4b1c3d65689 100644 --- a/src/mame/video/midzeus2.c +++ b/src/mame/video/midzeus2.c @@ -1069,7 +1069,7 @@ void midzeus2_renderer::zeus2_draw_quad(const UINT32 *databuffer, UINT32 texoffs int texmode = texoffs & 0xffff; if (logit) - logerror("quad\n"); + m_state.logerror("quad\n"); if (machine().input().code_pressed(KEYCODE_Q) && (texoffs & 0xffff) == 0x119) return; if (machine().input().code_pressed(KEYCODE_E) && (texoffs & 0xffff) == 0x01d) return; @@ -1188,7 +1188,7 @@ In memory: if (logit) { - logerror("\t\t(%f,%f,%f) (%02X,%02X)\n", + m_state.logerror("\t\t(%f,%f,%f) (%02X,%02X)\n", (double) vert[i].x, (double) vert[i].y, (double) vert[i].p[0], (int)(vert[i].p[1] / 256.0f), (int)(vert[i].p[2] / 256.0f)); } @@ -1215,7 +1215,7 @@ In memory: maxx = MAX(maxx, clipvert[i].x); maxy = MAX(maxy, clipvert[i].y); if (logit) - logerror("\t\t\tTranslated=(%f,%f)\n", (double) clipvert[i].x, (double) clipvert[i].y); + m_state.logerror("\t\t\tTranslated=(%f,%f)\n", (double) clipvert[i].x, (double) clipvert[i].y); } for (i = 0; i < numverts; i++) { diff --git a/src/mame/video/mikromik.c b/src/mame/video/mikromik.c index f0c93b80f7a..1972efdb910 100644 --- a/src/mame/video/mikromik.c +++ b/src/mame/video/mikromik.c @@ -12,15 +12,15 @@ I8275_DRAW_CHARACTER_MEMBER( mm1_state::crtc_display_pixels ) { UINT8 romdata = m_char_rom->base()[(charcode << 4) | linecount]; - int gpa0 = BIT(gpa, 0); // general purpose attribute 0 - int llen = m_llen; // light enable - int compl_in = rvv; // reverse video - int hlt_in = hlgt; // highlight; - int color; // 0 = black, 1 = dk green, 2 = lt green; on MikroMikko 1, "highlight" is actually the darker shade of green + int gpa0 = BIT(gpa, 0); // general purpose attribute 0 + int llen = m_llen; // light enable + int compl_in = rvv; // reverse video + int hlt_in = hlgt; // highlight; + int color; // 0 = black, 1 = dk green, 2 = lt green; on MikroMikko 1, "highlight" is actually the darker shade of green int i, qh, video_in; - int d7 = BIT(romdata, 7); // save MSB (1 indicates that this is a Visual Attribute or Special Code instead of a normal display character) - int d6 = BIT(romdata, 6); // save also first and last char bitmap bits before shifting out the MSB + int d7 = BIT(romdata, 7); // save MSB (1 indicates that this is a Visual Attribute or Special Code instead of a normal display character) + int d6 = BIT(romdata, 6); // save also first and last char bitmap bits before shifting out the MSB int d0 = BIT(romdata, 0); UINT8 data = (romdata << 1) | (d7 & d0); // get rid of MSB, duplicate LSB for special characters @@ -29,7 +29,7 @@ I8275_DRAW_CHARACTER_MEMBER( mm1_state::crtc_display_pixels ) if (HORIZONTAL_CHARACTER_PIXELS == 10) { // Hack to stretch 8 pixels wide character bitmap to 10 pixels on screen. - // This was needed because high res graphics use 800 pixels wide bitmap but + // This was needed because high res graphics use 800 pixels wide bitmap but // 80 chars * 8 pixels is only 640 -> characters would cover only 80% of the screen width. // Step 1: Instead of 8, set MCFG_I8275_CHARACTER_WIDTH(10) at the end of this file // Step 2: Make sure i8275_device::recompute_parameters() is called in i8275_device::device_start() diff --git a/src/mame/video/model1.c b/src/mame/video/model1.c index 50db35e7043..65d0b2846cc 100644 --- a/src/mame/video/model1.c +++ b/src/mame/video/model1.c @@ -8,6 +8,7 @@ #define LOG_TGP_VIDEO 0 #define LOG_TGP(x) do { if (LOG_TGP_VIDEO) logerror x; } while (0) +#define LOG_TGP_DEV(d,x) do { if (LOG_TGP_VIDEO) d->logerror x; } while (0) // Model 1 geometrizer TGP and rasterizer simulation @@ -237,7 +238,7 @@ static void fill_line(bitmap_rgb32 &bitmap, struct view *view, int color, INT32 } } -static void fill_quad(bitmap_rgb32 &bitmap, struct view *view, const struct quad_m1 *q) +static void fill_quad(device_t *device,bitmap_rgb32 &bitmap, struct view *view, const struct quad_m1 *q) { INT32 sl1, sl2, cury, limy, x1, x2; int pmin, pmax, i, ps1, ps2; @@ -246,7 +247,7 @@ static void fill_quad(bitmap_rgb32 &bitmap, struct view *view, const struct quad if(color < 0) { color = -1-color; - LOG_TGP(("VIDEOD: Q (%d, %d)-(%d, %d)-(%d, %d)-(%d, %d)\n", + LOG_TGP_DEV(device,("VIDEOD: Q (%d, %d)-(%d, %d)-(%d, %d)-(%d, %d)\n", q->p[0]->s.x, q->p[0]->s.y, q->p[1]->s.x, q->p[1]->s.y, q->p[2]->s.x, q->p[2]->s.y, @@ -454,7 +455,7 @@ void model1_state::draw_quads(bitmap_rgb32 &bitmap, const rectangle &cliprect) for(i=0; i<count; i++) { struct quad_m1 *q = m_quadind[i]; - fill_quad(bitmap, view, q); + fill_quad(this, bitmap, view, q); #if 0 draw_line(bitmap, m_palette->black_pen(), q->p[0]->s.x, q->p[0]->s.y, q->p[1]->s.x, q->p[1]->s.y); draw_line(bitmap, m_palette->black_pen(), q->p[1]->s.x, q->p[1]->s.y, q->p[2]->s.x, q->p[2]->s.y); diff --git a/src/mame/video/model2.c b/src/mame/video/model2.c index fef913f7f18..14445bafc23 100644 --- a/src/mame/video/model2.c +++ b/src/mame/video/model2.c @@ -1184,6 +1184,7 @@ struct geo_state texture_parameter texture_parameters[32]; /* Texture parameters */ UINT32 polygon_ram0[0x8000]; /* Fast Polygon RAM pointer */ UINT32 polygon_ram1[0x8000]; /* Slow Polygon RAM pointer */ + model2_state *state; }; @@ -1197,6 +1198,7 @@ static void geo_init( running_machine &machine, UINT32 *polygon_rom ) { model2_state *state = machine.driver_data<model2_state>(); state->m_geo = auto_alloc_clear(machine, geo_state); + state->m_geo->state = state; state->m_geo->raster = state->m_raster; state->m_geo->polygon_rom = polygon_rom; @@ -2283,7 +2285,7 @@ static UINT32 * geo_data_mem_push( geo_state *geo, UINT32 opcode, UINT32 *input /* read in the count */ count = *input++; - logerror( "SEGA GEO: Executing unsupported geo_data_mem_push (address = %08x, count = %08x)\n", address, count ); + geo->state->logerror( "SEGA GEO: Executing unsupported geo_data_mem_push (address = %08x, count = %08x)\n", address, count ); (void)i; /* @@ -2309,7 +2311,7 @@ static UINT32 * geo_test( geo_state *geo, UINT32 opcode, UINT32 *input ) if ( *input++ != data ) { /* TODO: Set Red LED on */ - logerror( "SEGA GEO: FIFO Test failed\n" ); + geo->state->logerror( "SEGA GEO: FIFO Test failed\n" ); } data <<= 1; @@ -2357,7 +2359,7 @@ static UINT32 * geo_test( geo_state *geo, UINT32 opcode, UINT32 *input ) if ( sum_even != 0 || sum_odd != 0 ) { /* TODO: Set Green LED on */ - logerror( "SEGA GEO: Polygon ROM Test failed\n" ); + geo->state->logerror( "SEGA GEO: Polygon ROM Test failed\n" ); } } @@ -2446,7 +2448,7 @@ static UINT32 * geo_code_upload( geo_state *geo, UINT32 opcode, UINT32 *input ) No games are known to use this command yet. */ - logerror( "SEGA GEO: Uploading debug code (unimplemented)\n" ); + geo->state->logerror( "SEGA GEO: Uploading debug code (unimplemented)\n" ); (void)opcode; @@ -2496,7 +2498,7 @@ static UINT32 * geo_code_jump( geo_state *geo, UINT32 opcode, UINT32 *input ) No games are known to use this command yet. */ - logerror( "SEGA GEO: Jumping to debug code (unimplemented)\n" ); + geo->state->logerror( "SEGA GEO: Jumping to debug code (unimplemented)\n" ); (void)opcode; diff --git a/src/mame/video/model3.c b/src/mame/video/model3.c index a9340181902..33ed150f227 100644 --- a/src/mame/video/model3.c +++ b/src/mame/video/model3.c @@ -1613,7 +1613,7 @@ void model3_state::draw_model(UINT32 addr) clip_vert[i].z = p[i][2]; clip_vert[i].w = p[i][3]; - clip_vert[i].p[0] = vertex[i].u * texture_coord_scale * 256.0f; // 8 bits of subtexel accuracy for bilinear filtering + clip_vert[i].p[0] = vertex[i].u * texture_coord_scale * 256.0f; // 8 bits of subtexel accuracy for bilinear filtering clip_vert[i].p[1] = vertex[i].v * texture_coord_scale * 256.0f; // transform vertex normal @@ -1656,7 +1656,7 @@ void model3_state::draw_model(UINT32 addr) } /* clip against all edges of the view frustum */ - num_vertices = frustum_clip_all<float, 4>(clip_vert, num_vertices, clip_vert); + num_vertices = frustum_clip_all<float, 4>(clip_vert, num_vertices, clip_vert); /* divide by W, transform to screen coords */ for(i=0; i < num_vertices; i++) @@ -2038,9 +2038,9 @@ void model3_renderer::draw_opaque_triangles(const m3_triangle* tris, int num_tri v[i].y = tri->v[i].y; v[i].p[0] = tri->v[i].w; v[i].p[1] = 1.0f / tri->v[i].w; - v[i].p[2] = tri->v[i].p[0]; - v[i].p[3] = tri->v[i].p[1]; - v[i].p[4] = tri->v[i].p[2]; + v[i].p[2] = tri->v[i].p[0]; + v[i].p[3] = tri->v[i].p[1]; + v[i].p[4] = tri->v[i].p[2]; } model3_polydata &extra = object_data_alloc(); @@ -2068,7 +2068,7 @@ void model3_renderer::draw_opaque_triangles(const m3_triangle* tris, int num_tri v[i].x = tri->v[i].x; v[i].y = tri->v[i].y; v[i].p[0] = tri->v[i].w; - v[i].p[1] = tri->v[i].p[2]; + v[i].p[1] = tri->v[i].p[2]; } model3_polydata &extra = object_data_alloc(); @@ -2103,7 +2103,7 @@ void model3_renderer::draw_alpha_triangles(const m3_triangle* tris, int num_tris v[i].y = tri->v[i].y; v[i].p[0] = tri->v[i].w; v[i].p[1] = 1.0f / tri->v[i].w; - v[i].p[2] = tri->v[i].p[0]; + v[i].p[2] = tri->v[i].p[0]; v[i].p[3] = tri->v[i].p[1]; v[i].p[4] = tri->v[i].p[2]; } diff --git a/src/mame/video/qix.c b/src/mame/video/qix.c index 53cacf4a472..a42fd44fc4e 100644 --- a/src/mame/video/qix.c +++ b/src/mame/video/qix.c @@ -99,7 +99,8 @@ WRITE8_MEMBER(qix_state::qix_videoram_w) { /* update the screen in case the game is writing "behind" the beam - Zookeeper likes to do this */ - m_screen->update_now(); +// m_screen->update_now(); + m_screen->update_partial(m_screen->vpos()); /* add in the upper bit of the address latch */ offset += (m_videoram_address[0] & 0x80) << 8; @@ -113,7 +114,8 @@ WRITE8_MEMBER(qix_state::slither_videoram_w) { /* update the screen in case the game is writing "behind" the beam - Zookeeper likes to do this */ - m_screen->update_now(); +// m_screen->update_now(); + m_screen->update_partial(m_screen->vpos()); /* add in the upper bit of the address latch */ offset += (m_videoram_address[0] & 0x80) << 8; @@ -150,7 +152,8 @@ READ8_MEMBER(qix_state::qix_addresslatch_r) WRITE8_MEMBER(qix_state::qix_addresslatch_w) { /* update the screen in case the game is writing "behind" the beam */ - m_screen->update_now(); +// m_screen->update_now(); + m_screen->update_partial(m_screen->vpos()); /* compute the value at the address latch */ offset = (m_videoram_address[0] << 8) | m_videoram_address[1]; @@ -163,7 +166,8 @@ WRITE8_MEMBER(qix_state::qix_addresslatch_w) WRITE8_MEMBER(qix_state::slither_addresslatch_w) { /* update the screen in case the game is writing "behind" the beam */ - m_screen->update_now(); +// m_screen->update_now(); + m_screen->update_partial(m_screen->vpos()); /* compute the value at the address latch */ offset = (m_videoram_address[0] << 8) | m_videoram_address[1]; @@ -191,7 +195,10 @@ WRITE8_MEMBER(qix_state::qix_paletteram_w) /* trigger an update if a currently visible pen has changed */ if (((offset >> 8) == m_palette_bank) && (old_data != data)) - m_screen->update_now(); + { + // m_screen->update_now(); + m_screen->update_partial(m_screen->vpos()); + } set_pen(offset); } @@ -202,7 +209,8 @@ WRITE8_MEMBER(qix_state::qix_palettebank_w) /* set the bank value */ if (m_palette_bank != (data & 3)) { - m_screen->update_now(); + //m_screen->update_now(); + m_screen->update_partial(m_screen->vpos()); m_palette_bank = data & 3; } diff --git a/src/mame/video/sega16sp.c b/src/mame/video/sega16sp.c index e7ca8d7cd7a..cb92a10a212 100644 --- a/src/mame/video/sega16sp.c +++ b/src/mame/video/sega16sp.c @@ -1041,7 +1041,6 @@ sega_outrun_sprite_device::sega_outrun_sprite_device(const machine_config &mconf sega_xboard_sprite_device::sega_xboard_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : sega_outrun_sprite_device(mconfig, tag, owner, clock, true, "sega_xboard_sprite", __FILE__) { - } @@ -1086,7 +1085,7 @@ void sega_outrun_sprite_device::draw(bitmap_ind16 &bitmap, const rectangle &clip // ----cccc cccc---- Sprite color palette // -------- ----llll 4-bit pixel data // - + set_origin(m_xoffs, m_yoffs); // render the sprites in order diff --git a/src/mame/video/segaic16.c b/src/mame/video/segaic16.c index a4826571cb4..8ac02ea654b 100644 --- a/src/mame/video/segaic16.c +++ b/src/mame/video/segaic16.c @@ -529,7 +529,7 @@ void draw_virtual_tilemap(screen_device &screen, struct tilemap_info *info, bitm temp = bottommax; bottommax = topmin; topmin = temp; - + if (leftmin != -1) leftmin = width - 1 - leftmin; if (leftmax != -1) leftmax = width - 1 - leftmax; if (rightmin != -1) rightmin = width - 1 - rightmin; diff --git a/src/mame/video/spacefb.c b/src/mame/video/spacefb.c index c663655dc32..72b0c11ca05 100644 --- a/src/mame/video/spacefb.c +++ b/src/mame/video/spacefb.c @@ -19,14 +19,16 @@ WRITE8_MEMBER(spacefb_state::port_0_w) { - m_screen->update_now(); +// m_screen->update_now(); + m_screen->update_partial(m_screen->vpos()); m_port_0 = data; } WRITE8_MEMBER(spacefb_state::port_2_w) { - m_screen->update_now(); +// m_screen->update_now(); + m_screen->update_partial(m_screen->vpos()); m_port_2 = data; } diff --git a/src/mame/video/system1.c b/src/mame/video/system1.c index b731529a82e..f326cb1d5b3 100644 --- a/src/mame/video/system1.c +++ b/src/mame/video/system1.c @@ -190,19 +190,22 @@ WRITE8_MEMBER(system1_state::system1_videomode_w) READ8_MEMBER(system1_state::system1_mixer_collision_r) { - m_screen->update_now(); +// m_screen->update_now(); + m_screen->update_partial(m_screen->vpos()); return m_mix_collide[offset & 0x3f] | 0x7e | (m_mix_collide_summary << 7); } WRITE8_MEMBER(system1_state::system1_mixer_collision_w) { - m_screen->update_now(); +// m_screen->update_now(); + m_screen->update_partial(m_screen->vpos()); m_mix_collide[offset & 0x3f] = 0; } WRITE8_MEMBER(system1_state::system1_mixer_collision_reset_w) { - m_screen->update_now(); +// m_screen->update_now(); + m_screen->update_partial(m_screen->vpos()); m_mix_collide_summary = 0; } @@ -216,19 +219,22 @@ WRITE8_MEMBER(system1_state::system1_mixer_collision_reset_w) READ8_MEMBER(system1_state::system1_sprite_collision_r) { - m_screen->update_now(); +// m_screen->update_now(); + m_screen->update_partial(m_screen->vpos()); return m_sprite_collide[offset & 0x3ff] | 0x7e | (m_sprite_collide_summary << 7); } WRITE8_MEMBER(system1_state::system1_sprite_collision_w) { - m_screen->update_now(); +// m_screen->update_now(); + m_screen->update_partial(m_screen->vpos()); m_sprite_collide[offset & 0x3ff] = 0; } WRITE8_MEMBER(system1_state::system1_sprite_collision_reset_w) { - m_screen->update_now(); +// m_screen->update_now(); + m_screen->update_partial(m_screen->vpos()); m_sprite_collide_summary = 0; } @@ -274,7 +280,10 @@ WRITE8_MEMBER(system1_state::system1_videoram_w) /* force a partial update if the page is changing */ if (m_tilemap_pages > 2 && offset >= 0x740 && offset < 0x748 && offset % 2 == 0) - m_screen->update_now(); + { + //m_screen->update_now(); + m_screen->update_partial(m_screen->vpos()); + } } WRITE8_MEMBER(system1_state::system1_videoram_bank_w) diff --git a/src/mame/video/timeplt.c b/src/mame/video/timeplt.c index cff9b230643..afd493a8b92 100644 --- a/src/mame/video/timeplt.c +++ b/src/mame/video/timeplt.c @@ -125,6 +125,15 @@ TILE_GET_INFO_MEMBER(timeplt_state::get_chkun_tile_info) void timeplt_state::video_start() { m_bg_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(timeplt_state::get_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 32, 32); + m_video_enable = 0; + + save_item(NAME(m_video_enable)); +} + +VIDEO_START_MEMBER(timeplt_state,psurge) +{ + video_start(); + m_video_enable = 1; //psurge doesn't seem to have the video enable } VIDEO_START_MEMBER(timeplt_state,chkun) @@ -140,27 +149,31 @@ VIDEO_START_MEMBER(timeplt_state,chkun) * *************************************/ -WRITE8_MEMBER(timeplt_state::timeplt_videoram_w) +WRITE8_MEMBER(timeplt_state::videoram_w) { m_videoram[offset] = data; m_bg_tilemap->mark_tile_dirty(offset); } -WRITE8_MEMBER(timeplt_state::timeplt_colorram_w) +WRITE8_MEMBER(timeplt_state::colorram_w) { m_colorram[offset] = data; m_bg_tilemap->mark_tile_dirty(offset); } -WRITE8_MEMBER(timeplt_state::timeplt_flipscreen_w) +WRITE8_MEMBER(timeplt_state::flipscreen_w) { flip_screen_set(~data & 1); } +WRITE8_MEMBER(timeplt_state::video_enable_w) +{ + m_video_enable = data & 1; +} -READ8_MEMBER(timeplt_state::timeplt_scanline_r) +READ8_MEMBER(timeplt_state::scanline_r) { return m_screen->vpos(); } @@ -175,19 +188,15 @@ READ8_MEMBER(timeplt_state::timeplt_scanline_r) void timeplt_state::draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect ) { - UINT8 *spriteram = m_spriteram; - UINT8 *spriteram_2 = m_spriteram2; - int offs; - - for (offs = 0x3e;offs >= 0x10;offs -= 2) + for (int offs = 0x3e;offs >= 0x10;offs -= 2) { - int sx = spriteram[offs]; - int sy = 241 - spriteram_2[offs + 1]; + int sx = m_spriteram[offs]; + int sy = 241 - m_spriteram2[offs + 1]; - int code = spriteram[offs + 1]; - int color = spriteram_2[offs] & 0x3f; - int flipx = ~spriteram_2[offs] & 0x40; - int flipy = spriteram_2[offs] & 0x80; + int code = m_spriteram[offs + 1]; + int color = m_spriteram2[offs] & 0x3f; + int flipx = ~m_spriteram2[offs] & 0x40; + int flipy = m_spriteram2[offs] & 0x80; m_gfxdecode->gfx(1)->transpen(bitmap,cliprect, code, @@ -205,10 +214,13 @@ void timeplt_state::draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprec * *************************************/ -UINT32 timeplt_state::screen_update_timeplt(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) +UINT32 timeplt_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - m_bg_tilemap->draw(screen, bitmap, cliprect, 0, 0); - draw_sprites(bitmap, cliprect); - m_bg_tilemap->draw(screen, bitmap, cliprect, 1, 0); + if (m_video_enable) + { + m_bg_tilemap->draw(screen, bitmap, cliprect, 0, 0); + draw_sprites(bitmap, cliprect); + m_bg_tilemap->draw(screen, bitmap, cliprect, 1, 0); + } return 0; } diff --git a/src/mame/video/tp84.c b/src/mame/video/tp84.c index fc2f2196bba..80b3d00a95f 100644 --- a/src/mame/video/tp84.c +++ b/src/mame/video/tp84.c @@ -106,7 +106,8 @@ PALETTE_INIT_MEMBER(tp84_state, tp84) WRITE8_MEMBER(tp84_state::tp84_spriteram_w) { /* the game multiplexes the sprites, so update now */ - m_screen->update_now(); +// m_screen->update_now(); + m_screen->update_partial(m_screen->vpos()); m_spriteram[offset] = data; } diff --git a/src/mame/video/zx.c b/src/mame/video/zx.c index 8948a395246..ecf00939bbf 100644 --- a/src/mame/video/zx.c +++ b/src/mame/video/zx.c @@ -1,5 +1,5 @@ // license:GPL-2.0+ -// copyright-holders:Juergen Buchmueller, Krzysztof Strzecha, Robbbert +// copyright-holders: Olivier Galibert, Juergen Buchmueller, Krzysztof Strzecha, Robbbert /*************************************************************************** zx.c @@ -25,14 +25,11 @@ void zx_state::device_timer(emu_timer &timer, device_timer_id id, int param, voi { switch (id) { - case TIMER_TAPE_PULSE: - zx_tape_pulse(ptr, param); + case TIMER_TAPE_INPUT: + zx_tape_input(); break; - case TIMER_ULA_NMI: - zx_ula_nmi(ptr, param); - break; - case TIMER_ULA_IRQ: - zx_ula_irq(ptr, param); + case TIMER_ULA_HSYNC: + zx_ula_hsync(); break; default: assert_always(FALSE, "Unknown id in zx_state::device_timer"); @@ -40,184 +37,113 @@ void zx_state::device_timer(emu_timer &timer, device_timer_id id, int param, voi } -/* - * Toggle the video output between black and white. - * This happens whenever the ULA scanline IRQs are enabled/disabled. - * Normally this is done during the synchronized zx_ula_r() function, - * which outputs 8 pixels per code, but if the video sync is off - * (during tape IO or sound output) zx_ula_bkgnd() is used to - * simulate the display of a ZX80/ZX81. - */ -void zx_state::zx_ula_bkgnd(UINT8 color) +void zx_state::zx_ula_hsync() { - int width = m_screen->width(); - int height = m_screen->height(); - const rectangle &visarea = m_screen->visible_area(); + m_hsync_active = !m_hsync_active; + if(m_hsync_active) + m_ypos++; + if(m_nmi_generator_active) { + m_nmi_on = m_hsync_active; + m_maincpu->set_input_line(INPUT_LINE_NMI, m_nmi_on ? ASSERT_LINE : CLEAR_LINE); + } + recalc_hsync(); +} - if (m_ula_frame_vsync == 0 && color != m_old_c) - { - int y, new_x, new_y; - rectangle r; - bitmap_ind16 &bitmap = m_bitmap; - - new_y = machine().first_screen()->vpos(); - new_x = machine().first_screen()->hpos(); -/* logerror("zx_ula_bkgnd: %3d,%3d - %3d,%3d\n", state->m_old_x, state->m_old_y, new_x, new_y);*/ - y = m_old_y; - for (;;) - { - if (y == new_y) - { - r.set(m_old_x, new_x, y, y); - bitmap.fill(color, r); - break; - } - else - { - r.set(m_old_x, visarea.max_x, y, y); - bitmap.fill(color, r); - m_old_x = 0; - } - if (++y == height) - y = 0; +WRITE16_MEMBER(zx_state::refresh_w) +{ + if((data ^ m_prev_refresh) & 0x40) + m_maincpu->set_input_line(INPUT_LINE_IRQ0, data & 0x40 ? CLEAR_LINE : ASSERT_LINE); + m_prev_refresh = data; + if(m_ula_char_buffer != 0xffff) { + UINT64 time = m_maincpu->total_cycles(); + int x = 2*((time-m_base_vsync_clock) % 207); + int y = (time-m_base_vsync_clock) / 207; + UINT8 pixels; + if(m_region_gfx1) + pixels = m_region_gfx1->base()[((m_ula_char_buffer & 0x3f) << 3) | (m_ypos & 7)]; + else + pixels = m_program->read_byte((data & 0xfe00) | ((m_ula_char_buffer & 0x3f) << 3) | (m_ypos & 7)); + if(m_ula_char_buffer & 0x80) + pixels = ~pixels; + if(x < 384-8 && y < 311) { + UINT16 *dest = &m_bitmap_render->pix16(y, x); + for(int i=0; i<8; i++) + *dest++ |= pixels & (0x80 >> i) ? 1 : 0; } - m_old_x = (new_x + 1) % width; - m_old_y = new_y; - m_old_c = color; + m_ula_char_buffer = 0xffff; } } -/* - * PAL: 310 total lines, - * 0.. 55 vblank - * 56..247 192 visible lines - * 248..303 vblank - * 304... vsync - * NTSC: 262 total lines - * 0.. 31 vblank - * 32..223 192 visible lines - * 224..233 vblank - */ -TIMER_CALLBACK_MEMBER(zx_state::zx_ula_nmi) +void zx_state::recalc_hsync() { - /* - * An NMI is issued on the ZX81 every 64us for the blanked - * scanlines at the top and bottom of the display. - */ - int height = m_screen->height(); - const rectangle& r1 = m_screen->visible_area(); - rectangle r; - - bitmap_ind16 &bitmap = m_bitmap; - r.set(r1.min_x, r1.max_x, m_ula_scanline_count, m_ula_scanline_count); - bitmap.fill(1, r); -// logerror("ULA %3d[%d] NMI, R:$%02X, $%04x\n", machine().first_screen()->vpos(), ula_scancode_count, (unsigned) m_maincpu->state_int(Z80_R), (unsigned) m_maincpu->state_int(Z80_PC)); - m_maincpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE); - if (++m_ula_scanline_count == height) - m_ula_scanline_count = 0; + UINT64 time = machine().time().as_ticks(m_maincpu->clock()); + UINT32 step = (time - m_base_vsync_clock) % 207; + UINT32 delta; + if (m_hsync_active) + delta = 207 - step; + else { + if(step < 192) + delta = 192 - step; + else + delta = 399 - step; + } + + m_ula_hsync->adjust(m_maincpu->cycles_to_attotime(delta)); } -TIMER_CALLBACK_MEMBER(zx_state::zx_ula_irq) +READ8_MEMBER(zx_state::ula_low_r) { - /* - * An IRQ is issued on the ZX80/81 whenever the R registers - * bit 6 goes low. In MESS this IRQ timed from the first read - * from the copy of the DFILE in the upper 32K in zx_ula_r(). - */ - if (m_ula_irq_active) - { -// logerror("ULA %3d[%d] IRQ, R:$%02X, $%04x\n", machine().first_screen()->vpos(), ula_scancode_count, (unsigned) m_maincpu->state_int(Z80_R), (unsigned) m_maincpu->state_int(Z80_PC)); - - m_ula_irq_active = 0; - m_maincpu->set_input_line(0, HOLD_LINE); + UINT8 cdata = m_program->read_byte(offset); + if(space.debugger_access()) + return cdata; + + if(m_maincpu->state_int(Z80_HALT)) + return cdata; + + if(m_nmi_on) { + UINT64 time = m_maincpu->total_cycles(); + int pos = (time-m_base_vsync_clock) % 207; + if(pos >= 192) + m_maincpu->adjust_icount(pos - 207); } + return cdata; } -void zx_state::zx_ula_r(int offs, memory_region *region, const UINT8 param) +READ8_MEMBER(zx_state::ula_high_r) { - int offs0 = offs & 0x7fff; - UINT8 *rom = m_region_maincpu->base(); - UINT8 chr = rom[offs0]; - - if ((!m_ula_irq_active) && (chr == 0x76)) - { - bitmap_ind16 &bitmap = m_bitmap; - UINT16 y, *scanline; - UINT16 ireg = m_maincpu->state_int(Z80_I) << 8; - UINT8 data, *chrgen, creg; + UINT8 cdata = m_program->read_byte(offset); - if (param) - creg = m_maincpu->state_int(Z80_B); - else - creg = m_maincpu->state_int(Z80_C); - - chrgen = region->base(); - - if ((++m_ula_scanline_count == m_screen->height()) || (creg == 32)) - { - m_ula_scanline_count = 0; - m_offs1 = offs0; - } + if(space.debugger_access()) + return cdata; - m_ula_frame_vsync = 3; + if(m_maincpu->state_int(Z80_HALT)) + return cdata; - m_charline_ptr = 0; + if(m_nmi_on) { + UINT64 time = m_maincpu->total_cycles(); + int pos = (time-m_base_vsync_clock) % 207; + if(pos >= 192) + m_maincpu->adjust_icount(pos - 207); + } - for (y = m_offs1+1; ((y < offs0) && (m_charline_ptr < ARRAY_LENGTH(m_charline))); y++) - { - m_charline[m_charline_ptr] = rom[y]; - m_charline_ptr++; - } - for (y = m_charline_ptr; y < ARRAY_LENGTH(m_charline); y++) - m_charline[y] = 0; - - timer_set(m_maincpu->cycles_to_attotime(((32 - m_charline_ptr) << 2)), TIMER_ULA_IRQ); - m_ula_irq_active++; - - scanline = &bitmap.pix16(m_ula_scanline_count); - y = 0; - - for (m_charline_ptr = 0; m_charline_ptr < ARRAY_LENGTH(m_charline); m_charline_ptr++) - { - chr = m_charline[m_charline_ptr]; - data = chrgen[ireg | ((chr & 0x3f) << 3) | ((8 - creg)&7) ]; - if (chr & 0x80) data ^= 0xff; - - scanline[y++] = (data >> 7) & 1; - scanline[y++] = (data >> 6) & 1; - scanline[y++] = (data >> 5) & 1; - scanline[y++] = (data >> 4) & 1; - scanline[y++] = (data >> 3) & 1; - scanline[y++] = (data >> 2) & 1; - scanline[y++] = (data >> 1) & 1; - scanline[y++] = (data >> 0) & 1; - m_charline[m_charline_ptr] = 0; - } + if(cdata & 0x40) + return cdata; - if (creg == 1) m_offs1 = offs0; - } + m_ula_char_buffer = cdata; + return 0x00; // nop } void zx_state::video_start() { - m_ula_nmi = timer_alloc(TIMER_ULA_NMI); - m_ula_irq_active = 0; - m_screen->register_screen_bitmap(m_bitmap); -} + m_ula_hsync = timer_alloc(TIMER_ULA_HSYNC); + m_ula_char_buffer = 0xffff; -void zx_state::screen_eof_zx(screen_device &screen, bool state) -{ - // rising edge - if (state) - { - /* decrement video synchronization counter */ - if (m_ula_frame_vsync) - --m_ula_frame_vsync; - } + m_bitmap_render = auto_bitmap_ind16_alloc(machine(), 384, 311); + m_bitmap_buffer = auto_bitmap_ind16_alloc(machine(), 384, 311); } UINT32 zx_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - copybitmap(bitmap, m_bitmap, 0, 0, 0, 0, cliprect); + copybitmap(bitmap, *m_bitmap_buffer, 0, 0, 0, 0, cliprect); return 0; } diff --git a/src/osd/eigccppc.h b/src/osd/eigccppc.h index b1ba620aaee..c6c73e309cf 100644 --- a/src/osd/eigccppc.h +++ b/src/osd/eigccppc.h @@ -307,9 +307,9 @@ _compare_exchange32(INT32 volatile *ptr, INT32 compare, INT32 exchange) "1: lwarx %[result], 0, %[ptr] \n" " cmpw %[compare], %[result] \n" " bne 2f \n" - " sync \n" " stwcx. %[exchange], 0, %[ptr] \n" " bne- 1b \n" + " lwsync \n" "2: " : [dummy] "+m" (*ptr) /* Lets GCC know that *ptr will be read/written in case it's not marked volatile */ , [result] "=&r" (result) @@ -343,6 +343,7 @@ _compare_exchange64(INT64 volatile *ptr, INT64 compare, INT64 exchange) " bne 2f \n" " stdcx. %[exchange], 0, %[ptr] \n" " bne- 1b \n" + " lwsync \n" "2: " : [dummy] "+m" (*ptr) /* Lets GCC know that *ptr will be read/written in case it's not marked volatile */ , [result] "=&r" (result) @@ -371,9 +372,9 @@ _atomic_exchange32(INT32 volatile *ptr, INT32 exchange) __asm__ __volatile__ ( "1: lwarx %[result], 0, %[ptr] \n" - " sync \n" " stwcx. %[exchange], 0, %[ptr] \n" " bne- 1b \n" + " lwsync \n" : [dummy] "+m" (*ptr) /* Lets GCC know that *ptr will be read/written in case it's not marked volatile */ , [result] "=&r" (result) : [ptr] "r" (ptr) @@ -400,9 +401,9 @@ _atomic_add32(INT32 volatile *ptr, INT32 delta) __asm__ __volatile__ ( "1: lwarx %[result], 0, %[ptr] \n" " add %[result], %[result], %[delta] \n" - " sync \n" " stwcx. %[result], 0, %[ptr] \n" " bne- 1b \n" + " lwsync \n" : [dummy] "+m" (*ptr) /* Lets GCC know that *ptr will be read/written in case it's not marked volatile */ , [result] "=&b" (result) : [ptr] "r" (ptr) @@ -429,9 +430,9 @@ _atomic_increment32(INT32 volatile *ptr) __asm__ __volatile__ ( "1: lwarx %[result], 0, %[ptr] \n" " addi %[result], %[result], 1 \n" - " sync \n" " stwcx. %[result], 0, %[ptr] \n" " bne- 1b \n" + " lwsync \n" : [dummy] "+m" (*ptr) /* Lets GCC know that *ptr will be read/written in case it's not marked volatile */ , [result] "=&b" (result) : [ptr] "r" (ptr) @@ -457,9 +458,9 @@ _atomic_decrement32(INT32 volatile *ptr) __asm__ __volatile__ ( "1: lwarx %[result], 0, %[ptr] \n" " addi %[result], %[result], -1 \n" - " sync \n" " stwcx. %[result], 0, %[ptr] \n" " bne- 1b \n" + " lwsync \n" : [dummy] "+m" (*ptr) /* Lets GCC know that *ptr will be read/written in case it's not marked volatile */ , [result] "=&b" (result) : [ptr] "r" (ptr) diff --git a/src/osd/modules/debugger/osx/debugview.m b/src/osd/modules/debugger/osx/debugview.m index c5b0a1c5431..e793c649d9e 100644 --- a/src/osd/modules/debugger/osx/debugview.m +++ b/src/osd/modules/debugger/osx/debugview.m @@ -404,7 +404,7 @@ static void debugwin_view_update(debug_view &view, void *osdprivate) [text addAttribute:NSFontAttributeName value:font range:run]; NSPasteboard *const board = [NSPasteboard generalPasteboard]; [board declareTypes:[NSArray arrayWithObject:NSRTFPboardType] owner:nil]; - [board setData:[text RTFFromRange:run documentAttributes:@{}] forType:NSRTFPboardType]; + [board setData:[text RTFFromRange:run documentAttributes:[NSDictionary dictionary]] forType:NSRTFPboardType]; [text deleteCharactersInRange:run]; } diff --git a/src/osd/modules/debugger/osx/debugwindowhandler.m b/src/osd/modules/debugger/osx/debugwindowhandler.m index a8e92bd6f5f..d99a9ec9961 100644 --- a/src/osd/modules/debugger/osx/debugwindowhandler.m +++ b/src/osd/modules/debugger/osx/debugwindowhandler.m @@ -8,6 +8,7 @@ #import "debugwindowhandler.h" +#import "debugconsole.h" #import "debugcommandhistory.h" #import "debugview.h" diff --git a/src/osd/modules/debugger/osx/devicesviewer.m b/src/osd/modules/debugger/osx/devicesviewer.m index 01d49c14da6..ddf08602bc6 100644 --- a/src/osd/modules/debugger/osx/devicesviewer.m +++ b/src/osd/modules/debugger/osx/devicesviewer.m @@ -153,7 +153,7 @@ // set default state [devicesView expandItem:root expandChildren:YES]; [window makeFirstResponder:devicesView]; - [window setTitle:[NSString stringWithFormat:@"All Devices"]]; + [window setTitle:@"All Devices"]; // calculate the optimal size for everything NSSize const desired = [NSScrollView frameSizeForContentSize:NSMakeSize(480, 320) diff --git a/src/osd/modules/netdev/pcap.c b/src/osd/modules/netdev/pcap.c index 49b2c6bda3d..3f3e20ef7f4 100644 --- a/src/osd/modules/netdev/pcap.c +++ b/src/osd/modules/netdev/pcap.c @@ -158,12 +158,12 @@ netdev_pcap::netdev_pcap(const char *name, class device_network_interface *ifdev #endif if(!m_p) { - logerror("Unable to open %s: %s\n", name, errbuf); + osd_printf_error("Unable to open %s: %s\n", name, errbuf); return; } if(pcap_set_datalink_dl(m_p, DLT_EN10MB) == -1) { - logerror("Unable to set %s to ethernet", name); + osd_printf_error("Unable to set %s to ethernet", name); pcap_close_dl(m_p); m_p = NULL; return; @@ -189,10 +189,10 @@ void netdev_pcap::set_mac(const char *mac) sprintf(filter, "ether dst %.2X:%.2X:%.2X:%.2X:%.2X:%.2X or ether multicast or ether broadcast", (unsigned char)mac[0], (unsigned char)mac[1], (unsigned char)mac[2],(unsigned char)mac[3], (unsigned char)mac[4], (unsigned char)mac[5]); #endif if(pcap_compile_dl(m_p, &fp, filter, 1, 0) == -1) { - logerror("Error with pcap_compile\n"); + osd_printf_error("Error with pcap_compile\n"); } if(pcap_setfilter_dl(m_p, &fp) == -1) { - logerror("Error with pcap_setfilter\n"); + osd_printf_error("Error with pcap_setfilter\n"); } } @@ -289,13 +289,13 @@ int pcap_module::init(const osd_options &options) catch (except_type e) { FreeLibrary(handle); - logerror(LIB_ERROR_STR, e); + osd_printf_error(LIB_ERROR_STR, e); return 1; } if(pcap_findalldevs_dl(&devs, errbuf) == -1) { FreeLibrary(handle); - logerror("Unable to get network devices: %s\n", errbuf); + osd_printf_error("Unable to get network devices: %s\n", errbuf); return 1; } diff --git a/src/osd/modules/render/d3d/d3dhlsl.c b/src/osd/modules/render/d3d/d3dhlsl.c index f3dad935d3e..00603e45e82 100644 --- a/src/osd/modules/render/d3d/d3dhlsl.c +++ b/src/osd/modules/render/d3d/d3dhlsl.c @@ -2266,9 +2266,9 @@ static void get_vector(const char *data, int count, float *out, int report_error /*------------------------------------------------- - slider_alloc - allocate a new slider entry - currently duplicated from ui.c, this could - be done in a more ideal way. + slider_alloc - allocate a new slider entry + currently duplicated from ui.c, this could + be done in a more ideal way. -------------------------------------------------*/ static slider_state *slider_alloc(running_machine &machine, const char *title, INT32 minval, INT32 defval, INT32 maxval, INT32 incval, slider_update update, void *arg) diff --git a/src/osd/modules/sound/direct_sound.c b/src/osd/modules/sound/direct_sound.c index d82cdbe1298..19c5f7055ed 100644 --- a/src/osd/modules/sound/direct_sound.c +++ b/src/osd/modules/sound/direct_sound.c @@ -45,7 +45,7 @@ #define LOG_SOUND 0 -#define LOG(x) do { if (LOG_SOUND) logerror x; } while(0) +#define LOG(x) do { if (LOG_SOUND) osd_printf_verbose x; } while(0) class sound_direct_sound : public osd_module, public sound_module diff --git a/src/osd/modules/sync/sync_ntc.c b/src/osd/modules/sync/sync_ntc.c index 74638f935e4..2575089c9d1 100644 --- a/src/osd/modules/sync/sync_ntc.c +++ b/src/osd/modules/sync/sync_ntc.c @@ -133,10 +133,9 @@ INT32 osd_scalable_lock_acquire(osd_scalable_lock *lock) " nop \n" " b 2b \n" "3: li %[tmp], 0 \n" - " sync \n" " stwcx. %[tmp], 0, %[haslock] \n" " bne- 1b \n" - " eieio \n" + " lwsync \n" : [tmp] "=&r" (tmp) : [haslock] "r" (&lock->slot[myslot].haslock) : "cr0" @@ -167,7 +166,7 @@ void osd_scalable_lock_release(osd_scalable_lock *lock, INT32 myslot) ); #elif defined(__ppc__) || defined (__PPC__) || defined(__ppc64__) || defined(__PPC64__) lock->slot[(myslot + 1) & (WORK_MAX_THREADS - 1)].haslock = TRUE; - __asm__ __volatile__ ( " eieio " : : ); + __asm__ __volatile__ ( " lwsync " : : ); #else osd_exchange32(&lock->slot[(myslot + 1) & (WORK_MAX_THREADS - 1)].haslock, TRUE); #endif @@ -319,7 +318,7 @@ void osd_lock_release(osd_lock *lock) if (--lock->count == 0) #if defined(__ppc__) || defined(__PPC__) || defined(__ppc64__) || defined(__PPC64__) lock->holder = 0; - __asm__ __volatile__( " eieio " : : ); + __asm__ __volatile__( " lwsync " : : ); #else osd_exchange_pthread_t(&lock->holder, 0); #endif diff --git a/src/osd/osdcomm.h b/src/osd/osdcomm.h index 4ec625878ab..3a16220ae77 100644 --- a/src/osd/osdcomm.h +++ b/src/osd/osdcomm.h @@ -226,12 +226,13 @@ typedef UINT32 FPTR; #ifdef _MSC_VER #include <malloc.h> typedef ptrdiff_t ssize_t; -#if _MSC_VER == 1900 // < VS2015 +#if _MSC_VER == 1900 // VS2015 #define __LINE__Var 0 -#endif -#if _MSC_VER < 1900 // < VS2015 +#endif // VS2015 +#if _MSC_VER < 1900 // VS2013 or earlier #define snprintf _snprintf -#if _MSC_VER < 1800 // VS2013 or earlier +#define __func__ __FUNCTION__ +#if _MSC_VER < 1800 // VS2012 or earlier #define alloca _alloca #define round(x) floor((x) + 0.5) #define strtoll _strtoi64 @@ -241,7 +242,7 @@ static __inline double fmin(double x, double y){ return (x < y) ? x : y; } static __inline double fmax(double x, double y){ return (x > y) ? x : y; } static __inline double log2(double x) { return log(x) * M_LOG2E; } #define __func__ __FUNCTION__ -#endif // VS2013 +#endif // VS2012 or earlier #else // VS2015 #define _CRT_STDIO_LEGACY_WIDE_SPECIFIERS #endif diff --git a/src/osd/osdmini/minifile.c b/src/osd/osdmini/minifile.c index 2883b81c731..b55a3ad77e9 100644 --- a/src/osd/osdmini/minifile.c +++ b/src/osd/osdmini/minifile.c @@ -107,7 +107,7 @@ file_error osd_write(osd_file *file, const void *buffer, UINT64 offset, UINT32 l file_error osd_openpty(osd_file **file, char *name, size_t name_len) { - return FILERR_FAILURE; + return FILERR_FAILURE; } //============================================================ diff --git a/src/osd/osdnet.c b/src/osd/osdnet.c index 023eecbab6e..4c167251cea 100644 --- a/src/osd/osdnet.c +++ b/src/osd/osdnet.c @@ -49,7 +49,8 @@ osd_netdev::osd_netdev(class device_network_interface *ifdev, int rate) osd_netdev::~osd_netdev() { m_stop = true; - m_timer->reset(); +// nasty hack to prevent Segmentation fault on emulation stop +// m_timer->reset(); } int osd_netdev::send(UINT8 *buf, int len) diff --git a/src/osd/sdl/aueffectutil.m b/src/osd/sdl/aueffectutil.m index 397fb640c68..45ca18d178e 100644 --- a/src/osd/sdl/aueffectutil.m +++ b/src/osd/sdl/aueffectutil.m @@ -793,13 +793,13 @@ static void UpdateChangeCountCallback(void *userData, newEffectMenu = [[NSMenu allocWithZone:[NSMenu zone]] initWithTitle:@"New"]; [menu setSubmenu:newEffectMenu forItem:item]; [newEffectMenu release]; - item = [menu addItemWithTitle:@"Open…" action:@selector(openDocument:) keyEquivalent:@"o"]; + item = [menu addItemWithTitle:[NSString stringWithFormat:@"Open%C", (unichar)0x2026] action:@selector(openDocument:) keyEquivalent:@"o"]; [menu addItem:[NSMenuItem separatorItem]]; item = [menu addItemWithTitle:@"Close" action:@selector(performClose:) keyEquivalent:@"w"]; item = [menu addItemWithTitle:@"Save" action:@selector(saveDocument:) keyEquivalent:@"s"]; - item = [menu addItemWithTitle:@"Save As…" action:@selector(saveDocumentAs:) keyEquivalent:@"S"]; + item = [menu addItemWithTitle:[NSString stringWithFormat:@"Save As%C", (unichar)0x2026] action:@selector(saveDocumentAs:) keyEquivalent:@"S"]; item = [menu addItemWithTitle:@"Save All" action:@selector(saveAllDocuments:) keyEquivalent:@""]; item = [menu addItemWithTitle:@"Revert to Saved" action:@selector(revertDocumentToSaved:) keyEquivalent:@"u"]; } diff --git a/src/osd/sdl/sdlfile.c b/src/osd/sdl/sdlfile.c index a93d5623412..7e3226d497a 100644 --- a/src/osd/sdl/sdlfile.c +++ b/src/osd/sdl/sdlfile.c @@ -365,18 +365,18 @@ file_error osd_write(osd_file *file, const void *buffer, UINT64 offset, UINT32 c file_error osd_openpty(osd_file **file, char *name, size_t name_len) { - file_error res; - UINT64 filesize; + file_error res; + UINT64 filesize; - if ((res = osd_open(sdlfile_ptty_identifier , 0 , file , &filesize)) != FILERR_NONE) { - return res; - } + if ((res = osd_open(sdlfile_ptty_identifier , 0 , file , &filesize)) != FILERR_NONE) { + return res; + } - if ((res = sdl_slave_name_ptty(*file , name , name_len)) != FILERR_NONE) { - osd_close(*file); - } + if ((res = sdl_slave_name_ptty(*file , name , name_len)) != FILERR_NONE) { + osd_close(*file); + } - return res; + return res; } //============================================================ diff --git a/src/osd/sdl/sdlmain.c b/src/osd/sdl/sdlmain.c index 14ff93ecaf5..2f382605cbb 100644 --- a/src/osd/sdl/sdlmain.c +++ b/src/osd/sdl/sdlmain.c @@ -302,7 +302,7 @@ int main(int argc, char *argv[]) // output_oslog //============================================================ -static void output_oslog(running_machine &machine, const char *buffer) +static void output_oslog(const running_machine &machine, const char *buffer) { fputs(buffer, stderr); } diff --git a/src/osd/sdl/sdlos_macosx.c b/src/osd/sdl/sdlos_macosx.c index a252cf95d6a..5afcfdc54eb 100644 --- a/src/osd/sdl/sdlos_macosx.c +++ b/src/osd/sdl/sdlos_macosx.c @@ -28,95 +28,74 @@ char *osd_get_clipboard_text(void) { - char *result = NULL; /* core expects a malloced C string of uft8 data */ - - PasteboardRef pasteboard_ref; OSStatus err; - PasteboardSyncFlags sync_flags; - PasteboardItemID item_id; - CFIndex flavor_count; - CFArrayRef flavor_type_array; - CFIndex flavor_index; - ItemCount item_count; - UInt32 item_index; - Boolean success = false; + PasteboardRef pasteboard_ref; err = PasteboardCreate(kPasteboardClipboard, &pasteboard_ref); + if (err) + return NULL; - if (!err) - { - sync_flags = PasteboardSynchronize( pasteboard_ref ); + PasteboardSynchronize(pasteboard_ref); - err = PasteboardGetItemCount(pasteboard_ref, &item_count ); + ItemCount item_count; + err = PasteboardGetItemCount(pasteboard_ref, &item_count); - for (item_index=1; item_index<=item_count; item_index++) + char *result = NULL; // core expects a malloced C string of uft8 data + for (UInt32 item_index = 1; (item_index <= item_count) && !result; item_index++) + { + PasteboardItemID item_id; + err = PasteboardGetItemIdentifier(pasteboard_ref, item_index, &item_id); + if (err) + continue; + + CFArrayRef flavor_type_array; + err = PasteboardCopyItemFlavors(pasteboard_ref, item_id, &flavor_type_array); + if (err) + continue; + + CFIndex const flavor_count = CFArrayGetCount(flavor_type_array); + for (CFIndex flavor_index = 0; (flavor_index < flavor_count) && !result; flavor_index++) { - err = PasteboardGetItemIdentifier(pasteboard_ref, item_index, &item_id); + CFStringRef const flavor_type = (CFStringRef)CFArrayGetValueAtIndex(flavor_type_array, flavor_index); + + CFStringEncoding encoding; + if (UTTypeConformsTo(flavor_type, kUTTypeUTF16PlainText)) + encoding = kCFStringEncodingUTF16; + else if (UTTypeConformsTo (flavor_type, kUTTypeUTF8PlainText)) + encoding = kCFStringEncodingUTF8; + else if (UTTypeConformsTo (flavor_type, kUTTypePlainText)) + encoding = kCFStringEncodingMacRoman; + else + continue; + + CFDataRef flavor_data; + err = PasteboardCopyItemFlavorData(pasteboard_ref, item_id, flavor_type, &flavor_data); if (!err) { - err = PasteboardCopyItemFlavors(pasteboard_ref, item_id, &flavor_type_array); + CFStringRef string_ref = CFStringCreateFromExternalRepresentation(kCFAllocatorDefault, flavor_data, encoding); + CFDataRef data_ref = CFStringCreateExternalRepresentation (kCFAllocatorDefault, string_ref, kCFStringEncodingUTF8, '?'); + CFRelease(string_ref); + CFRelease(flavor_data); + + CFIndex const length = CFDataGetLength(data_ref); + CFRange const range = CFRangeMake(0, length); - if (!err) + result = reinterpret_cast<char *>(osd_malloc_array(length + 1)); + if (result) { - flavor_count = CFArrayGetCount(flavor_type_array); - - for (flavor_index = 0; flavor_index < flavor_count; flavor_index++) - { - CFStringRef flavor_type; - CFDataRef flavor_data; - CFStringEncoding encoding; - CFStringRef string_ref; - CFDataRef data_ref; - CFIndex length; - CFRange range; - - flavor_type = (CFStringRef)CFArrayGetValueAtIndex(flavor_type_array, flavor_index); - - if (UTTypeConformsTo (flavor_type, kUTTypeUTF16PlainText)) - encoding = kCFStringEncodingUTF16; - else if (UTTypeConformsTo (flavor_type, kUTTypeUTF8PlainText)) - encoding = kCFStringEncodingUTF8; - else if (UTTypeConformsTo (flavor_type, kUTTypePlainText)) - encoding = kCFStringEncodingMacRoman; - else - continue; - - err = PasteboardCopyItemFlavorData(pasteboard_ref, item_id, flavor_type, &flavor_data); - - if( !err ) - { - string_ref = CFStringCreateFromExternalRepresentation (kCFAllocatorDefault, flavor_data, encoding); - data_ref = CFStringCreateExternalRepresentation (kCFAllocatorDefault, string_ref, kCFStringEncodingUTF8, '?'); - - length = CFDataGetLength (data_ref); - range = CFRangeMake (0,length); - - result = (char *)osd_malloc_array (length+1); - if (result != NULL) - { - CFDataGetBytes (data_ref, range, (unsigned char *)result); - result[length] = 0; - success = true; - break; - } - - CFRelease(data_ref); - CFRelease(string_ref); - CFRelease(flavor_data); - } - } - - CFRelease(flavor_type_array); + CFDataGetBytes(data_ref, range, reinterpret_cast<unsigned char *>(result)); + result[length] = 0; } - } - if (success) - break; + CFRelease(data_ref); + } } - CFRelease(pasteboard_ref); + CFRelease(flavor_type_array); } + CFRelease(pasteboard_ref); + return result; } diff --git a/src/osd/sdl/sdlptty_os2.c b/src/osd/sdl/sdlptty_os2.c index e7d76965238..6c31caf897f 100644 --- a/src/osd/sdl/sdlptty_os2.c +++ b/src/osd/sdl/sdlptty_os2.c @@ -35,5 +35,5 @@ file_error sdl_close_ptty(osd_file *file) file_error sdl_slave_name_ptty(osd_file *file) { - return FILERR_ACCESS_DENIED; + return FILERR_ACCESS_DENIED; } diff --git a/src/osd/sdl/sdlptty_unix.c b/src/osd/sdl/sdlptty_unix.c index 6b618314d72..abe4ba8db0b 100644 --- a/src/osd/sdl/sdlptty_unix.c +++ b/src/osd/sdl/sdlptty_unix.c @@ -40,91 +40,91 @@ const char *sdlfile_ptty_identifier = "/dev/pts"; file_error sdl_open_ptty(const char *path, UINT32 openflags, osd_file **file, UINT64 *filesize) { - int master; - int aslave; - struct termios tios; - int oldflags; - - memset(&tios , 0 , sizeof(tios)); - cfmakeraw(&tios); - - if (openpty(&master, &aslave, NULL, &tios, NULL) >= 0) - { - oldflags = fcntl(master, F_GETFL, 0); - if (oldflags == -1) { - close(master); - return FILERR_FAILURE; - } - - fcntl(master, F_SETFL, oldflags | O_NONBLOCK); - close(aslave); - (*file)->handle = master; - *filesize = 0; - } - else - { - return FILERR_ACCESS_DENIED; - } - - return FILERR_NONE; + int master; + int aslave; + struct termios tios; + int oldflags; + + memset(&tios , 0 , sizeof(tios)); + cfmakeraw(&tios); + + if (openpty(&master, &aslave, NULL, &tios, NULL) >= 0) + { + oldflags = fcntl(master, F_GETFL, 0); + if (oldflags == -1) { + close(master); + return FILERR_FAILURE; + } + + fcntl(master, F_SETFL, oldflags | O_NONBLOCK); + close(aslave); + (*file)->handle = master; + *filesize = 0; + } + else + { + return FILERR_ACCESS_DENIED; + } + + return FILERR_NONE; } file_error sdl_read_ptty(osd_file *file, void *buffer, UINT64 offset, UINT32 count, UINT32 *actual) { - ssize_t result; + ssize_t result; - result = read(file->handle, buffer, count); + result = read(file->handle, buffer, count); - if (result < 0) - { - return error_to_file_error(errno); - } + if (result < 0) + { + return error_to_file_error(errno); + } - if (actual != NULL ) - { - *actual = result; - } + if (actual != NULL ) + { + *actual = result; + } - return FILERR_NONE; + return FILERR_NONE; } file_error sdl_write_ptty(osd_file *file, const void *buffer, UINT64 offset, UINT32 count, UINT32 *actual) { - ssize_t result; - result = write(file->handle, buffer, count); + ssize_t result; + result = write(file->handle, buffer, count); - if (result < 0) - { - return error_to_file_error(errno); - } + if (result < 0) + { + return error_to_file_error(errno); + } - if (actual != NULL ) - { - *actual = result; - } + if (actual != NULL ) + { + *actual = result; + } - return FILERR_NONE; + return FILERR_NONE; } file_error sdl_close_ptty(osd_file *file) { - close(file->handle); - osd_free(file); + close(file->handle); + osd_free(file); - return FILERR_NONE; + return FILERR_NONE; } file_error sdl_slave_name_ptty(osd_file *file , char *name , size_t name_len) { - const char *slave_name = ptsname(file->handle); + const char *slave_name = ptsname(file->handle); - if (slave_name == NULL || strlen(slave_name) >= name_len) { - return FILERR_INVALID_ACCESS; - } + if (slave_name == NULL || strlen(slave_name) >= name_len) { + return FILERR_INVALID_ACCESS; + } - strcpy(name , slave_name); + strcpy(name , slave_name); - return FILERR_NONE; + return FILERR_NONE; } #else @@ -134,27 +134,27 @@ const char *sdlfile_ptty_identifier = ""; file_error sdl_open_ptty(const char *path, UINT32 openflags, osd_file **file, UINT64 *filesize) { - return FILERR_ACCESS_DENIED; + return FILERR_ACCESS_DENIED; } file_error sdl_read_ptty(osd_file *file, void *buffer, UINT64 offset, UINT32 count, UINT32 *actual) { - return FILERR_ACCESS_DENIED; + return FILERR_ACCESS_DENIED; } file_error sdl_write_ptty(osd_file *file, const void *buffer, UINT64 offset, UINT32 count, UINT32 *actual) { - return FILERR_ACCESS_DENIED; + return FILERR_ACCESS_DENIED; } file_error sdl_close_ptty(osd_file *file) { - return FILERR_ACCESS_DENIED; + return FILERR_ACCESS_DENIED; } file_error sdl_slave_name_ptty(osd_file *file) { - return FILERR_ACCESS_DENIED; + return FILERR_ACCESS_DENIED; } #endif diff --git a/src/osd/windows/input.c b/src/osd/windows/input.c index 6afca302c27..078fa665098 100644 --- a/src/osd/windows/input.c +++ b/src/osd/windows/input.c @@ -1826,13 +1826,13 @@ static device_info *rawinput_device_create(running_machine &machine, device_info { device_info *devinfo = NULL; TCHAR *tname = NULL; - INT name_length; + INT name_length = 0; - // determine the length of the device name, allocate it, and fetch it + // determine the length of the device name, allocate it, and fetch it if not nameless if ((*get_rawinput_device_info)(device->hDevice, RIDI_DEVICENAME, NULL, &name_length) != 0) goto error; - tname = global_alloc_array(TCHAR, name_length); - if ((*get_rawinput_device_info)(device->hDevice, RIDI_DEVICENAME, tname, &name_length) == -1) + tname = global_alloc_array_clear(TCHAR, name_length+1); + if (name_length > 1 && (*get_rawinput_device_info)(device->hDevice, RIDI_DEVICENAME, tname, &name_length) == -1) goto error; // if this is an RDP name, skip it diff --git a/src/osd/windows/window.c b/src/osd/windows/window.c index 3c25e8e9ca5..1b6b36b99dd 100644 --- a/src/osd/windows/window.c +++ b/src/osd/windows/window.c @@ -967,7 +967,7 @@ void winwindow_ui_pause_from_main_thread(running_machine &machine, int pause) } if (LOG_TEMP_PAUSE) - logerror("winwindow_ui_pause_from_main_thread(): %d --> %d\n", old_temp_pause, ui_temp_pause); + machine.logerror("winwindow_ui_pause_from_main_thread(): %d --> %d\n", old_temp_pause, ui_temp_pause); } @@ -1858,7 +1858,7 @@ void win_window_info::adjust_window_position_after_major_change() { win_physical_width = newrect.width(); win_physical_height = newrect.height(); - logerror("Physical width %d, height %d\n",win_physical_width,win_physical_height); + machine().logerror("Physical width %d, height %d\n",win_physical_width,win_physical_height); } } diff --git a/src/osd/windows/winfile.c b/src/osd/windows/winfile.c index 2ac5cddaee3..86ce65a0ef7 100644 --- a/src/osd/windows/winfile.c +++ b/src/osd/windows/winfile.c @@ -241,7 +241,7 @@ file_error osd_write(osd_file *file, const void *buffer, UINT64 offset, UINT32 l file_error osd_openpty(osd_file **file, char *name, size_t name_len) { - return FILERR_FAILURE; + return FILERR_FAILURE; } //============================================================ diff --git a/src/osd/windows/winmain.c b/src/osd/windows/winmain.c index a67617f6eaf..06f1cb677fe 100644 --- a/src/osd/windows/winmain.c +++ b/src/osd/windows/winmain.c @@ -497,7 +497,7 @@ static BOOL WINAPI control_handler(DWORD type) // output_oslog //============================================================ -static void output_oslog(running_machine &machine, const char *buffer) +static void output_oslog(const running_machine &machine, const char *buffer) { if (IsDebuggerPresent()) win_output_debug_string_utf8(buffer); diff --git a/src/tools/unidasm.c b/src/tools/unidasm.c index dfd185b1cb3..7a245886d6a 100644 --- a/src/tools/unidasm.c +++ b/src/tools/unidasm.c @@ -355,17 +355,6 @@ static const dasm_table_entry dasm_table[] = // { "z8000", _16be, 0, CPU_DISASSEMBLE_NAME(z8000) }, }; -void CLIB_DECL ATTR_PRINTF(1,2) logerror(const char *format, ...) -{ - /* silent logerrors are allowed in disassemblers */ -} - - -void CLIB_DECL ATTR_PRINTF(1,2) osd_printf_debug(const char *format, ...) -{ - /* silent osd_printf_debugs are allowed in disassemblers */ -} - static int parse_options(int argc, char *argv[], options *opts) { diff --git a/src/version.c b/src/version.c index 06c276e0ff8..3ed45cbfb40 100644 --- a/src/version.c +++ b/src/version.c @@ -8,7 +8,7 @@ ***************************************************************************/ -#define BARE_BUILD_VERSION "0.166" +#define BARE_BUILD_VERSION "0.167" extern const char bare_build_version[]; extern const char build_version[]; |